aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo-Lun Lai <llai@qca.qualcomm.com>2014-01-17 19:35:03 +0200
committerSteve Kondik <shade@chemlab.org>2014-06-12 14:07:59 -0700
commit858ba4b93826f1ad233569442664da2e3613f6a3 (patch)
treed21a61250ec56d4b6d3674f71d61d93b15b2a74b
parent0d4211f7cea080f55857e887e9d299085fd5dbba (diff)
downloadandroid_external_wpa_supplicant_8-858ba4b93826f1ad233569442664da2e3613f6a3.tar.gz
android_external_wpa_supplicant_8-858ba4b93826f1ad233569442664da2e3613f6a3.tar.bz2
android_external_wpa_supplicant_8-858ba4b93826f1ad233569442664da2e3613f6a3.zip
P2P: Allow GO Negotiation Request to update peer entry after PD
Previously, GO Negotiation Request frame was used to update a peer entry if only a Probe Request from that peer had been received. However, it would be possible, even if unlikely, for a peer to be discovered based on receiving Provision Discovery Request frame from it and no Probe Request frame. In such a case, the Listen frequency of the peer would not be known and group formation could not be (re-)initialized with that peer. Fix this by allowing the GO Negotiation Request frame to update peer entry if the current peer entry does not include Listen or Operating frequency. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com> Git-commit: 3eaaca1a0b372f31ddc43d152c3681dce48889bb Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 597384
-rw-r--r--src/p2p/p2p_go_neg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index 17fb3293..e855d8a1 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -589,6 +589,18 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa,
dev = p2p_add_dev_from_go_neg_req(p2p, sa, &msg);
else if (dev->flags & P2P_DEV_PROBE_REQ_ONLY)
p2p_add_dev_info(p2p, sa, dev, &msg);
+ else if (!dev->listen_freq && !dev->oper_freq) {
+ /*
+ * This may happen if the peer entry was added based on PD
+ * Request and no Probe Request/Response frame has been received
+ * from this peer (or that information has timed out).
+ */
+ p2p_dbg(p2p, "Update peer " MACSTR
+ " based on GO Neg Req since listen/oper freq not known",
+ MAC2STR(dev->info.p2p_device_addr));
+ p2p_add_dev_info(p2p, sa, dev, &msg);
+ }
+
if (dev && dev->flags & P2P_DEV_USER_REJECTED) {
p2p_dbg(p2p, "User has rejected this peer");
status = P2P_SC_FAIL_REJECTED_BY_USER;