aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-03-01 08:58:15 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-01 08:58:15 (GMT)
commitff936bc753fe94ea6776915d11ba788758aa8e1d (patch)
treeb120e45835be5ac95a49af63d728be9d3f2951f8 /hostapd
parentb80130c60b7b8c51628d295fc5f593d95a970a31 (diff)
downloadhostap-ff936bc753fe94ea6776915d11ba788758aa8e1d.zip
hostap-ff936bc753fe94ea6776915d11ba788758aa8e1d.tar.gz
hostap-ff936bc753fe94ea6776915d11ba788758aa8e1d.tar.bz2
Make the third octet of Country String configurable
The new hostapd.conf parameter country3 can now be used to configure the third octet of the Country String that was previously hardcoded to ' ' (= 0x20). For example: All environments of the current frequency band and country (default) country3=0x20 Outdoor environment only country3=0x4f Indoor environment only country3=0x49 Noncountry entity (country_code=XX) country3=0x58 IEEE 802.11 standard Annex E table indication: 0x01 .. 0x1f Annex E, Table E-4 (Global operating classes) country3=0x04 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c4
-rw-r--r--hostapd/hostapd.conf17
2 files changed, 19 insertions, 2 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 85c634f..953032d 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2138,8 +2138,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
bss->skip_inactivity_poll = atoi(pos);
} else if (os_strcmp(buf, "country_code") == 0) {
os_memcpy(conf->country, pos, 2);
- /* FIX: make this configurable */
- conf->country[2] = ' ';
+ } else if (os_strcmp(buf, "country3") == 0) {
+ conf->country[2] = strtol(pos, NULL, 16);
} else if (os_strcmp(buf, "ieee80211d") == 0) {
conf->ieee80211d = atoi(pos);
} else if (os_strcmp(buf, "ieee80211h") == 0) {
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index da97505..821910c 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -98,8 +98,25 @@ ssid=test
# 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
+# The third octet of the Country String (dot11CountryString)
+# This parameter is used to set the third octet of the country string.
+#
+# All environments of the current frequency band and country (default)
+#country3=0x20
+# Outdoor environment only
+#country3=0x4f
+# Indoor environment only
+#country3=0x49
+# Noncountry entity (country_code=XX)
+#country3=0x58
+# IEEE 802.11 standard Annex E table indication: 0x01 .. 0x1f
+# Annex E, Table E-4 (Global operating classes)
+#country3=0x04
+
# Enable IEEE 802.11d. This advertises the country_code and the set of allowed
# channels and transmit power levels based on the regulatory limits. The
# country_code setting must be configured with the correct country for