Page MenuHomeFreeBSD

net80211: init by default to FCC (was: DEBUG) regdomain (via ifconfig)
ClosedPublic

Authored by avos on May 5 2016, 4:22 PM.
Tags
None
Referenced Files
F82146472: D6228.diff
Thu, Apr 25, 10:45 PM
Unknown Object (File)
Mon, Apr 8, 11:52 AM
Unknown Object (File)
Sun, Apr 7, 8:47 PM
Unknown Object (File)
Sun, Apr 7, 12:07 PM
Unknown Object (File)
Sat, Apr 6, 5:54 PM
Unknown Object (File)
Sat, Apr 6, 5:48 AM
Unknown Object (File)
Feb 18 2024, 5:23 PM
Unknown Object (File)
Dec 22 2023, 9:21 PM
Subscribers

Details

Summary

Change default regulatory domain from DEBUG (no limitations; exposes all device channels) to FCC (in case if it was not set by the driver previously).

Differences from D6205: no new (hardcoded) net80211 stuff (but some copy-paste from set80211regdomain() in ifconfig(8)); channel table is not touched until first vap is created.

(and, of course, this will not work if user creates wlan interface not via ifconfig(8))).

Relnotes: yes

Test Plan

Tested with

  • Intel 3945BG (wpi)
  • WUSB54GC (rum).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avos retitled this revision from to net80211: init by default to FCC (was: DEBUG) regdomain (via ifconfig).
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.

i did try setting the SKU up in net80211 and it didn't help when I created a vap. i wonder if something is only happening when you do ifconfig X regdomain Y; which isn't being done when you create a VAP.

sbin/ifconfig/ifieee80211.c
5204 ↗(On Diff #15937)

we need to enforce it for monitor mode too; we can do packet injection with monitor mode these days.

sys/net80211/ieee80211_regdomain.c
72 ↗(On Diff #15937)

any reason for deleting this?

Ah okay. So you're assuming that if a driver has set a regdomain up, it also has setup the relevant channel list. So you're defaulting to no country/no domain as a way for net80211 to realise this isn't the case.

Ah okay. So you're assuming that if a driver has set a regdomain up, it also has setup the relevant channel list. So you're defaulting to no country/no domain as a way for net80211 to realise this isn't the case.

+ this helps to recognize if this is the first vap (or not).

ok. Well, make sure regdomain is enforced for monitor mode, and then yeah, this will be fine for now. We'll have to come up with some other way of doing this in the future but this is better than the current state of affairs. :)

avos edited the test plan for this revision. (Show Details)
avos edited edge metadata.
  • Apply regdomain/country settings to the MONITOR mode.
  • Clenup isocc[] array too; as a result, 'ifconfig wlan0 create wlandev rum0 regdomain FCC4' will fail because of no country.
avos marked an inline comment as done.May 5 2016, 5:43 PM
adrian edited edge metadata.
This revision is now accepted and ready to land.May 5 2016, 8:14 PM

We're going to have to figure out how to initialise the regdomain stuff from the driver at some point after this commit.

Ie, the driver should be able to just pick a default regdomain out of the hardware and populate it, and then the first time we create a vap it updates the channel list. We can do this after this commit though.

This revision was automatically updated to reflect the committed changes.