diff options
author | David S. Miller <davem@davemloft.net> | 2020-04-24 13:17:01 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-24 13:17:01 -0700 |
commit | c651b461b55b82029f1e78e9430bde1a0d7ec5af (patch) | |
tree | cd2e94423877e6024e00c1e4ff0e661e17361db0 /net/mac80211/rate.h | |
parent | 0303b3a168080934a370a570ba162072139eedbe (diff) | |
parent | 8ca47eb9f9e4e10e7e7fa695731a88941732c38d (diff) | |
download | linux-stable-c651b461b55b82029f1e78e9430bde1a0d7ec5af.tar.gz linux-stable-c651b461b55b82029f1e78e9430bde1a0d7ec5af.tar.bz2 linux-stable-c651b461b55b82029f1e78e9430bde1a0d7ec5af.zip |
Merge tag 'mac80211-for-net-2020-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
Just three changes:
* fix a wrong GFP_KERNEL in hwsim
* fix the debugfs mess after the mac80211 registration race fix
* suppress false-positive RCU list lockdep warnings
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/rate.h')
-rw-r--r-- | net/mac80211/rate.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 5397c6dad056..79b44d3db171 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h @@ -60,6 +60,29 @@ static inline void rate_control_add_sta_debugfs(struct sta_info *sta) #endif } +extern const struct file_operations rcname_ops; + +static inline void rate_control_add_debugfs(struct ieee80211_local *local) +{ +#ifdef CONFIG_MAC80211_DEBUGFS + struct dentry *debugfsdir; + + if (!local->rate_ctrl) + return; + + if (!local->rate_ctrl->ops->add_debugfs) + return; + + debugfsdir = debugfs_create_dir("rc", local->hw.wiphy->debugfsdir); + local->debugfs.rcdir = debugfsdir; + debugfs_create_file("name", 0400, debugfsdir, + local->rate_ctrl, &rcname_ops); + + local->rate_ctrl->ops->add_debugfs(&local->hw, local->rate_ctrl->priv, + debugfsdir); +#endif +} + void ieee80211_check_rate_mask(struct ieee80211_sub_if_data *sdata); /* Get a reference to the rate control algorithm. If `name' is NULL, get the |