Skip to content

Commit

Permalink
mac80211: close the SP when we enqueue frames during the SP
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
[remove erroneous comment]
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
egrumbach authored and jmberg-intel committed Apr 5, 2016
1 parent 4b559ec commit f6d4671
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,12 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
reset_agg_timer = true;
} else {
queued = true;
if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER) {
clear_sta_flag(tx->sta, WLAN_STA_SP);
ps_dbg(tx->sta->sdata,
"STA %pM aid %d: SP frame queued, close the SP w/o telling the peer\n",
tx->sta->sta.addr, tx->sta->sta.aid);
}
info->control.vif = &tx->sdata->vif;
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS;
Expand Down

0 comments on commit f6d4671

Please sign in to comment.