Commit 1a8dacfb authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Sasha Levin

mac80211: don't look at the PM bit of BAR frames

[ Upstream commit 769dc04d ]

When a peer sends a BAR frame with PM bit clear, we should
not modify its PM state as madated by the spec in
802.11-20012 10.2.1.2.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 61df07cc
...@@ -1418,12 +1418,16 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) ...@@ -1418,12 +1418,16 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
*/ */
if (!(sta->local->hw.flags & IEEE80211_HW_AP_LINK_PS) && if (!(sta->local->hw.flags & IEEE80211_HW_AP_LINK_PS) &&
!ieee80211_has_morefrags(hdr->frame_control) && !ieee80211_has_morefrags(hdr->frame_control) &&
!ieee80211_is_back_req(hdr->frame_control) &&
!(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) && !(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) &&
(rx->sdata->vif.type == NL80211_IFTYPE_AP || (rx->sdata->vif.type == NL80211_IFTYPE_AP ||
rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN) && rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN) &&
/* PM bit is only checked in frames where it isn't reserved, /*
* PM bit is only checked in frames where it isn't reserved,
* in AP mode it's reserved in non-bufferable management frames * in AP mode it's reserved in non-bufferable management frames
* (cf. IEEE 802.11-2012 8.2.4.1.7 Power Management field) * (cf. IEEE 802.11-2012 8.2.4.1.7 Power Management field)
* BAR frames should be ignored as specified in
* IEEE 802.11-2012 10.2.1.2.
*/ */
(!ieee80211_is_mgmt(hdr->frame_control) || (!ieee80211_is_mgmt(hdr->frame_control) ||
ieee80211_is_bufferable_mmpdu(hdr->frame_control))) { ieee80211_is_bufferable_mmpdu(hdr->frame_control))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment