]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Generalize channel switch methods to incorperated HE mode
authorMuna Sinada <msinada@codeaurora.org>
Thu, 11 Jun 2020 11:18:43 +0000 (04:18 -0700)
committerJouni Malinen <j@w1.fi>
Sat, 6 Feb 2021 09:41:09 +0000 (11:41 +0200)
Remove the VHT specific naming on methods that are utilized in both VHT
and HE modes.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
hostapd/ctrl_iface.c
src/ap/hostapd.c
src/ap/hostapd.h

index ba7cc29351c22f28d6af30ca24b27f038aeb8c78..381809d72f3d9bdfc8c9bc3f453f50608d2a1dbf 100644 (file)
@@ -2680,9 +2680,9 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
 
        for (i = 0; i < iface->num_bss; i++) {
 
-               /* Save CHAN_SWITCH VHT config */
-               hostapd_chan_switch_vht_config(
-                       iface->bss[i], settings.freq_params.vht_enabled);
+               /* Save CHAN_SWITCH VHT and HE config */
+               hostapd_chan_switch_config(iface->bss[i],
+                                          &settings.freq_params);
 
                ret = hostapd_switch_channel(iface->bss[i], &settings);
                if (ret) {
index 1de0329301b0ef310769f7c32f77d7b0f5880cc9..1b105227db2ab36a9b4786ce15e686abdf42aa35 100644 (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);
 }
 
index 0eff47e1ab083ff49c46732b4134e67a5d8c43d0..0736f451dfa273853021fd20b45fb2a40b4c810e 100644 (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