diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-04-12 14:36:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-13 14:06:59 -0400 |
commit | 75600abf1991657580233570400009e85f861787 (patch) | |
tree | 46d0e49b9230d97f4901aa18af39194cfd26d17f /drivers/net/wireless | |
parent | 2db0d2ba97801fb57c91e99b9e22b2a24c32d3d7 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 2504ab005589..798ea57252b4 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1548,6 +1548,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1548 | struct ath_hw *ah = sc->sc_ah; | 1548 | struct ath_hw *ah = sc->sc_ah; |
1549 | struct ath_common *common = ath9k_hw_common(ah); | 1549 | struct ath_common *common = ath9k_hw_common(ah); |
1550 | struct ieee80211_conf *conf = &hw->conf; | 1550 | struct ieee80211_conf *conf = &hw->conf; |
1551 | bool reset_channel = false; | ||
1551 | 1552 | ||
1552 | ath9k_ps_wakeup(sc); | 1553 | ath9k_ps_wakeup(sc); |
1553 | mutex_lock(&sc->mutex); | 1554 | mutex_lock(&sc->mutex); |
@@ -1556,6 +1557,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1556 | sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE); | 1557 | sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE); |
1557 | if (sc->ps_idle) | 1558 | if (sc->ps_idle) |
1558 | ath_cancel_work(sc); | 1559 | ath_cancel_work(sc); |
1560 | else | ||
1561 | /* | ||
1562 | * The chip needs a reset to properly wake up from | ||
1563 | * full sleep | ||
1564 | */ | ||
1565 | reset_channel = ah->chip_fullsleep; | ||
1559 | } | 1566 | } |
1560 | 1567 | ||
1561 | /* | 1568 | /* |
@@ -1584,7 +1591,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1584 | } | 1591 | } |
1585 | } | 1592 | } |
1586 | 1593 | ||
1587 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { | 1594 | if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) { |
1588 | struct ieee80211_channel *curchan = hw->conf.channel; | 1595 | struct ieee80211_channel *curchan = hw->conf.channel; |
1589 | int pos = curchan->hw_value; | 1596 | int pos = curchan->hw_value; |
1590 | int old_pos = -1; | 1597 | int old_pos = -1; |