aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@Atheros.com>2008-12-09 20:11:14 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-09 20:11:14 (GMT)
commit6d1584905c5897aa1ce117cb4e6b16d28a0f397f (patch)
tree2d41f08708e9e19f1dac606fdec5bee691686f2d /wpa_supplicant/wpa_supplicant.c
parent556f5a2a281dc725f16cbf986c3f17aff4115e13 (diff)
downloadhostap-06-6d1584905c5897aa1ce117cb4e6b16d28a0f397f.zip
hostap-06-6d1584905c5897aa1ce117cb4e6b16d28a0f397f.tar.gz
hostap-06-6d1584905c5897aa1ce117cb4e6b16d28a0f397f.tar.bz2
wpa_supplicant: Add support for setting of a regulatory domain
This adds support for setting of a regulatory domain to wpa_supplicant drivers. It also adds regulatory domain setting for the nl80211 driver. We expect an ISO / IEC 3166 alpha2 in the wpa configuration file as a global.
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 00d20c9..c3e7dbd 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1790,6 +1790,12 @@ static int wpa_supplicant_init_iface2(struct wpa_supplicant *wpa_s)
if (wpa_supplicant_driver_init(wpa_s) < 0)
return -1;
+ if (wpa_s->conf->alpha2[0] && wpa_s->conf->alpha2[1] &&
+ wpa_drv_set_country(wpa_s, wpa_s->conf->alpha2)) {
+ wpa_printf(MSG_DEBUG, "Failed to set country");
+ return -1;
+ }
+
wpa_sm_set_own_addr(wpa_s->wpa, wpa_s->own_addr);
if (wpas_wps_init(wpa_s))