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

login
register
mail settings
Submitter Jithu Jance
Date March 6, 2012, 5:03 a.m.
Message ID <CAGCGobBp9_1pLJKdftb=fbFmH1HnKky8MqBZexDen6cMNchx4A@mail.gmail.com>
Download mbox | patch
Permalink /patch/144840/
State Superseded
Headers show

Comments

Jithu Jance - March 6, 2012, 5:03 a.m.
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@broadcom.com>

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


@@ -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;
Johannes Berg - March 6, 2012, 5:49 p.m.
Please submit as text.

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

How about DBus?

johannes

Patch

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);