Page MenuHomeFreeBSD

net80211: IEEE80211_FEXT_SCAN_OFFLOAD conditions for bgscan
Needs ReviewPublic

Authored by bz on Jun 27 2024, 12:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 24, 4:16 AM
Unknown Object (File)
Dec 8 2025, 5:49 PM
Unknown Object (File)
Nov 18 2025, 4:43 AM
Unknown Object (File)
Oct 31 2025, 2:36 AM
Unknown Object (File)
Oct 31 2025, 1:13 AM
Unknown Object (File)
Oct 31 2025, 12:07 AM
Unknown Object (File)
Oct 30 2025, 7:11 PM
Unknown Object (File)
Oct 26 2025, 6:25 AM

Details

Reviewers
adrian
Summary

If "full offload scan" is set, we do not want to continue or start
a background scan (the firmware will do that anyway by its own leisure).
Simplify the logic and pull that case out upfront.
This is assumed to help iwm(4), LinuxKPI based drivers supporting hw_scan
and rsu(4) to not get into a state where a scan is always assumed to be
running but no scan is actually active.

While where fix spelling and use an != 0 check for style on a
conition check for IEEE80211_FEXT_SCAN_OFFLOAD in sta_roam_check().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Test Plan

I should go back and run iwm(4) for a few days and roam around
to see that things improve there too. This was mostly noticed
during code inspection and I want to put it out for validation/
review to not lose it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 58374
Build 55262: arc lint + arc unit

Event Timeline

bz requested review of this revision.Jun 27 2024, 12:46 PM

Is there anything specific you'd like to see for testing this?

Is there anything specific you'd like to see for testing this?

Use iwm(4) and see if your scan gets stuck still (wpa_cli would report BUSY if you type scan); but also you may start seeing results from both bands (not entirely sure about it); if the scan results at least start updating and do not get stuck anymore that'll help a lot.

I got:

> scan
OK

(a moment later)

> scan
FAIL-BUSY

but ifconfig wlan0 scan returns expected results (e.g. 31 valid rows)

I got:

> scan
OK

(a moment later)

> scan
FAIL-BUSY

if you wait n channels * 300ms or so (say 10s), does a follow-up scan then still work or work again if you were to type scan once a second?
In the past the problem was that we would get into a state where all "scan" would always return busy until the interfaces was set down/up.

but ifconfig wlan0 scan returns expected results (e.g. 31 valid rows)

good, also if that worked; as user or as super user?

In D45756#1050213, @bz wrote:

if you wait n channels * 300ms or so (say 10s), does a follow-up scan then still work or work again if you were to type scan once a second?

It remains FAIL-BUSY on a few tries over 60+ seconds.

but ifconfig wlan0 scan returns expected results (e.g. 31 valid rows)

good, also if that worked; as user or as super user?

That was as root, but trying ifconfig wlan0 scan just now worked as a user.

(I'm not 100% certain wpa* is up-to-date on my laptop though, let me check.)

In D45756#1050213, @bz wrote:

if you wait n channels * 300ms or so (say 10s), does a follow-up scan then still work or work again if you were to type scan once a second?

It remains FAIL-BUSY on a few tries over 60+ seconds.

OK, then there is more lingering somewhere :(

(I'm not 100% certain wpa* is up-to-date on my laptop though, let me check.)

Won't make a difference.

(I'm not 100% certain wpa* is up-to-date on my laptop though, let me check.)

Sigh, indeed I had out-of-date wpa bits. After updating I got scan to work again after FAIL-BUSY

> scan 
OK
<short wait>
> scan
FAIL-BUSY
<another short wait>
> scan
OK

and scan_results showed what I expect

but now I am stuck in a permanent FAIL-BUSY - maybe the one working case after updating wpa was a coincidence.