git: 7d60647a1a6c - main - LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 07 Feb 2026 00:58:28 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=7d60647a1a6c19e7be33428c33b77faadfe863a1
commit 7d60647a1a6c19e7be33428c33b77faadfe863a1
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-02-04 22:39:01 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-02-07 00:57:52 +0000
LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue()
If we are not scheduled before calling wake_tx_queue() packets may
never go out, which at first will look like EAPOL fails (as
wpa_supplicant suggest possibly with a wrong key). Using monitor
mode it will be clear what is going on.
Pass a flag down to wake_tx_queue() to call ieee80211_schedule_txq()
in case (*wake_tx_queue)() is supported or not, which solves the
problem for the lkpi_80211_txq_tx_one() which was failing.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++----
sys/compat/linuxkpi/common/src/linux_80211.h | 5 +++--
sys/compat/linuxkpi/common/src/linux_80211_macops.c | 10 ++++++++--
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 2a56d19adbea..54571b28e2b8 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2020-2025 The FreeBSD Foundation
+ * Copyright (c) 2020-2026 The FreeBSD Foundation
* Copyright (c) 2020-2025 Bjoern A. Zeeb
*
* This software was developed by Björn Zeeb under sponsorship from
@@ -2150,7 +2150,7 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
if (no_emptyq && ltxq_empty)
continue;
- lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]);
+ lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid], false);
}
}
@@ -5764,7 +5764,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m)
#endif
LKPI_80211_LTXQ_UNLOCK(ltxq);
wiphy_lock(hw->wiphy);
- lkpi_80211_mo_wake_tx_queue(hw, <xq->txq);
+ lkpi_80211_mo_wake_tx_queue(hw, <xq->txq, true);
wiphy_unlock(hw->wiphy);
return;
@@ -8751,7 +8751,7 @@ lkpi_ieee80211_wake_queues(struct ieee80211_hw *hw, int hwq)
ltxq->stopped = false;
if (!skb_queue_empty(<xq->skbq))
- lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]);
+ lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid], false);
}
}
rcu_read_unlock();
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h
index d4f18fcafbba..3d25ab4a857b 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.h
+++ b/sys/compat/linuxkpi/common/src/linux_80211.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2020-2023 The FreeBSD Foundation
+ * Copyright (c) 2020-2026 The FreeBSD Foundation
* Copyright (c) 2020-2021 Bjoern A. Zeeb
*
* This software was developed by Björn Zeeb under sponsorship from
@@ -481,7 +481,8 @@ void lkpi_80211_mo_mgd_complete_tx(struct ieee80211_hw *, struct ieee80211_vif *
struct ieee80211_prep_tx_info *);
void lkpi_80211_mo_tx(struct ieee80211_hw *, struct ieee80211_tx_control *,
struct sk_buff *);
-void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *);
+void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *,
+ bool);
void lkpi_80211_mo_sync_rx_queues(struct ieee80211_hw *);
void lkpi_80211_mo_sta_pre_rcu_remove(struct ieee80211_hw *,
struct ieee80211_vif *, struct ieee80211_sta *);
diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
index a85e6d0d0dd7..634cffddea9e 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2021-2022 The FreeBSD Foundation
+ * Copyright (c) 2021-2026 The FreeBSD Foundation
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
@@ -644,11 +644,17 @@ lkpi_80211_mo_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *txctrl,
}
void
-lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
+lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq,
+ bool schedule)
{
struct lkpi_hw *lhw;
lhw = HW_TO_LHW(hw);
+
+ /* Do the schedule before the check for wake_tx_queue supported! */
+ if (schedule)
+ ieee80211_schedule_txq(hw, txq);
+
if (lhw->ops->wake_tx_queue == NULL)
return;