summaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-12 07:53:24 +0100
committerJohannes Berg <johannes.berg@intel.com>2015-03-16 09:30:30 +0100
commitdc5a1ad7bd830b7789ba2950342bdecfe4787945 (patch)
tree110a5076d8e31c96775cc04ef4e906ad17454a9e /include/net/mac80211.h
parentmac80211: add comment for rx_path_lock (diff)
downloadlinux-dc5a1ad7bd830b7789ba2950342bdecfe4787945.tar.xz
linux-dc5a1ad7bd830b7789ba2950342bdecfe4787945.zip
mac80211: allow to get wireless_dev structure from ieee80211_vif
This will allow mac80211 drivers to call cfg80211 APIs with the right handle. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a7756e45465e..157c0f151766 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1282,6 +1282,19 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
/**
+ * ieee80211_vif_to_wdev - return a wdev struct from a vif
+ * @vif: the vif to get the wdev for
+ *
+ * This can be used by mac80211 drivers with direct cfg80211 APIs
+ * (like the vendor commands) that needs to get the wdev for a vif.
+ *
+ * Note that this function may return %NULL if the given wdev isn't
+ * associated with a vif that the driver knows about (e.g. monitor
+ * or AP_VLAN interfaces.)
+ */
+struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif);
+
+/**
* enum ieee80211_key_flags - key flags
*
* These flags are used for communication about keys between the driver