From patchwork Thu Jan 27 13:09:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 512151 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0RDAaW2022788 for ; Thu, 27 Jan 2011 13:11:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752999Ab1A0NKq (ORCPT ); Thu, 27 Jan 2011 08:10:46 -0500 Received: from mail.atheros.com ([12.19.149.2]:15307 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295Ab1A0NKh (ORCPT ); Thu, 27 Jan 2011 08:10:37 -0500 Received: from mail.atheros.com ([10.10.20.108]) by sidewinder.atheros.com for ; Thu, 27 Jan 2011 05:10:18 -0800 Received: from mail.atheros.com (10.12.4.12) by SC1EXHC-02.global.atheros.com (10.10.20.111) with Microsoft SMTP Server (TLS) id 8.2.213.0; Thu, 27 Jan 2011 05:10:35 -0800 Received: by mail.atheros.com (sSMTP sendmail emulation); Thu, 27 Jan 2011 18:39:47 +0530 From: Rajkumar Manoharan To: CC: , Rajkumar Manoharan , , Paul Stewart Subject: [PATCH v2 2/2] ath9k: Fix power save usage count imbalance on deinit Date: Thu, 27 Jan 2011 18:39:38 +0530 Message-ID: <1296133778-3150-2-git-send-email-rmanoharan@atheros.com> X-Mailer: git-send-email 1.7.3.5 In-Reply-To: <1296133778-3150-1-git-send-email-rmanoharan@atheros.com> References: <1296133778-3150-1-git-send-email-rmanoharan@atheros.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 27 Jan 2011 13:11:09 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 5279653..4538e6d 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -830,6 +830,8 @@ void ath9k_deinit_device(struct ath_softc *sc) wiphy_rfkill_stop_polling(sc->hw->wiphy); ath_deinit_leds(sc); + ath9k_ps_restore(sc); + for (i = 0; i < sc->num_sec_wiphy; i++) { struct ath_wiphy *aphy = sc->sec_wiphy[i]; if (aphy == NULL) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index facff10..65ad862 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -977,8 +977,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw) spin_unlock_bh(&sc->sc_pcu_lock); ath9k_ps_restore(sc); - - ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP); } int ath_reset(struct ath_softc *sc, bool retry_tx)