aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorBharat Chakravarty <bchakrav@qca.qualcomm.com>2011-11-30 15:44:43 (GMT)
committerJouni Malinen <j@w1.fi>2011-11-30 15:44:43 (GMT)
commit8e5f9134563d3310284bf8b3084744b1b2eb2b86 (patch)
tree8f8f9712bbd160035c243effbbfdd8fc0a7cecf9 /hostapd
parent910b482d9bdab425eb3e2e8a3e05bc9df1335ff2 (diff)
downloadhostap-8e5f9134563d3310284bf8b3084744b1b2eb2b86.zip
hostap-8e5f9134563d3310284bf8b3084744b1b2eb2b86.tar.gz
hostap-8e5f9134563d3310284bf8b3084744b1b2eb2b86.tar.bz2
WPS: Allow RF Bands value to be overridden
A new hostapd.conf parameter, wps_rf_bands, can now be used to fix the RF Bands value in cases where hw_mode is not set or when operating a dual band dual concurrent AP. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c15
-rw-r--r--hostapd/hostapd.conf6
2 files changed, 21 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 107d37a..5eb7b49 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -1768,6 +1768,21 @@ struct hostapd_config * hostapd_config_read(const char *fname)
"hw_mode '%s'", line, pos);
errors++;
}
+ } else if (os_strcmp(buf, "wps_rf_bands") == 0) {
+ if (os_strcmp(pos, "a") == 0)
+ bss->wps_rf_bands = WPS_RF_50GHZ;
+ else if (os_strcmp(pos, "g") == 0 ||
+ os_strcmp(pos, "b") == 0)
+ bss->wps_rf_bands = WPS_RF_24GHZ;
+ else if (os_strcmp(pos, "ag") == 0 ||
+ os_strcmp(pos, "ga") == 0)
+ bss->wps_rf_bands =
+ WPS_RF_24GHZ | WPS_RF_50GHZ;
+ else {
+ wpa_printf(MSG_ERROR, "Line %d: unknown "
+ "wps_rf_band '%s'", line, pos);
+ errors++;
+ }
} else if (os_strcmp(buf, "channel") == 0) {
conf->channel = atoi(pos);
} else if (os_strcmp(buf, "beacon_int") == 0) {
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 7571f45..2a54518 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -1011,6 +1011,12 @@ own_ip_addr=127.0.0.1
# 12-digit, all-numeric code that identifies the consumer package.
#upc=123456789012
+# WPS RF Bands (a = 5G, b = 2.4G, g = 2.4G, ag = dual band)
+# This value should be set according to RF band(s) supported by the AP if
+# hw_mode is not set. For dual band dual concurrent devices, this needs to be
+# set to ag to allow both RF bands to be advertized.
+#wps_rf_bands=ag
+
##### Wi-Fi Direct (P2P) ######################################################
# Enable P2P Device management