mesh: Add VHT_CHANWIDTH_USE_HT to max_oper_chwidth

Channel width in VHT mode refers HT capability when the width goes down
to below 80 MHz, hence add checking HT channel width to its max
operation channel width. So that mesh has capability to select bandwidth
below 80 MHz.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
This commit is contained in:
Peter Oh 2018-04-18 14:14:18 -07:00 committed by Jouni Malinen
parent 06809f618d
commit 806db174fd
5 changed files with 8 additions and 2 deletions

View File

@ -2903,6 +2903,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
ssid->mka_priority = DEFAULT_PRIO_NOT_KEY_SERVER;
#endif /* CONFIG_MACSEC */
ssid->mac_addr = -1;
ssid->max_oper_chwidth = DEFAULT_MAX_OPER_CHWIDTH;
}

View File

@ -838,7 +838,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
INT(vht);
INT_DEF(ht, 1);
INT(ht40);
INT(max_oper_chwidth);
INT_DEF(max_oper_chwidth, DEFAULT_MAX_OPER_CHWIDTH);
INT(vht_center_freq1);
INT(vht_center_freq2);
INT(pbss);

View File

@ -39,6 +39,7 @@
#define DEFAULT_AMPDU_FACTOR -1 /* no change */
#define DEFAULT_AMPDU_DENSITY -1 /* no change */
#define DEFAULT_USER_SELECTED_SIM 1
#define DEFAULT_MAX_OPER_CHWIDTH -1
struct psk_list_entry {
struct dl_list list;

View File

@ -332,7 +332,8 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
if (ssid->ht40)
conf->secondary_channel = ssid->ht40;
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
conf->vht_oper_chwidth = ssid->max_oper_chwidth;
if (ssid->max_oper_chwidth != DEFAULT_MAX_OPER_CHWIDTH)
conf->vht_oper_chwidth = ssid->max_oper_chwidth;
switch (conf->vht_oper_chwidth) {
case VHT_CHANWIDTH_80MHZ:
case VHT_CHANWIDTH_80P80MHZ:

View File

@ -2352,6 +2352,9 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
seg0 = 114;
}
} else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
chwidth = VHT_CHANWIDTH_USE_HT;
seg0 = vht80[j] + 2;
}
if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,