diff options
| author | Krishna Vamsi <vamsin@qti.qualcomm.com> | 2015-02-24 12:13:33 +0530 |
|---|---|---|
| committer | Arne Coucheron <arco68@gmail.com> | 2015-03-18 07:35:23 +0100 |
| commit | df7dc73228b4aa37c55cb74ed058a18c409a8088 (patch) | |
| tree | 71672f3ed5b4f871b2c6579bbbc997a1f6c88516 | |
| parent | db50417d3ee5b4fd3037a4fce0827455d6982cc2 (diff) | |
| download | android_external_wpa_supplicant_8-df7dc73228b4aa37c55cb74ed058a18c409a8088.tar.gz android_external_wpa_supplicant_8-df7dc73228b4aa37c55cb74ed058a18c409a8088.tar.bz2 android_external_wpa_supplicant_8-df7dc73228b4aa37c55cb74ed058a18c409a8088.zip | |
P2P: Consider 5 GHz channels also for auto GO
When there is no channel preference mentioned by user, auto GO
can be started on any of the 5 GHz channels supported for P2P.
Consider operating classes 115 and 124 which do not require DFS.
CRs-Fixed: 802336
Git-repo: git://w1.fi/srv/git/hostap.git
Git-commit: 95d7b863ecab973bb0829e038c0548c1b934d96b
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: I0cc086fdda6f0d779018d47c9473575dbec8447e
| -rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 480e0ba3..f479425f 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -5128,6 +5128,24 @@ static int wpas_p2p_select_freq_no_pref(struct wpa_supplicant *wpa_s, goto out; } + /* try all channels in operating class 115 */ + for (i = 0; i < 4; i++) { + params->freq = 5180 + i * 20; + if (!wpas_p2p_disallowed_freq(wpa_s->global, params->freq) && + freq_included(channels, params->freq) && + p2p_supported_freq(wpa_s->global->p2p, params->freq)) + goto out; + } + + /* try all channels in operating class 124 */ + for (i = 0; i < 4; i++) { + params->freq = 5745 + i * 20; + if (!wpas_p2p_disallowed_freq(wpa_s->global, params->freq) && + freq_included(channels, params->freq) && + p2p_supported_freq(wpa_s->global->p2p, params->freq)) + goto out; + } + /* try social channel class 180 channel 2 */ params->freq = 58320 + 1 * 2160; if (!wpas_p2p_disallowed_freq(wpa_s->global, params->freq) && @@ -5144,7 +5162,7 @@ static int wpas_p2p_select_freq_no_pref(struct wpa_supplicant *wpa_s, goto out; } - wpa_printf(MSG_DEBUG, "P2P: No 2.4 and 60 GHz channel allowed"); + wpa_printf(MSG_DEBUG, "P2P: No 2.4, 5, or 60 GHz channel allowed"); return -1; out: wpa_printf(MSG_DEBUG, "P2P: Set GO freq %d MHz (no preference known)", |
