wifi: ath12k: ath12k_start_vdev_delay(): convert to use ar
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Sun, 14 Jan 2024 15:02:41 +0000 (17:02 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 16 Jan 2024 12:21:36 +0000 (14:21 +0200)
To support single wiphy abstraction, remove the mac80211 hw data
dependency from the start vdev delay function. This way, this
function can be extended to handle multiple link/radio in the future.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240103063731.3356060-11-quic_periyasa@quicinc.com
drivers/net/wireless/ath/ath12k/mac.c

index ce916bf2dcc9c326b880e7551d176c53968bc3d1..a90c0309230a54324e3f0e5b63d9809743a7d7e1 100644 (file)
@@ -241,8 +241,8 @@ static const u32 ath12k_smps_map[] = {
        [WLAN_HT_CAP_SM_PS_DISABLED] = WMI_PEER_SMPS_PS_NONE,
 };
 
-static int ath12k_start_vdev_delay(struct ieee80211_hw *hw,
-                                  struct ieee80211_vif *vif);
+static int ath12k_start_vdev_delay(struct ath12k *ar,
+                                  struct ath12k_vif *arvif);
 
 static const char *ath12k_mac_phymode_str(enum wmi_phy_mode mode)
 {
@@ -3718,7 +3718,7 @@ static int ath12k_mac_station_add(struct ath12k *ar,
        if (ab->hw_params->vdev_start_delay &&
            !arvif->is_started &&
            arvif->vdev_type != WMI_VDEV_TYPE_AP) {
-               ret = ath12k_start_vdev_delay(ar->hw, vif);
+               ret = ath12k_start_vdev_delay(ar, arvif);
                if (ret) {
                        ath12k_warn(ab, "failed to delay vdev start: %d\n", ret);
                        goto free_peer;
@@ -6411,12 +6411,11 @@ unlock:
        mutex_unlock(&ar->conf_mutex);
 }
 
-static int ath12k_start_vdev_delay(struct ieee80211_hw *hw,
-                                  struct ieee80211_vif *vif)
+static int ath12k_start_vdev_delay(struct ath12k *ar,
+                                  struct ath12k_vif *arvif)
 {
-       struct ath12k *ar = hw->priv;
        struct ath12k_base *ab = ar->ab;
-       struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+       struct ieee80211_vif *vif = arvif->vif;
        int ret;
 
        if (WARN_ON(arvif->is_started))