blob: e9a2ebce8a6c0899da65b3e6d3397dac94c857d3 [file] [log] [blame]
From 77c5db25a8d03ab48f06d66cdab058757ba9a2fc Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Mon, 27 May 2024 19:10:51 +0800
Subject: [PATCH 73/89] mtk: mac80211: add mlo related debugfs knob
Add the following debugfs knob
- /sys/kernel/debug/ieee80211/phy0/<interface>/ttlm
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
---
net/mac80211/debugfs_netdev.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 3017f09..33fa0d9 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -613,6 +613,24 @@ static ssize_t ieee80211_if_fmt_num_buffered_multicast(
}
IEEE80211_IF_FILE_R(num_buffered_multicast);
+static ssize_t ieee80211_if_fmt_ttlm(
+ const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
+{
+ const struct ieee80211_vif *vif = &sdata->vif;
+ int i = 0, len = 0;
+
+ len += scnprintf(buf + len, buflen - len, "valid = %d\n", vif->neg_ttlm.valid);
+
+ for(i = 0; i < IEEE80211_TTLM_NUM_TIDS; i++)
+ len += scnprintf(buf + len, buflen - len,
+ "tid%d: dl = %u, ul = %u\n", i,
+ vif->neg_ttlm.downlink[i],
+ vif->neg_ttlm.uplink[i]);
+
+ return len;
+}
+IEEE80211_IF_FILE_R(ttlm);
+
static ssize_t ieee80211_if_fmt_aqm(
const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
{
@@ -839,6 +857,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
{
DEBUGFS_ADD(bssid);
DEBUGFS_ADD(aid);
+ DEBUGFS_ADD(ttlm);
DEBUGFS_ADD(beacon_timeout);
DEBUGFS_ADD_MODE(tkip_mic_test, 0200);
DEBUGFS_ADD_MODE(beacon_loss, 0200);
@@ -855,6 +874,7 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(num_mcast_sta);
DEBUGFS_ADD(num_sta_ps);
DEBUGFS_ADD(dtim_count);
+ DEBUGFS_ADD(ttlm);
DEBUGFS_ADD(num_buffered_multicast);
DEBUGFS_ADD_MODE(tkip_mic_test, 0200);
DEBUGFS_ADD_MODE(multicast_to_unicast, 0600);
@@ -865,6 +885,7 @@ static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
/* add num_mcast_sta_vlan using name num_mcast_sta */
debugfs_create_file("num_mcast_sta", 0400, sdata->vif.debugfs_dir,
sdata, &num_mcast_sta_vlan_ops);
+ DEBUGFS_ADD(ttlm);
}
static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
--
2.18.0