diff mbox series

wifi: ath12k: add hw_link_id in ath12k_pdev

Message ID 20240529054955.4105240-1-quic_hprem@quicinc.com
State New
Headers show
Series wifi: ath12k: add hw_link_id in ath12k_pdev | expand

Commit Message

Harshitha Prem May 29, 2024, 5:49 a.m. UTC
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>

Currently, hw_link_id is sent in WMI service ready event but it
is not parsed anywhere.

But, in future, for multi-link operation, this parameter would be
needed by many WMI commands such as WMI beacon template
(WMI_BCN_TMPL_CMDID), WMI vdev start for Multi-link virtual AP
interfaces (WMI_VDEV_START_REQUEST_CMDID), WMI peer assoc command
(WMI_PEER_ASSOC_CMDID) for Multi-link peer and so on.

Hence, add changes to parse and store the hw_link_id received in
WMI service ready event in ath12k_pdev structure.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/core.h | 1 +
 drivers/net/wireless/ath/ath12k/mac.c  | 2 +-
 drivers/net/wireless/ath/ath12k/wmi.c  | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)


base-commit: 2580be9ee6f5d97d6763b5d4ae4f9c0383fdf130

Comments

Kalle Valo June 3, 2024, 1:15 p.m. UTC | #1
Harshitha Prem <quic_hprem@quicinc.com> wrote:

> Currently, hw_link_id is sent in WMI service ready event but it
> is not parsed anywhere.
> 
> But, in future, for multi-link operation, this parameter would be
> needed by many WMI commands such as WMI beacon template
> (WMI_BCN_TMPL_CMDID), WMI vdev start for Multi-link virtual AP
> interfaces (WMI_VDEV_START_REQUEST_CMDID), WMI peer assoc command
> (WMI_PEER_ASSOC_CMDID) for Multi-link peer and so on.
> 
> Hence, add changes to parse and store the hw_link_id received in
> WMI service ready event in ath12k_pdev structure.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

22767241e644 wifi: ath12k: add hw_link_id in ath12k_pdev
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 7d20b09c52e6..45ca4d5e2b5f 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -689,6 +689,7 @@  struct mlo_timestamp {
 struct ath12k_pdev {
 	struct ath12k *ar;
 	u32 pdev_id;
+	u32 hw_link_id;
 	struct ath12k_pdev_cap cap;
 	u8 mac_addr[ETH_ALEN];
 	struct mlo_timestamp timestamp;
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 784964ae03ec..509c02bffdae 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -9229,7 +9229,7 @@  static struct ath12k_hw *ath12k_mac_hw_allocate(struct ath12k_base *ab,
 		ar = ath12k_ah_to_ar(ah, i);
 		ar->ah = ah;
 		ar->ab = ab;
-		ar->hw_link_id = i;
+		ar->hw_link_id = pdev->hw_link_id;
 		ar->pdev = pdev;
 		ar->pdev_idx = pdev_idx;
 		pdev->ar = ar;
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 99106b088311..d6e1d1398cdb 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -500,6 +500,7 @@  ath12k_pull_mac_phy_cap_svc_ready_ext(struct ath12k_wmi_pdev *wmi_handle,
 	mac_caps = wmi_mac_phy_caps + phy_idx;
 
 	pdev->pdev_id = ath12k_wmi_mac_phy_get_pdev_id(mac_caps);
+	pdev->hw_link_id = ath12k_wmi_mac_phy_get_hw_link_id(mac_caps);
 	pdev_cap->supported_bands |= le32_to_cpu(mac_caps->supported_bands);
 	pdev_cap->ampdu_density = le32_to_cpu(mac_caps->ampdu_density);