+
+ if (value == WPS_CONFIGURED)
+ bss->wps_capabilities |=
+ G_SUPPLICANT_WPS_CONFIGURED;
+ }
+
+ value = get_tlv(&ie[6], ie[1], WPS_METHODS_TLV);
+ if (value != 0) {
+ if (GUINT16_FROM_BE(value) == WPS_PBC)
+ bss->wps_capabilities |= G_SUPPLICANT_WPS_PBC;
+ if (GUINT16_FROM_BE(value) == WPS_PIN)
+ bss->wps_capabilities |= G_SUPPLICANT_WPS_PIN;
+ } else
+ bss->wps_capabilities |=
+ G_SUPPLICANT_WPS_PBC | G_SUPPLICANT_WPS_PIN;
+
+ /* If the AP sends this it means it's advertizing
+ * as a registrar and the WPS process is launched
+ * on its side */
+ if (get_tlv(&ie[6], ie[1], WPS_REGISTRAR_TLV) != 0)
+ bss->wps_capabilities |= G_SUPPLICANT_WPS_REGISTRAR;
+
+ SUPPLICANT_DBG("WPS Methods 0x%x", bss->wps_capabilities);