From f23b70f163781ad3c063469741be12c762c2078e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 19 Apr 2020 16:56:35 +0300 Subject: [PATCH] Silence compiler warning in no-NEED_AP_MLME hostapd builds The static function hostapd_ctrl_check_freq_params() was called only within #ifdef NEED_AP_MLME block so the function needs to be defined under matching condition. Signed-off-by: Jouni Malinen --- hostapd/ctrl_iface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index c6160ded3..6e8352f2f 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -2439,6 +2439,7 @@ static int hostapd_ctrl_get_pmk(struct hostapd_data *hapd, const char *cmd, #endif /* CONFIG_TESTING_OPTIONS */ +#ifdef NEED_AP_MLME static int hostapd_ctrl_check_freq_params(struct hostapd_freq_params *params) { switch (params->bandwidth) { @@ -2527,6 +2528,7 @@ static int hostapd_ctrl_check_freq_params(struct hostapd_freq_params *params) return 0; } +#endif /* NEED_AP_MLME */ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,