Skip to content

Commit e442e82

Browse files
Rameshkumar Sundaramgregkh
authored andcommitted
wifi: ath12k: unassign arvif on scan vdev create failure
[ Upstream commit e705150 ] 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: 477cabf ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 41b6231 commit e442e82

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+3
-1
lines changed

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5059,7 +5059,8 @@ static int ath12k_mac_initiate_hw_scan(struct ieee80211_hw *hw,
50595059
ret = ath12k_mac_vdev_create(ar, arvif);
50605060
if (ret) {
50615061
ath12k_warn(ar->ab, "unable to create scan vdev %d\n", ret);
5062-
return -EINVAL;
5062+
ath12k_mac_unassign_link_vif(arvif);
5063+
return ret;
50635064
}
50645065
}
50655066

@@ -12895,6 +12896,7 @@ static int ath12k_mac_op_remain_on_channel(struct ieee80211_hw *hw,
1289512896
if (ret) {
1289612897
ath12k_warn(ar->ab, "unable to create scan vdev for roc: %d\n",
1289712898
ret);
12899+
ath12k_mac_unassign_link_vif(arvif);
1289812900
return ret;
1289912901
}
1290012902
}

0 commit comments

Comments
 (0)