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;
 
 #define WLAN_PMKID_LEN                 16
 
+#define WLAN_OUI_WFA                   0x506f9a
+#define WLAN_OUI_TYPE_WFA_P2P          9
+
 /*
  * WMM/802.11e Tspec Element
  */
 
  */
 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
  *
 
 }
 EXPORT_SYMBOL(cfg80211_find_ie);
 
+const u8 *cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
+                                 const u8 *ies, int len)
+{
+       struct ieee80211_vendor_ie *ie;
+       const u8 *pos = ies, *end = ies + len;
+       int ie_oui;
+
+       while (pos < end) {
+               pos = cfg80211_find_ie(WLAN_EID_VENDOR_SPECIFIC, pos,
+                                      end - pos);
+               if (!pos)
+                       return NULL;
+
+               if (end - pos < sizeof(*ie))
+                       return NULL;
+
+               ie = (struct ieee80211_vendor_ie *)pos;
+               ie_oui = ie->oui[0] << 16 | ie->oui[1] << 8 | ie->oui[2];
+               if (ie_oui == oui && ie->oui_type == oui_type)
+                       return pos;
+
+               pos += 2 + ie->len;
+       }
+       return NULL;
+}
+EXPORT_SYMBOL(cfg80211_find_vendor_ie);
+
 static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2)
 {
        const u8 *ie1 = cfg80211_find_ie(num, ies1, len1);