10fac17bd1ce58302f4c0d3ad8ba117f2730733f
[openwrt.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 @@ -1087,6 +1087,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 @@ -1139,7 +1140,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);