]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: mac80211: rework the Tx of the deauth in ieee80211_set_disassoc()
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 5 Feb 2025 09:39:27 +0000 (11:39 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 Feb 2025 10:59:08 +0000 (11:59 +0100)
commitccbaf782390deb584d64dd2cf6aba983737bc48a
treefad62f3ef54d69525dc439b367d6d8cb8019d615
parent6c93fd502023dd919b5987ccbe990735410edd49
wifi: mac80211: rework the Tx of the deauth in ieee80211_set_disassoc()

When we disassociate we may need to send a deauth frame.
Regardless of this decision, we need to flush the queues to drop all the
packets on the Tx queues.

The flow looks like this:

1) Flush packets waiting on the queues (drop=true)
2) Prepare Tx to send the deauth
3) Build the deauth header
4) send the deauth
5) Flush the deauth packet (drop=false)
6) Complete_tx

Step 3 and 4 are done in ieee80211_send_deauth_disassoc() and that
function  must be called even if we decide not to send the deauth
frame because we need step 3 for cfg80211.

This means that if we want to send the deauth frame, we need all the
steps, but if we don't want to send the deauth frame we still want step
1 and 3.

Change the code to do that.

Also, prevent sending the deauth frame if we are in the middle of a CSA
with mode=1 in which case we won't be able to send the frame anyway.
This caused issues in iwlwifi at step 5 since the firmware wouldn't
send the frame and we'd be stuck flushing with drop=false.
Implement this in ieee80211_set_disassoc() which has many callers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250205110958.480bfea605e0.I91131eed942e49b9885d73f4180a3c9c26691c62@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c