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)
This commit is contained in:
sam 2003-08-19 21:35:08 +00:00
parent 1da5f51c18
commit 20ac20186c
2 changed files with 7 additions and 3 deletions

View File

@ -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;
}

View File

@ -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 */