diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 3 | ||||
-rw-r--r-- | net/wireless/core.h | 11 | ||||
-rw-r--r-- | net/wireless/debugfs.c | 15 | ||||
-rw-r--r-- | net/wireless/debugfs.h | 3 |
4 files changed, 2 insertions, 30 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 07252967be9..02835172b22 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -546,7 +546,7 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
546 | * First remove the hardware from everywhere, this makes | 546 | * First remove the hardware from everywhere, this makes |
547 | * it impossible to find from userspace. | 547 | * it impossible to find from userspace. |
548 | */ | 548 | */ |
549 | cfg80211_debugfs_rdev_del(rdev); | 549 | debugfs_remove_recursive(rdev->wiphy.debugfsdir); |
550 | list_del(&rdev->list); | 550 | list_del(&rdev->list); |
551 | 551 | ||
552 | /* | 552 | /* |
@@ -569,7 +569,6 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
569 | 569 | ||
570 | cfg80211_rdev_list_generation++; | 570 | cfg80211_rdev_list_generation++; |
571 | device_del(&rdev->wiphy.dev); | 571 | device_del(&rdev->wiphy.dev); |
572 | debugfs_remove(rdev->wiphy.debugfsdir); | ||
573 | 572 | ||
574 | mutex_unlock(&cfg80211_mutex); | 573 | mutex_unlock(&cfg80211_mutex); |
575 | 574 | ||
diff --git a/net/wireless/core.h b/net/wireless/core.h index 68b321997d4..5aeebb9085f 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -72,17 +72,6 @@ struct cfg80211_registered_device { | |||
72 | /* current channel */ | 72 | /* current channel */ |
73 | struct ieee80211_channel *channel; | 73 | struct ieee80211_channel *channel; |
74 | 74 | ||
75 | #ifdef CONFIG_CFG80211_DEBUGFS | ||
76 | /* Debugfs entries */ | ||
77 | struct wiphy_debugfsdentries { | ||
78 | struct dentry *rts_threshold; | ||
79 | struct dentry *fragmentation_threshold; | ||
80 | struct dentry *short_retry_limit; | ||
81 | struct dentry *long_retry_limit; | ||
82 | struct dentry *ht40allow_map; | ||
83 | } debugfs; | ||
84 | #endif | ||
85 | |||
86 | /* must be last because of the way we do wiphy_priv(), | 75 | /* must be last because of the way we do wiphy_priv(), |
87 | * and it should at least be aligned to NETDEV_ALIGN */ | 76 | * and it should at least be aligned to NETDEV_ALIGN */ |
88 | struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); | 77 | struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); |
diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c index 13d93d84f90..2e489561503 100644 --- a/net/wireless/debugfs.c +++ b/net/wireless/debugfs.c | |||
@@ -104,11 +104,7 @@ static const struct file_operations ht40allow_map_ops = { | |||
104 | }; | 104 | }; |
105 | 105 | ||
106 | #define DEBUGFS_ADD(name) \ | 106 | #define DEBUGFS_ADD(name) \ |
107 | rdev->debugfs.name = debugfs_create_file(#name, S_IRUGO, phyd, \ | 107 | debugfs_create_file(#name, S_IRUGO, phyd, &rdev->wiphy, &name## _ops); |
108 | &rdev->wiphy, &name## _ops); | ||
109 | #define DEBUGFS_DEL(name) \ | ||
110 | debugfs_remove(rdev->debugfs.name); \ | ||
111 | rdev->debugfs.name = NULL; | ||
112 | 108 | ||
113 | void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) | 109 | void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) |
114 | { | 110 | { |
@@ -120,12 +116,3 @@ void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) | |||
120 | DEBUGFS_ADD(long_retry_limit); | 116 | DEBUGFS_ADD(long_retry_limit); |
121 | DEBUGFS_ADD(ht40allow_map); | 117 | DEBUGFS_ADD(ht40allow_map); |
122 | } | 118 | } |
123 | |||
124 | void cfg80211_debugfs_rdev_del(struct cfg80211_registered_device *rdev) | ||
125 | { | ||
126 | DEBUGFS_DEL(rts_threshold); | ||
127 | DEBUGFS_DEL(fragmentation_threshold); | ||
128 | DEBUGFS_DEL(short_retry_limit); | ||
129 | DEBUGFS_DEL(long_retry_limit); | ||
130 | DEBUGFS_DEL(ht40allow_map); | ||
131 | } | ||
diff --git a/net/wireless/debugfs.h b/net/wireless/debugfs.h index 6419b6d6ce3..74fdd381142 100644 --- a/net/wireless/debugfs.h +++ b/net/wireless/debugfs.h | |||
@@ -3,12 +3,9 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_CFG80211_DEBUGFS | 4 | #ifdef CONFIG_CFG80211_DEBUGFS |
5 | void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev); | 5 | void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev); |
6 | void cfg80211_debugfs_rdev_del(struct cfg80211_registered_device *rdev); | ||
7 | #else | 6 | #else |
8 | static inline | 7 | static inline |
9 | void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) {} | 8 | void cfg80211_debugfs_rdev_add(struct cfg80211_registered_device *rdev) {} |
10 | static inline | ||
11 | void cfg80211_debugfs_rdev_del(struct cfg80211_registered_device *rdev) {} | ||
12 | #endif | 9 | #endif |
13 | 10 | ||
14 | #endif /* __CFG80211_DEBUGFS_H */ | 11 | #endif /* __CFG80211_DEBUGFS_H */ |