wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/657-ath12k-add-module-param-to-enable-disable-MLO.patch
John Crispin b9b03a6e38 ipq95xx: add Qualcomm wifi-7 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00

61 lines
2.2 KiB
Diff

From 49330b81c47943eb75009f5649ac189e3ff3a95b Mon Sep 17 00:00:00 2001
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Date: Fri, 12 Aug 2022 06:49:55 +0530
Subject: [PATCH] ath12k: add module param to enable/disable MLO
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/core.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index 7ffb03c168ba..4fd41b1af8be 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -31,6 +31,10 @@ module_param_named(frame_mode, ath12k_frame_mode, uint, 0644);
MODULE_PARM_DESC(frame_mode,
"Datapath frame mode (0: raw, 1: native wifi (default), 2: ethernet)");
+static unsigned int ath12k_mlo_capable = false;
+module_param_named(mlo_capable, ath12k_mlo_capable, uint, 0644);
+MODULE_PARM_DESC(mlo_capable, "mlo capable: 0-disable, 1-enable");
+
static DEFINE_MUTEX(ath12k_hw_lock);
static struct list_head ath12k_hw_groups = LIST_HEAD_INIT(ath12k_hw_groups);
@@ -159,7 +163,7 @@ ath12k_core_hw_group_alloc(u8 id, u8 max_chip)
static struct ath12k_hw_group *ath12k_core_get_hw_group(struct ath12k_base *ab)
{
struct ath12k_hw_group *ag = NULL;
- struct device_node *mlo = NULL;
+ struct device_node *mlo;
struct device *dev = ab->dev;
u32 group_id, num_chips;
int ret;
@@ -171,7 +175,11 @@ static struct ath12k_hw_group *ath12k_core_get_hw_group(struct ath12k_base *ab)
* soc is added to hw group and based on the number of links
* within the soc, all links are combined into a single wiphy.
*/
- mlo = of_parse_phandle(dev->of_node, "qcom,wsi", 0);
+ if (ath12k_mlo_capable)
+ mlo = of_parse_phandle(dev->of_node, "qcom,wsi", 0);
+ else
+ mlo = NULL;
+
if (!mlo) {
group_id = ATH12K_INVALID_GRP_ID;
} else {
@@ -182,7 +190,8 @@ static struct ath12k_hw_group *ath12k_core_get_hw_group(struct ath12k_base *ab)
again:
if (group_id == ATH12K_INVALID_GRP_ID) {
- ath12k_info(ab, "Grouping of multiple SoC not done\n");
+ ath12k_info(ab, "Grouping of multiple SoC not done. mlo capable %d\n",
+ ath12k_mlo_capable);
ag = ath12k_core_hw_group_alloc(group_id, 1);
} else {
--
2.37.0