diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-11-13 07:37:47 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-03 10:27:17 -0500 |
commit | ad7e718c9b4f717823fd920a0103f7b0fb06183f (patch) | |
tree | cb87f5792da6330705586e232f8e39b46e188e26 /net/mac80211/util.c | |
parent | 7869303b17a3cc78c9e9f26544be98b5734ac97c (diff) |
nl80211: vendor command support
Add support for vendor-specific commands to nl80211. This is
intended to be used for really vendor-specific functionality
that can't be implemented in a generic fashion for any reason.
It's *NOT* intended to be used for any normal/generic feature
or any optimisations that could be implemented across drivers.
Currently, only vendor commands (with replies) are supported,
no dump operations or vendor-specific notifications.
Also add a function wdev_to_ieee80211_vif() to mac80211 which
is needed for mac80211-based drivers wanting to implement any
vendor commands.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 06265d7f8cc3..4a376a724153 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -642,6 +642,17 @@ void ieee80211_iterate_active_interfaces_rtnl( | |||
642 | } | 642 | } |
643 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_rtnl); | 643 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_rtnl); |
644 | 644 | ||
645 | struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev) | ||
646 | { | ||
647 | struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); | ||
648 | |||
649 | if (!ieee80211_sdata_running(sdata) || | ||
650 | !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) | ||
651 | return NULL; | ||
652 | return &sdata->vif; | ||
653 | } | ||
654 | EXPORT_SYMBOL_GPL(wdev_to_ieee80211_vif); | ||
655 | |||
645 | /* | 656 | /* |
646 | * Nothing should have been stuffed into the workqueue during | 657 | * Nothing should have been stuffed into the workqueue during |
647 | * the suspend->resume cycle. If this WARN is seen then there | 658 | * the suspend->resume cycle. If this WARN is seen then there |