]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: ath12k: unassign arvif on scan vdev create failure
authorRameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Sun, 26 Oct 2025 18:22:54 +0000 (23:52 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 30 Oct 2025 21:55:08 +0000 (14:55 -0700)
commite70515039d44be61b6a73aafb401d141b0034d12
tree26a51bf7e29aa476607e2e409280adb8fb6db098
parent448bf7b51426bcca54b5ac1ddd1045a36c9d1dea
wifi: ath12k: unassign arvif on scan vdev create failure

During scan and remain-on-channel requests, a scan link vif (arvif) is
assigned and a temporary vdev is created. If vdev creation fails, the
assigned arvif is left attached until the virtual interface is removed,
leaving a stale link in ahvif.

Fix this by freeing the stale arvif and resetting the corresponding link in
ahvif by calling ath12k_mac_unassign_link_vif() when vdev creation fails.

While at it, propagate the actual error code from ath12k_mac_vdev_create()
instead of returning -EINVAL in ath12k_mac_initiate_hw_scan().

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1

Fixes: 477cabfdb776 ("wifi: ath12k: modify link arvif creation and removal for MLO")
Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251026182254.1399650-3-rameshkumar.sundaram@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c