mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-21 11:33:04 -05:00
P2P: Fix channel selection for MCC case
Commit 0d08efa447a5c5fb20bbed18a2ced36a8afe9221 modified wpas_p2p_setup_freqs() design to use number of MCC channels capability from the driver. However, it resulted in regression on how the preferred vs. forced channel selection is done in the case of a MCC device. force_freq was set unconditionally even though this was supposed to be done only if no additional channels are available. pref_freq needs to be used when possible to avoid preventing connection. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
f86d282f43
commit
b17d89bd10
@ -4162,13 +4162,14 @@ static int wpas_p2p_setup_freqs(struct wpa_supplicant *wpa_s, int freq,
|
|||||||
if (!p2p_supported_freq(wpa_s->global->p2p, freqs[i]))
|
if (!p2p_supported_freq(wpa_s->global->p2p, freqs[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "P2P: Try to force us to use frequency (%u MHz) which is already in use",
|
|
||||||
*force_freq);
|
|
||||||
*force_freq = freqs[i];
|
|
||||||
|
|
||||||
if (*pref_freq == 0 && num < wpa_s->num_multichan_concurrent) {
|
if (*pref_freq == 0 && num < wpa_s->num_multichan_concurrent) {
|
||||||
wpa_printf(MSG_DEBUG, "P2P: Try to prefer a frequency we are already using");
|
wpa_printf(MSG_DEBUG, "P2P: Try to prefer a frequency (%u MHz) we are already using",
|
||||||
*pref_freq = *force_freq;
|
freqs[i]);
|
||||||
|
*pref_freq = freqs[i];
|
||||||
|
} else {
|
||||||
|
wpa_printf(MSG_DEBUG, "P2P: Try to force us to use frequency (%u MHz) which is already in use",
|
||||||
|
freqs[i]);
|
||||||
|
*force_freq = freqs[i];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user