[PATCH] P2P: Fix wpa_supplicant build when CONFIG_P2P=n

Alex Kiernan alex.kiernan at gmail.com
Sat Sep 4 06:01:32 PDT 2021


Fixes: e5173e8b12a8 ("P2P: Enable multiple channel widths for P2P in 6 GHz band")
Signed-off-by: Alex Kiernan <alexk at zuma.ai>
Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
---
 wpa_supplicant/ap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 415f08789fd3..9a7475e150ee 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -239,6 +239,7 @@ static void wpas_conf_ap_he_6ghz(struct wpa_supplicant *wpa_s,
 	    ssid->he)
 		conf->ieee80211ax = 1;
 
+#ifdef CONFIG_P2P
 	if (is_chanwidth_40_80 && ssid->p2p_group &&
 	    get_max_oper_chwidth_6ghz(ssid->max_oper_chwidth) >= 40) {
 		conf->secondary_channel =
@@ -254,6 +255,7 @@ static void wpas_conf_ap_he_6ghz(struct wpa_supplicant *wpa_s,
 	if ((is_chanwidth_40_80 || is_chanwidth_160) && ssid->p2p_group &&
 	    get_max_oper_chwidth_6ghz(ssid->max_oper_chwidth) >= 80)
 		wpas_conf_ap_vht(wpa_s, ssid, conf, mode);
+#endif
 }
 
 
-- 
2.33.0




More information about the Hostap mailing list