crda
Configure wireless regulatory domain settings
SYNOPSIS
crda COUNTRY_CODE
PARAMETERS
COUNTRY_CODE
The two-letter ISO 3166-1 alpha-2 country code (e.g., 'US', 'DE', 'JP') for which to apply wireless regulatory rules. This is the primary argument crda expects when explicitly invoked, though it's typically triggered by system services.
DESCRIPTION
crda is the Central Regulatory Domain Agent in Linux, responsible for enforcing wireless regulatory rules based on geographic location. It ensures that wireless devices like Wi-Fi adapters operate within the legal limits of a specific country, controlling aspects such as available frequencies, maximum transmit power, and allowed channels.
It achieves this by reading a digitally signed regulatory database (typically /lib/firmware/regulatory.db) which contains country-specific regulatory information. When the system detects a wireless device or the country code changes, crda is invoked (often via udev or network managers) to inform the kernel's cfg80211 subsystem about the applicable regulatory domain. This prevents wireless devices from operating illegally or causing interference, ensuring compliance with local regulations worldwide.
CAVEATS
Requires a valid and digitally signed regulatory database (regulatory.db). If the database is missing, corrupted, or the signature is invalid, crda might fail to set regulatory rules, potentially leading to limited Wi-Fi functionality or no Wi-Fi at all.
It relies heavily on the kernel's cfg80211 subsystem for interaction. An incorrect country code can lead to non-compliance with local laws or suboptimal wireless performance due to unnecessary restrictions. For ongoing compliance, the regulatory database must be kept up-to-date.
crda typically requires elevated privileges to operate, usually running as root or via privileged mechanisms orchestrated by the system.
REGULATORY DATABASE
The regulatory database, typically found at /lib/firmware/regulatory.db, is crucial for crda's operation. This database is cryptographically signed, and crda verifies this signature before applying its rules, ensuring data authenticity and integrity. It contains comprehensive information on allowed frequencies, power levels, and channel availability for various countries worldwide.
INTERACTION WITH IW
While crda is the underlying agent, users typically do not invoke it directly. Instead, they commonly use the iw command (e.g., iw reg set US), which sends a Netlink message to the kernel. The kernel then triggers crda to process and apply the specified country's regulations based on this input.
AUTOMATIC INVOCATION
crda is frequently invoked automatically by udev rules when a wireless device is detected or initialized, or by network managers upon system boot or network configuration changes. This automated process ensures that the correct regulatory domain is applied seamlessly without manual user intervention, crucial for system stability and compliance.
HISTORY
crda was developed as an integral part of the modern Linux wireless stack, specifically alongside the cfg80211 kernel subsystem and mac80211 drivers. Its introduction addressed the need for a robust and centralized mechanism to manage wireless regulatory compliance. Prior to crda, regulatory information was often hardcoded in individual wireless drivers, leading to inflexibility and potential compliance issues.
The design of crda, coupled with a digitally signed regulatory.db, ensures the integrity and authenticity of the regulatory data, preventing unauthorized modifications. It has since become a standard and essential component in most contemporary Linux distributions for managing Wi-Fi regulatory domains.
SEE ALSO
iw(8), udev(7)