mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-24 21:02:35 +00:00
62 lines
2.1 KiB
Diff
62 lines
2.1 KiB
Diff
From d090bf7eb47914550f17dfc143f968022187737b Mon Sep 17 00:00:00 2001
|
|
From: Rajat Soni <quic_rajson@quicinc.com>
|
|
Date: Tue, 14 Mar 2023 17:52:55 +0530
|
|
Subject: [PATCH] ath12k: Add support for mlo in cnss diag debug
|
|
|
|
Currently, when mlo is enabled when we run cnss_diag -p -c
|
|
radio index is always 0 (R0: FWMSG:...) due to this it is
|
|
not possible to identify radio and debugging is not possible.
|
|
|
|
Add ATH12K_TM_ATTR_LINK_IDX attribute to send ar->link_idx that is
|
|
fetched by cnss diag to display correct radio number.
|
|
|
|
Signed-off-by: Rajat Soni <quic_rajson@quicinc.com>
|
|
---
|
|
drivers/net/wireless/ath/ath12k/testmode.c | 10 ++++++++++
|
|
drivers/net/wireless/ath/ath12k/testmode_i.h | 1 +
|
|
2 files changed, 11 insertions(+)
|
|
|
|
diff --git a/drivers/net/wireless/ath/ath12k/testmode.c b/drivers/net/wireless/ath/ath12k/testmode.c
|
|
index c2c24b8..2e16255 100644
|
|
--- a/drivers/net/wireless/ath/ath12k/testmode.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/testmode.c
|
|
@@ -25,6 +25,7 @@ static const struct nla_policy ath12k_tm_policy[ATH12K_TM_ATTR_MAX + 1] = {
|
|
[ATH12K_TM_ATTR_VERSION_MINOR] = { .type = NLA_U32 },
|
|
[ATH12K_TM_ATTR_FWLOG] = { .type = NLA_BINARY,
|
|
.len = 2048 },
|
|
+ [ATH12K_TM_ATTR_LINK_IDX] = { .type = NLA_U8 },
|
|
};
|
|
|
|
void ath12k_fwlog_write(struct ath12k_base *ab, u8 *data, int len)
|
|
@@ -56,6 +57,15 @@ void ath12k_fwlog_write(struct ath12k_base *ab, u8 *data, int len)
|
|
return;
|
|
}
|
|
|
|
+ if (ab->ag->mlo_capable) {
|
|
+ ret = nla_put_u8(nl_skb, ATH12K_TM_ATTR_LINK_IDX, ar->link_idx);
|
|
+ if (ret) {
|
|
+ ath12k_warn(ab, "failed to put link idx wmi event to nl: %d\n", ret);
|
|
+ kfree_skb(nl_skb);
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+
|
|
cfg80211_testmode_event(nl_skb, GFP_ATOMIC);
|
|
}
|
|
|
|
diff --git a/drivers/net/wireless/ath/ath12k/testmode_i.h b/drivers/net/wireless/ath/ath12k/testmode_i.h
|
|
index 709ba68..3c6f8d0 100644
|
|
--- a/drivers/net/wireless/ath/ath12k/testmode_i.h
|
|
+++ b/drivers/net/wireless/ath/ath12k/testmode_i.h
|
|
@@ -26,6 +26,7 @@ enum ath12k_tm_attr {
|
|
ATH12K_TM_ATTR_VERSION_MINOR = 5,
|
|
ATH12K_TM_ATTR_WMI_OP_VERSION = 6,
|
|
ATH12K_TM_ATTR_FWLOG = 7,
|
|
+ ATH12K_TM_ATTR_LINK_IDX = 8,
|
|
|
|
/* keep last */
|
|
__ATH12K_TM_ATTR_AFTER_LAST,
|
|
--
|
|
2.17.1
|
|
|