[PATCH] wifi: ath12k: use scan link for off-channel tx without link 0

Alexander Wilhelm alexander.wilhelm at westermo.com
Sun Nov 22 23:57:37 PST 2026


For a non-MLD vif ath12k_mac_op_tx() always selects link 0, except for P2P
device vifs, which use ATH12K_FIRST_SCAN_LINK since upstream commit "wifi:
ath12k: Fix wrong P2P device link id issue".

A station that is not associated yet has no link 0 arvif. Off-channel
management frames like GAS/ANQP requests (Hotspot 2.0 interworking) are
sent during remain-on-channel, whose vdev is created on the scan link
(ATH12K_FIRST_SCAN_LINK). The frames are dropped with:

  ath12k_pci ...: failed to find arvif link id 0 for frame transmission

and wpa_supplicant reports GAS-QUERY-DONE result=TIMEOUT, so the station
never finds a matching NAI realm.

Use the scan link for off-channel frames if link 0 does not exist.

Signed-off-by: Alexander Wilhelm <alexander.wilhelm at westermo.com>
---
 drivers/net/wireless/ath/ath12k/wifi7/hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/wifi7/hw.c b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
index 48a2f6da16ef..20e977cde23a 100644
--- a/drivers/net/wireless/ath/ath12k/wifi7/hw.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
@@ -1119,7 +1119,9 @@ static void ath12k_wifi7_mac_op_tx(struct ieee80211_hw *hw,
 			return;
 		}
 	} else {
-		if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
+		if (vif->type == NL80211_IFTYPE_P2P_DEVICE ||
+		    (info_flags & IEEE80211_TX_CTL_TX_OFFCHAN &&
+		     !rcu_access_pointer(ahvif->link[0])))
 			link_id = ATH12K_FIRST_SCAN_LINK;
 		else
 			link_id = 0;

---
base-commit: 03b7c601b6e314115015a57061f5b377afe13190
change-id: 20261123-mac-fix-offchannel-tx-link-id-84d8387eaf40

Best regards,
-- 
Alexander Wilhelm <alexander.wilhelm at westermo.com>




More information about the ath12k mailing list