From: Jouni Malinen Date: Mon, 30 Jan 2023 09:23:35 +0000 (+0200) Subject: OCV: Fix build without CONFIG_OCV=y X-Git-Tag: hostap_2_11~1330 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89377c6b9cd6c16a0f5373c64e88887a8ab549ce;p=thirdparty%2Fhostap.git OCV: Fix build without CONFIG_OCV=y 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 --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index f85da5fa9..6452a3bee 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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