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