From b306a92dfc0c36eb2b8383400008bf2cb86f8921 Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Mon, 1 Nov 2021 08:03:37 +0900 Subject: [PATCH] Fix compiler error on CONFIG_AP without CONFIG_P2P builds /usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/ap.o: in function `wpas_conf_ap_he_6ghz': /home/honma/git/hostap/wpa_supplicant/ap.c:245: undefined reference to `wpas_p2p_get_sec_channel_offset_40mhz' Fixes: e5173e8b12a8 ("P2P: Enable multiple channel widths for P2P in 6 GHz band") Signed-off-by: Masashi Honma --- wpa_supplicant/ap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 79b904b66..6a0a69e68 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -196,6 +196,8 @@ wpa_supplicant_find_hw_mode(struct wpa_supplicant *wpa_s, } +#ifdef CONFIG_P2P + static int get_max_oper_chwidth_6ghz(int chwidth) { switch (chwidth) { @@ -256,6 +258,8 @@ static void wpas_conf_ap_he_6ghz(struct wpa_supplicant *wpa_s, wpas_conf_ap_vht(wpa_s, ssid, conf, mode); } +#endif /* CONFIG_P2P */ + int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid, @@ -319,7 +323,9 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, if (mode && is_6ghz_freq(ssid->frequency) && conf->hw_mode == HOSTAPD_MODE_IEEE80211A) { +#ifdef CONFIG_P2P wpas_conf_ap_he_6ghz(wpa_s, mode, ssid, conf); +#endif /* CONFIG_P2P */ } else if (!no_ht && mode && mode->ht_capab) { wpa_printf(MSG_DEBUG, "Enable HT support (p2p_group=%d 11a=%d ht40_hw_capab=%d ssid->ht40=%d)",