aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorService qcabuildsw <qcabuildsw@localhost>2016-10-26 21:41:54 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-26 21:41:54 -0700
commit8d26c5d07af78357d37af9173107fd02487446f8 (patch)
tree04c0e685092a400e32754712f38a7babd2e4b4ee
parentd3541d3f4c26a2d031e83a2c950b932d3c14ff09 (diff)
parent2886779ab50ec275b1386cb00a356df678bd5c0e (diff)
downloadandroid_external_wpa_supplicant_8-8d26c5d07af78357d37af9173107fd02487446f8.tar.gz
android_external_wpa_supplicant_8-8d26c5d07af78357d37af9173107fd02487446f8.tar.bz2
android_external_wpa_supplicant_8-8d26c5d07af78357d37af9173107fd02487446f8.zip
Merge "P2P: Check if the pref_freq reported by the driver supports P2P" into wlan-aosp-service.lnx.2.0-dev
-rw-r--r--wpa_supplicant/p2p_supplicant.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 527d1595..14237abb 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -5248,8 +5248,10 @@ static int wpas_p2p_setup_freqs(struct wpa_supplicant *wpa_s, int freq,
if (!res && max_pref_freq > 0) {
*num_pref_freq = max_pref_freq;
i = 0;
- while (wpas_p2p_disallowed_freq(wpa_s->global,
- pref_freq_list[i]) &&
+ while ((!p2p_supported_freq(wpa_s->global->p2p,
+ pref_freq_list[i]) ||
+ wpas_p2p_disallowed_freq(wpa_s->global,
+ pref_freq_list[i])) &&
i < *num_pref_freq) {
wpa_printf(MSG_DEBUG,
"P2P: preferred_freq_list[%d]=%d is disallowed",