Lines Matching refs:attr
105 struct wps_parse_attr attr; in wps_init() local
108 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) { in wps_init()
111 } else if (attr.request_type == NULL) { in wps_init()
117 *attr.request_type); in wps_init()
118 data->request_type = *attr.request_type; in wps_init()
237 struct wps_parse_attr attr; in wps_is_selected_pbc_registrar() local
246 if (wps_parse_msg(msg, &attr) < 0 || in wps_is_selected_pbc_registrar()
247 !attr.selected_registrar || *attr.selected_registrar == 0 || in wps_is_selected_pbc_registrar()
248 !attr.dev_password_id || in wps_is_selected_pbc_registrar()
249 WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON) in wps_is_selected_pbc_registrar()
253 if (!attr.sel_reg_config_methods || in wps_is_selected_pbc_registrar()
254 !(WPA_GET_BE16(attr.sel_reg_config_methods) & in wps_is_selected_pbc_registrar()
263 static int is_selected_pin_registrar(struct wps_parse_attr *attr) in is_selected_pin_registrar() argument
273 if (!attr->selected_registrar || *attr->selected_registrar == 0) in is_selected_pin_registrar()
276 if (attr->dev_password_id != NULL && in is_selected_pin_registrar()
277 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON) in is_selected_pin_registrar()
281 if (!attr->sel_reg_config_methods || in is_selected_pin_registrar()
282 !(WPA_GET_BE16(attr->sel_reg_config_methods) & in is_selected_pin_registrar()
298 struct wps_parse_attr attr; in wps_is_selected_pin_registrar() local
300 if (wps_parse_msg(msg, &attr) < 0) in wps_is_selected_pin_registrar()
303 return is_selected_pin_registrar(&attr); in wps_is_selected_pin_registrar()
318 struct wps_parse_attr attr; in wps_is_addr_authorized() local
323 if (wps_parse_msg(msg, &attr) < 0) in wps_is_addr_authorized()
326 if (!attr.version2 && ver1_compat) { in wps_is_addr_authorized()
331 return is_selected_pin_registrar(&attr); in wps_is_addr_authorized()
334 if (!attr.authorized_macs) in wps_is_addr_authorized()
337 pos = attr.authorized_macs; in wps_is_addr_authorized()
338 for (i = 0; i < attr.authorized_macs_len / ETH_ALEN; i++) { in wps_is_addr_authorized()
360 struct wps_parse_attr attr; in wps_ap_priority_compar() local
363 if (wps_a == NULL || wps_parse_msg(wps_a, &attr) < 0) in wps_ap_priority_compar()
365 sel_a = attr.selected_registrar && *attr.selected_registrar != 0; in wps_ap_priority_compar()
367 if (wps_b == NULL || wps_parse_msg(wps_b, &attr) < 0) in wps_ap_priority_compar()
369 sel_b = attr.selected_registrar && *attr.selected_registrar != 0; in wps_ap_priority_compar()
390 struct wps_parse_attr attr; in wps_get_uuid_e() local
392 if (wps_parse_msg(msg, &attr) < 0) in wps_get_uuid_e()
394 return attr.uuid_e; in wps_get_uuid_e()
403 struct wps_parse_attr attr; in wps_is_20() local
405 if (msg == NULL || wps_parse_msg(msg, &attr) < 0) in wps_is_20()
407 return attr.version2 != NULL; in wps_is_20()
549 struct wps_parse_attr attr; in wps_attr_text() local
553 if (wps_parse_msg(data, &attr) < 0) in wps_attr_text()
556 if (attr.wps_state) { in wps_attr_text()
557 if (*attr.wps_state == WPS_STATE_NOT_CONFIGURED) in wps_attr_text()
560 else if (*attr.wps_state == WPS_STATE_CONFIGURED) in wps_attr_text()
570 if (attr.ap_setup_locked && *attr.ap_setup_locked) { in wps_attr_text()
578 if (attr.selected_registrar && *attr.selected_registrar) { in wps_attr_text()
586 if (attr.dev_password_id) { in wps_attr_text()
589 WPA_GET_BE16(attr.dev_password_id)); in wps_attr_text()
595 if (attr.sel_reg_config_methods) { in wps_attr_text()
599 WPA_GET_BE16(attr.sel_reg_config_methods)); in wps_attr_text()
605 if (attr.primary_dev_type) { in wps_attr_text()
609 wps_dev_type_bin2str(attr.primary_dev_type, in wps_attr_text()
617 if (attr.dev_name) { in wps_attr_text()
618 char *str = os_malloc(attr.dev_name_len + 1); in wps_attr_text()
622 for (i = 0; i < attr.dev_name_len; i++) { in wps_attr_text()
623 if (attr.dev_name[i] == 0 || in wps_attr_text()
624 is_ctrl_char(attr.dev_name[i])) in wps_attr_text()
627 str[i] = attr.dev_name[i]; in wps_attr_text()
637 if (attr.config_methods) { in wps_attr_text()
640 WPA_GET_BE16(attr.config_methods)); in wps_attr_text()