Skip to content

Commit f6d4671

Browse files
egrumbachjmberg-intel
authored andcommitted
mac80211: close the SP when we enqueue frames during the SP
Since we enqueued the frame that was supposed to be sent during the SP, and that frame may very well cary the IEEE80211_TX_STATUS_EOSP bit, we may never close the SP (WLAN_STA_SP will never be cleared). If that happens, we will not open any new SP and will never respond to any poll frame from the client. Clear WLAN_STA_SP manually if a frame that was polled during the SP is queued because of a starting A-MPDU session. The client may not see the EOSP bit, but it will at least be able to poll new frames in another SP. Reported-by: Alesya Shapira <alesya.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> [remove erroneous comment] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 4b559ec commit f6d4671

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

net/mac80211/tx.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,12 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
11161116
reset_agg_timer = true;
11171117
} else {
11181118
queued = true;
1119+
if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) {
1120+
clear_sta_flag(tx->sta, WLAN_STA_SP);
1121+
ps_dbg(tx->sta->sdata,
1122+
"STA %pM aid %d: SP frame queued, close the SP w/o telling the peer\n",
1123+
tx->sta->sta.addr, tx->sta->sta.aid);
1124+
}
11191125
info->control.vif = &tx->sdata->vif;
11201126
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
11211127
info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS;

0 commit comments

Comments
 (0)