Browse Source

P2P: Report dev_found event (if not yet done) from GO Neg Req RX

p2p_find removes P2P_DEV_REPORTED flag from every existing P2P peer
entry. Thus, if a GO Negotiation Request frame is received before the
peer is re-discovered based on Probe Response frame, report
P2P-DEVICE-FOUND indication prior to the P2P-GO-NEG-REQUEST similarly to
how this is done the first time the peer is found.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt Undekari 11 years ago
parent
commit
3a8ec7382e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/p2p/p2p_go_neg.c

+ 2 - 1
src/p2p/p2p_go_neg.c

@@ -618,7 +618,8 @@ void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa,
 
 	if (dev == NULL)
 		dev = p2p_add_dev_from_go_neg_req(p2p, sa, &msg);
-	else if (dev->flags & P2P_DEV_PROBE_REQ_ONLY)
+	else if ((dev->flags & P2P_DEV_PROBE_REQ_ONLY) ||
+		  !(dev->flags & P2P_DEV_REPORTED))
 		p2p_add_dev_info(p2p, sa, dev, &msg);
 	else if (!dev->listen_freq && !dev->oper_freq) {
 		/*