|
@@ -434,8 +434,11 @@ static void ieee80211_enable_ps(struct ieee80211_local *local,
|
|
|
} else {
|
|
|
if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
|
|
|
ieee80211_send_nullfunc(local, sdata, 1);
|
|
|
- conf->flags |= IEEE80211_CONF_PS;
|
|
|
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
|
|
|
+
|
|
|
+ if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) {
|
|
|
+ conf->flags |= IEEE80211_CONF_PS;
|
|
|
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -541,6 +544,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
|
|
|
container_of(work, struct ieee80211_local,
|
|
|
dynamic_ps_enable_work);
|
|
|
struct ieee80211_sub_if_data *sdata = local->ps_sdata;
|
|
|
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
|
|
|
|
|
|
/* can only happen when PS was just disabled anyway */
|
|
|
if (!sdata)
|
|
@@ -549,11 +553,16 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
|
|
|
if (local->hw.conf.flags & IEEE80211_CONF_PS)
|
|
|
return;
|
|
|
|
|
|
- if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
|
|
|
+ if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
|
|
|
+ (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)))
|
|
|
ieee80211_send_nullfunc(local, sdata, 1);
|
|
|
|
|
|
- local->hw.conf.flags |= IEEE80211_CONF_PS;
|
|
|
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
|
|
|
+ if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) ||
|
|
|
+ (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) {
|
|
|
+ ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
|
|
|
+ local->hw.conf.flags |= IEEE80211_CONF_PS;
|
|
|
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void ieee80211_dynamic_ps_timer(unsigned long data)
|
|
@@ -1892,6 +1901,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
|
|
|
return -ENOMEM;
|
|
|
|
|
|
ifmgd->flags &= ~IEEE80211_STA_DISABLE_11N;
|
|
|
+ ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
|
|
|
|
|
|
for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
|
|
|
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
|