wifi: ath12k: handle link removal in change_vif_links()

Currently, the link interface is deleted during channel unassignment, which
does not align with mac80211 link handling. Therefore, add changes to only
perform vdev stop during channel unassignment. The actual vdev deletion
will occur in change_vif_links().

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1.97421.5 # Nicolas Escande

Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Tested-by: Nicolas Escande <nico.escande@gmail.com>
Link: https://patch.msgid.link/20250204-unlink_link_arvif_from_chanctx-v2-8-764fb5973c1a@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
Aditya Kumar Singh 2025-02-04 22:35:14 +05:30 committed by Jeff Johnson
parent 315d80be30
commit 81e4be3054
1 changed files with 16 additions and 3 deletions

View File

@ -3602,6 +3602,7 @@ ath12k_mac_op_change_vif_links(struct ieee80211_hw *hw,
struct ieee80211_bss_conf *ol[IEEE80211_MLD_MAX_NUM_LINKS])
{
struct ath12k_vif *ahvif = ath12k_vif_to_ahvif(vif);
unsigned long to_remove = old_links & ~new_links;
unsigned long to_add = ~old_links & new_links;
struct ath12k_hw *ah = ath12k_hw_to_ah(hw);
struct ath12k_link_vif *arvif;
@ -3626,6 +3627,21 @@ ath12k_mac_op_change_vif_links(struct ieee80211_hw *hw,
return -EINVAL;
}
for_each_set_bit(link_id, &to_remove, IEEE80211_MLD_MAX_NUM_LINKS) {
arvif = wiphy_dereference(hw->wiphy, ahvif->link[link_id]);
if (WARN_ON(!arvif))
return -EINVAL;
if (!arvif->is_created)
continue;
if (WARN_ON(!arvif->ar))
return -EINVAL;
ath12k_mac_remove_link_interface(hw, arvif);
ath12k_mac_unassign_link_vif(arvif);
}
return 0;
}
@ -9444,9 +9460,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
if (ahvif->vdev_type != WMI_VDEV_TYPE_MONITOR &&
ar->num_started_vdevs == 1 && ar->monitor_vdev_created)
ath12k_mac_monitor_stop(ar);
ath12k_mac_remove_link_interface(hw, arvif);
ath12k_mac_unassign_link_vif(arvif);
}
static int