Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2025 01:16:45 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 618afeb7f375 - stable/14 - LinuxKPI 802.11 / rtw88: make packets flow again
Message-ID:  <202502070116.5171GjoS087984@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=618afeb7f3751ffb93a3d7ebbace4ec07b3e90cb

commit 618afeb7f3751ffb93a3d7ebbace4ec07b3e90cb
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-12-20 14:23:50 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-02-06 20:52:42 +0000

    LinuxKPI 802.11 / rtw88: make packets flow again
    
    In 886653492945f we added checks for packets to only go out if the
    station is known to the firmware (amongst others) as there are
    implications in drivers.
    Unfortunately rtw88 does not support the mac80211 (*sta_state)() KPI
    but only the fallback (*sta_add/remove)() in which case the station is
    only added to firmware when going from AUTH to ASSOC.  That means we
    had no chance to get authenticated anymore.
    
    PR:     283142, 274382
    Fixes:  886653492945f (make sure we can send DISASSOC or DEAUTH frames)
    Tested by:      imb protected-networks.net, oleg.nauman gmail.com
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D48161
    
    (cherry picked from commit 2372f8cc640c2f4ab82831e6ac0e27ab6c18321a)
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index f22ab8435a2f..d2c2a020399d 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -3705,7 +3705,16 @@ lkpi_ic_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
 
 	lsta = ni->ni_drv_data;
 	LKPI_80211_LSTA_TXQ_LOCK(lsta);
+#if 0
 	if (!lsta->added_to_drv || !lsta->txq_ready) {
+#else
+	/*
+	 * Backout this part of 886653492945f which breaks rtw88 or
+	 * in general drivers without (*sta_state)() but only the
+	 * legacy fallback to (*sta_add)().
+	 */
+	if (!lsta->txq_ready) {
+#endif
 		LKPI_80211_LSTA_TXQ_UNLOCK(lsta);
 		/*
 		 * Free the mbuf (do NOT release ni ref for the m_pkthdr.rcvif!
@@ -3953,7 +3962,16 @@ lkpi_80211_txq_task(void *ctx, int pending)
 	 * We also use txq_ready as a semaphore and will drain the txq manually
 	 * if needed on our way towards SCAN/INIT in the state machine.
 	 */
+#if 0
 	shall_tx = lsta->added_to_drv && lsta->txq_ready;
+#else
+	/*
+	 * Backout this part of 886653492945f which breaks rtw88 or
+	 * in general drivers without (*sta_state)() but only the
+	 * legacy fallback to (*sta_add)().
+	 */
+	shall_tx = lsta->txq_ready;
+#endif
 	if (__predict_true(shall_tx))
 		mbufq_concat(&mq, &lsta->txq);
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502070116.5171GjoS087984>