linux/drivers/net/wireless
Aaradhana Sahu da289440f0 wifi: ath12k: clear stale link mapping of ahvif->links_map
[ Upstream commit 2c1ba9c2ad ]

When an arvif is initialized in non-AP STA mode but MLO connection
preparation fails before the arvif is created
(arvif->is_created remains false), the error path attempts to delete all
links. However, link deletion only executes when arvif->is_created is true.
As a result, ahvif retains a stale entry of arvif that is initialized but
not created.

When a new arvif is initialized with the same link id, this stale mapping
triggers the following WARN_ON.

WARNING: drivers/net/wireless/ath/ath12k/mac.c:4271 at ath12k_mac_op_change_vif_links+0x140/0x180 [ath12k], CPU#3: wpa_supplicant/275

Call trace:
 ath12k_mac_op_change_vif_links+0x140/0x180 [ath12k] (P)
 drv_change_vif_links+0xbc/0x1a4 [mac80211]
 ieee80211_vif_update_links+0x54c/0x6a0 [mac80211]
 ieee80211_vif_set_links+0x40/0x70 [mac80211]
 ieee80211_prep_connection+0x84/0x450 [mac80211]
 ieee80211_mgd_auth+0x200/0x480 [mac80211]
 ieee80211_auth+0x14/0x20 [mac80211]
 cfg80211_mlme_auth+0x90/0xf0 [cfg80211]
 nl80211_authenticate+0x32c/0x380 [cfg80211]
 genl_family_rcv_msg_doit+0xc8/0x134

Fix this issue by unassigning the link vif and clearing ahvif->links_map
if arvif is only initialized but not created.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1

Fixes: 81e4be3054 ("wifi: ath12k: handle link removal in change_vif_links()")
Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260127033400.1721220-1-aaradhana.sahu@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-02-26 14:59:19 -08:00
..
admtek wifi: cfg80211/mac80211: Add support to get radio index 2025-06-24 15:19:27 +02:00
ath wifi: ath12k: clear stale link mapping of ahvif->links_map 2026-02-26 14:59:19 -08:00
atmel wifi: cfg80211/mac80211: Add support to get radio index 2025-06-24 15:19:27 +02:00
broadcom wifi: brcmfmac: Add DMI nvram filename quirk for Acer A1 840 tablet 2026-01-02 12:56:41 +01:00
intel wifi: iwlwifi: mvm: pause TCM on fast resume 2026-02-11 13:41:58 +01:00
intersil wifi: mac80211: support parsing S1G TIM PVB 2025-09-04 11:19:01 +02:00
marvell wifi: mwifiex: Fix a loop in mwifiex_update_ampdu_rxwinsize() 2026-01-30 10:32:24 +01:00
mediatek wifi: mt76: Fix DTS power-limits on little endian systems 2026-01-02 12:57:08 +01:00
microchip Plenty of things going on, notably: 2025-09-11 17:50:46 -07:00
purelifi wifi: plfxlc: Fix error handling in usb driver probe 2025-07-18 14:23:23 +02:00
quantenna wifi: cfg80211/mac80211: Add support to get radio index 2025-06-24 15:19:27 +02:00
ralink Plenty of things going on, notably: 2025-09-11 17:50:46 -07:00
realtek wifi: rtw89: debug: Fix memory leak in __print_txpwr_map() 2026-02-26 14:59:17 -08:00
rsi wifi: rsi: Fix memory corruption due to not set vif driver data size 2026-01-30 10:32:24 +01:00
silabs wifi: cfg80211/mac80211: Add support to get radio index 2025-06-24 15:19:27 +02:00
st wifi: cw1200: Fix potential memory leak in cw1200_bh_rx_helper() 2025-12-18 14:02:55 +01:00
ti wifi: wlcore: ensure skb headroom before skb_push 2026-02-11 13:41:46 +01:00
virtual wifi: mac80211_hwsim: fix typo in frequency notification 2026-01-17 16:35:29 +01:00
zydas wifi: zd1211rw: fix potential memory leak in __zd_usb_enable_rx() 2025-10-30 08:41:10 +01:00
Kconfig wifi: remove orphaned rndis_wlan driver 2023-10-30 19:30:33 +02:00
Makefile wifi: remove orphaned rndis_wlan driver 2023-10-30 19:30:33 +02:00