From owner-svn-src-all@FreeBSD.ORG Tue Jul 21 19:23:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1F7106566B; Tue, 21 Jul 2009 19:23:35 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB818FC12; Tue, 21 Jul 2009 19:23:35 +0000 (UTC) (envelope-from sam@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 n6LJNZmV019833; Tue, 21 Jul 2009 19:23:35 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6LJNZe7019831; Tue, 21 Jul 2009 19:23:35 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907211923.n6LJNZe7019831@svn.freebsd.org> From: Sam Leffler Date: Tue, 21 Jul 2009 19:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195809 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2009 19:23:35 -0000 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); } }