]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OCV: Fix build without CONFIG_OCV=y
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 30 Jan 2023 09:23:35 +0000 (11:23 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Jan 2023 09:23:35 +0000 (11:23 +0200)
ssid->ocv is defined within CONFIG_OCV block, so the use for it needs to
match.

Fixes: dc7e330e0b89 ("Set OCV capability based on Association Request frame RSNE")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/events.c

index f85da5fa9644847f083b55fc38910d805f2164cb..6452a3beeaf19423324b244ac1eee07a2cdb1be0 100644 (file)
@@ -2874,10 +2874,12 @@ static int wpa_supplicant_use_own_rsne_params(struct wpa_supplicant *wpa_s,
                return -1;
        }
 
+#ifdef CONFIG_OCV
        if (((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) ||
             (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_OCV)) && ssid->ocv)
                wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_OCV,
                                 !!(ie.capabilities & WPA_CAPABILITY_OCVC));
+#endif /* CONFIG_OCV */
 
        /*
         * Update PMK in wpa_sm and the driver if roamed to WPA/WPA2 PSK from a