aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-01-30 10:43:19 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:27:23 (GMT)
commitb5bd5cdc2b311c9dbf7b34e4ebc39191861a3f35 (patch)
tree65a1a06670b71701368e05baa7b1fabbfb4bb7a3 /hostapd/hostapd.c
parente822c28d465a1a68577874f74973fe1a916352c6 (diff)
downloadhostap-06-b5bd5cdc2b311c9dbf7b34e4ebc39191861a3f35.zip
hostap-06-b5bd5cdc2b311c9dbf7b34e4ebc39191861a3f35.tar.gz
hostap-06-b5bd5cdc2b311c9dbf7b34e4ebc39191861a3f35.tar.bz2
Do not use country_code default (was: US)
If country_code is not included in hostapd.conf, refuse to enable IEEE 802.11d and do not try to set the regulatory domain in kernel. (cherry picked from commit 6f4071c084be304e7f16a939eb3127de98a1ff0a)
Diffstat (limited to 'hostapd/hostapd.c')
-rw-r--r--hostapd/hostapd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index afff924..df6062b 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -1543,11 +1543,13 @@ static int setup_interface(struct hostapd_iface *iface)
OP_MODE_PURE);
#endif /* CONFIG_IEEE80211N */
- os_memcpy(country, hapd->iconf->country, 3);
- country[3] = '\0';
- if (hostapd_set_country(hapd, country) < 0) {
- wpa_printf(MSG_ERROR, "Failed to set country code");
- return -1;
+ if (hapd->iconf->country[0] && hapd->iconf->country[1]) {
+ os_memcpy(country, hapd->iconf->country, 3);
+ country[3] = '\0';
+ if (hostapd_set_country(hapd, country) < 0) {
+ wpa_printf(MSG_ERROR, "Failed to set country code");
+ return -1;
+ }
}
if (hapd->iconf->ieee80211d &&