[PATCH] P2P: Fix for multi channel concurrency

Sreenath Sharma sreenats
Thu Sep 12 05:49:30 PDT 2013


In case of GO-NEGOTIATION, the connected STA channel is set as the forced
frequency even though the device is multi channel concurrent capable.
This will cause only that channel getting added in the channel list of
GO-NEGOTIATION request packet. So if both the peers try to force their
receptive STA channels and if both are different, there will be
failure - "no common channel" (7).

Ideally in case of multi channel concurrency, the connected STA channel
should not be set as forced channel and should only be set as preferred
channel. This will cause full channel list getting updated in the
GO-NEGOTIATION request packet, so that there can be channel intersection
if the peer's proposed channel is different.

This is a regression from commit 0d08efa447a5c5fb20bbed18a2ced36a8afe9221.

Signed-hostap: Sreenath Sharma <sreenats at broadcom.com>
---
 wpa_supplicant/p2p_supplicant.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

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;
 	}
 
-- 
1.7.9.5





More information about the Hostap mailing list