P2P: Report dev_found event (if not yet done) from GO Neg Req RX
authorSunil Dutt Undekari <usdutt@qti.qualcomm.com>
Thu, 6 Mar 2014 14:15:27 +0000 (19:45 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 12 Mar 2014 20:39:11 +0000 (22:39 +0200)
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>
src/p2p/p2p_go_neg.c

index 2e40db1..a32cfac 100644 (file)
@@ -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) {
                /*