diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index dc8856841..d9dfb708c 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -96,6 +96,22 @@ static int ieee802_11_parse_vendor_specific(const u8 *pos, size_t elen, } break; + case OUI_WFA: + switch (pos[3]) { + case P2P_OUI_TYPE: + /* Wi-Fi Alliance - P2P IE */ + elems->p2p = pos; + elems->p2p_len = elen; + break; + default: + wpa_printf(MSG_MSGDUMP, "Unknown WFA " + "information element ignored " + "(type=%d len=%lu)\n", + pos[3], (unsigned long) elen); + return -1; + } + break; + case OUI_BROADCOM: switch (pos[3]) { case VENDOR_HT_CAPAB_OUI_TYPE: diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h index 4a4f5a742..406c13a68 100644 --- a/src/common/ieee802_11_common.h +++ b/src/common/ieee802_11_common.h @@ -40,6 +40,7 @@ struct ieee802_11_elems { const u8 *ht_capabilities; const u8 *ht_operation; const u8 *vendor_ht_cap; + const u8 *p2p; u8 ssid_len; u8 supp_rates_len; @@ -64,6 +65,7 @@ struct ieee802_11_elems { u8 ht_capabilities_len; u8 ht_operation_len; u8 vendor_ht_cap_len; + u8 p2p_len; }; typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;