+static char * wpa_supplicant_wps_ie_txt(char *pos, char *end,
+ const struct wpa_scan_res *res)
+{
+#ifdef CONFIG_WPS
+ struct wpabuf *wps_ie;
+ int ret;
+ const char *txt;
+
+ wps_ie = wpa_scan_get_vendor_ie_multi(res, WPS_IE_VENDOR_TYPE);
+ if (wps_ie == NULL)
+ return pos;
+
+ if (wps_is_selected_pbc_registrar(wps_ie))
+ txt = "[WPS-PBC]";
+ else if (wps_is_selected_pin_registrar(wps_ie))
+ txt = "[WPS-PIN]";
+ else
+ txt = "[WPS]";
+
+ ret = os_snprintf(pos, end - pos, "%s", txt);
+ if (ret >= 0 && ret < end - pos)
+ pos += ret;
+ wpabuf_free(wps_ie);
+#endif /* CONFIG_WPS */
+
+ return pos;
+}
+