summaryrefslogtreecommitdiff
path: root/net/mac80211/debugfs.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-07-09 14:40:35 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-07-14 14:30:07 -0400
commit75636525fbfa78fa33fd754c89785cfde750acd3 (patch)
tree2c614681382a53bec50248c621ba4c8bb07ce670 /net/mac80211/debugfs.c
parent3e122be089e6fb8d3f322416da4cdbb80ce12927 (diff)
downloadlinux-3.10-75636525fbfa78fa33fd754c89785cfde750acd3.tar.gz
linux-3.10-75636525fbfa78fa33fd754c89785cfde750acd3.tar.bz2
linux-3.10-75636525fbfa78fa33fd754c89785cfde750acd3.zip
mac80211: revamp virtual interface handling
This patch revamps the virtual interface handling and makes the code much easier to follow. Fewer functions, better names, less spaghetti code. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r--net/mac80211/debugfs.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index d20d90eead1..ee509f1109e 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -70,16 +70,6 @@ DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s",
/* statistics stuff */
-static inline int rtnl_lock_local(struct ieee80211_local *local)
-{
- rtnl_lock();
- if (unlikely(local->reg_state != IEEE80211_DEV_REGISTERED)) {
- rtnl_unlock();
- return -ENODEV;
- }
- return 0;
-}
-
#define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \
DEBUGFS_READONLY_FILE(stats_ ##name, buflen, fmt, ##value)
@@ -96,10 +86,7 @@ static ssize_t format_devstat_counter(struct ieee80211_local *local,
if (!local->ops->get_stats)
return -EOPNOTSUPP;
- res = rtnl_lock_local(local);
- if (res)
- return res;
-
+ rtnl_lock();
res = local->ops->get_stats(local_to_hw(local), &stats);
rtnl_unlock();
if (!res)