diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-11-19 22:16:02 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-21 05:46:25 -0500 |
commit | 77d2ece6fde80631193054edc9c9a3edad519565 (patch) | |
tree | ea8597ad4790f00f064a482fa837480d1cf8ae53 /net/mac80211/driver-ops.h | |
parent | fe5f255930af02ef3c3e0d00545b674e7e9d0cfb (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/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 284dd02385e4..68c27aaf5c93 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -490,6 +490,38 @@ static inline void drv_sta_remove(struct ieee80211_local *local, | |||
490 | trace_drv_return_void(local); | 490 | trace_drv_return_void(local); |
491 | } | 491 | } |
492 | 492 | ||
493 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
494 | static inline void drv_sta_add_debugfs(struct ieee80211_local *local, | ||
495 | struct ieee80211_sub_if_data *sdata, | ||
496 | struct ieee80211_sta *sta, | ||
497 | struct dentry *dir) | ||
498 | { | ||
499 | might_sleep(); | ||
500 | |||
501 | sdata = get_bss_sdata(sdata); | ||
502 | check_sdata_in_driver(sdata); | ||
503 | |||
504 | if (local->ops->sta_add_debugfs) | ||
505 | local->ops->sta_add_debugfs(&local->hw, &sdata->vif, | ||
506 | sta, dir); | ||
507 | } | ||
508 | |||
509 | static inline void drv_sta_remove_debugfs(struct ieee80211_local *local, | ||
510 | struct ieee80211_sub_if_data *sdata, | ||
511 | struct ieee80211_sta *sta, | ||
512 | struct dentry *dir) | ||
513 | { | ||
514 | might_sleep(); | ||
515 | |||
516 | sdata = get_bss_sdata(sdata); | ||
517 | check_sdata_in_driver(sdata); | ||
518 | |||
519 | if (local->ops->sta_remove_debugfs) | ||
520 | local->ops->sta_remove_debugfs(&local->hw, &sdata->vif, | ||
521 | sta, dir); | ||
522 | } | ||
523 | #endif | ||
524 | |||
493 | static inline __must_check | 525 | static inline __must_check |
494 | int drv_sta_state(struct ieee80211_local *local, | 526 | int drv_sta_state(struct ieee80211_local *local, |
495 | struct ieee80211_sub_if_data *sdata, | 527 | struct ieee80211_sub_if_data *sdata, |