aboutsummaryrefslogtreecommitdiffstats
path: root/src
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 /src
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 'src')
-rw-r--r--src/ap/ap_config.c5
-rw-r--r--src/ap/ap_config.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index a996ea8..a03c006 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -206,6 +206,11 @@ struct hostapd_config * hostapd_config_defaults(void)
conf->acs_num_scans = 5;
#endif /* CONFIG_ACS */
+ /* The third octet of the country string uses an ASCII space character
+ * by default to indicate that the regulations encompass all
+ * environments for the current frequency band in the country. */
+ conf->country[2] = ' ';
+
return conf;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index cbdb786..82eb006 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -679,6 +679,9 @@ struct hostapd_config {
* ' ' (ascii 32): all environments
* 'O': Outdoor environemnt only
* 'I': Indoor environment only
+ * 'X': Used with noncountry entity ("XXX")
+ * 0x00..0x31: identifying IEEE 802.11 standard
+ * Annex E table (0x04 = global table)
*/
int ieee80211d;