[PATCH] ap: Don't use a p2p function if support is not present

Tomasz Bursztyka tomasz.bursztyka
Mon Dec 9 04:49:13 PST 2013


Minor built issue, if CONFIG_P2P is set to N, wpas_p2p_get_vht80_center
cannot be called.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>
---

 wpa_supplicant/ap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 394ab30..30c757a 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -47,8 +47,9 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
 			     struct hostapd_config *conf,
 			     struct hostapd_hw_modes *mode)
 {
-	u8 center_chan = 0;
 	u8 channel = conf->channel;
+#ifdef CONFIG_P2P
+	u8 center_chan = 0;
 
 	if (!conf->secondary_channel)
 		goto no_vht;
@@ -63,6 +64,7 @@ static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
 	return;
 
 no_vht:
+#endif /* CONFIG_P2P */
 	conf->vht_oper_centr_freq_seg0_idx =
 		channel + conf->secondary_channel * 2;
 }
-- 
1.8.4.4




More information about the Hostap mailing list