diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-06-15 17:49:09 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-15 15:05:58 -0400 |
commit | 3989279ccc838c7357c75af6090f56f5cb555158 (patch) | |
tree | 6d87843d328e5025e697ebc412f43ac4ee736096 /drivers/net/wireless/ath | |
parent | 624f0de44afa9fbb4ec8396f88d8d54b96a57a7e (diff) |
ath9k: restore power mode on error path
The ath9k_ps_{wakeup,restore} calls must be in balance.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 91c00486b2a..9f49a3251d4 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -296,7 +296,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, "reset status %d\n", channel->center_freq, r); spin_unlock_bh(&sc->sc_resetlock); - return r; + goto ps_restore; } spin_unlock_bh(&sc->sc_resetlock); @@ -305,14 +305,17 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, if (ath_startrecv(sc) != 0) { DPRINTF(sc, ATH_DBG_FATAL, "Unable to restart recv logic\n"); - return -EIO; + r = -EIO; + goto ps_restore; } ath_cache_conf_rate(sc, &hw->conf); ath_update_txpow(sc); ath9k_hw_set_interrupts(ah, sc->imask); + + ps_restore: ath9k_ps_restore(sc); - return 0; + return r; } /* |