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
|
@ -15,7 +15,7 @@
|
|||
#include "wpa_i.h"
|
||||
#include "pmksa_cache.h"
|
||||
|
||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
|
|
|
@ -44,7 +44,7 @@ enum pmksa_free_reason {
|
|||
PMKSA_EXPIRE,
|
||||
};
|
||||
|
||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
|
||||
struct rsn_pmksa_cache *
|
||||
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,
|
||||
const u8 *pmk, size_t pmk_len);
|
||||
|
||||
#else /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
||||
#else /* IEEE8021X_EAPOL */
|
||||
|
||||
static inline struct rsn_pmksa_cache *
|
||||
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 */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "wpa_i.h"
|
||||
|
||||
|
||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
|
||||
#define PMKID_CANDIDATE_PRIO_SCAN 1000
|
||||
|
||||
|
@ -508,4 +508,4 @@ int rsn_preauth_in_progress(struct wpa_sm *sm)
|
|||
return sm->preauth_eapol != NULL;
|
||||
}
|
||||
|
||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
struct wpa_scan_results;
|
||||
|
||||
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
|
||||
void pmksa_candidate_free(struct wpa_sm *sm);
|
||||
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 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)
|
||||
{
|
||||
|
@ -74,6 +74,6 @@ static inline int rsn_preauth_in_progress(struct wpa_sm *sm)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
|
||||
#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));
|
||||
|
||||
#ifndef CONFIG_NO_WPA2
|
||||
if (sm->proto == WPA_PROTO_RSN) {
|
||||
/* RSN: msg 1/4 should contain PMKID for the selected PMK */
|
||||
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);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_NO_WPA2 */
|
||||
|
||||
res = wpa_supplicant_get_pmk(sm, src_addr, ie.pmkid);
|
||||
if (res == -2) {
|
||||
|
@ -664,7 +662,6 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
|
|||
const u8 *gtk, size_t gtk_len,
|
||||
int key_info)
|
||||
{
|
||||
#ifndef CONFIG_NO_WPA2
|
||||
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,
|
||||
key_info & WPA_KEY_INFO_SECURE);
|
||||
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)
|
||||
{
|
||||
#ifndef CONFIG_NO_WPA2
|
||||
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)
|
||||
{
|
||||
#ifndef CONFIG_NO_WPA2
|
||||
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,
|
||||
struct wpa_sm *sm)
|
||||
{
|
||||
#ifndef CONFIG_NO_WPA2
|
||||
u8 *pos;
|
||||
struct rsn_ie_hdr *hdr;
|
||||
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);
|
||||
|
||||
return pos - rsn_ie;
|
||||
#else /* CONFIG_NO_WPA2 */
|
||||
return -1;
|
||||
#endif /* CONFIG_NO_WPA2 */
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue