]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ifconfig: set by default FCC regulatory domain for wireless interfaces.
authoravos <avos@FreeBSD.org>
Thu, 26 May 2016 13:14:08 +0000 (13:14 +0000)
committeravos <avos@FreeBSD.org>
Thu, 26 May 2016 13:14:08 +0000 (13:14 +0000)
commit7b68b2abebc734de4ab8037e8db634937f2845f9
tree879deddad8c09ceffb09d77ec86536b945c8a651
parente9737995b6a43920f2a0299feff3cd615aec1f72
ifconfig: set by default FCC regulatory domain for wireless interfaces.

Change default regulatory domain from DEBUG (no limitations;
exposes all device channels) to FCC; as a result, newly created wireless
interface with default settings will have less chances to violate
country-specific regulations.

This change will not affect drivers with pre-initialized regdomain
structure (currentry ath(4) and mwl(4)); in that case, the default
channel list must correspond to the default regdomain / country setting.

You can switch to another regdomain / country via corresponding
ifconfig(8) options; the driver must implement ic_getradiocaps()
method to restore full channel list.

Full country / regdomain list may be obtained via
'ifconfig <iface> list countries' command.

Example: change country to Germany:
ifconfig wlan0 down # all wlans on the device must be down
ifconfig wlan0 country DE
ifconfig wlan0 up
# wpa_supplicant(8), dhclient(8) etc

At the creation time:
ifconfig wlan0 create wlandev wpi0 country DE

To make changes permanent add the following line to the rc.conf(5):
create_args_wlan0="country DE"

Tested with
 - Intel 3945BG (wpi(4)).
 - WUSB54GC (rum(4)).

Reviewed by: adrian
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D6228
sbin/ifconfig/ifieee80211.c
sys/net80211/ieee80211_regdomain.c