]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Enable WSC 2.0 support unconditionally
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 25 Mar 2014 15:40:50 +0000 (17:40 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 25 Mar 2014 16:33:21 +0000 (18:33 +0200)
There is not much point in building devices with WPS 1.0 only supported
nowadays. As such, there is not sufficient justification for maintaining
extra complexity for the CONFIG_WPS2 build option either. Remove this by
enabling WSC 2.0 support unconditionally.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
24 files changed:
hostapd/Android.mk
hostapd/Makefile
hostapd/README-WPS
hostapd/android.config
hostapd/defconfig
src/ap/ap_config.c
src/ap/ap_drv_ops.c
src/ap/wps_hostapd.c
src/wps/wps.c
src/wps/wps_attr_build.c
src/wps/wps_common.c
src/wps/wps_defs.h
src/wps/wps_enrollee.c
src/wps/wps_er.c
src/wps/wps_registrar.c
src/wps/wps_upnp_ap.c
wpa_supplicant/Android.mk
wpa_supplicant/Makefile
wpa_supplicant/README-WPS
wpa_supplicant/android.config
wpa_supplicant/ap.c
wpa_supplicant/ctrl_iface.c
wpa_supplicant/defconfig
wpa_supplicant/wps_supplicant.c

index b96345f5836dfc6ee2a554422a9a58fac2b09bbb..6db82f854c65fe140e9d95a186b3b49738de7b20 100644 (file)
@@ -393,10 +393,6 @@ NEED_AES_UNWRAP=y
 endif
 
 ifdef CONFIG_WPS
-ifdef CONFIG_WPS2
-L_CFLAGS += -DCONFIG_WPS2
-endif
-
 L_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
 OBJS += src/utils/uuid.c
 OBJS += src/ap/wps_hostapd.c
index 149688897f54c1b1b36db62e6978e0140cc0526f..ac6373e6c22cc641b1fe9a04c6420e7469a960ea 100644 (file)
@@ -376,10 +376,6 @@ NEED_AES_UNWRAP=y
 endif
 
 ifdef CONFIG_WPS
-ifdef CONFIG_WPS2
-CFLAGS += -DCONFIG_WPS2
-endif
-
 CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
 OBJS += ../src/utils/uuid.o
 OBJS += ../src/ap/wps_hostapd.o
index 654b5bcec3342c5f1e5c8d022329c48dd6c022be..bb7d35f9052651f85d67b71e50c0d9718ebb0687 100644 (file)
@@ -63,7 +63,6 @@ includes WPS support and uses madwifi driver interface:
 CONFIG_DRIVER_MADWIFI=y
 CFLAGS += -I/usr/src/madwifi-0.9.3
 CONFIG_WPS=y
-CONFIG_WPS2=y
 CONFIG_WPS_UPNP=y
 
 Following parameter can be used to enable support for NFC config method:
index 81a2e2cebd200ed005c11cf256415a46945868a1..ad8330815766d3851a119477949954cd118063f9 100644 (file)
@@ -108,8 +108,6 @@ CONFIG_IEEE80211W=y
 
 # Wi-Fi Protected Setup (WPS)
 CONFIG_WPS=y
-# Enable WSC 2.0 support
-CONFIG_WPS2=y
 # Enable UPnP support for external WPS Registrars
 #CONFIG_WPS_UPNP=y
 
index 8c8f0ea2dbe4b119db0642d66b6f14138625f8ef..5b74b64f44f8a5dc557b0c124c56de19920aeffe 100644 (file)
@@ -113,8 +113,6 @@ CONFIG_EAP_TTLS=y
 
 # Wi-Fi Protected Setup (WPS)
 #CONFIG_WPS=y
-# Enable WSC 2.0 support
-#CONFIG_WPS2=y
 # Enable UPnP support for external WPS Registrars
 #CONFIG_WPS_UPNP=y
 # Enable WPS support with NFC config method
index 14d9ae9da5e970a65a8ed0d6b6e4e3982cbf788d..5a8e67e99a545848b7eb0d8b8c21bb2111686860 100644 (file)
@@ -782,7 +782,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
        }
 #endif /* CONFIG_IEEE80211N */
 
-#ifdef CONFIG_WPS2
+#ifdef CONFIG_WPS
        if (full_config && bss->wps_state && bss->ignore_broadcast_ssid) {
                wpa_printf(MSG_INFO, "WPS: ignore_broadcast_ssid "
                           "configuration forced WPS to be disabled");
@@ -803,7 +803,7 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
                           "WPA2/CCMP forced WPS to be disabled");
                bss->wps_state = 0;
        }
-#endif /* CONFIG_WPS2 */
+#endif /* CONFIG_WPS */
 
 #ifdef CONFIG_HS20
        if (full_config && bss->hs20 &&
index 83cfd0f4c5ce3424efa6696fb888b9555a05535d..9abcd7c97b4e36a2e58f9f265e64d627dbe589e1 100644 (file)
@@ -128,14 +128,14 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd,
        }
 #endif /* CONFIG_P2P_MANAGER */
 
-#ifdef CONFIG_WPS2
+#ifdef CONFIG_WPS
        if (hapd->conf->wps_state) {
                struct wpabuf *a = wps_build_assoc_resp_ie();
                if (a && wpabuf_resize(&assocresp, wpabuf_len(a)) == 0)
                        wpabuf_put_buf(assocresp, a);
                wpabuf_free(a);
        }
-#endif /* CONFIG_WPS2 */
+#endif /* CONFIG_WPS */
 
 #ifdef CONFIG_P2P_MANAGER
        if (hapd->conf->p2p & P2P_MANAGE) {
index e0033cedf3cda4028ba8221f8929495dc499c624..17217a133715c3e1e63e579387f6f217af493223 100644 (file)
@@ -378,48 +378,11 @@ static int hapd_wps_reconfig_in_memory(struct hostapd_data *hapd,
                }
                bss->auth_algs = 1;
        } else {
-#ifdef CONFIG_WPS2
                /*
                 * WPS 2.0 does not allow WEP to be configured, so no need to
                 * process that option here either.
                 */
                bss->auth_algs = 1;
-#else /* CONFIG_WPS2 */
-               if ((cred->auth_type & WPS_AUTH_OPEN) &&
-                   (cred->auth_type & WPS_AUTH_SHARED))
-                       bss->auth_algs = 3;
-               else if (cred->auth_type & WPS_AUTH_SHARED)
-                       bss->auth_algs = 2;
-               else
-                       bss->auth_algs = 1;
-               if (cred->encr_type & WPS_ENCR_WEP && cred->key_idx > 0 &&
-                   cred->key_idx <= 4) {
-                       struct hostapd_wep_keys *wep = &bss->ssid.wep;
-                       int idx = cred->key_idx;
-                       if (idx)
-                               idx--;
-                       wep->idx = idx;
-                       if (cred->key_len == 10 || cred->key_len == 26) {
-                               os_free(wep->key[idx]);
-                               wep->key[idx] = os_malloc(cred->key_len / 2);
-                               if (wep->key[idx] == NULL ||
-                                   hexstr2bin((const char *) cred->key,
-                                              wep->key[idx],
-                                              cred->key_len / 2))
-                                       return -1;
-                               wep->len[idx] = cred->key_len / 2;
-                       } else {
-                               os_free(wep->key[idx]);
-                               wep->key[idx] = os_malloc(cred->key_len);
-                               if (wep->key[idx] == NULL)
-                                       return -1;
-                               os_memcpy(wep->key[idx], cred->key,
-                                         cred->key_len);
-                               wep->len[idx] = cred->key_len;
-                       }
-                       wep->keys_set = 1;
-               }
-#endif /* CONFIG_WPS2 */
        }
 
        /* Schedule configuration reload after short period of time to allow
@@ -594,39 +557,11 @@ static int hapd_wps_cred_cb(struct hostapd_data *hapd, void *ctx)
 
                fprintf(nconf, "auth_algs=1\n");
        } else {
-#ifdef CONFIG_WPS2
                /*
                 * WPS 2.0 does not allow WEP to be configured, so no need to
                 * process that option here either.
                 */
                fprintf(nconf, "auth_algs=1\n");
-#else /* CONFIG_WPS2 */
-               if ((cred->auth_type & WPS_AUTH_OPEN) &&
-                   (cred->auth_type & WPS_AUTH_SHARED))
-                       fprintf(nconf, "auth_algs=3\n");
-               else if (cred->auth_type & WPS_AUTH_SHARED)
-                       fprintf(nconf, "auth_algs=2\n");
-               else
-                       fprintf(nconf, "auth_algs=1\n");
-
-               if (cred->encr_type & WPS_ENCR_WEP && cred->key_idx <= 4) {
-                       int key_idx = cred->key_idx;
-                       if (key_idx)
-                               key_idx--;
-                       fprintf(nconf, "wep_default_key=%d\n", key_idx);
-                       fprintf(nconf, "wep_key%d=", key_idx);
-                       if (cred->key_len == 10 || cred->key_len == 26) {
-                               /* WEP key as a hex string */
-                               for (i = 0; i < cred->key_len; i++)
-                                       fputc(cred->key[i], nconf);
-                       } else {
-                               /* Raw WEP key; convert to hex */
-                               for (i = 0; i < cred->key_len; i++)
-                                       fprintf(nconf, "%02x", cred->key[i]);
-                       }
-                       fprintf(nconf, "\n");
-               }
-#endif /* CONFIG_WPS2 */
        }
 
        fprintf(nconf, "# WPS configuration - END\n");
@@ -1078,7 +1013,6 @@ int hostapd_init_wps(struct hostapd_data *hapd,
                os_strdup(hapd->conf->serial_number) : NULL;
        wps->config_methods =
                wps_config_methods_str2bin(hapd->conf->config_methods);
-#ifdef CONFIG_WPS2
        if ((wps->config_methods &
             (WPS_CONFIG_DISPLAY | WPS_CONFIG_VIRT_DISPLAY |
              WPS_CONFIG_PHY_DISPLAY)) == WPS_CONFIG_DISPLAY) {
@@ -1093,7 +1027,6 @@ int hostapd_init_wps(struct hostapd_data *hapd,
                           "virtual_push_button for WPS 2.0 compliance");
                wps->config_methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
        }
-#endif /* CONFIG_WPS2 */
        os_memcpy(wps->dev.pri_dev_type, hapd->conf->device_type,
                  WPS_DEV_TYPE_LEN);
 
index 3d019f10399edde69552d1be83081465587051fd..648cfd10f60885e835e3683debbc2ad93710b466 100644 (file)
@@ -511,13 +511,11 @@ struct wpabuf * wps_build_probe_req_ie(u16 pw_id, struct wps_device_data *dev,
            wps_build_assoc_state(NULL, ie) ||
            wps_build_config_error(ie, WPS_CFG_NO_ERROR) ||
            wps_build_dev_password_id(ie, pw_id) ||
-#ifdef CONFIG_WPS2
            wps_build_manufacturer(dev, ie) ||
            wps_build_model_name(dev, ie) ||
            wps_build_model_number(dev, ie) ||
            wps_build_dev_name(dev, ie) ||
            wps_build_wfa_ext(ie, req_type == WPS_REQ_ENROLLEE, NULL, 0) ||
-#endif /* CONFIG_WPS2 */
            wps_build_req_dev_type(dev, ie, num_req_dev_types, req_dev_types)
            ||
            wps_build_secondary_dev_type(dev, ie)
@@ -526,13 +524,6 @@ struct wpabuf * wps_build_probe_req_ie(u16 pw_id, struct wps_device_data *dev,
                return NULL;
        }
 
-#ifndef CONFIG_WPS2
-       if (dev->p2p && wps_build_dev_name(dev, ie)) {
-               wpabuf_free(ie);
-               return NULL;
-       }
-#endif /* CONFIG_WPS2 */
-
        return wps_ie_encapsulate(ie);
 }
 
index c7e1cbb2f5bad5d10d9daf713722a476e2e02e25..b689357a280a657eb0a0df072fe28bffdf2cdd3a 100644 (file)
@@ -205,7 +205,6 @@ int wps_build_version(struct wpabuf *msg)
 int wps_build_wfa_ext(struct wpabuf *msg, int req_to_enroll,
                      const u8 *auth_macs, size_t auth_macs_count)
 {
-#ifdef CONFIG_WPS2
        u8 *len;
 
 #ifdef CONFIG_WPS_TESTING
@@ -246,7 +245,6 @@ int wps_build_wfa_ext(struct wpabuf *msg, int req_to_enroll,
        }
 
        WPA_PUT_BE16(len, (u8 *) wpabuf_put(msg, 0) - len - 2);
-#endif /* CONFIG_WPS2 */
 
 #ifdef CONFIG_WPS_TESTING
        if (WPS_VERSION > 0x20) {
@@ -299,9 +297,7 @@ int wps_build_auth_type_flags(struct wps_data *wps, struct wpabuf *msg)
        /* WPA/WPA2-Enterprise enrollment not supported through WPS */
        auth_types &= ~WPS_AUTH_WPA;
        auth_types &= ~WPS_AUTH_WPA2;
-#ifdef CONFIG_WPS2
        auth_types &= ~WPS_AUTH_SHARED;
-#endif /* CONFIG_WPS2 */
        wpa_printf(MSG_DEBUG, "WPS:  * Authentication Type Flags");
        wpabuf_put_be16(msg, ATTR_AUTH_TYPE_FLAGS);
        wpabuf_put_be16(msg, 2);
@@ -313,9 +309,7 @@ int wps_build_auth_type_flags(struct wps_data *wps, struct wpabuf *msg)
 int wps_build_encr_type_flags(struct wps_data *wps, struct wpabuf *msg)
 {
        u16 encr_types = WPS_ENCR_TYPES;
-#ifdef CONFIG_WPS2
        encr_types &= ~WPS_ENCR_WEP;
-#endif /* CONFIG_WPS2 */
        wpa_printf(MSG_DEBUG, "WPS:  * Encryption Type Flags");
        wpabuf_put_be16(msg, ATTR_ENCR_TYPE_FLAGS);
        wpabuf_put_be16(msg, 2);
index abf3a4fc6787336748fb6af36fd24f723acb7868..a282348eeeeb5c2a4aa3de1f515a4e7008cb8528 100644 (file)
@@ -531,9 +531,7 @@ u16 wps_config_methods_str2bin(const char *str)
        if (str == NULL) {
                /* Default to enabling methods based on build configuration */
                methods |= WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD;
-#ifdef CONFIG_WPS2
                methods |= WPS_CONFIG_VIRT_DISPLAY;
-#endif /* CONFIG_WPS2 */
 #ifdef CONFIG_WPS_NFC
                methods |= WPS_CONFIG_NFC_INTERFACE;
 #endif /* CONFIG_WPS_NFC */
@@ -554,7 +552,6 @@ u16 wps_config_methods_str2bin(const char *str)
                        methods |= WPS_CONFIG_PUSHBUTTON;
                if (os_strstr(str, "keypad"))
                        methods |= WPS_CONFIG_KEYPAD;
-#ifdef CONFIG_WPS2
                if (os_strstr(str, "virtual_display"))
                        methods |= WPS_CONFIG_VIRT_DISPLAY;
                if (os_strstr(str, "physical_display"))
@@ -563,7 +560,6 @@ u16 wps_config_methods_str2bin(const char *str)
                        methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
                if (os_strstr(str, "physical_push_button"))
                        methods |= WPS_CONFIG_PHY_PUSHBUTTON;
-#endif /* CONFIG_WPS2 */
        }
 
        return methods;
index e125048ca5b9c033252f296f4e44d8f0a55de59a..a5ba25486127cef2f4f223c1ee0f5b31f1c5c5a6 100644 (file)
@@ -18,11 +18,7 @@ extern int wps_corrupt_pkhash;
 
 #else /* CONFIG_WPS_TESTING */
 
-#ifdef CONFIG_WPS2
 #define WPS_VERSION 0x20
-#else /* CONFIG_WPS2 */
-#define WPS_VERSION 0x10
-#endif /* CONFIG_WPS2 */
 
 #endif /* CONFIG_WPS_TESTING */
 
@@ -246,12 +242,10 @@ enum wps_error_indication {
 #define WPS_CONFIG_NFC_INTERFACE 0x0040
 #define WPS_CONFIG_PUSHBUTTON 0x0080
 #define WPS_CONFIG_KEYPAD 0x0100
-#ifdef CONFIG_WPS2
 #define WPS_CONFIG_VIRT_PUSHBUTTON 0x0280
 #define WPS_CONFIG_PHY_PUSHBUTTON 0x0480
 #define WPS_CONFIG_VIRT_DISPLAY 0x2008
 #define WPS_CONFIG_PHY_DISPLAY 0x4008
-#endif /* CONFIG_WPS2 */
 
 /* Connection Type Flags */
 #define WPS_CONN_ESS 0x01
index 89f13664583128aa6baedba0c6845528c2c7f431..d072582feb2a4bc76726b830b7e2353f8ac88882 100644 (file)
@@ -130,10 +130,8 @@ static struct wpabuf * wps_build_m1(struct wps_data *wps)
                 * workaround.
                 */
                config_methods &= ~WPS_CONFIG_PUSHBUTTON;
-#ifdef CONFIG_WPS2
                config_methods &= ~(WPS_CONFIG_VIRT_PUSHBUTTON |
                                    WPS_CONFIG_PHY_PUSHBUTTON);
-#endif /* CONFIG_WPS2 */
        }
 
        if (wps_build_version(msg) ||
@@ -698,7 +696,6 @@ static int wps_process_cred_e(struct wps_data *wps, const u8 *cred,
 #endif /* CONFIG_WPS_STRICT */
        }
 
-#ifdef CONFIG_WPS2
        if (!(wps->cred.encr_type &
              (WPS_ENCR_NONE | WPS_ENCR_TKIP | WPS_ENCR_AES))) {
                if (wps->cred.encr_type & WPS_ENCR_WEP) {
@@ -712,7 +709,6 @@ static int wps_process_cred_e(struct wps_data *wps, const u8 *cred,
                           "invalid encr_type 0x%x", wps->cred.encr_type);
                return -1;
        }
-#endif /* CONFIG_WPS2 */
 
        if (wps->wps->cred_cb) {
                wps->cred.cred_attr = cred - 4;
@@ -799,7 +795,6 @@ static int wps_process_ap_settings_e(struct wps_data *wps,
 #endif /* CONFIG_WPS_STRICT */
        }
 
-#ifdef CONFIG_WPS2
        if (!(cred.encr_type & (WPS_ENCR_NONE | WPS_ENCR_TKIP | WPS_ENCR_AES)))
        {
                if (cred.encr_type & WPS_ENCR_WEP) {
@@ -813,7 +808,6 @@ static int wps_process_ap_settings_e(struct wps_data *wps,
                           "invalid encr_type 0x%x", cred.encr_type);
                return -1;
        }
-#endif /* CONFIG_WPS2 */
 
 #ifdef CONFIG_WPS_STRICT
        if (wps2) {
@@ -830,7 +824,6 @@ static int wps_process_ap_settings_e(struct wps_data *wps,
        }
 #endif /* CONFIG_WPS_STRICT */
 
-#ifdef CONFIG_WPS2
        if ((cred.encr_type & (WPS_ENCR_TKIP | WPS_ENCR_AES)) == WPS_ENCR_TKIP)
        {
                wpa_printf(MSG_DEBUG, "WPS: Upgrade encr_type TKIP -> "
@@ -844,7 +837,6 @@ static int wps_process_ap_settings_e(struct wps_data *wps,
                           "WPAPSK+WPA2PSK");
                cred.auth_type |= WPS_AUTH_WPA2PSK;
        }
-#endif /* CONFIG_WPS2 */
 
        if (wps->wps->cred_cb) {
                cred.cred_attr = wpabuf_head(attrs);
index 8e9ee7a5518768ad2e2844707b13a9cdd2afab3f..8b2675e78e018bb53574e17e0fc7c5c26db47e50 100644 (file)
@@ -1490,11 +1490,9 @@ static int wps_er_build_sel_reg_config_methods(struct wpabuf *msg,
 
 static int wps_er_build_uuid_r(struct wpabuf *msg, const u8 *uuid_r)
 {
-#ifdef CONFIG_WPS2
        wpabuf_put_be16(msg, ATTR_UUID_R);
        wpabuf_put_be16(msg, WPS_UUID_LEN);
        wpabuf_put_data(msg, uuid_r, WPS_UUID_LEN);
-#endif /* CONFIG_WPS2 */
        return 0;
 }
 
@@ -1506,9 +1504,7 @@ void wps_er_set_sel_reg(struct wps_er *er, int sel_reg, u16 dev_passwd_id,
        struct wps_er_ap *ap;
        struct wps_registrar *reg = er->wps->registrar;
        const u8 *auth_macs;
-#ifdef CONFIG_WPS2
        u8 bcast[ETH_ALEN];
-#endif /* CONFIG_WPS2 */
        size_t count;
        union wps_event_data data;
 
@@ -1522,13 +1518,11 @@ void wps_er_set_sel_reg(struct wps_er *er, int sel_reg, u16 dev_passwd_id,
                return;
 
        auth_macs = wps_authorized_macs(reg, &count);
-#ifdef CONFIG_WPS2
        if (count == 0) {
                os_memset(bcast, 0xff, ETH_ALEN);
                auth_macs = bcast;
                count = 1;
        }
-#endif /* CONFIG_WPS2 */
 
        if (wps_build_version(msg) ||
            wps_er_build_selected_registrar(msg, sel_reg) ||
index 900dd5a1fdfc813f6abdbbb1022179ca87fa7c52..c47ec4619eb7378e504c9a41b7c492a89fc329d1 100644 (file)
@@ -538,7 +538,6 @@ static int wps_build_sel_pbc_reg_uuid_e(struct wps_registrar *reg,
 static void wps_set_pushbutton(u16 *methods, u16 conf_methods)
 {
        *methods |= WPS_CONFIG_PUSHBUTTON;
-#ifdef CONFIG_WPS2
        if ((conf_methods & WPS_CONFIG_VIRT_PUSHBUTTON) ==
            WPS_CONFIG_VIRT_PUSHBUTTON)
                *methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
@@ -556,7 +555,6 @@ static void wps_set_pushbutton(u16 *methods, u16 conf_methods)
                 */
                *methods |= WPS_CONFIG_PHY_PUSHBUTTON;
        }
-#endif /* CONFIG_WPS2 */
 }
 
 
@@ -568,10 +566,8 @@ static int wps_build_sel_reg_config_methods(struct wps_registrar *reg,
                return 0;
        methods = reg->wps->config_methods;
        methods &= ~WPS_CONFIG_PUSHBUTTON;
-#ifdef CONFIG_WPS2
        methods &= ~(WPS_CONFIG_VIRT_PUSHBUTTON |
                     WPS_CONFIG_PHY_PUSHBUTTON);
-#endif /* CONFIG_WPS2 */
        if (reg->pbc)
                wps_set_pushbutton(&methods, reg->wps->config_methods);
        if (reg->sel_reg_config_methods_override >= 0)
@@ -594,10 +590,8 @@ static int wps_build_probe_config_methods(struct wps_registrar *reg,
         * external Registrars.
         */
        methods = reg->wps->config_methods & ~WPS_CONFIG_PUSHBUTTON;
-#ifdef CONFIG_WPS2
        methods &= ~(WPS_CONFIG_VIRT_PUSHBUTTON |
                     WPS_CONFIG_PHY_PUSHBUTTON);
-#endif /* CONFIG_WPS2 */
        wpa_printf(MSG_DEBUG, "WPS:  * Config Methods (%x)", methods);
        wpabuf_put_be16(msg, ATTR_CONFIG_METHODS);
        wpabuf_put_be16(msg, 2);
@@ -617,13 +611,11 @@ const u8 * wps_authorized_macs(struct wps_registrar *reg, size_t *count)
 {
        *count = 0;
 
-#ifdef CONFIG_WPS2
        while (*count < WPS_MAX_AUTHORIZED_MACS) {
                if (is_zero_ether_addr(reg->authorized_macs_union[*count]))
                        break;
                (*count)++;
        }
-#endif /* CONFIG_WPS2 */
 
        return (const u8 *) reg->authorized_macs_union;
 }
@@ -1217,10 +1209,8 @@ static void wps_cb_set_sel_reg(struct wps_registrar *reg)
 
        if (reg->selected_registrar) {
                methods = reg->wps->config_methods & ~WPS_CONFIG_PUSHBUTTON;
-#ifdef CONFIG_WPS2
                methods &= ~(WPS_CONFIG_VIRT_PUSHBUTTON |
                             WPS_CONFIG_PHY_PUSHBUTTON);
-#endif /* CONFIG_WPS2 */
                if (reg->pbc)
                        wps_set_pushbutton(&methods, reg->wps->config_methods);
        }
@@ -3446,10 +3436,8 @@ void wps_registrar_selected_registrar_changed(struct wps_registrar *reg,
                u16 methods;
 
                methods = reg->wps->config_methods & ~WPS_CONFIG_PUSHBUTTON;
-#ifdef CONFIG_WPS2
                methods &= ~(WPS_CONFIG_VIRT_PUSHBUTTON |
                             WPS_CONFIG_PHY_PUSHBUTTON);
-#endif /* CONFIG_WPS2 */
                if (reg->pbc) {
                        reg->sel_reg_dev_password_id_override =
                                DEV_PW_PUSHBUTTON;
@@ -3510,7 +3498,6 @@ int wps_registrar_get_info(struct wps_registrar *reg, const u8 *addr,
 int wps_registrar_config_ap(struct wps_registrar *reg,
                            struct wps_credential *cred)
 {
-#ifdef CONFIG_WPS2
        wpa_printf(MSG_DEBUG, "WPS: encr_type=0x%x", cred->encr_type);
        if (!(cred->encr_type & (WPS_ENCR_NONE | WPS_ENCR_TKIP |
                                 WPS_ENCR_AES))) {
@@ -3538,7 +3525,6 @@ int wps_registrar_config_ap(struct wps_registrar *reg,
                           "WPAPSK+WPA2PSK");
                cred->auth_type |= WPS_AUTH_WPA2PSK;
        }
-#endif /* CONFIG_WPS2 */
 
        if (reg->wps->cred_cb)
                return reg->wps->cred_cb(reg->wps->cb_ctx, cred);
index 4f1dd8f4100ea96e65661098f14764b4a8ee7064..2949f141220b54aa5847a79bd46578251872af19 100644 (file)
@@ -61,11 +61,9 @@ int upnp_er_set_selected_registrar(struct wps_registrar *reg,
                        os_memcpy(s->authorized_macs, attr.authorized_macs,
                                  count * ETH_ALEN);
                } else if (!attr.version2) {
-#ifdef CONFIG_WPS2
                        wpa_printf(MSG_DEBUG, "WPS: Add broadcast "
                                   "AuthorizedMACs for WPS 1.0 ER");
                        os_memset(s->authorized_macs, 0xff, ETH_ALEN);
-#endif /* CONFIG_WPS2 */
                }
                eloop_register_timeout(WPS_PBC_WALK_TIME, 0,
                                       upnp_er_set_selected_timeout, s, reg);
index b8690f505f2cc59ba0d6c8fd906d128a4dfa0be5..a60a26a5569526ab347054e67aee6b8a9239e9e4 100644 (file)
@@ -617,10 +617,6 @@ NEED_SHA256=y
 endif
 
 ifdef CONFIG_WPS
-ifdef CONFIG_WPS2
-L_CFLAGS += -DCONFIG_WPS2
-endif
-
 # EAP-WSC
 L_CFLAGS += -DCONFIG_WPS -DEAP_WSC
 OBJS += wps_supplicant.c
index ce98068808e07e3897cac07005447e03dbcca291..19dae705369c655487f10ee076c1173756624429 100644 (file)
@@ -622,10 +622,6 @@ NEED_SHA256=y
 endif
 
 ifdef CONFIG_WPS
-ifdef CONFIG_WPS2
-CFLAGS += -DCONFIG_WPS2
-endif
-
 # EAP-WSC
 CFLAGS += -DCONFIG_WPS -DEAP_WSC
 OBJS += wps_supplicant.o
index 18b0cca1f1b6ff3a751093aec112fa40f84633eb..a33b0f06f758079324dae19192b5b8964a03dc27 100644 (file)
@@ -60,7 +60,6 @@ driver interface:
 
 CONFIG_DRIVER_NL80211=y
 CONFIG_WPS=y
-CONFIG_WPS2=y
 
 If you want to enable WPS external registrar (ER) functionality, you
 will also need to add following line:
index 7c80528eed540674c5c3a0040e389252b5cf30fe..ffa2f01a2d34830ad53f18131894c995414b1727 100644 (file)
@@ -141,8 +141,6 @@ CONFIG_EAP_AKA_PRIME=y
 
 # Wi-Fi Protected Setup (WPS)
 CONFIG_WPS=y
-# Enable WSC 2.0 support
-CONFIG_WPS2=y
 # Enable WPS external registrar functionality
 CONFIG_WPS_ER=y
 # Disable credentials for an open network by default when acting as a WPS
index 12cb4b6b2e93b28d73d80b205037ecca3a3fb53b..e7d59de99f1ccd928c712b27515fb6ce8c83b823 100644 (file)
@@ -311,12 +311,10 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
        if (bss->ssid.security_policy != SECURITY_WPA_PSK &&
            bss->ssid.security_policy != SECURITY_PLAINTEXT)
                goto no_wps;
-#ifdef CONFIG_WPS2
        if (bss->ssid.security_policy == SECURITY_WPA_PSK &&
            (!(bss->rsn_pairwise & WPA_CIPHER_CCMP) || !(bss->wpa & 2)))
                goto no_wps; /* WPS2 does not allow WPA/TKIP-only
                              * configuration */
-#endif /* CONFIG_WPS2 */
        bss->eap_server = 1;
 
        if (!ssid->ignore_broadcast_ssid)
index 704caa1e27608ecc4081cb4309afa2ae0b8aafca..19ac27c2ef1921523d2075c3ac98970c77702786 100644 (file)
@@ -2163,10 +2163,8 @@ static char * wpa_supplicant_wps_ie_txt_buf(struct wpa_supplicant *wpa_s,
                return pos;
        if (wps_is_selected_pbc_registrar(wps_ie))
                txt = "[WPS-PBC]";
-#ifdef CONFIG_WPS2
        else if (wps_is_addr_authorized(wps_ie, wpa_s->own_addr, 0))
                txt = "[WPS-AUTH]";
-#endif /* CONFIG_WPS2 */
        else if (wps_is_selected_pin_registrar(wps_ie))
                txt = "[WPS-PIN]";
        else
index 91eea355059d907d089f9c7b3238e4f9b17c9a60..d194eb8d891e63c9a86617045273aae9803f8346 100644 (file)
@@ -152,8 +152,6 @@ CONFIG_EAP_LEAP=y
 
 # Wi-Fi Protected Setup (WPS)
 #CONFIG_WPS=y
-# Enable WSC 2.0 support
-#CONFIG_WPS2=y
 # Enable WPS external registrar functionality
 #CONFIG_WPS_ER=y
 # Disable credentials for an open network by default when acting as a WPS
index c87fa3d2601935cf049e6baf88da59e4d8b8fb55..b086c4713d6e6a0b69ad2b3e1d44c009e99e8abc 100644 (file)
@@ -1301,7 +1301,6 @@ static void wpas_wps_set_sel_reg_cb(void *ctx, int sel_reg, u16 dev_passwd_id,
 
 static u16 wps_fix_config_methods(u16 config_methods)
 {
-#ifdef CONFIG_WPS2
        if ((config_methods &
             (WPS_CONFIG_DISPLAY | WPS_CONFIG_VIRT_DISPLAY |
              WPS_CONFIG_PHY_DISPLAY)) == WPS_CONFIG_DISPLAY) {
@@ -1316,7 +1315,6 @@ static u16 wps_fix_config_methods(u16 config_methods)
                           "virtual_push_button for WPS 2.0 compliance");
                config_methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
        }
-#endif /* CONFIG_WPS2 */
 
        return config_methods;
 }