]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Scan all channels if GO is not found from common channels
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 19 Oct 2010 15:38:49 +0000 (18:38 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 19 Oct 2010 15:38:49 +0000 (18:38 +0300)
This is not supposed to happen, but in theory, the GO may end up
changing its channels at some point. While it would be reasonable
to use one of the common channels, GO may be forced to use another
channel. The most likely reason for this would be if the P2P client
is enforcing only a single channel to be used (e.g., to avoid
multi-channel concurrent operations).

wpa_supplicant/scan.c

index ee105d902c8aa10f2136817d6fe31ba10fc79b9c..2769c2f84631c14a373983b95495f24abfd7d304 100644 (file)
@@ -401,7 +401,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
                        params.freqs = os_zalloc(2 * sizeof(int));
                        if (params.freqs)
                                params.freqs[0] = wpa_s->go_params->freq;
-               } else if (wpa_s->go_params->freq_list[0]) {
+               } else if (wpa_s->p2p_in_provisioning < 8 &&
+                          wpa_s->go_params->freq_list[0]) {
                        wpa_printf(MSG_DEBUG, "P2P: Scan only common "
                                   "channels");
                        int_array_concat(&params.freqs,