HomeFreeBSD

rc/WPA: driver_bsd.c: backout upstream IFF_ change and add logging

Description

rc/WPA: driver_bsd.c: backout upstream IFF_ change and add logging

This reverts the state to our old supplicant logic setting or clearing
IFF_UP if needed. In addition this adds logging for the cases in which
we do (not) change the interface state.

Depending on testing this seems to help bringing WiFi up or not log
any needed changes (which would be the expected wpa_supplicant logic
now). People should look out for `(changed)` log entries (at least
if debugging the issue; this way we will at least have data points).

There is a hypothesis still pondered that the entire IFF_UP toggling
only exploits a race in net80211 (see further discssussions for more
debugging and alternative solutions see D38508 and D38753).
That may also explain why the changes to the rc startup script [1]
only helped partially for some people to no longer see the
continuous CTRL-EVENT-SCAN-FAILED.

It is highly likely that we will want further changes and until
we know for sure that people are seeing ''(changed)'' events
this should stay local. Should we need to upstream this we'll
likely need #ifdef FreeBSD around this code.

Remove ifconfig down/up workaround (bfb202c4554a) in
rc.d/wpa_supplicant as it is no longer needed.

[1] 5fcdc19a81115d975e238270754e28557a2fcfc5 and

d06d7eb09131edea666bf049d6c0c55672726f76

Sponsored by: The FreeBSD Foundation
Reviewed by: cy, enweiwu (earlier)
Differential Revision: https://reviews.freebsd.org/D38807

(cherry picked from commit bfb202c4554a72383202a1a401d80721935b8c95)

Reviewed by: bz (for wireless)
Differential Revision: https://reviews.freebsd.org/D39257

(cherry picked from commit 052211e08c0e227277d0c4dc603bba2253eb3d73)

Details

Provenance
bzAuthored on Mar 23 2023, 10:37 PM
Reviewer
cy
Differential Revision
D38807: WPA: backout upstream IFF_ change and add logging
Parents
rGa3a5f67d3949: ifconfig: ifieee80211: print bssid name
Branches
Unknown
Tags
Unknown