ath9k: wake up the hardware from full sleep when idle is turned off
The hardware needs a reset to recover from full sleep. Issue this reset directly in the ath9k_config call that turns off idle, otherwise tx remains dead until the first channel change after the idle state change Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
2db0d2ba97
commit
75600abf19
1 changed files with 8 additions and 1 deletions
|
@ -1548,6 +1548,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
|
||||||
struct ath_hw *ah = sc->sc_ah;
|
struct ath_hw *ah = sc->sc_ah;
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
struct ieee80211_conf *conf = &hw->conf;
|
struct ieee80211_conf *conf = &hw->conf;
|
||||||
|
bool reset_channel = false;
|
||||||
|
|
||||||
ath9k_ps_wakeup(sc);
|
ath9k_ps_wakeup(sc);
|
||||||
mutex_lock(&sc->mutex);
|
mutex_lock(&sc->mutex);
|
||||||
|
@ -1556,6 +1557,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
|
||||||
sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
|
sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
|
||||||
if (sc->ps_idle)
|
if (sc->ps_idle)
|
||||||
ath_cancel_work(sc);
|
ath_cancel_work(sc);
|
||||||
|
else
|
||||||
|
/*
|
||||||
|
* The chip needs a reset to properly wake up from
|
||||||
|
* full sleep
|
||||||
|
*/
|
||||||
|
reset_channel = ah->chip_fullsleep;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1584,7 +1591,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
|
||||||
struct ieee80211_channel *curchan = hw->conf.channel;
|
struct ieee80211_channel *curchan = hw->conf.channel;
|
||||||
int pos = curchan->hw_value;
|
int pos = curchan->hw_value;
|
||||||
int old_pos = -1;
|
int old_pos = -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue