diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-03-12 02:53:24 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-03-16 04:30:30 -0400 |
commit | dc5a1ad7bd830b7789ba2950342bdecfe4787945 (patch) | |
tree | 110a5076d8e31c96775cc04ef4e906ad17454a9e /net/mac80211/util.c | |
parent | 45ceeee81ecdd437f7ecac77ae79263486c755e8 (diff) |
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 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 37d85d36dd2c..e664b28821a2 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -745,6 +745,18 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev) | |||
745 | } | 745 | } |
746 | EXPORT_SYMBOL_GPL(wdev_to_ieee80211_vif); | 746 | EXPORT_SYMBOL_GPL(wdev_to_ieee80211_vif); |
747 | 747 | ||
748 | struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif) | ||
749 | { | ||
750 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
751 | |||
752 | if (!ieee80211_sdata_running(sdata) || | ||
753 | !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) | ||
754 | return NULL; | ||
755 | |||
756 | return &sdata->wdev; | ||
757 | } | ||
758 | EXPORT_SYMBOL_GPL(ieee80211_vif_to_wdev); | ||
759 | |||
748 | /* | 760 | /* |
749 | * Nothing should have been stuffed into the workqueue during | 761 | * Nothing should have been stuffed into the workqueue during |
750 | * the suspend->resume cycle. Since we can't check each caller | 762 | * the suspend->resume cycle. Since we can't check each caller |