git: db480c29879c - main - LinuxKPI: 802.11: stop queues during key updates
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Jun 2025 16:29:38 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=db480c29879cac1afba1d887d7b8871aa4eef6db
commit db480c29879cac1afba1d887d7b8871aa4eef6db
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-06-05 21:47:08 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-06-06 16:27:59 +0000
LinuxKPI: 802.11: stop queues during key updates
When beginning key updates do stop and afterwards re-enable the tx queues
to avoid packets being passed to the driver. This is a theoretical
problem at this point but helps some cases. These functions will likely
need refinement in the future.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/compat/linuxkpi/common/src/linux_80211.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index ef53c91a201e..4c511eeba388 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -174,6 +174,7 @@ static void lkpi_ieee80211_free_skb_mbuf(void *);
#ifdef LKPI_80211_WME
static int lkpi_wme_update(struct lkpi_hw *, struct ieee80211vap *, bool);
#endif
+static void lkpi_ieee80211_wake_queues_locked(struct ieee80211_hw *);
static const char *
lkpi_rate_info_bw_to_str(enum rate_info_bw bw)
@@ -1631,6 +1632,11 @@ lkpi_iv_key_update_begin(struct ieee80211vap *vap)
refcount_acquire(&lvif->ic_unlocked);
if (ntislocked)
refcount_acquire(&lvif->nt_unlocked);
+
+ /*
+ * Stop the queues while doing key updates.
+ */
+ ieee80211_stop_queues(hw);
}
static void
@@ -1649,6 +1655,11 @@ lkpi_iv_key_update_end(struct ieee80211vap *vap)
lvif = VAP_TO_LVIF(vap);
nt = &ic->ic_sta;
+ /*
+ * Re-enabled the queues after the key update.
+ */
+ lkpi_ieee80211_wake_queues_locked(hw);
+
icislocked = IEEE80211_IS_LOCKED(ic);
MPASS(!icislocked);
ntislocked = IEEE80211_NODE_IS_LOCKED(nt);