Lines Matching refs:buf
18 void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) in p2p_buf_add_action_hdr() argument
20 wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); in p2p_buf_add_action_hdr()
21 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_action_hdr()
23 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_action_hdr()
24 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_action_hdr()
29 void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, in p2p_buf_add_public_action_hdr() argument
32 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in p2p_buf_add_public_action_hdr()
33 wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); in p2p_buf_add_public_action_hdr()
34 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_public_action_hdr()
36 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_public_action_hdr()
37 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_public_action_hdr()
42 u8 * p2p_buf_add_ie_hdr(struct wpabuf *buf) in p2p_buf_add_ie_hdr() argument
47 wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); in p2p_buf_add_ie_hdr()
48 len = wpabuf_put(buf, 1); /* IE length to be filled */ in p2p_buf_add_ie_hdr()
49 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_ie_hdr()
55 void p2p_buf_update_ie_hdr(struct wpabuf *buf, u8 *len) in p2p_buf_update_ie_hdr() argument
58 *len = (u8 *) wpabuf_put(buf, 0) - len - 1; in p2p_buf_update_ie_hdr()
62 void p2p_buf_add_capability(struct wpabuf *buf, u8 dev_capab, u8 group_capab) in p2p_buf_add_capability() argument
65 wpabuf_put_u8(buf, P2P_ATTR_CAPABILITY); in p2p_buf_add_capability()
66 wpabuf_put_le16(buf, 2); in p2p_buf_add_capability()
67 wpabuf_put_u8(buf, dev_capab); /* Device Capabilities */ in p2p_buf_add_capability()
68 wpabuf_put_u8(buf, group_capab); /* Group Capabilities */ in p2p_buf_add_capability()
74 void p2p_buf_add_go_intent(struct wpabuf *buf, u8 go_intent) in p2p_buf_add_go_intent() argument
77 wpabuf_put_u8(buf, P2P_ATTR_GROUP_OWNER_INTENT); in p2p_buf_add_go_intent()
78 wpabuf_put_le16(buf, 1); in p2p_buf_add_go_intent()
79 wpabuf_put_u8(buf, go_intent); in p2p_buf_add_go_intent()
85 void p2p_buf_add_listen_channel(struct wpabuf *buf, const char *country, in p2p_buf_add_listen_channel() argument
89 wpabuf_put_u8(buf, P2P_ATTR_LISTEN_CHANNEL); in p2p_buf_add_listen_channel()
90 wpabuf_put_le16(buf, 5); in p2p_buf_add_listen_channel()
91 wpabuf_put_data(buf, country, 3); in p2p_buf_add_listen_channel()
92 wpabuf_put_u8(buf, reg_class); /* Regulatory Class */ in p2p_buf_add_listen_channel()
93 wpabuf_put_u8(buf, channel); /* Channel Number */ in p2p_buf_add_listen_channel()
99 void p2p_buf_add_operating_channel(struct wpabuf *buf, const char *country, in p2p_buf_add_operating_channel() argument
103 wpabuf_put_u8(buf, P2P_ATTR_OPERATING_CHANNEL); in p2p_buf_add_operating_channel()
104 wpabuf_put_le16(buf, 5); in p2p_buf_add_operating_channel()
105 wpabuf_put_data(buf, country, 3); in p2p_buf_add_operating_channel()
106 wpabuf_put_u8(buf, reg_class); /* Regulatory Class */ in p2p_buf_add_operating_channel()
107 wpabuf_put_u8(buf, channel); /* Channel Number */ in p2p_buf_add_operating_channel()
113 void p2p_buf_add_pref_channel_list(struct wpabuf *buf, in p2p_buf_add_pref_channel_list() argument
134 wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); in p2p_buf_add_pref_channel_list()
135 wpabuf_put_u8(buf, 4 + count * sizeof(u16)); in p2p_buf_add_pref_channel_list()
136 wpabuf_put_be24(buf, OUI_QCA); in p2p_buf_add_pref_channel_list()
137 wpabuf_put_u8(buf, QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST); in p2p_buf_add_pref_channel_list()
145 wpabuf_put_u8(buf, op_class); in p2p_buf_add_pref_channel_list()
146 wpabuf_put_u8(buf, op_channel); in p2p_buf_add_pref_channel_list()
151 void p2p_buf_add_channel_list(struct wpabuf *buf, const char *country, in p2p_buf_add_channel_list() argument
158 wpabuf_put_u8(buf, P2P_ATTR_CHANNEL_LIST); in p2p_buf_add_channel_list()
159 len = wpabuf_put(buf, 2); /* IE length to be filled */ in p2p_buf_add_channel_list()
160 wpabuf_put_data(buf, country, 3); /* Country String */ in p2p_buf_add_channel_list()
164 wpabuf_put_u8(buf, c->reg_class); in p2p_buf_add_channel_list()
165 wpabuf_put_u8(buf, c->channels); in p2p_buf_add_channel_list()
166 wpabuf_put_data(buf, c->channel, c->channels); in p2p_buf_add_channel_list()
170 WPA_PUT_LE16(len, (u8 *) wpabuf_put(buf, 0) - len - 2); in p2p_buf_add_channel_list()
172 len + 2, (u8 *) wpabuf_put(buf, 0) - len - 2); in p2p_buf_add_channel_list()
176 void p2p_buf_add_status(struct wpabuf *buf, u8 status) in p2p_buf_add_status() argument
179 wpabuf_put_u8(buf, P2P_ATTR_STATUS); in p2p_buf_add_status()
180 wpabuf_put_le16(buf, 1); in p2p_buf_add_status()
181 wpabuf_put_u8(buf, status); in p2p_buf_add_status()
186 void p2p_buf_add_device_info(struct wpabuf *buf, struct p2p_data *p2p, in p2p_buf_add_device_info() argument
194 wpabuf_put_u8(buf, P2P_ATTR_DEVICE_INFO); in p2p_buf_add_device_info()
195 len = wpabuf_put(buf, 2); /* IE length to be filled */ in p2p_buf_add_device_info()
198 wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); in p2p_buf_add_device_info()
219 wpabuf_put_be16(buf, methods); in p2p_buf_add_device_info()
222 wpabuf_put_data(buf, p2p->cfg->pri_dev_type, in p2p_buf_add_device_info()
226 wpabuf_put_u8(buf, p2p->cfg->num_sec_dev_types); in p2p_buf_add_device_info()
230 wpabuf_put_data(buf, p2p->cfg->sec_dev_type[i], in p2p_buf_add_device_info()
235 wpabuf_put_be16(buf, ATTR_DEV_NAME); in p2p_buf_add_device_info()
236 wpabuf_put_be16(buf, nlen); in p2p_buf_add_device_info()
237 wpabuf_put_data(buf, p2p->cfg->dev_name, nlen); in p2p_buf_add_device_info()
240 WPA_PUT_LE16(len, (u8 *) wpabuf_put(buf, 0) - len - 2); in p2p_buf_add_device_info()
245 void p2p_buf_add_device_id(struct wpabuf *buf, const u8 *dev_addr) in p2p_buf_add_device_id() argument
248 wpabuf_put_u8(buf, P2P_ATTR_DEVICE_ID); in p2p_buf_add_device_id()
249 wpabuf_put_le16(buf, ETH_ALEN); in p2p_buf_add_device_id()
250 wpabuf_put_data(buf, dev_addr, ETH_ALEN); in p2p_buf_add_device_id()
255 void p2p_buf_add_config_timeout(struct wpabuf *buf, u8 go_timeout, in p2p_buf_add_config_timeout() argument
259 wpabuf_put_u8(buf, P2P_ATTR_CONFIGURATION_TIMEOUT); in p2p_buf_add_config_timeout()
260 wpabuf_put_le16(buf, 2); in p2p_buf_add_config_timeout()
261 wpabuf_put_u8(buf, go_timeout); in p2p_buf_add_config_timeout()
262 wpabuf_put_u8(buf, client_timeout); in p2p_buf_add_config_timeout()
268 void p2p_buf_add_intended_addr(struct wpabuf *buf, const u8 *interface_addr) in p2p_buf_add_intended_addr() argument
271 wpabuf_put_u8(buf, P2P_ATTR_INTENDED_INTERFACE_ADDR); in p2p_buf_add_intended_addr()
272 wpabuf_put_le16(buf, ETH_ALEN); in p2p_buf_add_intended_addr()
273 wpabuf_put_data(buf, interface_addr, ETH_ALEN); in p2p_buf_add_intended_addr()
279 void p2p_buf_add_group_bssid(struct wpabuf *buf, const u8 *bssid) in p2p_buf_add_group_bssid() argument
282 wpabuf_put_u8(buf, P2P_ATTR_GROUP_BSSID); in p2p_buf_add_group_bssid()
283 wpabuf_put_le16(buf, ETH_ALEN); in p2p_buf_add_group_bssid()
284 wpabuf_put_data(buf, bssid, ETH_ALEN); in p2p_buf_add_group_bssid()
290 void p2p_buf_add_group_id(struct wpabuf *buf, const u8 *dev_addr, in p2p_buf_add_group_id() argument
294 wpabuf_put_u8(buf, P2P_ATTR_GROUP_ID); in p2p_buf_add_group_id()
295 wpabuf_put_le16(buf, ETH_ALEN + ssid_len); in p2p_buf_add_group_id()
296 wpabuf_put_data(buf, dev_addr, ETH_ALEN); in p2p_buf_add_group_id()
297 wpabuf_put_data(buf, ssid, ssid_len); in p2p_buf_add_group_id()
304 void p2p_buf_add_invitation_flags(struct wpabuf *buf, u8 flags) in p2p_buf_add_invitation_flags() argument
307 wpabuf_put_u8(buf, P2P_ATTR_INVITATION_FLAGS); in p2p_buf_add_invitation_flags()
308 wpabuf_put_le16(buf, 1); in p2p_buf_add_invitation_flags()
309 wpabuf_put_u8(buf, flags); in p2p_buf_add_invitation_flags()
314 static void p2p_buf_add_noa_desc(struct wpabuf *buf, struct p2p_noa_desc *desc) in p2p_buf_add_noa_desc() argument
319 wpabuf_put_u8(buf, desc->count_type); in p2p_buf_add_noa_desc()
320 wpabuf_put_le32(buf, desc->duration); in p2p_buf_add_noa_desc()
321 wpabuf_put_le32(buf, desc->interval); in p2p_buf_add_noa_desc()
322 wpabuf_put_le32(buf, desc->start_time); in p2p_buf_add_noa_desc()
326 void p2p_buf_add_noa(struct wpabuf *buf, u8 noa_index, u8 opp_ps, u8 ctwindow, in p2p_buf_add_noa() argument
330 wpabuf_put_u8(buf, P2P_ATTR_NOTICE_OF_ABSENCE); in p2p_buf_add_noa()
331 wpabuf_put_le16(buf, 2 + (desc1 ? 13 : 0) + (desc2 ? 13 : 0)); in p2p_buf_add_noa()
332 wpabuf_put_u8(buf, noa_index); in p2p_buf_add_noa()
333 wpabuf_put_u8(buf, (opp_ps ? 0x80 : 0) | (ctwindow & 0x7f)); in p2p_buf_add_noa()
334 p2p_buf_add_noa_desc(buf, desc1); in p2p_buf_add_noa()
335 p2p_buf_add_noa_desc(buf, desc2); in p2p_buf_add_noa()
340 void p2p_buf_add_ext_listen_timing(struct wpabuf *buf, u16 period, in p2p_buf_add_ext_listen_timing() argument
344 wpabuf_put_u8(buf, P2P_ATTR_EXT_LISTEN_TIMING); in p2p_buf_add_ext_listen_timing()
345 wpabuf_put_le16(buf, 4); in p2p_buf_add_ext_listen_timing()
346 wpabuf_put_le16(buf, period); in p2p_buf_add_ext_listen_timing()
347 wpabuf_put_le16(buf, interval); in p2p_buf_add_ext_listen_timing()
353 void p2p_buf_add_p2p_interface(struct wpabuf *buf, struct p2p_data *p2p) in p2p_buf_add_p2p_interface() argument
356 wpabuf_put_u8(buf, P2P_ATTR_INTERFACE); in p2p_buf_add_p2p_interface()
357 wpabuf_put_le16(buf, ETH_ALEN + 1 + ETH_ALEN); in p2p_buf_add_p2p_interface()
359 wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); in p2p_buf_add_p2p_interface()
365 wpabuf_put_u8(buf, 1); in p2p_buf_add_p2p_interface()
366 wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); in p2p_buf_add_p2p_interface()
370 void p2p_buf_add_oob_go_neg_channel(struct wpabuf *buf, const char *country, in p2p_buf_add_oob_go_neg_channel() argument
375 wpabuf_put_u8(buf, P2P_ATTR_OOB_GO_NEG_CHANNEL); in p2p_buf_add_oob_go_neg_channel()
376 wpabuf_put_le16(buf, 6); in p2p_buf_add_oob_go_neg_channel()
377 wpabuf_put_data(buf, country, 3); in p2p_buf_add_oob_go_neg_channel()
378 wpabuf_put_u8(buf, oper_class); /* Operating Class */ in p2p_buf_add_oob_go_neg_channel()
379 wpabuf_put_u8(buf, channel); /* Channel Number */ in p2p_buf_add_oob_go_neg_channel()
380 wpabuf_put_u8(buf, (u8) role); /* Role indication */ in p2p_buf_add_oob_go_neg_channel()
387 void p2p_buf_add_service_hash(struct wpabuf *buf, struct p2p_data *p2p) in p2p_buf_add_service_hash() argument
393 wpabuf_put_u8(buf, P2P_ATTR_SERVICE_HASH); in p2p_buf_add_service_hash()
394 wpabuf_put_le16(buf, p2p->p2ps_seek_count * P2PS_HASH_LEN); in p2p_buf_add_service_hash()
395 wpabuf_put_data(buf, p2p->p2ps_seek_hash, in p2p_buf_add_service_hash()
402 void p2p_buf_add_session_info(struct wpabuf *buf, const char *info) in p2p_buf_add_session_info() argument
410 wpabuf_put_u8(buf, P2P_ATTR_SESSION_INFORMATION_DATA); in p2p_buf_add_session_info()
411 wpabuf_put_le16(buf, (u16) info_len); in p2p_buf_add_session_info()
414 wpabuf_put_data(buf, info, info_len); in p2p_buf_add_session_info()
420 void p2p_buf_add_connection_capability(struct wpabuf *buf, u8 connection_cap) in p2p_buf_add_connection_capability() argument
423 wpabuf_put_u8(buf, P2P_ATTR_CONNECTION_CAPABILITY); in p2p_buf_add_connection_capability()
424 wpabuf_put_le16(buf, 1); in p2p_buf_add_connection_capability()
425 wpabuf_put_u8(buf, connection_cap); in p2p_buf_add_connection_capability()
431 void p2p_buf_add_advertisement_id(struct wpabuf *buf, u32 id, const u8 *mac) in p2p_buf_add_advertisement_id() argument
433 if (!buf || !mac) in p2p_buf_add_advertisement_id()
437 wpabuf_put_u8(buf, P2P_ATTR_ADVERTISEMENT_ID); in p2p_buf_add_advertisement_id()
438 wpabuf_put_le16(buf, (u16) (sizeof(u32) + ETH_ALEN)); in p2p_buf_add_advertisement_id()
439 wpabuf_put_le32(buf, id); in p2p_buf_add_advertisement_id()
440 wpabuf_put_data(buf, mac, ETH_ALEN); in p2p_buf_add_advertisement_id()
476 static int p2p_buf_add_service_info(struct wpabuf *buf, struct p2p_data *p2p, in p2p_buf_add_service_info() argument
518 *ie_len = p2p_buf_add_ie_hdr(buf); in p2p_buf_add_service_info()
536 wpabuf_put_data(buf, holder, front); in p2p_buf_add_service_info()
538 p2p_buf_update_ie_hdr(buf, *ie_len); in p2p_buf_add_service_info()
539 *ie_len = p2p_buf_add_ie_hdr(buf); in p2p_buf_add_service_info()
541 wpabuf_put_data(buf, &holder[front], back); in p2p_buf_add_service_info()
545 wpabuf_put_le32(buf, adv_id); in p2p_buf_add_service_info()
546 wpabuf_put_be16(buf, config_methods); in p2p_buf_add_service_info()
547 wpabuf_put_u8(buf, svc_len); in p2p_buf_add_service_info()
558 wpabuf_put_data(buf, svc_name, front); in p2p_buf_add_service_info()
560 p2p_buf_update_ie_hdr(buf, *ie_len); in p2p_buf_add_service_info()
561 *ie_len = p2p_buf_add_ie_hdr(buf); in p2p_buf_add_service_info()
565 wpabuf_put_data(buf, &svc_name[front], 255 - 4); in p2p_buf_add_service_info()
568 p2p_buf_update_ie_hdr(buf, *ie_len); in p2p_buf_add_service_info()
569 *ie_len = p2p_buf_add_ie_hdr(buf); in p2p_buf_add_service_info()
572 wpabuf_put_data(buf, &svc_name[front], back); in p2p_buf_add_service_info()
575 wpabuf_put_data(buf, svc_name, svc_len); in p2p_buf_add_service_info()
579 p2p_buf_update_ie_hdr(buf, *ie_len); in p2p_buf_add_service_info()
586 *pos = wpabuf_put(buf, 0); in p2p_buf_add_service_info()
594 void p2p_buf_add_service_instance(struct wpabuf *buf, struct p2p_data *p2p, in p2p_buf_add_service_instance() argument
660 wpabuf_put_buf(buf, tmp_buf); in p2p_buf_add_service_instance()
665 void p2p_buf_add_session_id(struct wpabuf *buf, u32 id, const u8 *mac) in p2p_buf_add_session_id() argument
667 if (!buf || !mac) in p2p_buf_add_session_id()
671 wpabuf_put_u8(buf, P2P_ATTR_SESSION_ID); in p2p_buf_add_session_id()
672 wpabuf_put_le16(buf, (u16) (sizeof(u32) + ETH_ALEN)); in p2p_buf_add_session_id()
673 wpabuf_put_le32(buf, id); in p2p_buf_add_session_id()
674 wpabuf_put_data(buf, mac, ETH_ALEN); in p2p_buf_add_session_id()
680 void p2p_buf_add_feature_capability(struct wpabuf *buf, u16 len, const u8 *mask) in p2p_buf_add_feature_capability() argument
682 if (!buf || !len || !mask) in p2p_buf_add_feature_capability()
686 wpabuf_put_u8(buf, P2P_ATTR_FEATURE_CAPABILITY); in p2p_buf_add_feature_capability()
687 wpabuf_put_le16(buf, len); in p2p_buf_add_feature_capability()
688 wpabuf_put_data(buf, mask, len); in p2p_buf_add_feature_capability()
693 void p2p_buf_add_persistent_group_info(struct wpabuf *buf, const u8 *dev_addr, in p2p_buf_add_persistent_group_info() argument
697 wpabuf_put_u8(buf, P2P_ATTR_PERSISTENT_GROUP); in p2p_buf_add_persistent_group_info()
698 wpabuf_put_le16(buf, ETH_ALEN + ssid_len); in p2p_buf_add_persistent_group_info()
699 wpabuf_put_data(buf, dev_addr, ETH_ALEN); in p2p_buf_add_persistent_group_info()
700 wpabuf_put_data(buf, ssid, ssid_len); in p2p_buf_add_persistent_group_info()
706 static int p2p_add_wps_string(struct wpabuf *buf, enum wps_attribute attr, in p2p_add_wps_string() argument
712 if (wpabuf_tailroom(buf) < 4 + len) in p2p_add_wps_string()
714 wpabuf_put_be16(buf, attr); in p2p_add_wps_string()
722 if (wpabuf_tailroom(buf) < 3) in p2p_add_wps_string()
724 wpabuf_put_be16(buf, 1); in p2p_add_wps_string()
725 wpabuf_put_u8(buf, ' '); in p2p_add_wps_string()
729 wpabuf_put_be16(buf, len); in p2p_add_wps_string()
731 wpabuf_put_data(buf, val, len); in p2p_add_wps_string()
736 int p2p_build_wps_ie(struct p2p_data *p2p, struct wpabuf *buf, int pw_id, in p2p_build_wps_ie() argument
742 if (wpabuf_tailroom(buf) < 6) in p2p_build_wps_ie()
744 wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); in p2p_build_wps_ie()
745 len = wpabuf_put(buf, 1); in p2p_build_wps_ie()
746 wpabuf_put_be32(buf, WPS_DEV_OUI_WFA); in p2p_build_wps_ie()
748 if (wps_build_version(buf) < 0) in p2p_build_wps_ie()
752 if (wpabuf_tailroom(buf) < 5) in p2p_build_wps_ie()
754 wpabuf_put_be16(buf, ATTR_WPS_STATE); in p2p_build_wps_ie()
755 wpabuf_put_be16(buf, 1); in p2p_build_wps_ie()
756 wpabuf_put_u8(buf, WPS_STATE_NOT_CONFIGURED); in p2p_build_wps_ie()
760 if (wpabuf_tailroom(buf) < 6) in p2p_build_wps_ie()
763 wpabuf_put_be16(buf, ATTR_DEV_PASSWORD_ID); in p2p_build_wps_ie()
764 wpabuf_put_be16(buf, 2); in p2p_build_wps_ie()
767 wpabuf_put_be16(buf, pw_id); in p2p_build_wps_ie()
771 if (wpabuf_tailroom(buf) < 5) in p2p_build_wps_ie()
773 wpabuf_put_be16(buf, ATTR_RESPONSE_TYPE); in p2p_build_wps_ie()
774 wpabuf_put_be16(buf, 1); in p2p_build_wps_ie()
775 wpabuf_put_u8(buf, WPS_RESP_ENROLLEE_INFO); in p2p_build_wps_ie()
777 if (wps_build_uuid_e(buf, p2p->cfg->uuid) < 0 || in p2p_build_wps_ie()
778 p2p_add_wps_string(buf, ATTR_MANUFACTURER, in p2p_build_wps_ie()
780 p2p_add_wps_string(buf, ATTR_MODEL_NAME, in p2p_build_wps_ie()
782 p2p_add_wps_string(buf, ATTR_MODEL_NUMBER, in p2p_build_wps_ie()
784 p2p_add_wps_string(buf, ATTR_SERIAL_NUMBER, in p2p_build_wps_ie()
788 if (wpabuf_tailroom(buf) < 4 + WPS_DEV_TYPE_LEN) in p2p_build_wps_ie()
790 wpabuf_put_be16(buf, ATTR_PRIMARY_DEV_TYPE); in p2p_build_wps_ie()
791 wpabuf_put_be16(buf, WPS_DEV_TYPE_LEN); in p2p_build_wps_ie()
792 wpabuf_put_data(buf, p2p->cfg->pri_dev_type, WPS_DEV_TYPE_LEN); in p2p_build_wps_ie()
794 if (p2p_add_wps_string(buf, ATTR_DEV_NAME, p2p->cfg->dev_name) in p2p_build_wps_ie()
798 if (wpabuf_tailroom(buf) < 6) in p2p_build_wps_ie()
800 wpabuf_put_be16(buf, ATTR_CONFIG_METHODS); in p2p_build_wps_ie()
801 wpabuf_put_be16(buf, 2); in p2p_build_wps_ie()
802 wpabuf_put_be16(buf, p2p->cfg->config_methods); in p2p_build_wps_ie()
805 if (wps_build_wfa_ext(buf, 0, NULL, 0) < 0) in p2p_build_wps_ie()
809 if (wpabuf_tailroom(buf) < in p2p_build_wps_ie()
812 wpabuf_put_be16(buf, ATTR_SECONDARY_DEV_TYPE_LIST); in p2p_build_wps_ie()
813 wpabuf_put_be16(buf, WPS_DEV_TYPE_LEN * in p2p_build_wps_ie()
815 wpabuf_put_data(buf, p2p->cfg->sec_dev_type, in p2p_build_wps_ie()
824 if (wpabuf_tailroom(buf) < in p2p_build_wps_ie()
827 wpabuf_put_be16(buf, ATTR_VENDOR_EXT); in p2p_build_wps_ie()
828 wpabuf_put_be16(buf, wpabuf_len(p2p->wps_vendor_ext[i])); in p2p_build_wps_ie()
829 wpabuf_put_buf(buf, p2p->wps_vendor_ext[i]); in p2p_build_wps_ie()
832 p2p_buf_update_ie_hdr(buf, len); in p2p_build_wps_ie()