Re: wlan0 no longer functional after n249128-a0c64a443e4c -> n249146-cb5c07649aa0

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Mon, 06 Sep 2021 17:31:33 UTC
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.

Fifteen seconds isn't needed. Two or three, even no wait, will do.


-- 
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.


In message <3000346.ZmR5Pbtf01@sigill.theweb.org.ua>, "Oleg V. Nauman" 
writes:
> On 2021 M09 6, Mon 18:41:13 EEST Cy Schubert wrote:
> > I changed mine to be the same as yours. I can connect. (I use iwn(4) and
> > ath(4) here.)
>
>  a ) regular reboot - wlan can not associate
>  b ) service netif restart - wlan can not associate
>  c ) service netif stop wlan0 ; service netif start wlan0 - wlan can not 
> associate
>  d ) ifconfig wlan0 down; sleep 15 ; ifconfig wlan0 up - wlan associated
>  e ) regular reboot with ifconfig wlan0 down; sleep 15 ; ifconfig wlan0 up 
> added to /etc/rc.local - wlan associated
>
> Thank you.
>
> > 
> > Do you reboot every time you test or simply this?
> > 
> > 	service netif stop wlan0
> > 	service netif start wlan0
> > 
> > If simply above, does a reboot have it work again?
> > 
> > The reason I ask is, I discovered, today, a quirk in 14-CURRENT, regardless
> > of the wpa_supplicant installed. It will always associate following a
> > reboot however when running the above two commands to stop and start wlan0
> > I can reproduce your problem. The workaround for now is when running the
> > above two commands to also ifconfig wlan0 down; ifconfig wlan0 up.
> > 
> > Can you try ifconfig wlan0 down; ifconfig wlan0 up after stopping/starting
> > wlan0? You may need to wait 2-3 seconds between down and up.
>
>