Regulatory Domain Support
(NOTE: This section is a work in progress.)
Overview
FreeBSD's net80211 stack has basic regulatory domain support, enforcing restrictions on frequency, operating modes, transmission power and general behaviour.
The regulatory domain database is in an XML file - /etc/regdomain.xml. This is used by ifconfig(8) to view and manipulate regulatory domain settings.
Some drivers (eg if_ath(9)) impose further restrictions. This may include limits on transmission power due to number of physical radios in a MIMO setup, channel, channel edges and transmission rate. The former may be regulatory related, but per-transmission rate limits are a hardware limitation - exceeding these will cause distortion and hardware damage.
Country codes and SKUs
(TODO)
Regulatory Entries
SKUs and Country entries contain multiple regulatory entries. Each regulatory entry contains:
- A frequency range, from channel centre to channel centre (eg 2412 - 2472 MHz);
- Channel width (20MHz/40MHz) and channel separation (5MHz/20MHz);
There are also a set of flags describing the operational parameters:
- 2ghz / 5ghz - frequency type
- cck - legacy rates - 11b
- ofdm - OFDM only - 11a, 11na, pure-11g
- dyn - Dynamic CCK/OFDM - 11g, 11ng
- gsm - 900mhz channel
- ht20 / ht40+ / ht40- - 802.11n HT allowed
- turbo / half / quarter - Atheros Turbo/Half/Quarter modes allowed
There may be multiple regulatory entries with the same frequency but differing channel widths and operational flags. The regulatory support code searches the list of frequencies for the first match on both frequency range and operational flags.
There are then a set of regulatory parameters for the given regulatory entry:
- The maximum TX power for the given entry
- An optional maximum TX power if DFS/TPC (Transmit Power Control) is enabled and operational
- An optional maximum antenna gain
And also, a set of flags which control behaviour:
- dfs - Radar/DFS/TPC is required for the channel
- 4ms xmit - Maximum TX time per frame is 4ms
- noadhoc - ADHOC/IBSS mode is not allowed
- nohostap - Host AP mode is not allowed
- passive - Active scanning is not allowed - devices must listen passively for announcements before transmitting on the channel
Commands
To view the current list of regulatory domains and SKUs:
# ifconfig wlan0 list countries
To set the current country:
# ifconfig wlan0 country <countryname>
Please note the country name is not the ISO country code but is the full country specification from list countries. For example, country AU will not set Australia, but will set Austria.
To view the current regulatory domain frequency and operating modes:
# ifconfig wlan0 list regdomain
To view the current limits on per-channel TX power:
# ifconfig wlan0 list txpower
See Also
- regdomain(5)
- ifconfig(8)
- ieee80211_regdomain(9)