Lines Matching refs:attr
108 struct wps_parse_attr attr; in wps_init() local
111 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) { in wps_init()
114 } else if (attr.request_type == NULL) { in wps_init()
120 *attr.request_type); in wps_init()
121 data->request_type = *attr.request_type; in wps_init()
239 struct wps_parse_attr attr; in wps_is_selected_pbc_registrar() local
248 if (wps_parse_msg(msg, &attr) < 0 || in wps_is_selected_pbc_registrar()
249 !attr.selected_registrar || *attr.selected_registrar == 0 || in wps_is_selected_pbc_registrar()
250 !attr.dev_password_id || in wps_is_selected_pbc_registrar()
251 WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON) in wps_is_selected_pbc_registrar()
255 if (!attr.sel_reg_config_methods || in wps_is_selected_pbc_registrar()
256 !(WPA_GET_BE16(attr.sel_reg_config_methods) & in wps_is_selected_pbc_registrar()
265 static int is_selected_pin_registrar(struct wps_parse_attr *attr) in is_selected_pin_registrar() argument
275 if (!attr->selected_registrar || *attr->selected_registrar == 0) in is_selected_pin_registrar()
278 if (attr->dev_password_id != NULL && in is_selected_pin_registrar()
279 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON) in is_selected_pin_registrar()
283 if (!attr->sel_reg_config_methods || in is_selected_pin_registrar()
284 !(WPA_GET_BE16(attr->sel_reg_config_methods) & in is_selected_pin_registrar()
300 struct wps_parse_attr attr; in wps_is_selected_pin_registrar() local
302 if (wps_parse_msg(msg, &attr) < 0) in wps_is_selected_pin_registrar()
305 return is_selected_pin_registrar(&attr); in wps_is_selected_pin_registrar()
320 struct wps_parse_attr attr; in wps_is_addr_authorized() local
325 if (wps_parse_msg(msg, &attr) < 0) in wps_is_addr_authorized()
328 if (!attr.version2 && ver1_compat) { in wps_is_addr_authorized()
333 return is_selected_pin_registrar(&attr); in wps_is_addr_authorized()
336 if (!attr.authorized_macs) in wps_is_addr_authorized()
339 pos = attr.authorized_macs; in wps_is_addr_authorized()
340 for (i = 0; i < attr.authorized_macs_len / ETH_ALEN; i++) { in wps_is_addr_authorized()
362 struct wps_parse_attr attr; in wps_ap_priority_compar() local
365 if (wps_a == NULL || wps_parse_msg(wps_a, &attr) < 0) in wps_ap_priority_compar()
367 sel_a = attr.selected_registrar && *attr.selected_registrar != 0; in wps_ap_priority_compar()
369 if (wps_b == NULL || wps_parse_msg(wps_b, &attr) < 0) in wps_ap_priority_compar()
371 sel_b = attr.selected_registrar && *attr.selected_registrar != 0; in wps_ap_priority_compar()
392 struct wps_parse_attr attr; in wps_get_uuid_e() local
394 if (wps_parse_msg(msg, &attr) < 0) in wps_get_uuid_e()
396 return attr.uuid_e; in wps_get_uuid_e()
405 struct wps_parse_attr attr; in wps_is_20() local
407 if (msg == NULL || wps_parse_msg(msg, &attr) < 0) in wps_is_20()
409 return attr.version2 != NULL; in wps_is_20()
551 struct wps_parse_attr attr; in wps_attr_text() local
555 if (wps_parse_msg(data, &attr) < 0) in wps_attr_text()
558 if (attr.wps_state) { in wps_attr_text()
559 if (*attr.wps_state == WPS_STATE_NOT_CONFIGURED) in wps_attr_text()
562 else if (*attr.wps_state == WPS_STATE_CONFIGURED) in wps_attr_text()
572 if (attr.ap_setup_locked && *attr.ap_setup_locked) { in wps_attr_text()
580 if (attr.selected_registrar && *attr.selected_registrar) { in wps_attr_text()
588 if (attr.dev_password_id) { in wps_attr_text()
591 WPA_GET_BE16(attr.dev_password_id)); in wps_attr_text()
597 if (attr.sel_reg_config_methods) { in wps_attr_text()
601 WPA_GET_BE16(attr.sel_reg_config_methods)); in wps_attr_text()
607 if (attr.primary_dev_type) { in wps_attr_text()
611 wps_dev_type_bin2str(attr.primary_dev_type, in wps_attr_text()
619 if (attr.dev_name) { in wps_attr_text()
620 char *str = os_malloc(attr.dev_name_len + 1); in wps_attr_text()
624 for (i = 0; i < attr.dev_name_len; i++) { in wps_attr_text()
625 if (attr.dev_name[i] == 0 || in wps_attr_text()
626 is_ctrl_char(attr.dev_name[i])) in wps_attr_text()
629 str[i] = attr.dev_name[i]; in wps_attr_text()
639 if (attr.config_methods) { in wps_attr_text()
642 WPA_GET_BE16(attr.config_methods)); in wps_attr_text()