diff options
author | sam <sam@FreeBSD.org> | 2003-08-19 21:35:08 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-08-19 21:35:08 +0000 |
commit | 20ac20186c2199b495b903d5471182a95c607ab9 (patch) | |
tree | c2c4b23d0cd251fffc14b6886eca28a9c05647e9 | |
parent | 1da5f51c1800d7e6044c643b88237b5fafc7aebe (diff) | |
download | FreeBSD-src-20ac20186c2199b495b903d5471182a95c607ab9.zip FreeBSD-src-20ac20186c2199b495b903d5471182a95c607ab9.tar.gz |
o pass control frames up the stack when in monitor mode (the 802.11 layer will
quietly discard them; this just permits them to be collected with bpf)
o add a counter for the number of rate control frames discarded when not in
monitor mode
o move the rx "too short" statistic in the stat structure so non-error rx stats
are together (NB: ABI change to apps that collect stats via driver ioctl)
-rw-r--r-- | sys/dev/ath/if_ath.c | 7 | ||||
-rw-r--r-- | sys/dev/ath/if_athioctl.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index f9fa4cd..ba84f09 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 a8d60dc..dcae150 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 */ |