]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Comment out WPA related code additions with CONFIG_NO_WPA
authorJouni Malinen <j@w1.fi>
Sun, 22 Dec 2024 16:22:10 +0000 (18:22 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Dec 2024 16:22:10 +0000 (18:22 +0200)
These broke CONFIG_NO_WPA=y builds due to dependencies to
src/common/wpa_common.c functionality.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/bss.c
wpa_supplicant/events.c
wpa_supplicant/scan.c

index 014752257a485e06d4e967a5e17131295e67ed4f..c641b510c81fc5783000a71cf32bf8ea60ce8ac6 100644 (file)
@@ -1930,6 +1930,8 @@ out:
 }
 
 
+#ifndef CONFIG_NO_WPA
+
 static bool wpa_bss_supported_cipher(struct wpa_supplicant *wpa_s,
                                     int pairwise_cipher)
 {
@@ -2055,11 +2057,14 @@ static bool wpa_bss_supported_rsne(struct wpa_supplicant *wpa_s,
        return true;
 }
 
+#endif /* CONFIG_NO_WPA */
+
 
 const u8 * wpa_bss_get_rsne(struct wpa_supplicant *wpa_s,
                            const struct wpa_bss *bss, struct wpa_ssid *ssid,
                            bool mlo)
 {
+#ifndef CONFIG_NO_WPA
        const u8 *ie;
 
        if (wpas_rsn_overriding(wpa_s, ssid)) {
@@ -2086,6 +2091,7 @@ const u8 * wpa_bss_get_rsne(struct wpa_supplicant *wpa_s,
                                return ie;
                }
        }
+#endif /* CONFIG_NO_WPA */
 
        return wpa_bss_get_ie(bss, WLAN_EID_RSN);
 }
index 03364e3f7af69753fe21f9c6267ddf7f5f6f978d..5a1bc6d58f727ba85b25aec85f07fb42ca6ba334 100644 (file)
@@ -1266,7 +1266,9 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
 {
        int res;
        bool wpa, check_ssid, osen, rsn_osen = false;
+#ifndef CONFIG_NO_WPA
        struct wpa_ie_data data;
+#endif /* CONFIG_NO_WPA */
 #ifdef CONFIG_MBO
        const u8 *assoc_disallow;
 #endif /* CONFIG_MBO */
@@ -1280,9 +1282,11 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
        wpa = ie && ie[1];
        ie = wpa_bss_get_rsne(wpa_s, bss, ssid, false);
        wpa |= ie && ie[1];
+#ifndef CONFIG_NO_WPA
        if (ie && wpa_parse_wpa_ie_rsn(ie, 2 + ie[1], &data) == 0 &&
            (data.key_mgmt & WPA_KEY_MGMT_OSEN))
                rsn_osen = true;
+#endif /* CONFIG_NO_WPA */
        ie = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
        osen = ie != NULL;
 
index f0ab122f59a403cbb59055e8a25c686445033d19..46dfcf24b1435d7ffe319ead687453d1dbcdf34e 100644 (file)
@@ -2368,7 +2368,9 @@ static int wpa_scan_result_compar(const void *a, const void *b)
        int wpa_a, wpa_b;
        int snr_a, snr_b, snr_a_full, snr_b_full;
        size_t ies_len;
+#ifndef CONFIG_NO_WPA
        const u8 *rsne_a, *rsne_b;
+#endif /* CONFIG_NO_WPA */
 
        /* WPA/WPA2 support preferred */
        wpa_a = wpa_scan_get_vendor_ie(wa, WPA_IE_VENDOR_TYPE) != NULL ||
@@ -2412,6 +2414,7 @@ static int wpa_scan_result_compar(const void *a, const void *b)
                snr_b = snr_b_full = wb->level;
        }
 
+#ifndef CONFIG_NO_WPA
        /* If SNR of a SAE BSS is good or at least as high as the PSK BSS,
         * prefer SAE over PSK for mixed WPA3-Personal transition mode and
         * WPA2-Personal deployments */
@@ -2437,6 +2440,7 @@ static int wpa_scan_result_compar(const void *a, const void *b)
                    (snr_b >= GREAT_SNR || snr_b >= snr_a))
                        return 1;
        }
+#endif /* CONFIG_NO_WPA */
 
        /* If SNR is close, decide by max rate or frequency band. For cases
         * involving the 6 GHz band, use the throughput estimate irrespective