Lines Matching refs:attr

104 		struct wps_parse_attr attr;  in wps_init()  local
107 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) { in wps_init()
110 } else if (attr.request_type == NULL) { in wps_init()
116 *attr.request_type); in wps_init()
117 data->request_type = *attr.request_type; in wps_init()
235 struct wps_parse_attr attr; in wps_is_selected_pbc_registrar() local
244 if (wps_parse_msg(msg, &attr) < 0 || in wps_is_selected_pbc_registrar()
245 !attr.selected_registrar || *attr.selected_registrar == 0 || in wps_is_selected_pbc_registrar()
246 !attr.dev_password_id || in wps_is_selected_pbc_registrar()
247 WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON) in wps_is_selected_pbc_registrar()
251 if (!attr.sel_reg_config_methods || in wps_is_selected_pbc_registrar()
252 !(WPA_GET_BE16(attr.sel_reg_config_methods) & in wps_is_selected_pbc_registrar()
261 static int is_selected_pin_registrar(struct wps_parse_attr *attr) in is_selected_pin_registrar() argument
271 if (!attr->selected_registrar || *attr->selected_registrar == 0) in is_selected_pin_registrar()
274 if (attr->dev_password_id != NULL && in is_selected_pin_registrar()
275 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON) in is_selected_pin_registrar()
279 if (!attr->sel_reg_config_methods || in is_selected_pin_registrar()
280 !(WPA_GET_BE16(attr->sel_reg_config_methods) & in is_selected_pin_registrar()
296 struct wps_parse_attr attr; in wps_is_selected_pin_registrar() local
298 if (wps_parse_msg(msg, &attr) < 0) in wps_is_selected_pin_registrar()
301 return is_selected_pin_registrar(&attr); in wps_is_selected_pin_registrar()
316 struct wps_parse_attr attr; in wps_is_addr_authorized() local
321 if (wps_parse_msg(msg, &attr) < 0) in wps_is_addr_authorized()
324 if (!attr.version2 && ver1_compat) { in wps_is_addr_authorized()
329 return is_selected_pin_registrar(&attr); in wps_is_addr_authorized()
332 if (!attr.authorized_macs) in wps_is_addr_authorized()
335 pos = attr.authorized_macs; in wps_is_addr_authorized()
336 for (i = 0; i < attr.authorized_macs_len / ETH_ALEN; i++) { in wps_is_addr_authorized()
388 struct wps_parse_attr attr; in wps_get_uuid_e() local
390 if (wps_parse_msg(msg, &attr) < 0) in wps_get_uuid_e()
392 return attr.uuid_e; in wps_get_uuid_e()
401 struct wps_parse_attr attr; in wps_is_20() local
403 if (msg == NULL || wps_parse_msg(msg, &attr) < 0) in wps_is_20()
405 return attr.version2 != NULL; in wps_is_20()
547 struct wps_parse_attr attr; in wps_attr_text() local
551 if (wps_parse_msg(data, &attr) < 0) in wps_attr_text()
554 if (attr.wps_state) { in wps_attr_text()
555 if (*attr.wps_state == WPS_STATE_NOT_CONFIGURED) in wps_attr_text()
558 else if (*attr.wps_state == WPS_STATE_CONFIGURED) in wps_attr_text()
568 if (attr.ap_setup_locked && *attr.ap_setup_locked) { in wps_attr_text()
576 if (attr.selected_registrar && *attr.selected_registrar) { in wps_attr_text()
584 if (attr.dev_password_id) { in wps_attr_text()
587 WPA_GET_BE16(attr.dev_password_id)); in wps_attr_text()
593 if (attr.sel_reg_config_methods) { in wps_attr_text()
597 WPA_GET_BE16(attr.sel_reg_config_methods)); in wps_attr_text()
603 if (attr.primary_dev_type) { in wps_attr_text()
607 wps_dev_type_bin2str(attr.primary_dev_type, in wps_attr_text()
615 if (attr.dev_name) { in wps_attr_text()
616 char *str = os_malloc(attr.dev_name_len + 1); in wps_attr_text()
620 for (i = 0; i < attr.dev_name_len; i++) { in wps_attr_text()
621 if (attr.dev_name[i] == 0 || in wps_attr_text()
622 is_ctrl_char(attr.dev_name[i])) in wps_attr_text()
625 str[i] = attr.dev_name[i]; in wps_attr_text()
635 if (attr.config_methods) { in wps_attr_text()
638 WPA_GET_BE16(attr.config_methods)); in wps_attr_text()