diff options
| author | Sunil Dutt <usdutt@qti.qualcomm.com> | 2016-10-21 12:13:16 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-25 14:40:57 -0700 |
| commit | 2886779ab50ec275b1386cb00a356df678bd5c0e (patch) | |
| tree | a23667a69b441f1e558be3f60bd33327d2a84bba | |
| parent | 415b29a14c4fcf53ef24c8405729167c9a8ebb0f (diff) | |
| download | android_external_wpa_supplicant_8-2886779ab50ec275b1386cb00a356df678bd5c0e.tar.gz android_external_wpa_supplicant_8-2886779ab50ec275b1386cb00a356df678bd5c0e.tar.bz2 android_external_wpa_supplicant_8-2886779ab50ec275b1386cb00a356df678bd5c0e.zip | |
P2P: Check if the pref_freq reported by the driver supports P2P
Filter out get_pref_freq_list() (i.e.,
QCA_NL80211_VENDOR_SUBCMD_GET_PREFERRED_FREQ_LIST) output in case of
channel negotiation by removing channels that do not allow P2P operation
at all. Previously, only the explicitly disallowed channels were removed
and that could have resulted in selecting an operating channel that is
not allowed for P2P and failing to complete the operation to start the
group.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 783c2920cc9117b663506dc82223867bfa792a5d
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I289bc3a2ff88d5be767fc59d83d888fa1fa121e9
CRs-fixed: 1081648
| -rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 6 |
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", |
