diff options
| author | Alexander Bondar <alexander.bondar@intel.com> | 2012-12-22 03:43:33 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-11 12:44:58 -0500 |
| commit | b207cdb07f3f01ec1adaac62e9d0cc918c60a81a (patch) | |
| tree | f99fa790d54a25e99c04bb43badd3d8ed8159172 /include/net | |
| parent | 776b3580178f2065838fa0db0eb7a41b57495c0a (diff) | |
mac80211: add vif debugfs driver callbacks
Add debugfs driver callbacks so drivers can add
debugfs entries for interfaces. Note that they
_must_ remove the entries again as add/remove in
the driver doesn't correspond to add/remove in
debugfs; the former is up/down while the latter
is netdev create/destroy.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
| -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 7da11211825d..46e08ba92b97 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -2167,6 +2167,18 @@ enum ieee80211_rate_control_changed { | |||
| 2167 | * MAC address of the device going away. | 2167 | * MAC address of the device going away. |
| 2168 | * Hence, this callback must be implemented. It can sleep. | 2168 | * Hence, this callback must be implemented. It can sleep. |
| 2169 | * | 2169 | * |
| 2170 | * @add_interface_debugfs: Drivers can use this callback to add debugfs files | ||
| 2171 | * when a vif is added to mac80211. This callback and | ||
| 2172 | * @remove_interface_debugfs should be within a CONFIG_MAC80211_DEBUGFS | ||
| 2173 | * conditional. @remove_interface_debugfs must be provided for cleanup. | ||
| 2174 | * This callback can sleep. | ||
| 2175 | * | ||
| 2176 | * @remove_interface_debugfs: Remove the debugfs files which were added using | ||
| 2177 | * @add_interface_debugfs. This callback must remove all debugfs entries | ||
| 2178 | * that were added because mac80211 only removes interface debugfs when the | ||
| 2179 | * interface is destroyed, not when it is removed from the driver. | ||
| 2180 | * This callback can sleep. | ||
| 2181 | * | ||
| 2170 | * @config: Handler for configuration requests. IEEE 802.11 code calls this | 2182 | * @config: Handler for configuration requests. IEEE 802.11 code calls this |
| 2171 | * function to change hardware configuration, e.g., channel. | 2183 | * function to change hardware configuration, e.g., channel. |
| 2172 | * This function should never fail but returns a negative error code | 2184 | * This function should never fail but returns a negative error code |
| @@ -2580,6 +2592,12 @@ struct ieee80211_ops { | |||
| 2580 | struct ieee80211_vif *vif, | 2592 | struct ieee80211_vif *vif, |
| 2581 | struct ieee80211_sta *sta, | 2593 | struct ieee80211_sta *sta, |
| 2582 | struct dentry *dir); | 2594 | struct dentry *dir); |
| 2595 | void (*add_interface_debugfs)(struct ieee80211_hw *hw, | ||
| 2596 | struct ieee80211_vif *vif, | ||
| 2597 | struct dentry *dir); | ||
| 2598 | void (*remove_interface_debugfs)(struct ieee80211_hw *hw, | ||
| 2599 | struct ieee80211_vif *vif, | ||
| 2600 | struct dentry *dir); | ||
| 2583 | #endif | 2601 | #endif |
| 2584 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2602 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
| 2585 | enum sta_notify_cmd, struct ieee80211_sta *sta); | 2603 | enum sta_notify_cmd, struct ieee80211_sta *sta); |
