svn commit: r194758 - in projects/mesh11s/sys/dev/ath: . ath_hal ath_hal/ar5212

Rui Paulo rpaulo at FreeBSD.org
Tue Jun 23 20:17:24 UTC 2009


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",


More information about the svn-src-projects mailing list