Lines Matching full:attr
99 struct wps_parse_attr attr;
102 if (wps_parse_msg(cfg->assoc_wps_ie, &attr) < 0) {
105 } else if (attr.request_type == NULL) {
111 *attr.request_type);
112 data->request_type = *attr.request_type;
224 struct wps_parse_attr attr;
227 * In theory, this could also verify that attr.sel_reg_config_methods
233 if (wps_parse_msg(msg, &attr) < 0 ||
234 !attr.selected_registrar || *attr.selected_registrar == 0 ||
235 !attr.dev_password_id ||
236 WPA_GET_BE16(attr.dev_password_id) != DEV_PW_PUSHBUTTON)
240 if (!attr.sel_reg_config_methods ||
241 !(WPA_GET_BE16(attr.sel_reg_config_methods) &
250 static int is_selected_pin_registrar(struct wps_parse_attr *attr)
253 * In theory, this could also verify that attr.sel_reg_config_methods
260 if (!attr->selected_registrar || *attr->selected_registrar == 0)
263 if (attr->dev_password_id != NULL &&
264 WPA_GET_BE16(attr->dev_password_id) == DEV_PW_PUSHBUTTON)
268 if (!attr->sel_reg_config_methods ||
269 !(WPA_GET_BE16(attr->sel_reg_config_methods) &
285 struct wps_parse_attr attr;
287 if (wps_parse_msg(msg, &attr) < 0)
290 return is_selected_pin_registrar(&attr);
305 struct wps_parse_attr attr;
310 if (wps_parse_msg(msg, &attr) < 0)
313 if (!attr.version2 && ver1_compat) {
318 return is_selected_pin_registrar(&attr);
321 if (!attr.authorized_macs)
324 pos = attr.authorized_macs;
325 for (i = 0; i < attr.authorized_macs_len / ETH_ALEN; i++) {
377 struct wps_parse_attr attr;
379 if (wps_parse_msg(msg, &attr) < 0)
381 return attr.uuid_e;
390 struct wps_parse_attr attr;
392 if (msg == NULL || wps_parse_msg(msg, &attr) < 0)
394 return attr.version2 != NULL;
545 struct wps_parse_attr attr;
549 if (wps_parse_msg(data, &attr) < 0)
552 if (attr.wps_state) {
553 if (*attr.wps_state == WPS_STATE_NOT_CONFIGURED)
556 else if (*attr.wps_state == WPS_STATE_CONFIGURED)
566 if (attr.ap_setup_locked && *attr.ap_setup_locked) {
574 if (attr.selected_registrar && *attr.selected_registrar) {
582 if (attr.dev_password_id) {
585 WPA_GET_BE16(attr.dev_password_id));
591 if (attr.sel_reg_config_methods) {
595 WPA_GET_BE16(attr.sel_reg_config_methods));
601 if (attr.primary_dev_type) {
605 attr.primary_dev_type,
613 if (attr.dev_name) {
614 char *str = os_malloc(attr.dev_name_len + 1);
618 for (i = 0; i < attr.dev_name_len; i++) {
619 if (attr.dev_name[i] < 32)
622 str[i] = attr.dev_name[i];
632 if (attr.config_methods) {
635 WPA_GET_BE16(attr.config_methods));