danderson,
@danderson@hachyderm.io avatar

TIL: so, wifi has these regulatory domains right, where if you don't tell your radio what country it's in, it doesn't know where it's allowed to transmit and effectively locks out all channels above 2.4GHz.

So I went to see how my chipset was configured... And somehow, it knew that it was in Canada and configured itself appropriately, despite me not telling it and there not being any OS-level service that would have done funky geolocation things.

Turns out, it's the access point!

danderson,
@danderson@hachyderm.io avatar

afaict from skimming the internet and my syslogs, wifi beacons sent by access points include a bunch of "regulatory domain" information, including the country the AP is in and a bunch of basic band and power limits.

So, the wifi chipset comes up, isn't told what regulatory domain it's in, and defaults to the "world" domain, which sucks: every possible channel is defined in the world domain, but almost all of them are tagged "transmitting forbidden".

danderson,
@danderson@hachyderm.io avatar

I wondered why the world regdomain did that rather than just not list any bands, seems pointless to show me 40 different bands that I can't use.

But, assuming that's the union of all bands in all "real" regulatory domains... That's enough info for the radio to spin up receive-only, and start listening for AP beacons! And then from the beacon, the userspace wifi stack can set the right regulatory domain and gain transmit powers.

Pretty nifty.

danderson,
@danderson@hachyderm.io avatar

In the case of this laptop, it's wpa_supplicant that did the thing. It logged the fact that it heard a regulatory domain hint from an AP beacon frame, and configured the chipset accordingly.

From my POV, wifi just worked, I only even discovered this was going on because I found a scary warning in a wiki to make sure a regulatory domain is configured, otherwise you're nerfed to decades-old wifi performance. Turns out, mostly unnecessary warning? Modern wifi and linux figures itself out?

nogweii,
@nogweii@nogweii.net avatar

@danderson that's really cool! Well thought out design (minus the bugs that inevitability arise when humans and/or computers are involved) that avoids a common misconfiguration. (Not me forgetting to set that flag for months after buying a new laptop, circa 2015, nope...)

gertvdijk,
@gertvdijk@mastodon.social avatar

@danderson You know what's even worse... a major ISP here in NL deployed the customer endpoints with WiFi broadcasting an invalid country code 'EU'. This confuses all Intel WiFi cards I have and they won't enable 6GHz/WiFi-6E. No matter what AP you try to connect to; it just sees more 'EU' ones, so buying 6E stuff is useless!

Dutch: https://community.ziggo.nl/t5/Internet/WiFi-landcode-uitgezonden-door-Ziggo-ConnectBoxen-onjuist-maakt/td-p/1205923

Turns out that I win the majority vote now by enabling 12 SSIDs on my Unifi AP and 2 on my own FritzBox modem broadcasting code 'NL'. 😜

danderson,
@danderson@hachyderm.io avatar

@gertvdijk ... wow, amazing. I mean cursed, but amazing. Do you know if that happens elsewhere in Europe? Do I need to prepare override scripts or hack an "EU" domain in the the linux regdb? 🤪

gertvdijk,
@gertvdijk@mastodon.social avatar

@danderson There is no way to override this. Intel closed firmware does this in the chip.

BIOS updates (OEM) can send newer firmware on boot to enable new rules like enabling 6E in Japan and whatnot, but you're totally screwed by closed firmware here.

iow, sudo iw reg set NL does not work anymore on AX210 and newer.

danderson,
@danderson@hachyderm.io avatar

@gertvdijk ugh, that sucks. I assumed there was some way to load a new DB file, but I guess that's all in the signed firmware 😕

I guess I should find out how terrible the mediatek radio that framework shipped me is... It seems well behaved and Just Worked with no negotiating... Hopefully that's a good sign...

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • megavids
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines