Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2009 19:23:35 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195809 - head/sys/dev/ath/ath_hal/ar5212
Message-ID:  <200907211923.n6LJNZe7019831@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Tue Jul 21 19:23:34 2009
New Revision: 195809
URL: http://svn.freebsd.org/changeset/base/195809

Log:
  Fix handling of AR_RX_FILTER_BSSID: write the shadow value for AR_MISC_MODE
  so other register writes preserve the setting of AR_MISC_MODE_BSSID_MATCH_FORCE.
  
  Reviewed by:	rpaulo
  Approved by:	re (kib)

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c	Tue Jul 21 19:06:39 2009	(r195808)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c	Tue Jul 21 19:23:34 2009	(r195809)
@@ -164,7 +164,7 @@ ar5212GetRxFilter(struct ath_hal *ah)
 	if (phybits & (AR_PHY_ERR_OFDM_TIMING|AR_PHY_ERR_CCK_TIMING))
 		bits |= HAL_RX_FILTER_PHYERR;
 	if (AH_PRIVATE(ah)->ah_caps.halBssidMatchSupport &&
-	    (OS_REG_READ(ah, AR_MISC_MODE) & AR_MISC_MODE_BSSID_MATCH_FORCE))
+	    (AH5212(ah)->ah_miscMode & AR_MISC_MODE_BSSID_MATCH_FORCE))
 		bits |= HAL_RX_FILTER_BSSID;
 	return bits;
 }
@@ -175,6 +175,7 @@ ar5212GetRxFilter(struct ath_hal *ah)
 void
 ar5212SetRxFilter(struct ath_hal *ah, uint32_t bits)
 {
+	struct ath_hal_5212 *ahp = AH5212(ah);
 	uint32_t phybits;
 
 	OS_REG_WRITE(ah, AR_RX_FILTER,
@@ -194,12 +195,11 @@ ar5212SetRxFilter(struct ath_hal *ah, ui
 			OS_REG_READ(ah, AR_RXCFG) &~ AR_RXCFG_ZLFDMA);
 	}
 	if (AH_PRIVATE(ah)->ah_caps.halBssidMatchSupport) {
-		uint32_t miscbits = OS_REG_READ(ah, AR_MISC_MODE);
 		if (bits & HAL_RX_FILTER_BSSID)
-			miscbits |= AR_MISC_MODE_BSSID_MATCH_FORCE;
+			ahp->ah_miscMode |= AR_MISC_MODE_BSSID_MATCH_FORCE;
 		else
-			miscbits &= ~AR_MISC_MODE_BSSID_MATCH_FORCE;
-		OS_REG_WRITE(ah, AR_MISC_MODE, miscbits);
+			ahp->ah_miscMode &= ~AR_MISC_MODE_BSSID_MATCH_FORCE;
+		OS_REG_WRITE(ah, AR_MISC_MODE, ahp->ah_miscMode);
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907211923.n6LJNZe7019831>