From owner-p4-projects@FreeBSD.ORG Tue Mar 4 17:53:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 856761065744; Tue, 4 Mar 2008 17:53:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4542D1065741 for ; Tue, 4 Mar 2008 17:53:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 375928FC23 for ; Tue, 4 Mar 2008 17:53:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m24HrAdv027664 for ; Tue, 4 Mar 2008 17:53:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m24HrAUm027662 for perforce@freebsd.org; Tue, 4 Mar 2008 17:53:10 GMT (envelope-from sam@freebsd.org) Date: Tue, 4 Mar 2008 17:53:10 GMT Message-Id: <200803041753.m24HrAUm027662@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 136834 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 17:53:10 -0000 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; }