diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4c189d0be4a3..461167dfa42c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -447,10 +447,12 @@ static void ieee80211_enable_ps(struct ieee80211_local *local, | |||
447 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) | 447 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) |
448 | ieee80211_send_nullfunc(local, sdata, 1); | 448 | ieee80211_send_nullfunc(local, sdata, 1); |
449 | 449 | ||
450 | if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { | 450 | if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) && |
451 | conf->flags |= IEEE80211_CONF_PS; | 451 | (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) |
452 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); | 452 | return; |
453 | } | 453 | |
454 | conf->flags |= IEEE80211_CONF_PS; | ||
455 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); | ||
454 | } | 456 | } |
455 | } | 457 | } |
456 | 458 | ||
@@ -569,7 +571,8 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) | |||
569 | (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) | 571 | (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) |
570 | ieee80211_send_nullfunc(local, sdata, 1); | 572 | ieee80211_send_nullfunc(local, sdata, 1); |
571 | 573 | ||
572 | if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) || | 574 | if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) && |
575 | (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) || | ||
573 | (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { | 576 | (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) { |
574 | ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED; | 577 | ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED; |
575 | local->hw.conf.flags |= IEEE80211_CONF_PS; | 578 | local->hw.conf.flags |= IEEE80211_CONF_PS; |