IBSS/mesh: Add support for VHT80P80 configuration
A new network profile configuration parameter max_oper_chwidth=3 can be used to specify preference to enable 80+80 MHz VHT channel for IBSS. If that is set, the first 80 MHz segment is specified based on the frequency parameter in the network profile and the second segment is selected automatically (which will practically be limited to a single possibility due to DFS requirements in most countries). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
05032725e1
commit
0f29bc68d1
4 changed files with 42 additions and 4 deletions
|
@ -1845,6 +1845,8 @@ static const struct parse_data ssid_fields[] = {
|
|||
{ FUNC(auth_alg) },
|
||||
{ FUNC(scan_freq) },
|
||||
{ FUNC(freq_list) },
|
||||
{ INT_RANGE(max_oper_chwidth, VHT_CHANWIDTH_USE_HT,
|
||||
VHT_CHANWIDTH_80P80MHZ) },
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
{ FUNC(eap) },
|
||||
{ STR_LENe(identity) },
|
||||
|
|
|
@ -751,6 +751,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
|
|||
INT(disabled);
|
||||
INT(peerkey);
|
||||
INT(mixed_cell);
|
||||
INT(max_oper_chwidth);
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
write_int(f, "ieee80211w", ssid->ieee80211w,
|
||||
MGMT_FRAME_PROTECTION_DEFAULT);
|
||||
|
|
|
@ -1554,7 +1554,7 @@ static const char *network_fields[] = {
|
|||
"ssid", "scan_ssid", "bssid", "bssid_blacklist",
|
||||
"bssid_whitelist", "psk", "proto", "key_mgmt",
|
||||
"bg_scan_period", "pairwise", "group", "auth_alg", "scan_freq",
|
||||
"freq_list",
|
||||
"freq_list", "max_oper_chwidth",
|
||||
#ifdef IEEE8021X_EAPOL
|
||||
"eap", "identity", "anonymous_identity", "password", "ca_cert",
|
||||
"ca_path", "client_cert", "private_key", "private_key_passwd",
|
||||
|
|
|
@ -1769,8 +1769,10 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
|||
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
|
||||
u8 channel;
|
||||
int i, chan_idx, ht40 = -1, res, obss_scan = 1;
|
||||
unsigned int j;
|
||||
unsigned int j, k;
|
||||
struct hostapd_freq_params vht_freq;
|
||||
int chwidth, seg0, seg1;
|
||||
u32 vht_caps = 0;
|
||||
|
||||
freq->freq = ssid->frequency;
|
||||
|
||||
|
@ -1956,12 +1958,45 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
|||
return;
|
||||
}
|
||||
|
||||
chwidth = VHT_CHANWIDTH_80MHZ;
|
||||
seg0 = vht80[j] + 6;
|
||||
seg1 = 0;
|
||||
|
||||
if (ssid->max_oper_chwidth == VHT_CHANWIDTH_80P80MHZ) {
|
||||
/* setup center_freq2, bandwidth */
|
||||
for (k = 0; k < ARRAY_SIZE(vht80); k++) {
|
||||
/* Only accept 80 MHz segments separated by a gap */
|
||||
if (j == k || abs(vht80[j] - vht80[k]) == 16)
|
||||
continue;
|
||||
for (i = vht80[k]; i < vht80[k] + 16; i += 4) {
|
||||
struct hostapd_channel_data *chan;
|
||||
|
||||
chan = hw_get_channel_chan(mode, i, NULL);
|
||||
if (!chan)
|
||||
continue;
|
||||
|
||||
if (chan->flag & (HOSTAPD_CHAN_DISABLED |
|
||||
HOSTAPD_CHAN_NO_IR |
|
||||
HOSTAPD_CHAN_RADAR))
|
||||
continue;
|
||||
|
||||
/* Found a suitable second segment for 80+80 */
|
||||
chwidth = VHT_CHANWIDTH_80P80MHZ;
|
||||
vht_caps |=
|
||||
VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
|
||||
seg1 = vht80[k] + 6;
|
||||
}
|
||||
|
||||
if (chwidth == VHT_CHANWIDTH_80P80MHZ)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,
|
||||
freq->channel, freq->ht_enabled,
|
||||
vht_freq.vht_enabled,
|
||||
freq->sec_channel_offset,
|
||||
VHT_CHANWIDTH_80MHZ,
|
||||
vht80[j] + 6, 0, 0) != 0)
|
||||
chwidth, seg0, seg1, vht_caps) != 0)
|
||||
return;
|
||||
|
||||
*freq = vht_freq;
|
||||
|
|
Loading…
Reference in a new issue