summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2012-12-22 10:43:33 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-02-11 18:44:58 +0100
commitb207cdb07f3f01ec1adaac62e9d0cc918c60a81a (patch)
treef99fa790d54a25e99c04bb43badd3d8ed8159172 /include/net
parent776b3580178f2065838fa0db0eb7a41b57495c0a (diff)
downloadop-kernel-dev-b207cdb07f3f01ec1adaac62e9d0cc918c60a81a.zip
op-kernel-dev-b207cdb07f3f01ec1adaac62e9d0cc918c60a81a.tar.gz
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.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 7da1121..46e08ba 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2167,6 +2167,18 @@ enum ieee80211_rate_control_changed {
* MAC address of the device going away.
* Hence, this callback must be implemented. It can sleep.
*
+ * @add_interface_debugfs: Drivers can use this callback to add debugfs files
+ * when a vif is added to mac80211. This callback and
+ * @remove_interface_debugfs should be within a CONFIG_MAC80211_DEBUGFS
+ * conditional. @remove_interface_debugfs must be provided for cleanup.
+ * This callback can sleep.
+ *
+ * @remove_interface_debugfs: Remove the debugfs files which were added using
+ * @add_interface_debugfs. This callback must remove all debugfs entries
+ * that were added because mac80211 only removes interface debugfs when the
+ * interface is destroyed, not when it is removed from the driver.
+ * This callback can sleep.
+ *
* @config: Handler for configuration requests. IEEE 802.11 code calls this
* function to change hardware configuration, e.g., channel.
* This function should never fail but returns a negative error code
@@ -2580,6 +2592,12 @@ struct ieee80211_ops {
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct dentry *dir);
+ void (*add_interface_debugfs)(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct dentry *dir);
+ void (*remove_interface_debugfs)(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct dentry *dir);
#endif
void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum sta_notify_cmd, struct ieee80211_sta *sta);
OpenPOWER on IntegriCloud