From: Avraham Stern Date: Mon, 25 Jan 2016 10:28:49 +0000 (+0200) Subject: P2P: Fall back to no VHT when starting AP/P2P GO X-Git-Tag: hostap_2_6~936 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83fe38b011e7dfd6b73c40cef8c5d74d52ad3389;p=thirdparty%2Fhostap.git P2P: Fall back to no VHT when starting AP/P2P GO In cases where the bandwidth is not set when starting an AP/P2P GO, the code tries to use 160 MHz or 80 MHz channels. As a result, the AP/P2P GO configuration is set to use these channel widths even if they are not available, which may results in failing to start the AP/P2P GO. Fix this by changing the AP/P2P GO configuration not to use VHT channels when they are not available. In this case the AP/P2P GO will use a 40 MHz channel, if available, or a 20 MHz channel, if this is the maximum available width. Signed-off-by: Avraham Stern --- diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 105fb1c68..98b959616 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -92,6 +92,7 @@ no_vht: conf->vht_oper_centr_freq_seg0_idx = conf->channel + conf->secondary_channel * 2; #endif /* CONFIG_P2P */ + conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT; } #endif /* CONFIG_IEEE80211N */