Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wifi: Include CRDA regulatory database #65335

Merged
merged 4 commits into from Jul 29, 2019
Merged

wifi: Include CRDA regulatory database #65335

merged 4 commits into from Jul 29, 2019

Conversation

Baughn
Copy link
Contributor

@Baughn Baughn commented Jul 24, 2019

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -177,7 +177,7 @@ in {
basePackages = mkOption {
type = types.attrsOf types.package;
default = { inherit (pkgs)
networkmanager modemmanager wpa_supplicant
networkmanager modemmanager wpa_supplicant crda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're going to need to do this wherever this option is used. See GNOME3, Pantheon etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@worldofpeace
Copy link
Contributor

Can you split these commits like?

nixos/networkmanager: Include CRDA regulartory database
nixos/wpa_supplicant: ...

...other modules touched

@Mic92 Mic92 merged commit 3b0f074 into NixOS:master Jul 29, 2019
@Baughn Baughn deleted the wifi-crda branch July 29, 2019 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants