9f1a43df32f54822d6216fe097ec51fe68814f89
[openwrt.git] / package / mac80211 / patches / 567-ath9k_add_idle_hack.patch
1 --- a/drivers/net/wireless/ath/ath9k/main.c
2 +++ b/drivers/net/wireless/ath/ath9k/main.c
3 @@ -1044,6 +1044,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 @@ -1096,7 +1097,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);