Date: Tue, 4 Mar 2008 17:53:10 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 136834 for review Message-ID: <200803041753.m24HrAUm027662@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=136834 Change 136834 by sam@sam_ebb on 2008/03/04 17:52:33 unbreak PHYERR frame handling for older parts Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#39 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#39 (text+ko) ==== @@ -2443,6 +2443,11 @@ * operating mode and state: * * o always accept unicast, broadcast, and multicast traffic + * o accept PHY error frames when hardware doesn't have MIB support + * to count and we need them for ANI (sta mode only at the moment) + * and we are not scanning (ANI is disabled) + * NB: only with recent hal's; older hal's add rx filter bits out + * of sight and we need to blindly preserve them * o probe request frames are accepted only when operating in * hostap, adhoc, or monitor modes * o enable promiscuous mode according to the interface state @@ -2455,9 +2460,6 @@ * - when doing s/w beacon miss (e.g. for ap+sta) * o accept control frames: * - when in monitor mode - * o accept PHY error frames when hardware doesn't have MIB support - * to count and we need them for ANI (sta mode only at the moment) - * and we are not scanning (ANI is disabled) * XXX BAR frames for 11n */ static u_int32_t @@ -2467,7 +2469,16 @@ struct ifnet *ifp = sc->sc_ifp; u_int32_t rfilt; +#if HAL_ABI_VERSION < 0x08011600 + rfilt = (ath_hal_getrxfilter(sc->sc_ah) & + (HAL_RX_FILTER_PHYRADAR | HAL_RX_FILTER_PHYERR)) + | HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; +#else rfilt = HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; + if (ic->ic_opmode == IEEE80211_M_STA && + !sc->sc_needmib && !sc->sc_scanning) + rfilt |= HAL_RX_FILTER_PHYERR; +#endif if (ic->ic_opmode != IEEE80211_M_STA) rfilt |= HAL_RX_FILTER_PROBEREQ; if (ic->ic_opmode != IEEE80211_M_HOSTAP && @@ -2479,9 +2490,6 @@ rfilt |= HAL_RX_FILTER_BEACON; if (ic->ic_opmode == IEEE80211_M_MONITOR) rfilt |= HAL_RX_FILTER_CONTROL; - if (ic->ic_opmode == IEEE80211_M_STA && - !sc->sc_needmib && !sc->sc_scanning) - rfilt |= HAL_RX_FILTER_PHYERR; return rfilt; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803041753.m24HrAUm027662>