wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/714-02-wifi-mac80211-include-link-address-in-debugfs.patch
John Crispin 144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

52 lines
1.6 KiB
Diff

From 4e3f8a549df71d47e05e195d9538316136ba1acc Mon Sep 17 00:00:00 2001
From: Benjamin Berg <benjamin.berg@intel.com>
Date: Wed, 1 Feb 2023 16:56:40 +0530
Subject: [PATCH] wifi: mac80211: include link address in debugfs
Add the link address to the per-link information, but only if we are
using MLO.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
---
net/mac80211/debugfs_sta.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 25abff4..e4fb7ee 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -443,6 +443,19 @@ static const struct file_operations link_sta_ ##name## _ops = { \
.llseek = generic_file_llseek, \
}
+static ssize_t link_sta_addr_read(struct file *file, char __user *userbuf,
+ size_t count, loff_t *ppos)
+{
+ struct link_sta_info *link_sta = file->private_data;
+ u8 mac[3 * ETH_ALEN + 1];
+
+ snprintf(mac, sizeof(mac), "%pM\n", link_sta->pub->addr);
+
+ return simple_read_from_buffer(userbuf, count, ppos, mac, 3 * ETH_ALEN);
+}
+
+LINK_STA_OPS(addr);
+
static ssize_t link_sta_ht_capa_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
@@ -1534,6 +1547,8 @@ void ieee80211_link_sta_debugfs_add(struct link_sta_info *link_sta)
link_sta->debugfs_dir =
debugfs_create_dir(link_dir_name,
link_sta->sta->debugfs_dir);
+
+ DEBUGFS_ADD(addr);
} else {
if (WARN_ON(link_sta != &link_sta->sta->deflink))
return;
--
2.17.1