From owner-svn-src-head@FreeBSD.ORG Wed Apr 30 02:03:47 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 ACE03B10; Wed, 30 Apr 2014 02:03:47 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 996F715AC; Wed, 30 Apr 2014 02:03:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3U23li5063637; Wed, 30 Apr 2014 02:03:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3U23liL063635; Wed, 30 Apr 2014 02:03:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201404300203.s3U23liL063635@svn.freebsd.org> From: Adrian Chadd Date: Wed, 30 Apr 2014 02:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265113 - head/sys/contrib/dev/ath/ath_hal/ar9300 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: Wed, 30 Apr 2014 02:03:47 -0000 Author: adrian Date: Wed Apr 30 02:03:47 2014 New Revision: 265113 URL: http://svnweb.freebsd.org/changeset/base/265113 Log: Only track the power state variable if the power state is changed, not if the self-generated frame state is changed. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Wed Apr 30 02:03:13 2014 (r265112) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Wed Apr 30 02:03:47 2014 (r265113) @@ -669,7 +669,8 @@ ar9300_set_power_mode(struct ath_hal *ah switch (mode) { case HAL_PM_AWAKE: - ah->ah_powerMode = mode; + if (set_chip) + ah->ah_powerMode = mode; status = ar9300_set_power_mode_awake(ah, set_chip); #if ATH_SUPPORT_MCI if (AH_PRIVATE(ah)->ah_caps.halMciSupport) { @@ -699,8 +700,10 @@ ar9300_set_power_mode(struct ath_hal *ah } #endif ar9300_set_power_mode_sleep(ah, set_chip); - ahp->ah_chip_full_sleep = AH_TRUE; - ah->ah_powerMode = mode; + if (set_chip) { + ahp->ah_chip_full_sleep = AH_TRUE; + ah->ah_powerMode = mode; + } break; case HAL_PM_NETWORK_SLEEP: #if ATH_SUPPORT_MCI @@ -709,7 +712,9 @@ ar9300_set_power_mode(struct ath_hal *ah } #endif ar9300_set_power_mode_network_sleep(ah, set_chip); - ah->ah_powerMode = mode; + if (set_chip) { + ah->ah_powerMode = mode; + } break; default: HALDEBUG(ah, HAL_DEBUG_POWER_MGMT,