wifi: Include CRDA regulatory database #65335
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
The WiFi regulatory database (CRDA) is a list, by country, of which frequencies are legal for use and how to use them. If it's missing, the kernel will use a global ruleset that might be just the intersection of what's legal in every country.
As many devices (e.g. phone hotspots) automatically apply the correct CRDA rules, it's possible for a hotspot to allocate a frequency band which is not globally legal. This is normally fine, as AP scans can be done passively and the beacons will include a country code for setting up CRDA on the client, but if the CRDA database is missing then the udev event will go unheeded.
In practice this means access points will either become impossible to connect to, or outright invisible. The problem is especially insidious because it's likely to occur during travel, when you may not have any other options for connecting to a network.
This commit enables CRDA if either wpa_supplicant or networkmanager is enabled, adding 264KiB to the closure size in either case.
There should be no documentation needed; it's entirely plug and play.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)