EHT: Add 320 channel width support
Add initial changes to support 320 MHz channel width. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
This commit is contained in:
parent
bafe35df03
commit
085a3fc76e
16 changed files with 121 additions and 13 deletions
|
@ -1163,6 +1163,8 @@ hostapd_set_oper_chwidth(struct hostapd_config *conf,
|
|||
#ifdef CONFIG_IEEE80211BE
|
||||
if (conf->ieee80211be)
|
||||
conf->eht_oper_chwidth = oper_chwidth;
|
||||
if (oper_chwidth == CONF_OPER_CHWIDTH_320MHZ)
|
||||
oper_chwidth = CONF_OPER_CHWIDTH_160MHZ;
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
#ifdef CONFIG_IEEE80211AX
|
||||
if (conf->ieee80211ax)
|
||||
|
@ -1192,6 +1194,9 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
|
|||
#ifdef CONFIG_IEEE80211BE
|
||||
if (conf->ieee80211be)
|
||||
conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
|
||||
if (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
|
||||
oper_centr_freq_seg0_idx +=
|
||||
conf->channel > oper_centr_freq_seg0_idx ? 16 : -16;
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
#ifdef CONFIG_IEEE80211AX
|
||||
if (conf->ieee80211ax)
|
||||
|
|
|
@ -986,6 +986,8 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd)
|
|||
else if (oper_chwidth == CONF_OPER_CHWIDTH_160MHZ ||
|
||||
oper_chwidth == CONF_OPER_CHWIDTH_80P80MHZ)
|
||||
params.ch_width = 160;
|
||||
else if (oper_chwidth == CONF_OPER_CHWIDTH_320MHZ)
|
||||
params.ch_width = 320;
|
||||
}
|
||||
|
||||
if (hapd->iface->conf->op_class)
|
||||
|
|
|
@ -838,6 +838,9 @@ void hostapd_event_sta_opmode_changed(struct hostapd_data *hapd, const u8 *addr,
|
|||
case CHAN_WIDTH_160:
|
||||
txt = "160";
|
||||
break;
|
||||
case CHAN_WIDTH_320:
|
||||
txt = "320";
|
||||
break;
|
||||
default:
|
||||
txt = NULL;
|
||||
break;
|
||||
|
@ -899,6 +902,9 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
|
|||
case CHAN_WIDTH_160:
|
||||
chwidth = CONF_OPER_CHWIDTH_160MHZ;
|
||||
break;
|
||||
case CHAN_WIDTH_320:
|
||||
chwidth = CONF_OPER_CHWIDTH_320MHZ;
|
||||
break;
|
||||
case CHAN_WIDTH_20_NOHT:
|
||||
case CHAN_WIDTH_20:
|
||||
case CHAN_WIDTH_40:
|
||||
|
@ -1173,6 +1179,15 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IEEE80211BE
|
||||
if (hapd->iface->conf->ieee80211be && acs_res->ch_width == 320) {
|
||||
hostapd_set_oper_chwidth(hapd->iconf, CONF_OPER_CHWIDTH_320MHZ);
|
||||
hostapd_set_oper_centr_freq_seg0_idx(
|
||||
hapd->iconf, acs_res->vht_seg1_center_ch);
|
||||
hostapd_set_oper_centr_freq_seg1_idx(hapd->iconf, 0);
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
|
||||
out:
|
||||
ret = hostapd_acs_completed(hapd->iface, err);
|
||||
if (ret) {
|
||||
|
|
|
@ -3516,6 +3516,9 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
|
|||
case 160:
|
||||
hostapd_set_oper_chwidth(conf, CONF_OPER_CHWIDTH_160MHZ);
|
||||
break;
|
||||
case 320:
|
||||
hostapd_set_oper_chwidth(conf, CONF_OPER_CHWIDTH_320MHZ);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
@ -3715,6 +3718,9 @@ hostapd_switch_channel_fallback(struct hostapd_iface *iface,
|
|||
case 160:
|
||||
bw = CONF_OPER_CHWIDTH_160MHZ;
|
||||
break;
|
||||
case 320:
|
||||
bw = CONF_OPER_CHWIDTH_320MHZ;
|
||||
break;
|
||||
default:
|
||||
wpa_printf(MSG_WARNING, "Unknown CSA bandwidth: %d",
|
||||
freq_params->bandwidth);
|
||||
|
|
|
@ -1087,13 +1087,14 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface)
|
|||
|
||||
if ((iface->conf->hw_mode == HOSTAPD_MODE_IEEE80211G ||
|
||||
iface->conf->ieee80211n || iface->conf->ieee80211ac ||
|
||||
iface->conf->ieee80211ax) &&
|
||||
iface->conf->ieee80211ax || iface->conf->ieee80211be) &&
|
||||
iface->conf->channel == 14) {
|
||||
wpa_printf(MSG_INFO, "Disable OFDM/HT/VHT/HE on channel 14");
|
||||
wpa_printf(MSG_INFO, "Disable OFDM/HT/VHT/HE/EHT on channel 14");
|
||||
iface->conf->hw_mode = HOSTAPD_MODE_IEEE80211B;
|
||||
iface->conf->ieee80211n = 0;
|
||||
iface->conf->ieee80211ac = 0;
|
||||
iface->conf->ieee80211ax = 0;
|
||||
iface->conf->ieee80211be = 0;
|
||||
}
|
||||
|
||||
iface->current_mode = NULL;
|
||||
|
|
|
@ -197,9 +197,7 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
|
|||
seg0 = hostapd_get_oper_centr_freq_seg0_idx(conf);
|
||||
|
||||
switch (chwidth) {
|
||||
#if 0 /* FIX: Need to clean up CHANWIDTH_* use for protocol vs. internal
|
||||
* needs to be able to define this. */
|
||||
case CHANWIDTH_320MHZ:
|
||||
case CONF_OPER_CHWIDTH_320MHZ:
|
||||
oper->oper_info.control |= EHT_OPER_CHANNEL_WIDTH_320MHZ;
|
||||
seg1 = seg0;
|
||||
if (hapd->iconf->channel < seg0)
|
||||
|
@ -207,7 +205,6 @@ u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid)
|
|||
else
|
||||
seg0 += 16;
|
||||
break;
|
||||
#endif
|
||||
case CONF_OPER_CHWIDTH_160MHZ:
|
||||
oper->oper_info.control |= EHT_OPER_CHANNEL_WIDTH_160MHZ;
|
||||
seg1 = seg0;
|
||||
|
@ -286,10 +283,12 @@ static bool check_valid_eht_mcs(struct hostapd_data *hapd,
|
|||
EHT_PHYCAP_MCS_NSS_LEN_20MHZ_ONLY);
|
||||
|
||||
switch (hapd->iface->conf->eht_oper_chwidth) {
|
||||
/* TODO: CHANWIDTH_320MHZ */
|
||||
case CONF_OPER_CHWIDTH_320MHZ:
|
||||
mcs_count++;
|
||||
/* fall through */
|
||||
case CONF_OPER_CHWIDTH_80P80MHZ:
|
||||
case CONF_OPER_CHWIDTH_160MHZ:
|
||||
mcs_count = 2;
|
||||
mcs_count++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -219,7 +219,7 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
|
|||
pos += 6; /* skip the fixed part */
|
||||
|
||||
if (is_6ghz_op_class(hapd->iconf->op_class)) {
|
||||
u8 seg0 = hostapd_get_oper_centr_freq_seg0_idx(hapd->iconf);
|
||||
u8 seg0 = hapd->iconf->he_oper_centr_freq_seg0_idx;
|
||||
u8 seg1 = hostapd_get_oper_centr_freq_seg1_idx(hapd->iconf);
|
||||
u8 control;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue