Remove CONFIG_NO_WPA2 build parameter
There is not much use for enabling WPA without WPA2 nowadays since most networks have been upgraded to WPA2. Furthermore, the code size savings from disabling just WPA2 are pretty small, so there is not much justification for maintaining this build option. Remove it to get rid of undesired complexity. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
5d5c4ee5e0
commit
aa20e1a1fb
11 changed files with 12 additions and 52 deletions
|
@ -335,7 +335,6 @@ int wpa_ft_parse_ies(const u8 *ies, size_t ies_len,
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
|
|
||||||
|
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
static int rsn_selector_to_bitfield(const u8 *s)
|
static int rsn_selector_to_bitfield(const u8 *s)
|
||||||
{
|
{
|
||||||
if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_NONE)
|
if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_NONE)
|
||||||
|
@ -384,7 +383,6 @@ static int rsn_key_mgmt_to_bitfield(const u8 *s)
|
||||||
#endif /* CONFIG_SAE */
|
#endif /* CONFIG_SAE */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -397,7 +395,6 @@ static int rsn_key_mgmt_to_bitfield(const u8 *s)
|
||||||
int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
|
int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
|
||||||
struct wpa_ie_data *data)
|
struct wpa_ie_data *data)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
const struct rsn_ie_hdr *hdr;
|
const struct rsn_ie_hdr *hdr;
|
||||||
const u8 *pos;
|
const u8 *pos;
|
||||||
int left;
|
int left;
|
||||||
|
@ -551,9 +548,6 @@ int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
#else /* CONFIG_NO_WPA2 */
|
|
||||||
return -1;
|
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "wpa_i.h"
|
#include "wpa_i.h"
|
||||||
#include "pmksa_cache.h"
|
#include "pmksa_cache.h"
|
||||||
|
|
||||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
#ifdef IEEE8021X_EAPOL
|
||||||
|
|
||||||
static const int pmksa_cache_max_entries = 32;
|
static const int pmksa_cache_max_entries = 32;
|
||||||
|
|
||||||
|
@ -522,4 +522,4 @@ pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
|
||||||
return pmksa;
|
return pmksa;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
#endif /* IEEE8021X_EAPOL */
|
||||||
|
|
|
@ -44,7 +44,7 @@ enum pmksa_free_reason {
|
||||||
PMKSA_EXPIRE,
|
PMKSA_EXPIRE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
#ifdef IEEE8021X_EAPOL
|
||||||
|
|
||||||
struct rsn_pmksa_cache *
|
struct rsn_pmksa_cache *
|
||||||
pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
|
pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
|
||||||
|
@ -69,7 +69,7 @@ pmksa_cache_get_opportunistic(struct rsn_pmksa_cache *pmksa,
|
||||||
void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa, void *network_ctx,
|
void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa, void *network_ctx,
|
||||||
const u8 *pmk, size_t pmk_len);
|
const u8 *pmk, size_t pmk_len);
|
||||||
|
|
||||||
#else /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
#else /* IEEE8021X_EAPOL */
|
||||||
|
|
||||||
static inline struct rsn_pmksa_cache *
|
static inline struct rsn_pmksa_cache *
|
||||||
pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
|
pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
|
||||||
|
@ -127,6 +127,6 @@ static inline void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
#endif /* IEEE8021X_EAPOL */
|
||||||
|
|
||||||
#endif /* PMKSA_CACHE_H */
|
#endif /* PMKSA_CACHE_H */
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "wpa_i.h"
|
#include "wpa_i.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
#ifdef IEEE8021X_EAPOL
|
||||||
|
|
||||||
#define PMKID_CANDIDATE_PRIO_SCAN 1000
|
#define PMKID_CANDIDATE_PRIO_SCAN 1000
|
||||||
|
|
||||||
|
@ -508,4 +508,4 @@ int rsn_preauth_in_progress(struct wpa_sm *sm)
|
||||||
return sm->preauth_eapol != NULL;
|
return sm->preauth_eapol != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
#endif /* IEEE8021X_EAPOL */
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
struct wpa_scan_results;
|
struct wpa_scan_results;
|
||||||
|
|
||||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
#ifdef IEEE8021X_EAPOL
|
||||||
|
|
||||||
void pmksa_candidate_free(struct wpa_sm *sm);
|
void pmksa_candidate_free(struct wpa_sm *sm);
|
||||||
int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst,
|
int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst,
|
||||||
|
@ -27,7 +27,7 @@ int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, size_t buflen,
|
||||||
int verbose);
|
int verbose);
|
||||||
int rsn_preauth_in_progress(struct wpa_sm *sm);
|
int rsn_preauth_in_progress(struct wpa_sm *sm);
|
||||||
|
|
||||||
#else /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
#else /* IEEE8021X_EAPOL */
|
||||||
|
|
||||||
static inline void pmksa_candidate_free(struct wpa_sm *sm)
|
static inline void pmksa_candidate_free(struct wpa_sm *sm)
|
||||||
{
|
{
|
||||||
|
@ -74,6 +74,6 @@ static inline int rsn_preauth_in_progress(struct wpa_sm *sm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
#endif /* IEEE8021X_EAPOL */
|
||||||
|
|
||||||
#endif /* PREAUTH_H */
|
#endif /* PREAUTH_H */
|
||||||
|
|
|
@ -392,7 +392,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
|
||||||
|
|
||||||
os_memset(&ie, 0, sizeof(ie));
|
os_memset(&ie, 0, sizeof(ie));
|
||||||
|
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
if (sm->proto == WPA_PROTO_RSN) {
|
if (sm->proto == WPA_PROTO_RSN) {
|
||||||
/* RSN: msg 1/4 should contain PMKID for the selected PMK */
|
/* RSN: msg 1/4 should contain PMKID for the selected PMK */
|
||||||
const u8 *_buf = (const u8 *) (key + 1);
|
const u8 *_buf = (const u8 *) (key + 1);
|
||||||
|
@ -405,7 +404,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
|
||||||
"Authenticator", ie.pmkid, PMKID_LEN);
|
"Authenticator", ie.pmkid, PMKID_LEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
|
|
||||||
res = wpa_supplicant_get_pmk(sm, src_addr, ie.pmkid);
|
res = wpa_supplicant_get_pmk(sm, src_addr, ie.pmkid);
|
||||||
if (res == -2) {
|
if (res == -2) {
|
||||||
|
@ -664,7 +662,6 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
|
||||||
const u8 *gtk, size_t gtk_len,
|
const u8 *gtk, size_t gtk_len,
|
||||||
int key_info)
|
int key_info)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
struct wpa_gtk_data gd;
|
struct wpa_gtk_data gd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -703,9 +700,6 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
|
||||||
wpa_supplicant_key_neg_complete(sm, sm->bssid,
|
wpa_supplicant_key_neg_complete(sm, sm->bssid,
|
||||||
key_info & WPA_KEY_INFO_SECURE);
|
key_info & WPA_KEY_INFO_SECURE);
|
||||||
return 0;
|
return 0;
|
||||||
#else /* CONFIG_NO_WPA2 */
|
|
||||||
return -1;
|
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2601,11 +2595,7 @@ int wpa_sm_parse_own_wpa_ie(struct wpa_sm *sm, struct wpa_ie_data *data)
|
||||||
|
|
||||||
int wpa_sm_pmksa_cache_list(struct wpa_sm *sm, char *buf, size_t len)
|
int wpa_sm_pmksa_cache_list(struct wpa_sm *sm, char *buf, size_t len)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
return pmksa_cache_list(sm->pmksa, buf, len);
|
return pmksa_cache_list(sm->pmksa, buf, len);
|
||||||
#else /* CONFIG_NO_WPA2 */
|
|
||||||
return -1;
|
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2636,9 +2626,7 @@ void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const u8 *replay_ctr)
|
||||||
|
|
||||||
void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void *network_ctx)
|
void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void *network_ctx)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
pmksa_cache_flush(sm->pmksa, network_ctx, NULL, 0);
|
pmksa_cache_flush(sm->pmksa, network_ctx, NULL, 0);
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,6 @@ static int wpa_gen_wpa_ie_rsn(u8 *rsn_ie, size_t rsn_ie_len,
|
||||||
int key_mgmt, int mgmt_group_cipher,
|
int key_mgmt, int mgmt_group_cipher,
|
||||||
struct wpa_sm *sm)
|
struct wpa_sm *sm)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_NO_WPA2
|
|
||||||
u8 *pos;
|
u8 *pos;
|
||||||
struct rsn_ie_hdr *hdr;
|
struct rsn_ie_hdr *hdr;
|
||||||
u16 capab;
|
u16 capab;
|
||||||
|
@ -220,9 +219,6 @@ static int wpa_gen_wpa_ie_rsn(u8 *rsn_ie, size_t rsn_ie_len,
|
||||||
WPA_ASSERT((size_t) (pos - rsn_ie) <= rsn_ie_len);
|
WPA_ASSERT((size_t) (pos - rsn_ie) <= rsn_ie_len);
|
||||||
|
|
||||||
return pos - rsn_ie;
|
return pos - rsn_ie;
|
||||||
#else /* CONFIG_NO_WPA2 */
|
|
||||||
return -1;
|
|
||||||
#endif /* CONFIG_NO_WPA2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ NEED_SHA1=y
|
||||||
NEED_MD5=y
|
NEED_MD5=y
|
||||||
NEED_RC4=y
|
NEED_RC4=y
|
||||||
else
|
else
|
||||||
L_CFLAGS += -DCONFIG_NO_WPA -DCONFIG_NO_WPA2
|
L_CFLAGS += -DCONFIG_NO_WPA
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_IBSS_RSN
|
ifdef CONFIG_IBSS_RSN
|
||||||
|
@ -281,10 +281,6 @@ L_CFLAGS += -DCONFIG_INTERWORKING
|
||||||
NEED_GAS=y
|
NEED_GAS=y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_NO_WPA2
|
|
||||||
L_CFLAGS += -DCONFIG_NO_WPA2
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(LOCAL_PATH)/src/drivers/drivers.mk
|
include $(LOCAL_PATH)/src/drivers/drivers.mk
|
||||||
|
|
||||||
ifdef CONFIG_AP
|
ifdef CONFIG_AP
|
||||||
|
|
|
@ -215,7 +215,7 @@ NEED_SHA1=y
|
||||||
NEED_MD5=y
|
NEED_MD5=y
|
||||||
NEED_RC4=y
|
NEED_RC4=y
|
||||||
else
|
else
|
||||||
CFLAGS += -DCONFIG_NO_WPA -DCONFIG_NO_WPA2
|
CFLAGS += -DCONFIG_NO_WPA
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_IBSS_RSN
|
ifdef CONFIG_IBSS_RSN
|
||||||
|
@ -265,10 +265,6 @@ CFLAGS += -DCONFIG_INTERWORKING
|
||||||
NEED_GAS=y
|
NEED_GAS=y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_NO_WPA2
|
|
||||||
CFLAGS += -DCONFIG_NO_WPA2
|
|
||||||
endif
|
|
||||||
|
|
||||||
include ../src/drivers/drivers.mak
|
include ../src/drivers/drivers.mak
|
||||||
ifdef CONFIG_AP
|
ifdef CONFIG_AP
|
||||||
OBJS_d += $(DRV_BOTH_OBJS)
|
OBJS_d += $(DRV_BOTH_OBJS)
|
||||||
|
|
|
@ -262,11 +262,6 @@ CONFIG_WPA_CLI_EDIT=y
|
||||||
# 35-50 kB in code size.
|
# 35-50 kB in code size.
|
||||||
#CONFIG_NO_WPA=y
|
#CONFIG_NO_WPA=y
|
||||||
|
|
||||||
# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to
|
|
||||||
# save about 1 kB in code size when building only WPA-Personal (no EAP support)
|
|
||||||
# or 6 kB if building for WPA-Enterprise.
|
|
||||||
#CONFIG_NO_WPA2=y
|
|
||||||
|
|
||||||
# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support
|
# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support
|
||||||
# This option can be used to reduce code size by removing support for
|
# This option can be used to reduce code size by removing support for
|
||||||
# converting ASCII passphrases into PSK. If this functionality is removed, the
|
# converting ASCII passphrases into PSK. If this functionality is removed, the
|
||||||
|
|
|
@ -261,11 +261,6 @@ CONFIG_CTRL_IFACE=y
|
||||||
# 35-50 kB in code size.
|
# 35-50 kB in code size.
|
||||||
#CONFIG_NO_WPA=y
|
#CONFIG_NO_WPA=y
|
||||||
|
|
||||||
# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to
|
|
||||||
# save about 1 kB in code size when building only WPA-Personal (no EAP support)
|
|
||||||
# or 6 kB if building for WPA-Enterprise.
|
|
||||||
#CONFIG_NO_WPA2=y
|
|
||||||
|
|
||||||
# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support
|
# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support
|
||||||
# This option can be used to reduce code size by removing support for
|
# This option can be used to reduce code size by removing support for
|
||||||
# converting ASCII passphrases into PSK. If this functionality is removed, the
|
# converting ASCII passphrases into PSK. If this functionality is removed, the
|
||||||
|
|
Loading…
Reference in a new issue