Commit d305a655 authored by Nikolay Martynov's avatar Nikolay Martynov Committed by John W. Linville
Browse files

mac80211: fix race condition caused by late addBA response

If addBA responses comes in just after addba_resp_timer has
expired mac80211 will still accept it and try to open the
aggregation session. This causes drivers to be confused and
in some cases even crash.

This patch fixes the race condition and makes sure that if
addba_resp_timer has expired addBA response is not longer
accepted and we do not try to open half-closed session.

Signed-off-by: default avatarNikolay Martynov <>
[some adjustments]
Signed-off-by: default avatarJohannes Berg <>
Signed-off-by: default avatarJohn W. Linville <>
parent a7322812
......@@ -762,11 +762,27 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
goto out;
printk(KERN_DEBUG "switched off addBA timer for tid %d\n", tid);
* addba_resp_timer may have fired before we got here, and
* caused WANT_STOP to be set. If the stop then was already
* processed further, STOPPING might be set.
if (test_bit(HT_AGG_STATE_WANT_STOP, &tid_tx->state) ||
test_bit(HT_AGG_STATE_STOPPING, &tid_tx->state)) {
"got addBA resp for tid %d but we already gave up\n",
goto out;
* IEEE 802.11-2007
* In an ADDBA Response frame, when the Status Code field
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