hostapd: Generalize channel switch methods to incorperated HE mode

Remove the VHT specific naming on methods that are utilized in both VHT
and HE modes.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
This commit is contained in:
Muna Sinada 2020-06-11 04:18:43 -07:00 committed by Jouni Malinen
parent 2908dc91c1
commit 2acfd15a2a
3 changed files with 16 additions and 7 deletions

View file

@ -3557,15 +3557,23 @@ void hostapd_cleanup_cs_params(struct hostapd_data *hapd)
}
void hostapd_chan_switch_vht_config(struct hostapd_data *hapd, int vht_enabled)
void hostapd_chan_switch_config(struct hostapd_data *hapd,
struct hostapd_freq_params *freq_params)
{
if (vht_enabled)
if (freq_params->he_enabled)
hapd->iconf->ch_switch_he_config |= CH_SWITCH_HE_ENABLED;
else
hapd->iconf->ch_switch_he_config |= CH_SWITCH_HE_DISABLED;
if (freq_params->vht_enabled)
hapd->iconf->ch_switch_vht_config |= CH_SWITCH_VHT_ENABLED;
else
hapd->iconf->ch_switch_vht_config |= CH_SWITCH_VHT_DISABLED;
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "CHAN_SWITCH VHT CONFIG 0x%x",
HOSTAPD_LEVEL_INFO,
"CHAN_SWITCH HE config 0x%x VHT config 0x%x",
hapd->iconf->ch_switch_he_config,
hapd->iconf->ch_switch_vht_config);
}

View file

@ -631,7 +631,8 @@ void hostapd_channel_list_updated(struct hostapd_iface *iface, int initiator);
void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s);
const char * hostapd_state_text(enum hostapd_iface_state s);
int hostapd_csa_in_progress(struct hostapd_iface *iface);
void hostapd_chan_switch_vht_config(struct hostapd_data *hapd, int vht_enabled);
void hostapd_chan_switch_config(struct hostapd_data *hapd,
struct hostapd_freq_params *freq_params);
int hostapd_switch_channel(struct hostapd_data *hapd,
struct csa_settings *settings);
void