Message ID | 20210904130132.1777-1-alexk@zuma.ai |
---|---|
State | Superseded |
Headers | show |
Series | P2P: Fix wpa_supplicant build when CONFIG_P2P=n | expand |
On Sat, Sep 04, 2021 at 02:01:32PM +0100, Alex Kiernan wrote: > diff --git 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, > +#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 > } This would result in a number of compiler warnings due to unused variables within the function and an unused static function for the case where CONFIG_P2P is not defined. I'll apply a more generic way of making this full function conditional based on this patch: http://patchwork.ozlabs.org/project/hostap/patch/20211031230337.23390-1-masashi.honma@gmail.com/
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 }