999a7eea50a61aef77ce57e788a2614a6480a4cf
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 562-ath9k_add_idle_hack.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -1055,6 +1055,7 @@ static void ath9k_remove_interface(struc
4 ath9k_calculate_summary_state(hw, NULL);
5
6 mutex_unlock(&sc->mutex);
7 + ath9k_config(hw, IEEE80211_CONF_CHANGE_IDLE);
8 ath9k_ps_restore(sc);
9 }
10
11 @@ -1107,7 +1108,8 @@ int ath9k_config(struct ieee80211_hw *hw
12 mutex_lock(&sc->mutex);
13
14 if (changed & IEEE80211_CONF_CHANGE_IDLE) {
15 - sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
16 + sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE) &&
17 + !sc->nvifs;
18 if (sc->ps_idle) {
19 ath_cancel_work(sc);
20 ath9k_stop_btcoex(sc);