]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: ath12k: Introduce device index
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Fri, 3 May 2024 10:34:38 +0000 (13:34 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 3 May 2024 13:19:23 +0000 (16:19 +0300)
Introduce a device index parameter in the ath12k_base structure. This
value is used as unique identifier for devices involved in Inter-device
MLO. It is also used to configure the MLO parameter within the QMI host
capability send request. While currently set to zero, future logic will
be added for inter device support to populate this parameter with
non-zero values.

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

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/20240430165811.1377182-4-quic_periyasa@quicinc.com
drivers/net/wireless/ath/ath12k/core.c
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/qmi.c

index e9aabdb9341c3891d01b933b605f73fdbecbf8dd..9482d5db71e77b617a54886a06eb78a66269c4ce 100644 (file)
@@ -1268,6 +1268,16 @@ struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
        ab->qmi.num_radios = U8_MAX;
        ab->mlo_capable_flags = ATH12K_INTRA_DEVICE_MLO_SUPPORT;
 
+       /* Device index used to identify the devices in a group.
+        *
+        * In Intra-device MLO, only one device present in a group,
+        * so it is always zero.
+        *
+        * In Inter-device MLO, Multiple device present in a group,
+        * expect non-zero value.
+        */
+       ab->device_id = 0;
+
        return ab;
 
 err_free_wq:
index d833361948b7306da61697e98f20b35cb388948e..3cfc65b36579770a7fc8be56eb07e23a41db6887 100644 (file)
@@ -754,6 +754,7 @@ struct ath12k_base {
        struct ath12k_qmi qmi;
        struct ath12k_wmi_base wmi_ab;
        struct completion fw_ready;
+       u8 device_id;
        int num_radios;
        /* HW channel counters frequency value in hertz common to all MACs */
        u32 cc_freq_hz;
index 5484112859a667e26d171eda47346cb7801f51a1..3bb730326a024be34e1a636b4466bc6d105f168f 100644 (file)
@@ -2041,7 +2041,7 @@ static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab,
        req->mlo_capable_valid = 1;
        req->mlo_capable = 1;
        req->mlo_chip_id_valid = 1;
-       req->mlo_chip_id = 0;
+       req->mlo_chip_id = ab->device_id;
        req->mlo_group_id_valid = 1;
        req->mlo_group_id = 0;
        req->max_mlo_peer_valid = 1;
@@ -2053,7 +2053,7 @@ static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab,
        req->mlo_num_chips = 1;
 
        info = &req->mlo_chip_info[0];
-       info->chip_id = 0;
+       info->chip_id = ab->device_id;
        info->num_local_links = ab->qmi.num_radios;
 
        for (i = 0; i < info->num_local_links; i++) {