Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Sep 2021 11:21:55 -0700
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        "Oleg V. Nauman" <oleg@theweb.org.ua>
Cc:        Cy Schubert <Cy.Schubert@cschubert.com>, current@freebsd.org, Idwer Vollering <vidwer@gmail.com>, phlip@freebsd.org
Subject:   Re: wlan0 no longer functional after n249128-a0c64a443e4c ->  n249146-cb5c07649aa0
Message-ID:  <202109061821.186ILt9b005261@slippy.cwsent.com>
In-Reply-To: <2780735.SSXfckUlLJ@sigill.theweb.org.ua>
References:  <YTS9onwkB4Ojr4cG@albert.catwhisker.org>  <3000346.ZmR5Pbtf01@sigill.theweb.org.ua> <202109061731.186HVXr5004438@slippy.cwsent.com> <2780735.SSXfckUlLJ@sigill.theweb.org.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <2780735.SSXfckUlLJ@sigill.theweb.org.ua>, "Oleg V. Nauman" 
writes:
> On 2021 M09 6, Mon 20:31:33 EEST Cy Schubert wrote:
> > One last favour to ask, can you try this with the wpa_supplicant-devel
> > port, please? I'm trying to narrow down if this is related to the options
> > in usr.sbin/wpa/Makefile.inc or an upstream problem. If this behaves the
> > same using wpa_supplicant-devel, this tells me to look at the code instead
> > of Makefiles.
> > 
> > I can reproduce the service netif restart problem using the old
> > wpa_supplicant 2.9, so at least here there is no change in behaviour.
> > Though on my sandbox machine the ifconfig dow/up is not required -- though
> > even the older wpa_supplicant 2.9 behaves the same on my laptop, (no
> > regression experienced here).
> > 
> > To help point to either Makefile.inc or contrib/wpa, can you please try the
> > wpa_supplicant-devel port. This will tell me where to look next.
>
>  I can confirm that wpa_supplicant from security/wpa_supplicant-devel port 
> demonstrating the same behavior as wpa_supplicant from base - "ifconfig wlan0
>  
> down ; sleep 5 ; ifconfig wlan0 up" mitigate wlan association issue.

Thank you.

This is an issue that I'll need to chase down with our upstream. In the 
mean time while work on this/bring it to upstream's attention this should 
circumvent the issue:

diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant
index 8a86fec90e4d..cfe5f1ab27c6 100755
--- a/libexec/rc/rc.d/wpa_supplicant
+++ b/libexec/rc/rc.d/wpa_supplicant
@@ -12,6 +12,7 @@
 
 name="wpa_supplicant"
 desc="WPA/802.11i Supplicant for wireless network devices"
+start_postcmd="wpa_poststart"
 rcvar=
 
 ifn="$2"
@@ -27,6 +28,12 @@ is_ndis_interface()
 	esac
 }
 
+wpa_poststart() {
+	ifconfig ${ifn} down
+	sleep 3
+	ifconfig ${ifn} up
+}
+
 if is_wired_interface ${ifn} ; then
 	driver="wired"
 elif is_ndis_interface ${ifn} ; then

I'll have more questions later (need to start working on another job) but 
I'd like to learn more about your configuration to understand why it works 
at boot for myself and phlip@ and not for you and the others here on 
-current who have experienced the same issue. Understanding what triggers 
this will go a long way to resolving it.

(cc'd philip@)

BTW, my laptop is configured so that wlan0 (iwn0) and bge0 are members of 
lagg0. Whereas on my sandbox wlan0 (ath0) is used directly.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109061821.186ILt9b005261>