From: Eliad Peller Date: Wed, 27 Jun 2012 11:18:22 +0000 (+0300) Subject: mac80211: flush queues before deauth/disassoc X-Git-Tag: firefly_0821_release~3680^2~2381^2~57^2~1^2~76 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f823981e288f83113bf1129ff2c94e2fd74a28dd;p=firefly-linux-kernel-4.4.55.git mac80211: flush queues before deauth/disassoc On deauth/disassoc we tear down all BA sessions. These DELBA packets are sent on the appropriate TID, while deauth/disassoc is always sent on VO. This sometimes ends with the DELBA being sent after the deauth was already sent. Fix it by flushing all the pending frames before sending deauth/disassoc. Signed-off-by: Eliad Peller Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e11cd0e033ef..c54388b3ebff 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1364,6 +1364,10 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, } mutex_unlock(&local->sta_mtx); + /* flush out any pending frame (e.g. DELBA) before deauth/disassoc */ + if (tx) + drv_flush(local, false); + /* deauthenticate/disassociate now */ if (tx || frame_buf) ieee80211_send_deauth_disassoc(sdata, bssid, stype, reason,