Commit 3989279c authored by Gabor Juhos's avatar Gabor Juhos Committed by John W. Linville

ath9k: restore power mode on error path

The ath9k_ps_{wakeup,restore} calls must be in balance.

Changes-licensed-under: ISC
Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 624f0de4
...@@ -296,7 +296,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, ...@@ -296,7 +296,7 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
"reset status %d\n", "reset status %d\n",
channel->center_freq, r); channel->center_freq, r);
spin_unlock_bh(&sc->sc_resetlock); spin_unlock_bh(&sc->sc_resetlock);
return r; goto ps_restore;
} }
spin_unlock_bh(&sc->sc_resetlock); spin_unlock_bh(&sc->sc_resetlock);
...@@ -305,14 +305,17 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, ...@@ -305,14 +305,17 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
if (ath_startrecv(sc) != 0) { if (ath_startrecv(sc) != 0) {
DPRINTF(sc, ATH_DBG_FATAL, DPRINTF(sc, ATH_DBG_FATAL,
"Unable to restart recv logic\n"); "Unable to restart recv logic\n");
return -EIO; r = -EIO;
goto ps_restore;
} }
ath_cache_conf_rate(sc, &hw->conf); ath_cache_conf_rate(sc, &hw->conf);
ath_update_txpow(sc); ath_update_txpow(sc);
ath9k_hw_set_interrupts(ah, sc->imask); ath9k_hw_set_interrupts(ah, sc->imask);
ps_restore:
ath9k_ps_restore(sc); ath9k_ps_restore(sc);
return 0; return r;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment