From owner-svn-src-head@FreeBSD.ORG Thu Mar 20 05:08:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE11B96A; Thu, 20 Mar 2014 05:08:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9AF0CF44; Thu, 20 Mar 2014 05:08:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2K58VgP035356; Thu, 20 Mar 2014 05:08:31 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2K58V6g035355; Thu, 20 Mar 2014 05:08:31 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201403200508.s2K58V6g035355@svn.freebsd.org> From: Adrian Chadd Date: Thu, 20 Mar 2014 05:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263417 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 05:08:31 -0000 Author: adrian Date: Thu Mar 20 05:08:31 2014 New Revision: 263417 URL: http://svnweb.freebsd.org/changeset/base/263417 Log: Shuffle ah_powerMode to be in a sane spot for the given power operation. This way the state changes from sleep->awake before the registers are poked and from awake->sleep after the registers are poked. This way spurious warnings aren't printed by my (to be committed) debugging code. Tested: * AR5416, STA Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Thu Mar 20 04:47:34 2014 (r263416) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Thu Mar 20 05:08:31 2014 (r263417) @@ -140,20 +140,22 @@ ar5416SetPowerMode(struct ath_hal *ah, H modes[ah->ah_powerMode], modes[mode], setChip ? "set chip " : ""); switch (mode) { case HAL_PM_AWAKE: + ah->ah_powerMode = mode; status = ar5416SetPowerModeAwake(ah, setChip); break; case HAL_PM_FULL_SLEEP: ar5416SetPowerModeSleep(ah, setChip); + ah->ah_powerMode = mode; break; case HAL_PM_NETWORK_SLEEP: ar5416SetPowerModeNetworkSleep(ah, setChip); + ah->ah_powerMode = mode; break; default: HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode 0x%x\n", __func__, mode); return AH_FALSE; } - ah->ah_powerMode = mode; return status; }