blob: e9a2ebce8a6c0899da65b3e6d3397dac94c857d3 [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 77c5db25a8d03ab48f06d66cdab058757ba9a2fc Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Mon, 27 May 2024 19:10:51 +0800
4Subject: [PATCH 73/89] mtk: mac80211: add mlo related debugfs knob
5
6Add the following debugfs knob
7- /sys/kernel/debug/ieee80211/phy0/<interface>/ttlm
8
9Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
10---
11 net/mac80211/debugfs_netdev.c | 21 +++++++++++++++++++++
12 1 file changed, 21 insertions(+)
13
14diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
15index 3017f09..33fa0d9 100644
16--- a/net/mac80211/debugfs_netdev.c
17+++ b/net/mac80211/debugfs_netdev.c
18@@ -613,6 +613,24 @@ static ssize_t ieee80211_if_fmt_num_buffered_multicast(
19 }
20 IEEE80211_IF_FILE_R(num_buffered_multicast);
21
22+static ssize_t ieee80211_if_fmt_ttlm(
23+ const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
24+{
25+ const struct ieee80211_vif *vif = &sdata->vif;
26+ int i = 0, len = 0;
27+
28+ len += scnprintf(buf + len, buflen - len, "valid = %d\n", vif->neg_ttlm.valid);
29+
30+ for(i = 0; i < IEEE80211_TTLM_NUM_TIDS; i++)
31+ len += scnprintf(buf + len, buflen - len,
32+ "tid%d: dl = %u, ul = %u\n", i,
33+ vif->neg_ttlm.downlink[i],
34+ vif->neg_ttlm.uplink[i]);
35+
36+ return len;
37+}
38+IEEE80211_IF_FILE_R(ttlm);
39+
40 static ssize_t ieee80211_if_fmt_aqm(
41 const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
42 {
43@@ -839,6 +857,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
44 {
45 DEBUGFS_ADD(bssid);
46 DEBUGFS_ADD(aid);
47+ DEBUGFS_ADD(ttlm);
48 DEBUGFS_ADD(beacon_timeout);
49 DEBUGFS_ADD_MODE(tkip_mic_test, 0200);
50 DEBUGFS_ADD_MODE(beacon_loss, 0200);
51@@ -855,6 +874,7 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
52 DEBUGFS_ADD(num_mcast_sta);
53 DEBUGFS_ADD(num_sta_ps);
54 DEBUGFS_ADD(dtim_count);
55+ DEBUGFS_ADD(ttlm);
56 DEBUGFS_ADD(num_buffered_multicast);
57 DEBUGFS_ADD_MODE(tkip_mic_test, 0200);
58 DEBUGFS_ADD_MODE(multicast_to_unicast, 0600);
59@@ -865,6 +885,7 @@ static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
60 /* add num_mcast_sta_vlan using name num_mcast_sta */
61 debugfs_create_file("num_mcast_sta", 0400, sdata->vif.debugfs_dir,
62 sdata, &num_mcast_sta_vlan_ops);
63+ DEBUGFS_ADD(ttlm);
64 }
65
66 static void add_ibss_files(struct ieee80211_sub_if_data *sdata)
67--
682.18.0
69