diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index f9fa4cdf4126..ba84f09a966a 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -1455,7 +1455,8 @@ ath_rx_proc(void *arg, int npending) { struct ath_softc *sc = arg; struct ath_buf *bf; - struct ifnet *ifp = &sc->sc_ic.ic_if; + struct ieee80211com *ic = &sc->sc_ic; + struct ifnet *ifp = &ic->ic_if; struct ath_hal *ah = sc->sc_ah; struct ath_desc *ds; struct mbuf *m; @@ -1512,11 +1513,13 @@ ath_rx_proc(void *arg, int npending) wh = mtod(m, struct ieee80211_frame *); if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_CTL) { + IEEE80211_FC0_TYPE_CTL && + ic->ic_opmode != IEEE80211_M_MONITOR) { /* * Ignore control frame received in promisc mode. */ DPRINTF(("ath_rx_proc: control frame\n")); + sc->sc_stats.ast_rx_ctl++; goto rx_next; } diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h index a8d60dcde9c3..dcae150da12e 100644 --- a/sys/dev/ath/if_athioctl.h +++ b/sys/dev/ath/if_athioctl.h @@ -73,12 +73,13 @@ struct ath_stats { u_int32_t ast_rx_nombuf; /* rx setup failed 'cuz no mbuf */ u_int32_t ast_rx_busdma; /* rx setup failed for dma resrcs */ u_int32_t ast_rx_orn; /* rx failed 'cuz of desc overrun */ - u_int32_t ast_rx_tooshort;/* rx failed 'cuz frame too short */ u_int32_t ast_rx_crcerr; /* rx failed 'cuz of bad CRC */ u_int32_t ast_rx_fifoerr; /* rx failed 'cuz of FIFO overrun */ u_int32_t ast_rx_badcrypt;/* rx failed 'cuz decryption */ u_int32_t ast_rx_phyerr; /* rx failed 'cuz of PHY err */ u_int32_t ast_rx_phy[32]; /* rx PHY error per-code counts */ + u_int32_t ast_rx_tooshort;/* rx discarded 'cuz frame too short */ + u_int32_t ast_rx_ctl; /* rx discarded 'cuz ctl frame */ u_int32_t ast_be_nombuf; /* beacon setup failed 'cuz no mbuf */ u_int32_t ast_per_cal; /* periodic calibration calls */ u_int32_t ast_per_calfail;/* periodic calibration failed */