Lines Matching refs:p2p

35 	struct p2p_data *p2p;  member
46 struct p2p_group * p2p_group_init(struct p2p_data *p2p, in p2p_group_init() argument
55 groups = os_realloc_array(p2p->groups, p2p->num_groups + 1, in p2p_group_init()
61 groups[p2p->num_groups++] = group; in p2p_group_init()
62 p2p->groups = groups; in p2p_group_init()
64 group->p2p = p2p; in p2p_group_init()
101 struct p2p_data *p2p; in p2p_group_deinit() local
106 p2p = group->p2p; in p2p_group_deinit()
108 for (g = 0; g < p2p->num_groups; g++) { in p2p_group_deinit()
109 if (p2p->groups[g] == group) { in p2p_group_deinit()
110 while (g + 1 < p2p->num_groups) { in p2p_group_deinit()
111 p2p->groups[g] = p2p->groups[g + 1]; in p2p_group_deinit()
114 p2p->num_groups--; in p2p_group_deinit()
140 u8 dev_capab = group->p2p->dev_capab, group_capab = 0; in p2p_group_add_common_ies()
150 if (group->p2p->cfg->p2p_intra_bss) in p2p_group_add_common_ies()
154 if (group->p2p->cross_connect) in p2p_group_add_common_ies()
215 if (group->p2p->wfd_ie_beacon) in p2p_group_build_beacon_ie()
216 extra = wpabuf_len(group->p2p->wfd_ie_beacon); in p2p_group_build_beacon_ie()
219 if (group->p2p->vendor_elem && in p2p_group_build_beacon_ie()
220 group->p2p->vendor_elem[VENDOR_ELEM_BEACON_P2P_GO]) in p2p_group_build_beacon_ie()
221 extra += wpabuf_len(group->p2p->vendor_elem[VENDOR_ELEM_BEACON_P2P_GO]); in p2p_group_build_beacon_ie()
228 if (group->p2p->wfd_ie_beacon) in p2p_group_build_beacon_ie()
229 wpabuf_put_buf(ie, group->p2p->wfd_ie_beacon); in p2p_group_build_beacon_ie()
232 if (group->p2p->vendor_elem && in p2p_group_build_beacon_ie()
233 group->p2p->vendor_elem[VENDOR_ELEM_BEACON_P2P_GO]) in p2p_group_build_beacon_ie()
235 group->p2p->vendor_elem[VENDOR_ELEM_BEACON_P2P_GO]); in p2p_group_build_beacon_ie()
239 p2p_buf_add_device_id(ie, group->p2p->cfg->dev_addr); in p2p_group_build_beacon_ie()
361 if (!group->p2p->wfd_ie_probe_resp) in wifi_display_build_go_ie()
364 wfd_subelems = wpabuf_alloc(wpabuf_len(group->p2p->wfd_ie_probe_resp) + in wifi_display_build_go_ie()
368 if (group->p2p->wfd_dev_info) in wifi_display_build_go_ie()
369 wpabuf_put_buf(wfd_subelems, group->p2p->wfd_dev_info); in wifi_display_build_go_ie()
370 if (group->p2p->wfd_r2_dev_info) in wifi_display_build_go_ie()
371 wpabuf_put_buf(wfd_subelems, group->p2p->wfd_r2_dev_info); in wifi_display_build_go_ie()
372 if (group->p2p->wfd_assoc_bssid) in wifi_display_build_go_ie()
374 group->p2p->wfd_assoc_bssid); in wifi_display_build_go_ie()
375 if (group->p2p->wfd_coupled_sink_info) in wifi_display_build_go_ie()
377 group->p2p->wfd_coupled_sink_info); in wifi_display_build_go_ie()
395 p2p_dbg(group->p2p, "WFD: WFD Session Info: %u descriptors", in wifi_display_build_go_ie()
421 p2p_dbg(group->p2p, "* P2P Group Info"); in p2p_buf_add_group_info()
438 p2p_buf_add_group_id(buf, group->p2p->cfg->dev_addr, group->cfg->ssid, in p2p_group_buf_add_id()
455 p2p_buf_add_device_info(p2p_subelems, group->p2p, NULL); in p2p_group_build_probe_resp_ie()
464 if (group->p2p->vendor_elem && in p2p_group_build_probe_resp_ie()
465 group->p2p->vendor_elem[VENDOR_ELEM_PROBE_RESP_P2P_GO]) { in p2p_group_build_probe_resp_ie()
467 extra = wpabuf_dup(group->p2p->vendor_elem[VENDOR_ELEM_PROBE_RESP_P2P_GO]); in p2p_group_build_probe_resp_ie()
610 p2p_add_device(group->p2p, addr, 0, NULL, 0, ie, len, 0); in p2p_group_notif_assoc()
631 p2p_dbg(group->p2p, "Add client " MACSTR in p2p_group_notif_assoc()
657 if (group->p2p->vendor_elem && in p2p_group_assoc_resp_ie()
658 group->p2p->vendor_elem[VENDOR_ELEM_P2P_ASSOC_RESP]) in p2p_group_assoc_resp_ie()
659 extra += wpabuf_len(group->p2p->vendor_elem[VENDOR_ELEM_P2P_ASSOC_RESP]); in p2p_group_assoc_resp_ie()
676 if (group->p2p->vendor_elem && in p2p_group_assoc_resp_ie()
677 group->p2p->vendor_elem[VENDOR_ELEM_P2P_ASSOC_RESP]) in p2p_group_assoc_resp_ie()
679 group->p2p->vendor_elem[VENDOR_ELEM_P2P_ASSOC_RESP]); in p2p_group_assoc_resp_ie()
693 p2p_dbg(group->p2p, "Remove client " MACSTR in p2p_group_notif_disassoc()
763 if (p2p_match_dev_type(group->p2p, wps)) in p2p_group_match_dev_type()
776 int p2p_group_match_dev_id(struct p2p_group *group, struct wpabuf *p2p) in p2p_group_match_dev_id() argument
782 if (p2p_parse_p2p_ie(p2p, &msg)) in p2p_group_match_dev_id()
788 if (os_memcmp(msg.device_id, group->p2p->cfg->dev_addr, ETH_ALEN) == 0) in p2p_group_match_dev_id()
915 struct p2p_data *p2p = group->p2p; in p2p_group_go_discover() local
920 p2p_dbg(group->p2p, "Requested client was not in this group " in p2p_group_go_discover()
926 p2p_dbg(group->p2p, "Requested client does not support client discoverability"); in p2p_group_go_discover()
930 p2p_dbg(group->p2p, "Schedule GO Discoverability Request to be sent to " in p2p_group_go_discover()
940 p2p->pending_action_state = P2P_PENDING_GO_DISC_REQ; in p2p_group_go_discover()
941 if (p2p->cfg->send_action(p2p->cfg->cb_ctx, freq, m->addr, in p2p_group_go_discover()
947 p2p_dbg(p2p, "Failed to send Action frame"); in p2p_group_go_discover()
972 p2p_dbg(group->p2p, "Client was not in this group"); in p2p_group_presence_req()
978 if (group->p2p->cfg->get_noa) in p2p_group_presence_req()
979 curr_noa_len = group->p2p->cfg->get_noa( in p2p_group_presence_req()
980 group->p2p->cfg->cb_ctx, group->cfg->interface_addr, in p2p_group_presence_req()
985 p2p_dbg(group->p2p, "Failed to fetch current NoA"); in p2p_group_presence_req()
987 p2p_dbg(group->p2p, "No NoA being advertized"); in p2p_group_presence_req()
1054 if (os_memcmp(group_id, group->p2p->cfg->dev_addr, ETH_ALEN) != 0) in p2p_group_is_group_id_match()
1080 void p2p_loop_on_all_groups(struct p2p_data *p2p, in p2p_loop_on_all_groups() argument
1087 for (i = 0; i < p2p->num_groups; i++) { in p2p_loop_on_all_groups()
1088 if (!group_callback(p2p->groups[i], user_data)) in p2p_loop_on_all_groups()
1107 p2p_channels_union(&intersect, &group->p2p->cfg->channels, in p2p_group_get_common_freqs()
1110 p2p_channels_dump(group->p2p, in p2p_group_get_common_freqs()
1117 dev = p2p_get_device(group->p2p, m->dev_addr); in p2p_group_get_common_freqs()
1125 p2p_channels_dump(group->p2p, "Group common channels", &intersect); in p2p_group_get_common_freqs()