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>
This commit is contained in:
Johannes Berg
2013-11-13 13:37:47 +01:00
parent 7869303b17
commit ad7e718c9b
6 changed files with 348 additions and 74 deletions

View File

@@ -1162,6 +1162,19 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
return false;
}
/**
* wdev_to_ieee80211_vif - return a vif struct from a wdev
* @wdev: the wdev to get the vif for
*
* This can be used by mac80211 drivers with direct cfg80211 APIs
* (like the vendor commands) that get a wdev.
*
* 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 ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
/**
* enum ieee80211_key_flags - key flags
*