aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_sta.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-19 22:16:02 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-21 05:46:25 -0500
commit77d2ece6fde80631193054edc9c9a3edad519565 (patch)
treeea8597ad4790f00f064a482fa837480d1cf8ae53 /net/mac80211/debugfs_sta.c
parentfe5f255930af02ef3c3e0d00545b674e7e9d0cfb (diff)
mac80211: Add debugfs callbacks for station addition/removal
Provide drivers with hooks to create debugfs files when a new station is added. This would help drivers to take advantage of mac80211's station list infrastructure and not maintain tedious station management code internally. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> [ifdef inline wrapper functions] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r--net/mac80211/debugfs_sta.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 3d103929d41a..89281d24b094 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -14,6 +14,7 @@
14#include "debugfs.h" 14#include "debugfs.h"
15#include "debugfs_sta.h" 15#include "debugfs_sta.h"
16#include "sta_info.h" 16#include "sta_info.h"
17#include "driver-ops.h"
17 18
18/* sta attributtes */ 19/* sta attributtes */
19 20
@@ -334,6 +335,8 @@ STA_OPS(ht_capa);
334 335
335void ieee80211_sta_debugfs_add(struct sta_info *sta) 336void ieee80211_sta_debugfs_add(struct sta_info *sta)
336{ 337{
338 struct ieee80211_local *local = sta->local;
339 struct ieee80211_sub_if_data *sdata = sta->sdata;
337 struct dentry *stations_dir = sta->sdata->debugfs.subdir_stations; 340 struct dentry *stations_dir = sta->sdata->debugfs.subdir_stations;
338 u8 mac[3*ETH_ALEN]; 341 u8 mac[3*ETH_ALEN];
339 342
@@ -379,10 +382,16 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
379 DEBUGFS_ADD_COUNTER(tx_retry_failed, tx_retry_failed); 382 DEBUGFS_ADD_COUNTER(tx_retry_failed, tx_retry_failed);
380 DEBUGFS_ADD_COUNTER(tx_retry_count, tx_retry_count); 383 DEBUGFS_ADD_COUNTER(tx_retry_count, tx_retry_count);
381 DEBUGFS_ADD_COUNTER(wep_weak_iv_count, wep_weak_iv_count); 384 DEBUGFS_ADD_COUNTER(wep_weak_iv_count, wep_weak_iv_count);
385
386 drv_sta_add_debugfs(local, sdata, &sta->sta, sta->debugfs.dir);
382} 387}
383 388
384void ieee80211_sta_debugfs_remove(struct sta_info *sta) 389void ieee80211_sta_debugfs_remove(struct sta_info *sta)
385{ 390{
391 struct ieee80211_local *local = sta->local;
392 struct ieee80211_sub_if_data *sdata = sta->sdata;
393
394 drv_sta_remove_debugfs(local, sdata, &sta->sta, sta->debugfs.dir);
386 debugfs_remove_recursive(sta->debugfs.dir); 395 debugfs_remove_recursive(sta->debugfs.dir);
387 sta->debugfs.dir = NULL; 396 sta->debugfs.dir = NULL;
388} 397}