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>
This commit is contained in:
parent
910b482d9b
commit
8e5f913456
4 changed files with 31 additions and 2 deletions
|
@ -1768,6 +1768,21 @@ struct hostapd_config * hostapd_config_read(const char *fname)
|
||||||
"hw_mode '%s'", line, pos);
|
"hw_mode '%s'", line, pos);
|
||||||
errors++;
|
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) {
|
} else if (os_strcmp(buf, "channel") == 0) {
|
||||||
conf->channel = atoi(pos);
|
conf->channel = atoi(pos);
|
||||||
} else if (os_strcmp(buf, "beacon_int") == 0) {
|
} else if (os_strcmp(buf, "beacon_int") == 0) {
|
||||||
|
|
|
@ -1011,6 +1011,12 @@ own_ip_addr=127.0.0.1
|
||||||
# 12-digit, all-numeric code that identifies the consumer package.
|
# 12-digit, all-numeric code that identifies the consumer package.
|
||||||
#upc=123456789012
|
#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) ######################################################
|
##### Wi-Fi Direct (P2P) ######################################################
|
||||||
|
|
||||||
# Enable P2P Device management
|
# Enable P2P Device management
|
||||||
|
|
|
@ -360,6 +360,8 @@ struct hostapd_bss_config {
|
||||||
/* IEEE 802.11u - Roaming Consortium list */
|
/* IEEE 802.11u - Roaming Consortium list */
|
||||||
unsigned int roaming_consortium_count;
|
unsigned int roaming_consortium_count;
|
||||||
struct hostapd_roaming_consortium *roaming_consortium;
|
struct hostapd_roaming_consortium *roaming_consortium;
|
||||||
|
|
||||||
|
u8 wps_rf_bands; /* RF bands for WPS (WPS_RF_*) */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -800,8 +800,14 @@ int hostapd_init_wps(struct hostapd_data *hapd,
|
||||||
}
|
}
|
||||||
|
|
||||||
wps->dev.os_version = WPA_GET_BE32(hapd->conf->os_version);
|
wps->dev.os_version = WPA_GET_BE32(hapd->conf->os_version);
|
||||||
wps->dev.rf_bands = hapd->iconf->hw_mode == HOSTAPD_MODE_IEEE80211A ?
|
|
||||||
WPS_RF_50GHZ : WPS_RF_24GHZ; /* FIX: dualband AP */
|
if (conf->wps_rf_bands) {
|
||||||
|
wps->dev.rf_bands = conf->wps_rf_bands;
|
||||||
|
} else {
|
||||||
|
wps->dev.rf_bands =
|
||||||
|
hapd->iconf->hw_mode == HOSTAPD_MODE_IEEE80211A ?
|
||||||
|
WPS_RF_50GHZ : WPS_RF_24GHZ; /* FIX: dualband AP */
|
||||||
|
}
|
||||||
|
|
||||||
if (conf->wpa & WPA_PROTO_RSN) {
|
if (conf->wpa & WPA_PROTO_RSN) {
|
||||||
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK)
|
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK)
|
||||||
|
|
Loading…
Reference in a new issue