Lines Matching refs:attr

106 		struct wps_parse_attr attr;  in wps_init()  local
109 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) { in wps_init()
112 } else if (attr.request_type == NULL) { in wps_init()
118 *attr.request_type); in wps_init()
119 data->request_type = *attr.request_type; in wps_init()
240 struct wps_parse_attr *attr = os_zalloc(sizeof(struct wps_parse_attr)); in wps_is_selected_pbc_registrar() local
242 if (!attr) in wps_is_selected_pbc_registrar()
252 if (wps_parse_msg(msg, attr) < 0 || in wps_is_selected_pbc_registrar()
253 !attr->selected_registrar || *attr->selected_registrar == 0 || in wps_is_selected_pbc_registrar()
254 !attr->dev_password_id || in wps_is_selected_pbc_registrar()
255 WPA_GET_BE16(attr->dev_password_id) != DEV_PW_PUSHBUTTON) { in wps_is_selected_pbc_registrar()
256 os_free(attr); in wps_is_selected_pbc_registrar()
262 if (!attr->sel_reg_config_methods || in wps_is_selected_pbc_registrar()
263 !(WPA_GET_BE16(attr->sel_reg_config_methods) & in wps_is_selected_pbc_registrar()
265 os_free(attr); in wps_is_selected_pbc_registrar()
270 os_free(attr); in wps_is_selected_pbc_registrar()
275 static int is_selected_pin_registrar(struct wps_parse_attr *attr) in is_selected_pin_registrar() argument
285 if (!attr->selected_registrar || *attr->selected_registrar == 0) { in is_selected_pin_registrar()
288 if (attr->dev_password_id != NULL && in is_selected_pin_registrar()
289 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON) { in is_selected_pin_registrar()
293 if (!attr->sel_reg_config_methods || in is_selected_pin_registrar()
294 !(WPA_GET_BE16(attr->sel_reg_config_methods) & in is_selected_pin_registrar()
310 struct wps_parse_attr *attr; in wps_is_selected_pin_registrar() local
313 attr = os_zalloc(sizeof(struct wps_parse_attr)); in wps_is_selected_pin_registrar()
314 if (attr == NULL) in wps_is_selected_pin_registrar()
317 if (wps_parse_msg(msg, attr) < 0) { in wps_is_selected_pin_registrar()
318 os_free(attr); in wps_is_selected_pin_registrar()
322 ret = is_selected_pin_registrar(attr); in wps_is_selected_pin_registrar()
323 os_free(attr); in wps_is_selected_pin_registrar()
339 struct wps_parse_attr *attr; in wps_is_addr_authorized() local
345 attr = os_zalloc(sizeof(struct wps_parse_attr)); in wps_is_addr_authorized()
346 if (attr == NULL) { in wps_is_addr_authorized()
351 if (wps_parse_msg(msg, attr) < 0) { in wps_is_addr_authorized()
356 if (!attr->version2 && ver1_compat) { in wps_is_addr_authorized()
362 ret = is_selected_pin_registrar(attr); in wps_is_addr_authorized()
366 if (!attr->authorized_macs) { in wps_is_addr_authorized()
371 pos = attr->authorized_macs; in wps_is_addr_authorized()
372 for (i = 0; i < attr->authorized_macs_len / ETH_ALEN; i++) { in wps_is_addr_authorized()
384 if (attr) in wps_is_addr_authorized()
385 os_free(attr); in wps_is_addr_authorized()
401 struct wps_parse_attr *attr = NULL; in wps_ap_priority_compar() local
405 attr = os_zalloc(sizeof(*attr)); in wps_ap_priority_compar()
407 if (!attr) in wps_ap_priority_compar()
410 if (wps_a == NULL || wps_parse_msg(wps_a, attr) < 0) { in wps_ap_priority_compar()
414 sel_a = attr->selected_registrar && *(attr->selected_registrar) != 0; in wps_ap_priority_compar()
416 if (wps_b == NULL || wps_parse_msg(wps_b, attr) < 0) { in wps_ap_priority_compar()
420 sel_b = attr->selected_registrar && *(attr->selected_registrar) != 0; in wps_ap_priority_compar()
432 os_free(attr); in wps_ap_priority_compar()
447 struct wps_parse_attr *attr; in wps_get_uuid_e() local
450 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_get_uuid_e()
451 if (attr == NULL) in wps_get_uuid_e()
454 if (wps_parse_msg(msg, attr) < 0) { in wps_get_uuid_e()
457 uuid_e = attr->uuid_e; in wps_get_uuid_e()
459 os_free(attr); in wps_get_uuid_e()
469 struct wps_parse_attr *attr; in wps_is_20() local
472 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_is_20()
473 if (attr == NULL) in wps_is_20()
476 if (msg == NULL || wps_parse_msg(msg, attr) < 0) { in wps_is_20()
479 ret = (attr->version2 != NULL); in wps_is_20()
481 os_free(attr); in wps_is_20()
626 struct wps_parse_attr *attr; in wps_attr_text() local
630 attr = (struct wps_parse_attr *)os_zalloc(sizeof(struct wps_parse_attr)); in wps_attr_text()
631 if (attr == NULL) in wps_attr_text()
634 if (wps_parse_msg(data, attr) < 0) { in wps_attr_text()
639 if (attr->wps_state) { in wps_attr_text()
640 if (*attr->wps_state == WPS_STATE_NOT_CONFIGURED) in wps_attr_text()
643 else if (*attr->wps_state == WPS_STATE_CONFIGURED) in wps_attr_text()
655 if (attr->ap_setup_locked && *attr->ap_setup_locked) { in wps_attr_text()
665 if (attr->selected_registrar && *attr->selected_registrar) { in wps_attr_text()
675 if (attr->dev_password_id) { in wps_attr_text()
678 WPA_GET_BE16(attr->dev_password_id)); in wps_attr_text()
686 if (attr->sel_reg_config_methods) { in wps_attr_text()
690 WPA_GET_BE16(attr->sel_reg_config_methods)); in wps_attr_text()
698 if (attr->primary_dev_type) { in wps_attr_text()
702 wps_dev_type_bin2str(attr->primary_dev_type, in wps_attr_text()
712 if (attr->dev_name) { in wps_attr_text()
713 char *str = (char *)os_malloc(attr->dev_name_len + 1); in wps_attr_text()
719 for (i = 0; i < attr->dev_name_len; i++) { in wps_attr_text()
720 if (attr->dev_name[i] < 32) in wps_attr_text()
723 str[i] = attr->dev_name[i]; in wps_attr_text()
735 if (attr->config_methods) { in wps_attr_text()
738 WPA_GET_BE16(attr->config_methods)); in wps_attr_text()
748 if (attr) in wps_attr_text()
749 os_free(attr); in wps_attr_text()