elems->rsn_selection = pos + 4;
elems->rsn_selection_len = elen - 4;
break;
+ case P2P2_OUI_TYPE:
+ /* Wi-Fi Alliance - P2P2 IE */
+ elems->p2p2_ie = pos;
+ elems->p2p2_ie_len = elen;
+ break;
default:
wpa_printf(MSG_MSGDUMP, "Unknown WFA "
"information element ignored "
*/
struct p2p_message {
struct wpabuf *p2p_attributes;
+ struct wpabuf *p2p2_attributes;
struct wpabuf *wps_attributes;
struct wpabuf *wfd_subelems;
const u8 *pref_freq_list;
size_t pref_freq_list_len;
+
+ const u8 *pcea_info;
+ size_t pcea_info_len;
+
+ const u8 *pbma_info;
+ size_t pbma_info_len;
};
msg->persistent_ssid_len));
break;
}
+ case P2P_ATTR_CAPABILITY_EXTENSION:
+ if (len < 2) {
+ wpa_printf(MSG_DEBUG, "P2P: Too short PCEA (length %d)",
+ len);
+ return -1;
+ }
+ msg->pcea_info = data;
+ msg->pcea_info_len = len;
+ wpa_printf(MSG_DEBUG, "P2P: * PCEA (length=%u)", len);
+ break;
+ case P2P_ATTR_PAIRING_AND_BOOTSTRAPPING:
+ if (len < 1) {
+ wpa_printf(MSG_DEBUG, "P2P: Too short PBMA (length %d)",
+ len);
+ return -1;
+ }
+ msg->pbma_info = data;
+ msg->pbma_info_len = len;
+ wpa_printf(MSG_DEBUG, "P2P: * PBMA (length=%u)", len);
+ break;
default:
wpa_printf(MSG_DEBUG, "P2P: Skipped unknown attribute %d "
"(length %d)", id, len);
return -1;
}
+ msg->p2p2_attributes = ieee802_11_vendor_ie_concat(data, len,
+ P2P2_IE_VENDOR_TYPE);
+ if (msg->p2p2_attributes &&
+ p2p_parse_p2p_ie(msg->p2p2_attributes, msg)) {
+ wpa_printf(MSG_DEBUG, "P2P: Failed to parse P2P2 IE data");
+ if (msg->p2p2_attributes)
+ wpa_hexdump_buf(MSG_MSGDUMP, "P2P: P2P2 IE data",
+ msg->p2p2_attributes);
+ p2p_parse_free(msg);
+ return -1;
+ }
+
#ifdef CONFIG_WIFI_DISPLAY
if (elems.wfd) {
msg->wfd_subelems = ieee802_11_vendor_ie_concat(
{
wpabuf_free(msg->p2p_attributes);
msg->p2p_attributes = NULL;
+ wpabuf_free(msg->p2p2_attributes);
+ msg->p2p2_attributes = NULL;
wpabuf_free(msg->wps_attributes);
msg->wps_attributes = NULL;
#ifdef CONFIG_WIFI_DISPLAY