]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix compiler error on CONFIG_AP without CONFIG_P2P builds
authorMasashi Honma <masashi.honma@gmail.com>
Sun, 31 Oct 2021 23:03:37 +0000 (08:03 +0900)
committerJouni Malinen <j@w1.fi>
Wed, 3 Nov 2021 11:19:30 +0000 (13:19 +0200)
/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 <masashi.honma@gmail.com>
wpa_supplicant/ap.c

index 79b904b66da8b1a2d73c53726b786a81fcd14e08..6a0a69e68ee6ecc8a7daf4f8368ddad303edcf05 100644 (file)
@@ -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)",