]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix compiler warning on CONFIG_AP without CONFIG_P2P builds
authorJouni Malinen <j@w1.fi>
Sun, 7 Feb 2021 17:12:24 +0000 (19:12 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 7 Feb 2021 17:12:24 +0000 (19:12 +0200)
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 <j@w1.fi>
wpa_supplicant/ap.c

index ac88a7dc9571ec819f1c8e45e0a110a6794ddba8..caf1ef8c21ab6576c3a3dcdaf272d8fe001bd4cd 100644 (file)
@@ -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,