hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/net/mac80211/rate.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright 2002-2005, Instant802 Networks, Inc.
34 * Copyright 2005, Devicescape Software, Inc.
45 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #ifndef IEEE80211_RATE_H
....@@ -63,12 +60,26 @@
6360 #endif
6461 }
6562
66
-static inline void rate_control_remove_sta_debugfs(struct sta_info *sta)
63
+extern const struct file_operations rcname_ops;
64
+
65
+static inline void rate_control_add_debugfs(struct ieee80211_local *local)
6766 {
6867 #ifdef CONFIG_MAC80211_DEBUGFS
69
- struct rate_control_ref *ref = sta->rate_ctrl;
70
- if (ref && ref->ops->remove_sta_debugfs)
71
- ref->ops->remove_sta_debugfs(ref->priv, sta->rate_ctrl_priv);
68
+ struct dentry *debugfsdir;
69
+
70
+ if (!local->rate_ctrl)
71
+ return;
72
+
73
+ if (!local->rate_ctrl->ops->add_debugfs)
74
+ return;
75
+
76
+ debugfsdir = debugfs_create_dir("rc", local->hw.wiphy->debugfsdir);
77
+ local->debugfs.rcdir = debugfsdir;
78
+ debugfs_create_file("name", 0400, debugfsdir,
79
+ local->rate_ctrl, &rcname_ops);
80
+
81
+ local->rate_ctrl->ops->add_debugfs(&local->hw, local->rate_ctrl->priv,
82
+ debugfsdir);
7283 #endif
7384 }
7485
....@@ -91,19 +102,6 @@
91102 return 0;
92103 }
93104 static inline void rc80211_minstrel_exit(void)
94
-{
95
-}
96
-#endif
97
-
98
-#ifdef CONFIG_MAC80211_RC_MINSTREL_HT
99
-int rc80211_minstrel_ht_init(void);
100
-void rc80211_minstrel_ht_exit(void);
101
-#else
102
-static inline int rc80211_minstrel_ht_init(void)
103
-{
104
- return 0;
105
-}
106
-static inline void rc80211_minstrel_ht_exit(void)
107105 {
108106 }
109107 #endif