From patchwork Mon Mar 28 20:57:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Rodriguez X-Patchwork-Id: 669992 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 p2SKvf8l016104 for ; Mon, 28 Mar 2011 20:57:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754822Ab1C1U5h (ORCPT ); Mon, 28 Mar 2011 16:57:37 -0400 Received: from mail.atheros.com ([12.19.149.2]:26433 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754789Ab1C1U5g (ORCPT ); Mon, 28 Mar 2011 16:57:36 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Mon, 28 Mar 2011 13:57:12 -0700 Received: from tux (10.10.10.239) by SC1EXHC-01.global.atheros.com (10.10.20.106) with Microsoft SMTP Server (TLS) id 8.2.213.0; Mon, 28 Mar 2011 13:57:35 -0700 Received: by tux (sSMTP sendmail emulation); Mon, 28 Mar 2011 13:57:33 -0700 From: "Luis R. Rodriguez" To: CC: , "Luis R. Rodriguez" , , Paul Stewart , Amod Bodas , "John W. Linville" Subject: [PATCH 4/9] ath9k: Fix power save count imbalance on ath_radio_enable() Date: Mon, 28 Mar 2011 13:57:10 -0700 Message-ID: <1301345835-11401-5-git-send-email-lrodriguez@atheros.com> X-Mailer: git-send-email 1.7.4.15.g7811d In-Reply-To: <1301345835-11401-1-git-send-email-lrodriguez@atheros.com> References: <1301345835-11401-1-git-send-email-lrodriguez@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]); Mon, 28 Mar 2011 20:57:42 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5a5f59f..20cdf3d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -898,8 +898,7 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw) if (ath_startrecv(sc) != 0) { ath_print(common, ATH_DBG_FATAL, "Unable to restart recv logic\n"); - spin_unlock_bh(&sc->sc_pcu_lock); - return; + goto out; } if (sc->sc_flags & SC_OP_BEACONS) ath_beacon_config(sc, NULL); /* restart beacons */ @@ -913,6 +912,7 @@ void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw) ath9k_hw_set_gpio(ah, ah->led_pin, 0); ieee80211_wake_queues(hw); +out: spin_unlock_bh(&sc->sc_pcu_lock); ath9k_ps_restore(sc);