aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-08-23 12:30:30 -0700
committerDmitry Shmidt <dimitrysh@google.com>2011-08-23 15:08:20 -0700
commit44da0253a740e0329b18f60c196e1f2dcacfccea (patch)
treeaa74342906dc993edfc839ad9bfbae28abb508b9 /wpa_supplicant/p2p_supplicant.c
parente25ba1592df19d46a7a1e1a1fca1fb02ebd7be8f (diff)
downloadexternal_wpa_supplicant_8-44da0253a740e0329b18f60c196e1f2dcacfccea.zip
external_wpa_supplicant_8-44da0253a740e0329b18f60c196e1f2dcacfccea.tar.gz
external_wpa_supplicant_8-44da0253a740e0329b18f60c196e1f2dcacfccea.tar.bz2
BRCM P2P update
- IFNAME for monitor interface is changed to m. from mon. This will give extra space for incrementing X in IFNAME (p2p-wlan0-X). Also, we have synced the reset of IFNAME w.r.t. monitor interface name. - Fixed continuous P2P_DEV_FOUND events coming from GO. Removed the BRCM specific change for this. - Fixed STATUS command for p2p interface. Change-Id: I04210dd0b2bdba06b0192c0a61edfa0e5b47ab72 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a0995fe..d8b2e16 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -1017,7 +1017,16 @@ static int wpas_p2p_add_group_interface(struct wpa_supplicant *wpa_s,
os_snprintf(ifname, sizeof(ifname), "p2p-%s-%d", wpa_s->ifname,
wpa_s->p2p_group_idx);
- if (os_strlen(ifname) >= IFNAMSIZ &&
+
+#ifdef ANDROID_BRCM_P2P_PATCH
+ /**
+ * Monitor interface name is derived from p2p interface name
+ * We need to reset p2p interface name early to take care of extra character in monitor interface name
+ */
+ if (os_strlen(ifname) + os_strlen(WPA_MONITOR_IFNAME_PREFIX) >= IFNAMSIZ &&
+#else
+ if (os_strlen(ifname) >= IFNAMSIZ &&
+#endif
os_strlen(wpa_s->ifname) < IFNAMSIZ) {
/* Try to avoid going over the IFNAMSIZ length limit */
os_snprintf(ifname, sizeof(ifname), "p2p-%d",
@@ -3677,7 +3686,7 @@ int wpas_p2p_assoc_req_ie(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
return -1;
p2p_ie = wpa_bss_get_vendor_ie_multi(bss, P2P_IE_VENDOR_TYPE);
-#ifdef ANDROID_BRCM_P2P_PATCH
+#ifdef ANDROID_BRCM_P2P_PATCH
if (p2p_ie == NULL) return -1;
#endif
ret = p2p_assoc_req_ie(wpa_s->global->p2p, bss->bssid, buf, len,
@@ -4015,7 +4024,8 @@ void wpas_p2p_group_remove_notif(struct wpa_supplicant *wpa_s, u16 reason_code)
wpa_printf(MSG_DEBUG, "P2P: [EVENT_DEAUTH] Removing P2P_CLIENT virtual intf.");
wpa_supplicant_cancel_scan(wpa_s);
- wpas_p2p_interface_unavailable(wpa_s);
+ wpa_s->removal_reason = P2P_GROUP_REMOVAL_UNAVAILABLE;
+ wpas_p2p_group_delete(wpa_s);
}
}
#endif