Patchwork P2P: Fix for multi channel concurrency

login
register
mail settings
Submitter Sreenath
Date Oct. 4, 2013, 6:36 a.m.
Message ID <5F8A83CFE238064080EB46F88B8161C1013BD009@SJEXCHMB09.corp.ad.broadcom.com>
Download mbox | patch
Permalink /patch/280474/
State Superseded
Headers show

Comments

Sreenath - Oct. 4, 2013, 6:36 a.m.
Hi Jouni,

Any update on this patch?

Regards,
Sreenath

Patch

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 9338ad5..c6b3c8e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3964,14 +3964,14 @@  static int wpas_p2p_setup_freqs(struct wpa_supplicant *wpa_s, int freq,
                if (!p2p_supported_freq(wpa_s->global->p2p, freqs[i]))
                        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) {
-                       wpa_printf(MSG_DEBUG, "P2P: Try to prefer a frequency we are already using");
-                       *pref_freq = *force_freq;
-               }
+               if (num < wpa_s->num_multichan_concurrent) {
+                       wpa_printf(MSG_DEBUG, "P2P: Try to prefer a frequency we are already using");
+                       *pref_freq = freqs[i];
+               } else {
+                       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];
+               }
                break;
        }