diff options
author | Eliad Peller <eliad@wizery.com> | 2011-09-15 11:53:01 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-19 15:49:11 -0400 |
commit | 0c28ec587a2f061b93a98ac02a53b4152cbe48f4 (patch) | |
tree | fa65521de60bc77f44eee5c0314543108f856c9c /include | |
parent | 6e82bc4a5bf3a1ce597324c8667baa6a2ed12604 (diff) | |
download | linux-3.10-0c28ec587a2f061b93a98ac02a53b4152cbe48f4.tar.gz linux-3.10-0c28ec587a2f061b93a98ac02a53b4152cbe48f4.tar.bz2 linux-3.10-0c28ec587a2f061b93a98ac02a53b4152cbe48f4.zip |
cfg80211: add cfg80211_find_vendor_ie() function
Add function to find vendor-specific ie (along with
vendor-specific ie struct definition and P2P OUI values)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 10 | ||||
-rw-r--r-- | include/net/cfg80211.h | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 72f3933938c..b5e0a5c344f 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -777,6 +777,13 @@ struct ieee80211_mmie { u8 mic[8]; } __attribute__ ((packed)); +struct ieee80211_vendor_ie { + u8 element_id; + u8 len; + u8 oui[3]; + u8 oui_type; +} __packed; + /* Control frames */ struct ieee80211_rts { __le16 frame_control; @@ -1470,6 +1477,9 @@ enum ieee80211_sa_query_action { #define WLAN_PMKID_LEN 16 +#define WLAN_OUI_WFA 0x506f9a +#define WLAN_OUI_TYPE_WFA_P2P 9 + /* * WMM/802.11e Tspec Element */ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index b42136a61f3..9518b5cfb82 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2459,6 +2459,24 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb); const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); /** + * cfg80211_find_vendor_ie - find vendor specific information element in data + * + * @oui: vendor OUI + * @oui_type: vendor-specific OUI type + * @ies: data consisting of IEs + * @len: length of data + * + * This function will return %NULL if the vendor specific element ID + * could not be found or if the element is invalid (claims to be + * longer than the given data), or a pointer to the first byte + * of the requested element, that is the byte containing the + * element ID. There are no checks on the element length + * other than having to fit into the given data. + */ +const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type, + const u8 *ies, int len); + +/** * DOC: Regulatory enforcement infrastructure * * TODO |