Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: [PATCH] wifi: Don't perform handle_wps_completion() when
      p2p is connecting (Jose Blanquicet)


----------------------------------------------------------------------

Message: 1
Date: Sun, 22 Oct 2017 19:56:01 +0200
From: Jose Blanquicet <[email protected]>
To: Saurav Babu <[email protected]>
Cc: [email protected], SACHIN DEV SHARMA <[email protected]>
Subject: Re: [PATCH] wifi: Don't perform handle_wps_completion() when
        p2p is connecting
Message-ID:
        <cafc8ijlxxliazzh+c4e9_5jseuman6znqf5tnce-gsrs2fi...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi Saurav,

On Thu, Oct 19, 2017 at 10:24 AM, Jose Blanquicet <[email protected]> wrote:
> On Mon, Oct 16, 2017 at 3:54 PM, Saurav Babu <[email protected]> wrote:
> > When p2p is connecting and other device acts as Group owner then
> > G_SUPPLICANT_STATE_COMPLETED is received after P2P Group formation is
> > success. handle_wps_completion() function disconnects the network if
> > wps_ssid doesn't match with ssid, due to this reason P2P connection is
> > never successful.

Digging into this issue I reached the conclusion that when P2P is
connecting, we actually do not need to handle interface state changes
G_SUPPLICANT_STATE_*. Instead, the connection success is completely
based on the peer state CONNMAN_PEER_STATE_*.

Therefore, we should ignore all the interface state changes during the
P2P connection, otherwise it could result in an inconsistency. In
fact, I tested your patch and it solves the connection problem but at
the end of the connection the service belonging to the just created
P2P group, goes in "association" state and we do not want this.

Here my proposal:

>From f4cfb7707af3c97a3beca1007c0145ba15bf772c Mon Sep 17 00:00:00 2001
From: Jose Blanquicet <[email protected]>
Date: Sun, 22 Oct 2017 19:39:31 +0200
Subject: [PATCH] wifi: Avoid state machine moves forward with P2P networks

---
 plugins/wifi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 74f216d..c2226a3 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2822,6 +2822,10 @@ static void
network_associated(GSupplicantNetwork *network)
     if (!wifi)
         return;

+    /* P2P networks must not be treated as WiFi networks */
+    if (wifi->p2p_connecting || wifi->p2p_device)
+        return;
+
     identifier = g_supplicant_network_get_identifier(network);

     connman_network = connman_device_get_network(wifi->device, identifier);
-- 
1.9.1


wifi->p2p_device will handle system's configuration where the P2P
group interface is created and wifi->p2p_connecting where it is not.
Could you please test this patch and give us your feedback?

Thanks,

Jose Blanquicet


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 24, Issue 26
***************************************

Reply via email to