wpa_supplicant: Allow disabling HT in AP mode without HT overrides
Since VHT can be toggled explicitly, also expose being able to disable HT explicitly, without requiring HT overrides. Continue making it default to enabled though. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2ff712fc1a
commit
b07ff9cb04
5 changed files with 10 additions and 3 deletions
|
@ -145,12 +145,15 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HT_OVERRIDES
|
#ifdef CONFIG_HT_OVERRIDES
|
||||||
if (ssid->disable_ht) {
|
if (ssid->disable_ht)
|
||||||
|
ssid->ht = 0;
|
||||||
|
#endif /* CONFIG_HT_OVERRIDES */
|
||||||
|
|
||||||
|
if (!ssid->ht) {
|
||||||
conf->ieee80211n = 0;
|
conf->ieee80211n = 0;
|
||||||
conf->ht_capab = 0;
|
conf->ht_capab = 0;
|
||||||
no_ht = 1;
|
no_ht = 1;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_HT_OVERRIDES */
|
|
||||||
|
|
||||||
if (!no_ht && mode && mode->ht_capab) {
|
if (!no_ht && mode && mode->ht_capab) {
|
||||||
conf->ieee80211n = 1;
|
conf->ieee80211n = 1;
|
||||||
|
|
|
@ -1995,6 +1995,7 @@ static const struct parse_data ssid_fields[] = {
|
||||||
{ FUNC(auth_alg) },
|
{ FUNC(auth_alg) },
|
||||||
{ FUNC(scan_freq) },
|
{ FUNC(scan_freq) },
|
||||||
{ FUNC(freq_list) },
|
{ FUNC(freq_list) },
|
||||||
|
{ INT_RANGE(ht, 0, 1) },
|
||||||
{ INT_RANGE(vht, 0, 1) },
|
{ INT_RANGE(vht, 0, 1) },
|
||||||
{ INT_RANGE(ht40, -1, 1) },
|
{ INT_RANGE(ht40, -1, 1) },
|
||||||
{ INT_RANGE(max_oper_chwidth, VHT_CHANWIDTH_USE_HT,
|
{ INT_RANGE(max_oper_chwidth, VHT_CHANWIDTH_USE_HT,
|
||||||
|
@ -2580,6 +2581,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
|
||||||
ssid->group_cipher = DEFAULT_GROUP;
|
ssid->group_cipher = DEFAULT_GROUP;
|
||||||
ssid->key_mgmt = DEFAULT_KEY_MGMT;
|
ssid->key_mgmt = DEFAULT_KEY_MGMT;
|
||||||
ssid->bg_scan_period = DEFAULT_BG_SCAN_PERIOD;
|
ssid->bg_scan_period = DEFAULT_BG_SCAN_PERIOD;
|
||||||
|
ssid->ht = 1;
|
||||||
#ifdef IEEE8021X_EAPOL
|
#ifdef IEEE8021X_EAPOL
|
||||||
ssid->eapol_flags = DEFAULT_EAPOL_FLAGS;
|
ssid->eapol_flags = DEFAULT_EAPOL_FLAGS;
|
||||||
ssid->eap_workaround = DEFAULT_EAP_WORKAROUND;
|
ssid->eap_workaround = DEFAULT_EAP_WORKAROUND;
|
||||||
|
|
|
@ -793,6 +793,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
|
||||||
INT(peerkey);
|
INT(peerkey);
|
||||||
INT(mixed_cell);
|
INT(mixed_cell);
|
||||||
INT(vht);
|
INT(vht);
|
||||||
|
INT_DEF(ht, 1);
|
||||||
INT(ht40);
|
INT(ht40);
|
||||||
INT(max_oper_chwidth);
|
INT(max_oper_chwidth);
|
||||||
INT(vht_center_freq1);
|
INT(vht_center_freq1);
|
||||||
|
|
|
@ -470,6 +470,7 @@ struct wpa_ssid {
|
||||||
int dot11MeshConfirmTimeout; /* msec */
|
int dot11MeshConfirmTimeout; /* msec */
|
||||||
int dot11MeshHoldingTimeout; /* msec */
|
int dot11MeshHoldingTimeout; /* msec */
|
||||||
|
|
||||||
|
int ht;
|
||||||
int ht40;
|
int ht40;
|
||||||
|
|
||||||
int vht;
|
int vht;
|
||||||
|
|
|
@ -1372,7 +1372,7 @@ static const char *network_fields[] = {
|
||||||
"bssid_whitelist", "psk", "proto", "key_mgmt",
|
"bssid_whitelist", "psk", "proto", "key_mgmt",
|
||||||
"bg_scan_period", "pairwise", "group", "auth_alg", "scan_freq",
|
"bg_scan_period", "pairwise", "group", "auth_alg", "scan_freq",
|
||||||
"freq_list", "max_oper_chwidth", "ht40", "vht", "vht_center_freq1",
|
"freq_list", "max_oper_chwidth", "ht40", "vht", "vht_center_freq1",
|
||||||
"vht_center_freq2",
|
"vht_center_freq2", "ht",
|
||||||
#ifdef IEEE8021X_EAPOL
|
#ifdef IEEE8021X_EAPOL
|
||||||
"eap", "identity", "anonymous_identity", "password", "ca_cert",
|
"eap", "identity", "anonymous_identity", "password", "ca_cert",
|
||||||
"ca_path", "client_cert", "private_key", "private_key_passwd",
|
"ca_path", "client_cert", "private_key", "private_key_passwd",
|
||||||
|
|
Loading…
Reference in a new issue