]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: update beacon template function to use arvif structure
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Fri, 24 Jan 2025 06:16:35 +0000 (11:46 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 3 Feb 2025 22:43:28 +0000 (14:43 -0800)
The current code has ath12k_wmi_bcn_tmpl() accepting separate ar and
vdev_id parameters. However, ath12k_link_vif structure can be used to
derive both of these.

Hence, simplify the function signature.

Later change needs arvif pointer access within the function hence it is
better if arvif is directly passed now.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Link: https://patch.msgid.link/20250124-ath12k_mlo_csa-v2-1-420c42fcfecf@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/wmi.c
drivers/net/wireless/ath/ath12k/wmi.h

index e9663c6ac72cd88f4510c7f509358b6477130dfb..a70b8bdda85590dac795734f88d8d88d597d6492 100644 (file)
@@ -1671,8 +1671,7 @@ static int ath12k_mac_setup_bcn_tmpl_ema(struct ath12k_link_vif *arvif)
 
                ema_args.bcn_cnt = beacons->cnt;
                ema_args.bcn_index = i;
-               ret = ath12k_wmi_bcn_tmpl(tx_arvif->ar, tx_arvif->vdev_id,
-                                         &beacons->bcn[i].offs,
+               ret = ath12k_wmi_bcn_tmpl(tx_arvif, &beacons->bcn[i].offs,
                                          beacons->bcn[i].skb, &ema_args);
                if (ret) {
                        ath12k_warn(tx_arvif->ar->ab,
@@ -1766,7 +1765,7 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif)
                }
        }
 
-       ret = ath12k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn, NULL);
+       ret = ath12k_wmi_bcn_tmpl(arvif, &offs, bcn, NULL);
 
        if (ret)
                ath12k_warn(ab, "failed to submit beacon template command: %d\n",
index ad29c4c99dc78daa245b4ff4d76c83bfe6e5701f..92d7d3c9d50cd2c295f3e57fe6e9d3a3600d57f6 100644 (file)
@@ -1927,14 +1927,16 @@ int ath12k_wmi_p2p_go_bcn_ie(struct ath12k *ar, u32 vdev_id,
        return ret;
 }
 
-int ath12k_wmi_bcn_tmpl(struct ath12k *ar, u32 vdev_id,
+int ath12k_wmi_bcn_tmpl(struct ath12k_link_vif *arvif,
                        struct ieee80211_mutable_offsets *offs,
                        struct sk_buff *bcn,
                        struct ath12k_wmi_bcn_tmpl_ema_arg *ema_args)
 {
+       struct ath12k *ar = arvif->ar;
        struct ath12k_wmi_pdev *wmi = ar->wmi;
        struct wmi_bcn_tmpl_cmd *cmd;
        struct ath12k_wmi_bcn_prb_info_params *bcn_prb_info;
+       u32 vdev_id = arvif->vdev_id;
        struct wmi_tlv *tlv;
        struct sk_buff *skb;
        u32 ema_params = 0;
index bd069a81e4c61e8f114f206eac604ced3b91cfdf..63a88fb821cada7bda2f16d3321ebf34c8afc4f4 100644 (file)
@@ -5780,7 +5780,7 @@ int ath12k_wmi_mgmt_send(struct ath12k *ar, u32 vdev_id, u32 buf_id,
                         struct sk_buff *frame);
 int ath12k_wmi_p2p_go_bcn_ie(struct ath12k *ar, u32 vdev_id,
                             const u8 *p2p_ie);
-int ath12k_wmi_bcn_tmpl(struct ath12k *ar, u32 vdev_id,
+int ath12k_wmi_bcn_tmpl(struct ath12k_link_vif *arvif,
                        struct ieee80211_mutable_offsets *offs,
                        struct sk_buff *bcn,
                        struct ath12k_wmi_bcn_tmpl_ema_arg *ema_args);