diff options
author | sam <sam@FreeBSD.org> | 2003-09-15 19:41:54 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-09-15 19:41:54 +0000 |
commit | 75f710a159ca531dfa034320c03d3e2eafeb59fd (patch) | |
tree | fda7f711eb1d9b74d9e01d4224bec0895727f270 /sys | |
parent | 53c5407126864e94d8e494a2faa1b87bd3befeec (diff) | |
download | FreeBSD-src-75f710a159ca531dfa034320c03d3e2eafeb59fd.zip FreeBSD-src-75f710a159ca531dfa034320c03d3e2eafeb59fd.tar.gz |
o do not filter received frames based on type or length; pass 'em all up
to the 802.11 layer if they are at least IEEE80211_MIN_LEN
o mask off interrupt status bits that we don't care about so we don't do
the wrong thing; this fixes a problem where the beacon miss interrupt status
bit is delivered together with other status bits when operating in monitor
mode (we would post a beacon miss swi and then do the wrong thing)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ath/if_ath.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 17760e1..aab78c0 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -403,6 +403,7 @@ ath_intr(void *arg) ath_hal_dumpstate(ah); } #endif /* AR_DEBUG */ + status &= sc->sc_imask; /* discard unasked for bits */ if (status & HAL_INT_FATAL) { sc->sc_stats.ast_hardware++; ath_hal_intrset(ah, 0); /* disable intr's until reset */ @@ -1519,7 +1520,7 @@ ath_rx_proc(void *arg, int npending) } len = ds->ds_rxstat.rs_datalen; - if (len < sizeof(struct ieee80211_frame)) { + if (len < IEEE80211_MIN_LEN) { DPRINTF(("ath_rx_proc: short packet %d\n", len)); sc->sc_stats.ast_rx_tooshort++; goto rx_next; @@ -1528,18 +1529,6 @@ ath_rx_proc(void *arg, int npending) bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); - wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_CTL && - ic->ic_opmode != IEEE80211_M_MONITOR) { - /* - * Discard control frame when not in monitor mode. - */ - DPRINTF(("ath_rx_proc: control frame\n")); - sc->sc_stats.ast_rx_ctl++; - goto rx_next; - } - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); bf->bf_m = NULL; m->m_pkthdr.rcvif = ifp; @@ -1570,6 +1559,7 @@ ath_rx_proc(void *arg, int npending) } m_adj(m, -IEEE80211_CRC_LEN); + wh = mtod(m, struct ieee80211_frame *); if (wh->i_fc[1] & IEEE80211_FC1_WEP) { /* * WEP is decrypted by hardware. Clear WEP bit |