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 /include | |
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 'include')
-rw-r--r-- | include/net/mac80211.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d11037b5b854..e1293c7e4d2c 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -2208,6 +2208,14 @@ enum ieee80211_rate_control_changed { | |||
2208 | * @sta_remove: Notifies low level driver about removal of an associated | 2208 | * @sta_remove: Notifies low level driver about removal of an associated |
2209 | * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep. | 2209 | * station, AP, IBSS/WDS/mesh peer etc. This callback can sleep. |
2210 | * | 2210 | * |
2211 | * @sta_add_debugfs: Drivers can use this callback to add debugfs files | ||
2212 | * when a station is added to mac80211's station list. This callback | ||
2213 | * and @sta_remove_debugfs should be within a CONFIG_MAC80211_DEBUGFS | ||
2214 | * conditional. This callback can sleep. | ||
2215 | * | ||
2216 | * @sta_remove_debugfs: Remove the debugfs files which were added using | ||
2217 | * @sta_add_debugfs. This callback can sleep. | ||
2218 | * | ||
2211 | * @sta_notify: Notifies low level driver about power state transition of an | 2219 | * @sta_notify: Notifies low level driver about power state transition of an |
2212 | * associated station, AP, IBSS/WDS/mesh peer etc. For a VIF operating | 2220 | * associated station, AP, IBSS/WDS/mesh peer etc. For a VIF operating |
2213 | * in AP mode, this callback will not be called when the flag | 2221 | * in AP mode, this callback will not be called when the flag |
@@ -2489,6 +2497,16 @@ struct ieee80211_ops { | |||
2489 | struct ieee80211_sta *sta); | 2497 | struct ieee80211_sta *sta); |
2490 | int (*sta_remove)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2498 | int (*sta_remove)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2491 | struct ieee80211_sta *sta); | 2499 | struct ieee80211_sta *sta); |
2500 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
2501 | void (*sta_add_debugfs)(struct ieee80211_hw *hw, | ||
2502 | struct ieee80211_vif *vif, | ||
2503 | struct ieee80211_sta *sta, | ||
2504 | struct dentry *dir); | ||
2505 | void (*sta_remove_debugfs)(struct ieee80211_hw *hw, | ||
2506 | struct ieee80211_vif *vif, | ||
2507 | struct ieee80211_sta *sta, | ||
2508 | struct dentry *dir); | ||
2509 | #endif | ||
2492 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2510 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2493 | enum sta_notify_cmd, struct ieee80211_sta *sta); | 2511 | enum sta_notify_cmd, struct ieee80211_sta *sta); |
2494 | int (*sta_state)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2512 | int (*sta_state)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |