[RFC 2/4] P2P: Handling single channel concurrency

Jithu Jance jithujance
Mon Mar 5 21:03:55 PST 2012


Single channel concurrency Patch [2/4]

This patch handles the case where a p2p join fails due to a freq conflict
with the existing STA connection.

 [PATCH] If P2P Join fails due to frequency conflict, indicate via
appropriate
 reason code.
 Signed-hostap: Jithu Jance <jithu at broadcom.com>

---
 wpa_supplicant/p2p_supplicant.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/p2p_supplicant.c
b/wpa_supplicant/p2p_supplicant.c
index 486a551..b870c4e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2609,6 +2609,7 @@ static void wpas_p2p_scan_res_join(struct
wpa_supplicant *wpa_s,
  struct wpa_bss *bss;
  int freq;
  u8 iface_addr[ETH_ALEN];
+ int shared_freq = 0;

  eloop_cancel_timeout(wpas_p2p_join_scan, wpa_s, NULL);

@@ -2644,6 +2645,14 @@ static void wpas_p2p_scan_res_join(struct
wpa_supplicant *wpa_s,
  wpa_printf(MSG_DEBUG, "P2P: Target GO operating frequency "
    "from P2P peer table: %d MHz", freq);
  }
+
+ if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT) &&
+ ((shared_freq = wpa_drv_shared_freq(wpa_s)) > 0) && (shared_freq !=
freq)) {
+ wpa_msg(wpa_s->parent, MSG_INFO,
+ P2P_EVENT_GROUP_FORMATION_FAILURE "reason=FREQ_CONFLICT");
+ return;
+ }
+
  bss = wpa_bss_get_bssid(wpa_s, wpa_s->pending_join_iface_addr);
  if (bss) {
  freq = bss->freq;
-- 
1.7.4.1


- Jithu Jance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20120306/a2e14765/attachment.htm 



More information about the Hostap mailing list