From owner-svn-src-projects@FreeBSD.ORG Tue Jun 23 20:17:24 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB21D106564A; Tue, 23 Jun 2009 20:17:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 991AB8FC12; Tue, 23 Jun 2009 20:17:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5NKHOdr088771; Tue, 23 Jun 2009 20:17:24 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5NKHOkW088767; Tue, 23 Jun 2009 20:17:24 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200906232017.n5NKHOkW088767@svn.freebsd.org> From: Rui Paulo Date: Tue, 23 Jun 2009 20:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194758 - in projects/mesh11s/sys/dev/ath: . ath_hal ath_hal/ar5212 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2009 20:17:24 -0000 Author: rpaulo Date: Tue Jun 23 20:17:24 2009 New Revision: 194758 URL: http://svn.freebsd.org/changeset/base/194758 Log: Introduce a new bit to to filter bssid. Needed by MBSS. Sponsored by: The FreeBSD Foundation Modified: projects/mesh11s/sys/dev/ath/ath_hal/ah.h projects/mesh11s/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c projects/mesh11s/sys/dev/ath/if_ath.c Modified: projects/mesh11s/sys/dev/ath/ath_hal/ah.h ============================================================================== --- projects/mesh11s/sys/dev/ath/ath_hal/ah.h Tue Jun 23 19:33:13 2009 (r194757) +++ projects/mesh11s/sys/dev/ath/ath_hal/ah.h Tue Jun 23 20:17:24 2009 (r194758) @@ -296,6 +296,7 @@ typedef enum { HAL_RX_FILTER_PHYERR = 0x00000100, /* Allow phy errors */ HAL_RX_FILTER_PHYRADAR = 0x00000200, /* Allow phy radar errors */ HAL_RX_FILTER_COMPBAR = 0x00000400, /* Allow compressed BAR */ + HAL_RX_FILTER_BSSID = 0x00000800, /* Force BSSID match */ } HAL_RX_FILTER; typedef enum { Modified: projects/mesh11s/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- projects/mesh11s/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jun 23 19:33:13 2009 (r194757) +++ projects/mesh11s/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jun 23 20:17:24 2009 (r194758) @@ -173,9 +173,11 @@ void ar5212SetRxFilter(struct ath_hal *ah, uint32_t bits) { uint32_t phybits; + uint32_t miscbits; OS_REG_WRITE(ah, AR_RX_FILTER, - bits &~ (HAL_RX_FILTER_PHYRADAR|HAL_RX_FILTER_PHYERR)); + bits &~ (HAL_RX_FILTER_PHYRADAR|HAL_RX_FILTER_PHYERR| + HAL_RX_FILTER_BSSID)); phybits = 0; if (bits & HAL_RX_FILTER_PHYRADAR) phybits |= AR_PHY_ERR_RADAR; @@ -189,6 +191,12 @@ ar5212SetRxFilter(struct ath_hal *ah, ui OS_REG_WRITE(ah, AR_RXCFG, OS_REG_READ(ah, AR_RXCFG) &~ AR_RXCFG_ZLFDMA); } + miscbits = OS_REG_READ(ah, AR_MISC_MODE); + if (bits & HAL_RX_FILTER_BSSID) + miscbits |= AR_MISC_MODE_BSSID_MATCH_FORCE; + else + miscbits &= ~AR_MISC_MODE_BSSID_MATCH_FORCE; + OS_REG_WRITE(ah, AR_MISC_MODE, miscbits); } /* Modified: projects/mesh11s/sys/dev/ath/if_ath.c ============================================================================== --- projects/mesh11s/sys/dev/ath/if_ath.c Tue Jun 23 19:33:13 2009 (r194757) +++ projects/mesh11s/sys/dev/ath/if_ath.c Tue Jun 23 20:17:24 2009 (r194758) @@ -2380,7 +2380,7 @@ ath_calcrxfilter(struct ath_softc *sc) IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) rfilt |= HAL_RX_FILTER_BEACON; if (ic->ic_opmode == IEEE80211_M_MBSS) - rfilt |= HAL_RX_FILTER_PROM | HAL_RX_FILTER_BEACON; + rfilt |= HAL_RX_FILTER_BEACON | HAL_RX_FILTER_BSSID; if (ic->ic_opmode == IEEE80211_M_MONITOR) rfilt |= HAL_RX_FILTER_CONTROL; DPRINTF(sc, ATH_DEBUG_MODE, "%s: RX filter 0x%x, %s if_flags 0x%x\n",