Send connman mailing list submissions to
        connman@lists.01.org

To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

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

Today's Topics:

   1. [PATCH] wifi: Fix wireless interface not being added to tether bridge 
sometimes
      (Jonathan Liu)


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

Date: Tue, 22 Dec 2020 13:55:42 +1100
From: Jonathan Liu <net...@gmail.com>
Subject: [PATCH] wifi: Fix wireless interface not being added to
        tether bridge sometimes
To: connman@lists.01.org
Cc: Jonathan Liu <net...@gmail.com>
Message-ID: <20201222025542.224306-1-net...@gmail.com>

For Broadcom BCM4356 chipset with brcmfmac driver, the IFF_LOWER_UP flag
did not always change state in wifi_newlink() but remained set when
changing from STA mode to AP mode. This resulted in handle_tethering()
not being called to add the wireless interface to the tether bridge.

To resolve the issue, always call handle_tethering() as long as the
IFF_LOWER_UP flag is set instead of only when IFF_LOWER_UP changes
from unset to set. The handle_tethering() function already has checks
in place to avoid adding the wireless interface to the tether bridge
more than once.
---
 plugins/wifi.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index be05dd26..7638ca48 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -753,14 +753,15 @@ static void wifi_newlink(unsigned flags, unsigned change, 
void *user_data)
        }
 
        if ((wifi->flags & IFF_LOWER_UP) != (flags & IFF_LOWER_UP)) {
-               if (flags & IFF_LOWER_UP) {
+               if (flags & IFF_LOWER_UP)
                        DBG("carrier on");
-
-                       handle_tethering(wifi);
-               } else
+               else
                        DBG("carrier off");
        }
 
+       if (flags & IFF_LOWER_UP)
+               handle_tethering(wifi);
+
        wifi->flags = flags;
 }
 
-- 
2.29.2

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

Subject: Digest Footer

_______________________________________________
connman mailing list -- connman@lists.01.org
To unsubscribe send an email to connman-le...@lists.01.org


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

End of connman Digest, Vol 62, Issue 25
***************************************

Reply via email to