aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.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.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.c')
-rw-r--r--net/mac80211/ieee80211.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 48a832d4e175..6e36df67f8d5 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -35,6 +35,9 @@
35#include "aes_ccm.h" 35#include "aes_ccm.h"
36#include "ieee80211_led.h" 36#include "ieee80211_led.h"
37#include "ieee80211_cfg.h" 37#include "ieee80211_cfg.h"
38#include "debugfs.h"
39#include "debugfs_netdev.h"
40#include "debugfs_key.h"
38 41
39/* privid for wiphys to determine whether they belong to us or not */ 42/* privid for wiphys to determine whether they belong to us or not */
40void *mac80211_wiphy_privid = &mac80211_wiphy_privid; 43void *mac80211_wiphy_privid = &mac80211_wiphy_privid;
@@ -108,6 +111,7 @@ static void ieee80211_key_release(struct kref *kref)
108 key = container_of(kref, struct ieee80211_key, kref); 111 key = container_of(kref, struct ieee80211_key, kref);
109 if (key->alg == ALG_CCMP) 112 if (key->alg == ALG_CCMP)
110 ieee80211_aes_key_free(key->u.ccmp.tfm); 113 ieee80211_aes_key_free(key->u.ccmp.tfm);
114 ieee80211_debugfs_key_remove(key);
111 kfree(key); 115 kfree(key);
112} 116}
113 117
@@ -4704,6 +4708,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
4704 goto fail_workqueue; 4708 goto fail_workqueue;
4705 } 4709 }
4706 4710
4711 debugfs_hw_add(local);
4712
4707 local->hw.conf.beacon_int = 1000; 4713 local->hw.conf.beacon_int = 1000;
4708 4714
4709 local->wstats_flags |= local->hw.max_rssi ? 4715 local->wstats_flags |= local->hw.max_rssi ?
@@ -4731,6 +4737,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
4731 if (result < 0) 4737 if (result < 0)
4732 goto fail_dev; 4738 goto fail_dev;
4733 4739
4740 ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));
4741
4734 result = ieee80211_init_rate_ctrl_alg(local, NULL); 4742 result = ieee80211_init_rate_ctrl_alg(local, NULL);
4735 if (result < 0) { 4743 if (result < 0) {
4736 printk(KERN_DEBUG "%s: Failed to initialize rate control " 4744 printk(KERN_DEBUG "%s: Failed to initialize rate control "
@@ -4765,11 +4773,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
4765fail_wep: 4773fail_wep:
4766 rate_control_deinitialize(local); 4774 rate_control_deinitialize(local);
4767fail_rate: 4775fail_rate:
4776 ieee80211_debugfs_remove_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));
4768 unregister_netdevice(local->mdev); 4777 unregister_netdevice(local->mdev);
4769fail_dev: 4778fail_dev:
4770 rtnl_unlock(); 4779 rtnl_unlock();
4771 sta_info_stop(local); 4780 sta_info_stop(local);
4772fail_sta_info: 4781fail_sta_info:
4782 debugfs_hw_del(local);
4773 destroy_workqueue(local->hw.workqueue); 4783 destroy_workqueue(local->hw.workqueue);
4774fail_workqueue: 4784fail_workqueue:
4775 wiphy_unregister(local->hw.wiphy); 4785 wiphy_unregister(local->hw.wiphy);
@@ -4844,6 +4854,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
4844 ieee80211_clear_tx_pending(local); 4854 ieee80211_clear_tx_pending(local);
4845 sta_info_stop(local); 4855 sta_info_stop(local);
4846 rate_control_deinitialize(local); 4856 rate_control_deinitialize(local);
4857 debugfs_hw_del(local);
4847 4858
4848 for (i = 0; i < NUM_IEEE80211_MODES; i++) { 4859 for (i = 0; i < NUM_IEEE80211_MODES; i++) {
4849 kfree(local->supp_rates[i]); 4860 kfree(local->supp_rates[i]);
@@ -4953,6 +4964,8 @@ static int __init ieee80211_init(void)
4953 return ret; 4964 return ret;
4954 } 4965 }
4955 4966
4967 ieee80211_debugfs_netdev_init();
4968
4956 return 0; 4969 return 0;
4957} 4970}
4958 4971
@@ -4960,6 +4973,7 @@ static int __init ieee80211_init(void)
4960static void __exit ieee80211_exit(void) 4973static void __exit ieee80211_exit(void)
4961{ 4974{
4962 ieee80211_wme_unregister(); 4975 ieee80211_wme_unregister();
4976 ieee80211_debugfs_netdev_exit();
4963} 4977}
4964 4978
4965 4979