aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_iface.c
diff options
context:
space:
mode:
authorJiri Benc <jbenc@suse.cz>2007-05-05 14:46:38 -0400
committerDavid S. Miller <davem@davemloft.net>2007-05-05 14:46:38 -0400
commite9f207f0ff90bf60b825800d7450e6f2ff2eab88 (patch)
tree22bd39116f2cae8d4ce6169eb91e4b9a7204770f /net/mac80211/ieee80211_iface.c
parentf0706e828e96d0fa4e80c0d25aa98523f6d589a0 (diff)
[MAC80211]: Add debugfs attributes.
Export various mac80211 internal variables through debugfs. Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ieee80211_iface.c')
-rw-r--r--net/mac80211/ieee80211_iface.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c
index 64267d4b31a4..cf0f32e8c2a2 100644
--- a/net/mac80211/ieee80211_iface.c
+++ b/net/mac80211/ieee80211_iface.c
@@ -14,6 +14,7 @@
14#include <net/mac80211.h> 14#include <net/mac80211.h>
15#include "ieee80211_i.h" 15#include "ieee80211_i.h"
16#include "sta_info.h" 16#include "sta_info.h"
17#include "debugfs_netdev.h"
17 18
18void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata) 19void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata)
19{ 20{
@@ -73,6 +74,7 @@ int ieee80211_if_add(struct net_device *dev, const char *name,
73 if (ret) 74 if (ret)
74 goto fail; 75 goto fail;
75 76
77 ieee80211_debugfs_add_netdev(sdata);
76 ieee80211_if_set_type(ndev, type); 78 ieee80211_if_set_type(ndev, type);
77 79
78 write_lock_bh(&local->sub_if_lock); 80 write_lock_bh(&local->sub_if_lock);
@@ -126,6 +128,8 @@ int ieee80211_if_add_mgmt(struct ieee80211_local *local)
126 if (ret) 128 if (ret)
127 goto fail; 129 goto fail;
128 130
131 ieee80211_debugfs_add_netdev(nsdata);
132
129 if (local->open_count > 0) 133 if (local->open_count > 0)
130 dev_open(ndev); 134 dev_open(ndev);
131 local->apdev = ndev; 135 local->apdev = ndev;
@@ -142,6 +146,7 @@ void ieee80211_if_del_mgmt(struct ieee80211_local *local)
142 146
143 ASSERT_RTNL(); 147 ASSERT_RTNL();
144 apdev = local->apdev; 148 apdev = local->apdev;
149 ieee80211_debugfs_remove_netdev(IEEE80211_DEV_TO_SUB_IF(apdev));
145 local->apdev = NULL; 150 local->apdev = NULL;
146 unregister_netdevice(apdev); 151 unregister_netdevice(apdev);
147} 152}
@@ -150,6 +155,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
150{ 155{
151 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 156 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
152 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 157 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
158 int oldtype = sdata->type;
153 159
154 sdata->type = type; 160 sdata->type = type;
155 switch (type) { 161 switch (type) {
@@ -195,6 +201,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
195 printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x", 201 printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",
196 dev->name, __FUNCTION__, type); 202 dev->name, __FUNCTION__, type);
197 } 203 }
204 ieee80211_debugfs_change_if_type(sdata, oldtype);
198 ieee80211_update_default_wep_only(local); 205 ieee80211_update_default_wep_only(local);
199} 206}
200 207
@@ -303,6 +310,7 @@ void __ieee80211_if_del(struct ieee80211_local *local,
303{ 310{
304 struct net_device *dev = sdata->dev; 311 struct net_device *dev = sdata->dev;
305 312
313 ieee80211_debugfs_remove_netdev(sdata);
306 unregister_netdevice(dev); 314 unregister_netdevice(dev);
307 /* Except master interface, the net_device will be freed by 315 /* Except master interface, the net_device will be freed by
308 * net_device->destructor (i. e. ieee80211_if_free). */ 316 * net_device->destructor (i. e. ieee80211_if_free). */