aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-06-15 11:49:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-06-15 15:05:58 -0400
commit3989279ccc838c7357c75af6090f56f5cb555158 (patch)
tree6d87843d328e5025e697ebc412f43ac4ee736096 /drivers/net/wireless
parent624f0de44afa9fbb4ec8396f88d8d54b96a57a7e (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')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c9
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 91c00486b2ac..9f49a3251d4d 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,
296 "reset status %d\n", 296 "reset status %d\n",
297 channel->center_freq, r); 297 channel->center_freq, r);
298 spin_unlock_bh(&sc->sc_resetlock); 298 spin_unlock_bh(&sc->sc_resetlock);
299 return r; 299 goto ps_restore;
300 } 300 }
301 spin_unlock_bh(&sc->sc_resetlock); 301 spin_unlock_bh(&sc->sc_resetlock);
302 302
@@ -305,14 +305,17 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
305 if (ath_startrecv(sc) != 0) { 305 if (ath_startrecv(sc) != 0) {
306 DPRINTF(sc, ATH_DBG_FATAL, 306 DPRINTF(sc, ATH_DBG_FATAL,
307 "Unable to restart recv logic\n"); 307 "Unable to restart recv logic\n");
308 return -EIO; 308 r = -EIO;
309 goto ps_restore;
309 } 310 }
310 311
311 ath_cache_conf_rate(sc, &hw->conf); 312 ath_cache_conf_rate(sc, &hw->conf);
312 ath_update_txpow(sc); 313 ath_update_txpow(sc);
313 ath9k_hw_set_interrupts(ah, sc->imask); 314 ath9k_hw_set_interrupts(ah, sc->imask);
315
316 ps_restore:
314 ath9k_ps_restore(sc); 317 ath9k_ps_restore(sc);
315 return 0; 318 return r;
316} 319}
317 320
318/* 321/*