[PATCH ath-next] wifi: ath12k: clear stale link mapping of ahvif->links_map

Baochen Qiang baochen.qiang at oss.qualcomm.com
Tue Jan 27 18:02:25 PST 2026



On 1/27/2026 11:34 AM, Aaradhana Sahu wrote:
> 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: 81e4be30544e ("wifi: ath12k: handle link removal in change_vif_links()")
> Signed-off-by: Aaradhana Sahu <aaradhana.sahu at oss.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath12k/mac.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index cdb72439dcf4..9a926f5b7e8a 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -4281,8 +4281,10 @@ ath12k_mac_op_change_vif_links(struct ieee80211_hw *hw,
>  		if (WARN_ON(!arvif))
>  			return -EINVAL;
>  
> -		if (!arvif->is_created)
> +		if (!arvif->is_created) {
> +			ath12k_mac_unassign_link_vif(arvif);
>  			continue;
> +		}
>  
>  		if (WARN_ON(!arvif->ar))
>  			return -EINVAL;
> 
> base-commit: 13f9e5344a517048f3d8c61e49a9a72f97410de3

Reviewed-by: Baochen Qiang <baochen.qiang at oss.qualcomm.com>




More information about the ath12k mailing list