aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-10-18 16:24:52 +0530
committerRashmi Ramanna <rashmi@codeaurora.org>2013-10-18 16:28:09 +0530
commitec9327ed080998bd7e9910cbadcf4735d660b83c (patch)
tree23e9d276cdad9decfe230d78bcf094023ad42bc8
parentc7f6e283ecbed797898aabf00263fd667a568ad8 (diff)
downloadandroid_external_wpa_supplicant_8-ec9327ed080998bd7e9910cbadcf4735d660b83c.tar.gz
android_external_wpa_supplicant_8-ec9327ed080998bd7e9910cbadcf4735d660b83c.tar.bz2
android_external_wpa_supplicant_8-ec9327ed080998bd7e9910cbadcf4735d660b83c.zip
P2P: Do not drop P2P IEs from BSS table on non-P2P scans
This could happen when non-P2P station interface runs a scan without P2P IE in the Probe Request frame. P2P GO would reply to that with a Probe Response that does not include P2P IE. Do not update the IEs in this BSS entry to avoid such loss of information that may be needed for P2P operations to determine group information. Change-Id: I2af1f4487a358da57b885ff63e879aaea4fd2508 CRs-Fixed: 535523 Git-commit: ff57398fcab817374dac975aaab3eef5bf64f381 Git-repo: git://w1.fi/srv/git/hostap.git Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--wpa_supplicant/bss.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index ec640b5f..caec1bae 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -501,6 +501,22 @@ wpa_bss_update(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
wpa_bss_copy_res(bss, res, fetch_time);
/* Move the entry to the end of the list */
dl_list_del(&bss->list);
+#ifdef CONFIG_P2P
+ if (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE) &&
+ !wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE)) {
+ /*
+ * This can happen when non-P2P station interface runs a scan
+ * without P2P IE in the Probe Request frame. P2P GO would reply
+ * to that with a Probe Response that does not include P2P IE.
+ * Do not update the IEs in this BSS entry to avoid such loss of
+ * information that may be needed for P2P operations to
+ * determine group information.
+ */
+ wpa_dbg(wpa_s, MSG_DEBUG, "BSS: Do not update scan IEs for "
+ MACSTR " since that would remove P2P IE information",
+ MAC2STR(bss->bssid));
+ } else
+#endif /* CONFIG_P2P */
if (bss->ie_len + bss->beacon_ie_len >=
res->ie_len + res->beacon_ie_len) {
os_memcpy(bss + 1, res + 1, res->ie_len + res->beacon_ie_len);