Wireless devices are subject to regulations issued by authorities. For any given AP or router, there will most likely be no case where one wireless NIC is located in one country and another wireless NIC in the same device is located in another country, resulting in different regulatory domains to apply to the same box.
Bug:
Currently, wireless Regulatory Domains in VyOS need to be configured per-NIC:
set interfaces wireless wlan0 country-code us
This leads to several side-effects:
- When operating multiple WiFi NICs, they all can have different RegDomains configured which might offend legislation.
- Some NICs need additional entries to /etc/modprobe.d/cfg80211.conf to apply RegDom settings, such as: options cfg80211 ieee80211_regdom=US. This is true for the Compex WLE600VX. This setting cannot be done per-interface.
- Newer standards, drivers and implementations of IEEE 802.11 might or might not abandon this module parameter, and it is hard to foresee the future here.
Suggested fix:
Along with a matching parameter setting in /etc/modprobe.d/cfg80211.conf, this setting has to be automatically set for a system-wide and unique configuration stanza in /var/run/hostapd/wlanN.conf (Ref: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf):
# Country code (ISO/IEC 3166-1). Used to set regulatory domain. # Set as needed to indicate country in which device is operating. # This can limit available channels and transmit power. # These two octets are used as the first two octets of the Country String # (dot11CountryString) #country_code=US