]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: ath12k: extend the link capable flag
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Fri, 5 Apr 2024 12:22:09 +0000 (15:22 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 8 Apr 2024 14:37:52 +0000 (17:37 +0300)
Link capability categorized as Single Link Operation (SLO) and Multi Link
Operation (MLO).

 - Intra-device SLO/MLO refers to links present within a device
 - Inter-device SLO/MLO refers to links present across multiple devices

Currently, driver uses a boolean variable to represent intra-device SLO/MLO
capability. To accommodate inter-device SLO/MLO capabilities within the
same variable, modify the existing variable name and type. Define a new
enumeration for the link capabilities to accommodate both intra-device
and inter-device scenarios. Populate the enum based on the supported
capabilities.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-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/20240403042056.1504209-2-quic_periyasa@quicinc.com
drivers/net/wireless/ath/ath12k/core.c
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/mhi.c
drivers/net/wireless/ath/ath12k/qmi.c

index 3ec67d831cbd336300f22e32f59d3f1ec66d7847..3c522a4b3e9bdac05d96df7d992e4edfbb885a4e 100644 (file)
@@ -1232,7 +1232,7 @@ struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
        ab->dev = dev;
        ab->hif.bus = bus;
        ab->qmi.num_radios = U8_MAX;
-       ab->slo_capable = true;
+       ab->mlo_capable_flags = ATH12K_INTRA_DEVICE_MLO_SUPPORT;
 
        return ab;
 
index ceb0451046bf87f84be57bdb19546a2e94f5b788..86895139052b05f0c892aa2a589bda6e2a2734bd 100644 (file)
@@ -695,6 +695,21 @@ struct ath12k_soc_dp_stats {
        struct ath12k_soc_dp_tx_err_stats tx_err;
 };
 
+/**
+ * enum ath12k_link_capable_flags - link capable flags
+ *
+ * Single/Multi link capability information
+ *
+ * @ATH12K_INTRA_DEVICE_MLO_SUPPORT: SLO/MLO form between the radio, where all
+ *     the links (radios) present within a device.
+ * @ATH12K_INTER_DEVICE_MLO_SUPPORT: SLO/MLO form between the radio, where all
+ *     the links (radios) present across the devices.
+ */
+enum ath12k_link_capable_flags {
+       ATH12K_INTRA_DEVICE_MLO_SUPPORT = BIT(0),
+       ATH12K_INTER_DEVICE_MLO_SUPPORT = BIT(1),
+};
+
 /* Master structure to hold the hw data which may be used in core module */
 struct ath12k_base {
        enum ath12k_hw_rev hw_rev;
@@ -853,10 +868,12 @@ struct ath12k_base {
 
        const struct hal_rx_ops *hal_rx_ops;
 
-       /* slo_capable denotes if the single/multi link operation
-        * is supported within the same chip (SoC).
+       /* mlo_capable_flags denotes the single/multi link operation
+        * capabilities of the Device.
+        *
+        * See enum ath12k_link_capable_flags
         */
-       bool slo_capable;
+       u8 mlo_capable_flags;
 
        /* must be last */
        u8 drv_priv[] __aligned(sizeof(void *));
index adb8c3ec1950ef71e9fdede7b3fac4e69f54329e..fd519c87ae24d57bea3f34577c9490314068b3b7 100644 (file)
@@ -385,7 +385,7 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci)
                                   "failed to read board id\n");
                } else if (board_id & OTP_VALID_DUALMAC_BOARD_ID_MASK) {
                        dualmac = true;
-                       ab->slo_capable = false;
+                       ab->mlo_capable_flags = 0;
                        ath12k_dbg(ab, ATH12K_DBG_BOOT,
                                   "dualmac fw selected for board id: %x\n", board_id);
                }
index 92845ffff44ad35d2c85d83a192ac3d64e069edc..3f0d2b99127a1caed28c918c5c7785ae51567601 100644 (file)
@@ -2124,7 +2124,7 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
        struct qmi_txn txn;
        int ret;
 
-       if (!ab->slo_capable)
+       if (!ab->mlo_capable_flags)
                goto out;
 
        ret = qmi_txn_init(&ab->qmi.handle, &txn,