diff mbox series

[3/4] wifi: mac80211: Fix permissions for valid_links debugfs entry

Message ID 20230611121219.c75316990411.I1565a7fcba8a37f83efffb0cc6b71c572b896e94@changeid (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series cfg80211/mac80211 patches from our internal tree 2023-06-08 | expand

Commit Message

Greenman, Gregory June 11, 2023, 9:14 a.m. UTC
From: Ilan Peer <ilan.peer@intel.com>

The entry should be a read only one and not a write only one. Fix it.
While at it, change the code to use debugs_create_x16().

Fixes: 3d9011029227 ("wifi: mac80211: implement link switching")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
---
 net/mac80211/debugfs_netdev.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 6253d0127207..b45a45df062b 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -598,13 +598,6 @@  static ssize_t ieee80211_if_parse_tsf(
 }
 IEEE80211_IF_FILE_RW(tsf);
 
-static ssize_t ieee80211_if_fmt_valid_links(const struct ieee80211_sub_if_data *sdata,
-					    char *buf, int buflen)
-{
-	return snprintf(buf, buflen, "0x%x\n", sdata->vif.valid_links);
-}
-IEEE80211_IF_FILE_R(valid_links);
-
 static ssize_t ieee80211_if_fmt_active_links(const struct ieee80211_sub_if_data *sdata,
 					     char *buf, int buflen)
 {
@@ -733,7 +726,7 @@  static void add_sta_files(struct ieee80211_sub_if_data *sdata)
 	DEBUGFS_ADD_MODE(uapsd_queues, 0600);
 	DEBUGFS_ADD_MODE(uapsd_max_sp_len, 0600);
 	DEBUGFS_ADD_MODE(tdls_wider_bw, 0600);
-	DEBUGFS_ADD_MODE(valid_links, 0200);
+	DEBUGFS_ADD_X16(valid_links, 0400);
 	DEBUGFS_ADD_MODE(active_links, 0600);
 	DEBUGFS_ADD_X16(dormant_links, 0400);
 }