aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/rx.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 648a1d0e6c82..68a6e973c72c 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -741,17 +741,29 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
741 sta->last_qual = rx->status->qual; 741 sta->last_qual = rx->status->qual;
742 sta->last_noise = rx->status->noise; 742 sta->last_noise = rx->status->noise;
743 743
744 /*
745 * Change STA power saving mode only at the end of a frame
746 * exchange sequence.
747 */
744 if (!ieee80211_has_morefrags(hdr->frame_control) && 748 if (!ieee80211_has_morefrags(hdr->frame_control) &&
745 (rx->sdata->vif.type == NL80211_IFTYPE_AP || 749 (rx->sdata->vif.type == NL80211_IFTYPE_AP ||
746 rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) { 750 rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) {
747 /* Change STA power saving mode only in the end of a frame 751 if (test_sta_flags(sta, WLAN_STA_PS)) {
748 * exchange sequence */ 752 /*
749 if (test_sta_flags(sta, WLAN_STA_PS) && 753 * Ignore doze->wake transitions that are
750 !ieee80211_has_pm(hdr->frame_control)) 754 * indicated by non-data frames, the standard
751 rx->sent_ps_buffered += ap_sta_ps_end(sta); 755 * is unclear here, but for example going to
752 else if (!test_sta_flags(sta, WLAN_STA_PS) && 756 * PS mode and then scanning would cause a
753 ieee80211_has_pm(hdr->frame_control)) 757 * doze->wake transition for the probe request,
754 ap_sta_ps_start(sta); 758 * and that is clearly undesirable.
759 */
760 if (ieee80211_is_data(hdr->frame_control) &&
761 !ieee80211_has_pm(hdr->frame_control))
762 rx->sent_ps_buffered += ap_sta_ps_end(sta);
763 } else {
764 if (ieee80211_has_pm(hdr->frame_control))
765 ap_sta_ps_start(sta);
766 }
755 } 767 }
756 768
757 /* Drop data::nullfunc frames silently, since they are used only to 769 /* Drop data::nullfunc frames silently, since they are used only to