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: ed24bad1d9 ("AP: Check driver support while auto-selecting bandwidth for AP/P2P GO")
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-02-07 19:12:24 +02:00
parent 4c9b16602d
commit e781f7c860

View file

@ -44,6 +44,7 @@ static void wpas_wps_ap_pin_timeout(void *eloop_data, void *user_ctx);
#endif /* CONFIG_WPS */ #endif /* CONFIG_WPS */
#ifdef CONFIG_P2P
static bool is_chanwidth160_supported(struct hostapd_hw_modes *mode, static bool is_chanwidth160_supported(struct hostapd_hw_modes *mode,
struct hostapd_config *conf) struct hostapd_config *conf)
{ {
@ -63,6 +64,7 @@ static bool is_chanwidth160_supported(struct hostapd_hw_modes *mode,
return true; return true;
return false; return false;
} }
#endif /* CONFIG_P2P */
static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s, static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,