From e781f7c860b115bdc6aee69f64959953e26ee1ae Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 7 Feb 2021 19:12:24 +0200 Subject: [PATCH] Fix compiler warning on CONFIG_AP without CONFIG_P2P builds The static function is_chanwidth160_supported() is called only within CONFIG_P2P block so the function itself needs to have matching condition for build. Fixes: ed24bad1d98d ("AP: Check driver support while auto-selecting bandwidth for AP/P2P GO") Signed-off-by: Jouni Malinen --- wpa_supplicant/ap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index ac88a7dc9..caf1ef8c2 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -44,6 +44,7 @@ static void wpas_wps_ap_pin_timeout(void *eloop_data, void *user_ctx); #endif /* CONFIG_WPS */ +#ifdef CONFIG_P2P static bool is_chanwidth160_supported(struct hostapd_hw_modes *mode, struct hostapd_config *conf) { @@ -63,6 +64,7 @@ static bool is_chanwidth160_supported(struct hostapd_hw_modes *mode, return true; return false; } +#endif /* CONFIG_P2P */ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,