+static void wps_er_ap_get_m1(struct wps_er_ap *ap, struct wpabuf *m1)
+{
+ struct wps_parse_attr attr;
+
+ if (wps_parse_msg(m1, &attr) < 0) {
+ wpa_printf(MSG_DEBUG, "WPS ER: Failed to parse M1");
+ return;
+ }
+ if (attr.primary_dev_type)
+ os_memcpy(ap->pri_dev_type, attr.primary_dev_type, 8);
+ if (attr.wps_state)
+ ap->wps_state = *attr.wps_state;
+
+ wps_er_subscribe(ap);
+}
+
+
+static void wps_er_get_device_info(struct wps_er_ap *ap)
+{
+ wps_er_send_get_device_info(ap, wps_er_ap_get_m1);
+}
+
+