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. [[PATCH v3] 1/1] service: retry online check permanently
      until success (Julien Massot)
   2. Re: [PATCH] Teach ConnMan to select the next BSSID when two
      APs with the same SSID and securcity configuration are available
      (Daniel Wagner)


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

Message: 1
Date: Mon, 18 Mar 2019 14:41:42 +0100
From: Julien Massot <[email protected]>
To: [email protected]
Subject: [[PATCH v3] 1/1] service: retry online check permanently
        until success
Message-ID: <[email protected]>

From: Julien Massot <[email protected]>

This make online check happen right after ready state, and
then after ONLINE_CHECK_INITIAL_INTERVAL (1 second) like before,
and then happen after + ONLINE_CHECK_INCREMENT_INTERVAL until
reaching the maximum interval ONLINE_CHECK_MAX_INTERVAL.

Once we reached the ready state we stop online check.
---
 src/service.c | 48 +++++++++++++++++++++++++-----------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/src/service.c b/src/service.c
index dbdaaa14..99820971 100644
--- a/src/service.c
+++ b/src/service.c
@@ -128,8 +128,8 @@ struct connman_service {
        bool wps;
        bool wps_advertizing;
        guint online_timeout;
-       int online_check_count_ipv4;
-       int online_check_count_ipv6;
+       int online_check_interval_ipv4;
+       int online_check_interval_ipv6;
        bool do_split_routing;
        bool new_service;
        bool hidden_service;
@@ -3426,15 +3426,25 @@ int __connman_service_reset_ipconfig(struct 
connman_service *service,
        return err;
 }
 
+/*
+ * We set the timeout to 1 sec so that we have a chance to get
+ * necessary IPv6 router advertisement messages that might have
+ * DNS data etc.
+ */
+#define ONLINE_CHECK_INITIAL_INTERVAL 1
+#define ONLINE_CHECK_MAX_INTERVAL 12
+
 void __connman_service_wispr_start(struct connman_service *service,
                                        enum connman_ipconfig_type type)
 {
        DBG("service %p type %s", service, 
__connman_ipconfig_type2string(type));
 
        if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
-               service->online_check_count_ipv4 = 1;
+               service->online_check_interval_ipv4 =
+                                       ONLINE_CHECK_INITIAL_INTERVAL;
        else
-               service->online_check_count_ipv6 = 1;
+               service->online_check_interval_ipv6 =
+                                       ONLINE_CHECK_INITIAL_INTERVAL;
 
        __connman_wispr_start(service, type);
 }
@@ -6031,35 +6041,27 @@ int __connman_service_online_check_failed(struct 
connman_service *service,
                                        enum connman_ipconfig_type type)
 {
        GSourceFunc redo_func;
-       int *count;
+       int *interval;
 
        if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
-               count = &service->online_check_count_ipv4;
+               interval = &service->online_check_interval_ipv4;
                redo_func = redo_wispr_ipv4;
        } else {
-               count = &service->online_check_count_ipv6;
+               interval = &service->online_check_interval_ipv6;
                redo_func = redo_wispr_ipv6;
        }
 
-       DBG("service %p type %s count %d", service,
-               __connman_ipconfig_type2string(type), *count);
+       DBG("service %p type %s interval %d", service,
+               __connman_ipconfig_type2string(type), *interval);
 
-       if (*count == 0) {
-               connman_warn("%s online check failed for %p %s",
-                       __connman_ipconfig_type2string(type),
-                       service, service->name);
-               return 0;
-       }
-
-       *count -= 1;
+       service->online_timeout = g_timeout_add_seconds(*interval * *interval,
+                               redo_func, connman_service_ref(service));
 
-       /*
-        * We set the timeout to 1 sec so that we have a chance to get
-        * necessary IPv6 router advertisement messages that might have
-        * DNS data etc.
+       /* Increment the interval for the next time, set a maximum timeout of
+        * ONLINE_CHECK_MAX_INTERVAL * ONLINE_CHECK_MAX_INTERVAL seconds.
         */
-       service->online_timeout = g_timeout_add_seconds(1, redo_func,
-                                       connman_service_ref(service));
+       if (*interval < ONLINE_CHECK_MAX_INTERVAL)
+               (*interval)++;
 
        return EAGAIN;
 }
-- 
2.21.0



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

Message: 2
Date: Mon, 18 Mar 2019 19:56:54 +0100
From: Daniel Wagner <[email protected]>
To: Rahul Jain <[email protected]>
Cc: "[email protected]" <[email protected]>, AMIT KUMAR JAISWAL
        <[email protected]>
Subject: Re: [PATCH] Teach ConnMan to select the next BSSID when two
        APs with the same SSID and securcity configuration are available
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Hi Rahul,

On Mon, Mar 18, 2019 at 01:12:27PM +0530, Rahul Jain wrote:
> [PATCH] Teach ConnMan to select the next BSSID when two APs (e.g. 2.4
>  GHz and 5 GHz) with the same SSID and securcity configuration are available.
> 
> Currently when one AP disapears ConnMan will retry to connect to the 
> old AP point even though there is another matching BSSID available.
> 
> So when wpa_supplicant sends a remove signal we find a matching BSSID
> and use it even when it's not from the same AP. 

Patch applied.

Thanks,
Daniel


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

Subject: Digest Footer

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


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

End of connman Digest, Vol 41, Issue 20
***************************************

Reply via email to