]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add EDMG parameters to set_freq functions
authorAlexei Avshalom Lazar <ailizaro@codeaurora.org>
Wed, 11 Sep 2019 09:03:07 +0000 (12:03 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 7 Oct 2019 13:59:23 +0000 (16:59 +0300)
This updates the frequency parameter setting functions to include
argument for EDMG.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
src/ap/ap_drv_ops.c
src/ap/ap_drv_ops.h
src/ap/beacon.c
src/ap/dfs.c
src/ap/hostapd.c
src/common/hw_features_common.c
src/common/hw_features_common.h
wpa_supplicant/wpa_supplicant.c

index 095810ff710e2321edae81cc9b77c1e8b3d7e2fb..45d46febd8981e675fcfbb2abd619b8fc4db7c91 100644 (file)
@@ -538,7 +538,8 @@ int hostapd_flush(struct hostapd_data *hapd)
 
 
 int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
-                    int freq, int channel, int ht_enabled, int vht_enabled,
+                    int freq, int channel, int edmg, u8 edmg_channel,
+                    int ht_enabled, int vht_enabled,
                     int he_enabled,
                     int sec_channel_offset, int oper_chwidth,
                     int center_segment0, int center_segment1)
@@ -546,7 +547,8 @@ int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
        struct hostapd_freq_params data;
        struct hostapd_hw_modes *cmode = hapd->iface->current_mode;
 
-       if (hostapd_set_freq_params(&data, mode, freq, channel, ht_enabled,
+       if (hostapd_set_freq_params(&data, mode, freq, channel, edmg,
+                                   edmg_channel, ht_enabled,
                                    vht_enabled, he_enabled, sec_channel_offset,
                                    oper_chwidth,
                                    center_segment0, center_segment1,
@@ -808,7 +810,8 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
                return -1;
        }
 
-       if (hostapd_set_freq_params(&data, mode, freq, channel, ht_enabled,
+       if (hostapd_set_freq_params(&data, mode, freq, channel, 0, 0,
+                                   ht_enabled,
                                    vht_enabled, he_enabled, sec_channel_offset,
                                    oper_chwidth, center_segment0,
                                    center_segment1,
index ca7f7abe01fd8c83922b0ce29aba0fc47c876a18..79b1302ac30cd24e5a75135698d76874958489bc 100644 (file)
@@ -62,7 +62,8 @@ int hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
                       const u8 *addr, int idx, u8 *seq);
 int hostapd_flush(struct hostapd_data *hapd);
 int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
-                    int freq, int channel, int ht_enabled, int vht_enabled,
+                    int freq, int channel, int edmg, u8 edmg_channel,
+                    int ht_enabled, int vht_enabled,
                     int he_enabled, int sec_channel_offset, int oper_chwidth,
                     int center_segment0, int center_segment1);
 int hostapd_set_rts(struct hostapd_data *hapd, int rts);
index 6c94f9521942cad39324832150b3bc7fb7a87137..0754ada73aad44a858cd62ccd4085e6053f36cf0 100644 (file)
@@ -1434,7 +1434,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
 
        if (cmode &&
            hostapd_set_freq_params(&freq, iconf->hw_mode, iface->freq,
-                                   iconf->channel, iconf->ieee80211n,
+                                   iconf->channel, iconf->enable_edmg,
+                                   iconf->edmg_channel, iconf->ieee80211n,
                                    iconf->ieee80211ac, iconf->ieee80211ax,
                                    iconf->secondary_channel,
                                    hostapd_get_oper_chwidth(iconf),
index 2de338d456dee8eb776ec59656608606ed20154c..c4c00fc4f848aa909ec23b173b97277fd2492910 100644 (file)
@@ -960,6 +960,8 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
                                      iface->conf->hw_mode,
                                      channel->freq,
                                      channel->chan,
+                                     iface->conf->enable_edmg,
+                                     iface->conf->edmg_channel,
                                      iface->conf->ieee80211n,
                                      iface->conf->ieee80211ac,
                                      iface->conf->ieee80211ax,
index bf7b1f89ea3365c8bc698936c89f92f715bdeb5d..83e64743d661e7004279779e87ce0a6be7e91045 100644 (file)
@@ -1914,6 +1914,8 @@ static int hostapd_setup_interface_complete_sync(struct hostapd_iface *iface,
                if (!delay_apply_cfg &&
                    hostapd_set_freq(hapd, hapd->iconf->hw_mode, iface->freq,
                                     hapd->iconf->channel,
+                                    hapd->iconf->enable_edmg,
+                                    hapd->iconf->edmg_channel,
                                     hapd->iconf->ieee80211n,
                                     hapd->iconf->ieee80211ac,
                                     hapd->iconf->ieee80211ax,
@@ -3282,7 +3284,8 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
        if (old_params &&
            hostapd_set_freq_params(old_params, conf->hw_mode,
                                    hostapd_hw_get_freq(hapd, conf->channel),
-                                   conf->channel, conf->ieee80211n,
+                                   conf->channel, conf->enable_edmg,
+                                   conf->edmg_channel, conf->ieee80211n,
                                    conf->ieee80211ac, conf->ieee80211ax,
                                    conf->secondary_channel,
                                    hostapd_get_oper_chwidth(conf),
index 3fdbf893d2b77d2d7ec8eff05c0e21637c134b77..57f5e39811bb8310f5d3a9012b23983ed6bafd19 100644 (file)
@@ -360,7 +360,8 @@ int check_40mhz_2g4(struct hostapd_hw_modes *mode,
 
 int hostapd_set_freq_params(struct hostapd_freq_params *data,
                            enum hostapd_hw_mode mode,
-                           int freq, int channel, int ht_enabled,
+                           int freq, int channel, int enable_edmg,
+                           u8 edmg_channel, int ht_enabled,
                            int vht_enabled, int he_enabled,
                            int sec_channel_offset,
                            int oper_chwidth, int center_segment0,
@@ -381,6 +382,9 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
        data->center_freq2 = 0;
        data->bandwidth = sec_channel_offset ? 40 : 20;
 
+       hostapd_encode_edmg_chan(enable_edmg, edmg_channel, channel,
+                                &data->edmg);
+
        if (data->vht_enabled) switch (oper_chwidth) {
        case CHANWIDTH_USE_HT:
                if (center_segment1 ||
index 2d2a539943c099cc1247066314aad48fae4bde12..c86e195594693ac4196992a6fffe3aae53c0dd8a 100644 (file)
@@ -31,7 +31,8 @@ int check_40mhz_2g4(struct hostapd_hw_modes *mode,
                    int sec_chan);
 int hostapd_set_freq_params(struct hostapd_freq_params *data,
                            enum hostapd_hw_mode mode,
-                           int freq, int channel, int ht_enabled,
+                           int freq, int channel, int edmg, u8 edmg_channel,
+                           int ht_enabled,
                            int vht_enabled, int he_enabled,
                            int sec_channel_offset,
                            int oper_chwidth, int center_segment0,
index e7ddaa1d0e15759314420e5ab96833f929fa978f..1c663ea85ba16d02c748b1a472da2c842985edab 100644 (file)
@@ -2433,7 +2433,8 @@ skip_ht40:
        }
 
        if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,
-                                   freq->channel, freq->ht_enabled,
+                                   freq->channel, ssid->enable_edmg,
+                                   ssid->edmg_channel, freq->ht_enabled,
                                    vht_freq.vht_enabled, freq->he_enabled,
                                    freq->sec_channel_offset,
                                    chwidth, seg0, seg1, vht_caps,