aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-09-15 04:53:01 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-19 15:49:11 -0400
commit0c28ec587a2f061b93a98ac02a53b4152cbe48f4 (patch)
treefa65521de60bc77f44eee5c0314543108f856c9c /include
parent6e82bc4a5bf3a1ce597324c8667baa6a2ed12604 (diff)
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.h10
-rw-r--r--include/net/cfg80211.h18
2 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 72f3933938c0..b5e0a5c344fd 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -777,6 +777,13 @@ struct ieee80211_mmie {
777 u8 mic[8]; 777 u8 mic[8];
778} __attribute__ ((packed)); 778} __attribute__ ((packed));
779 779
780struct ieee80211_vendor_ie {
781 u8 element_id;
782 u8 len;
783 u8 oui[3];
784 u8 oui_type;
785} __packed;
786
780/* Control frames */ 787/* Control frames */
781struct ieee80211_rts { 788struct ieee80211_rts {
782 __le16 frame_control; 789 __le16 frame_control;
@@ -1470,6 +1477,9 @@ enum ieee80211_sa_query_action {
1470 1477
1471#define WLAN_PMKID_LEN 16 1478#define WLAN_PMKID_LEN 16
1472 1479
1480#define WLAN_OUI_WFA 0x506f9a
1481#define WLAN_OUI_TYPE_WFA_P2P 9
1482
1473/* 1483/*
1474 * WMM/802.11e Tspec Element 1484 * WMM/802.11e Tspec Element
1475 */ 1485 */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index b42136a61f3a..9518b5cfb822 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2459,6 +2459,24 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb);
2459const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); 2459const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len);
2460 2460
2461/** 2461/**
2462 * cfg80211_find_vendor_ie - find vendor specific information element in data
2463 *
2464 * @oui: vendor OUI
2465 * @oui_type: vendor-specific OUI type
2466 * @ies: data consisting of IEs
2467 * @len: length of data
2468 *
2469 * This function will return %NULL if the vendor specific element ID
2470 * could not be found or if the element is invalid (claims to be
2471 * longer than the given data), or a pointer to the first byte
2472 * of the requested element, that is the byte containing the
2473 * element ID. There are no checks on the element length
2474 * other than having to fit into the given data.
2475 */
2476const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
2477 const u8 *ies, int len);
2478
2479/**
2462 * DOC: Regulatory enforcement infrastructure 2480 * DOC: Regulatory enforcement infrastructure
2463 * 2481 *
2464 * TODO 2482 * TODO