Provide punct_bitmap to hostapd_set_freq_params()
This is needed to be able to check validity of the channel parameters for cases where EHT puncturing impacts what can be enabled for HT/VHT/HE. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
47dad1ed16
commit
9f43c1e26b
8 changed files with 15 additions and 9 deletions
|
@ -629,7 +629,7 @@ int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
|
|||
&cmode->he_capab[IEEE80211_MODE_AP] : NULL,
|
||||
cmode ?
|
||||
&cmode->eht_capab[IEEE80211_MODE_AP] :
|
||||
NULL))
|
||||
NULL, hostapd_get_punct_bitmap(hapd)))
|
||||
return -1;
|
||||
|
||||
if (hapd->driver == NULL)
|
||||
|
@ -977,7 +977,8 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
|
|||
center_segment1,
|
||||
cmode->vht_capab,
|
||||
&cmode->he_capab[IEEE80211_MODE_AP],
|
||||
&cmode->eht_capab[IEEE80211_MODE_AP])) {
|
||||
&cmode->eht_capab[IEEE80211_MODE_AP],
|
||||
hostapd_get_punct_bitmap(hapd))) {
|
||||
wpa_printf(MSG_ERROR, "Can't set freq params");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -2616,7 +2616,8 @@ static int __ieee802_11_set_beacon(struct hostapd_data *hapd)
|
|||
hostapd_get_oper_centr_freq_seg1_idx(iconf),
|
||||
cmode->vht_capab,
|
||||
&cmode->he_capab[IEEE80211_MODE_AP],
|
||||
&cmode->eht_capab[IEEE80211_MODE_AP]) == 0)
|
||||
&cmode->eht_capab[IEEE80211_MODE_AP],
|
||||
hostapd_get_punct_bitmap(hapd)) == 0)
|
||||
params.freq = &freq;
|
||||
|
||||
for (i = 0; i < hapd->iface->num_hw_features; i++) {
|
||||
|
|
|
@ -1010,7 +1010,8 @@ static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
|
|||
oper_centr_freq_seg1_idx,
|
||||
cmode->vht_capab,
|
||||
&cmode->he_capab[ieee80211_mode],
|
||||
&cmode->eht_capab[ieee80211_mode]);
|
||||
&cmode->eht_capab[ieee80211_mode],
|
||||
hostapd_get_punct_bitmap(iface->bss[0]));
|
||||
|
||||
if (err) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
|
|
|
@ -3915,7 +3915,8 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
|
|||
mode ? &mode->he_capab[IEEE80211_MODE_AP] :
|
||||
NULL,
|
||||
mode ? &mode->eht_capab[IEEE80211_MODE_AP] :
|
||||
NULL))
|
||||
NULL,
|
||||
hostapd_get_punct_bitmap(hapd)))
|
||||
return -1;
|
||||
|
||||
switch (params->bandwidth) {
|
||||
|
|
|
@ -391,7 +391,8 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
|
|||
int center_segment0,
|
||||
int center_segment1, u32 vht_caps,
|
||||
struct he_capabilities *he_cap,
|
||||
struct eht_capabilities *eht_cap)
|
||||
struct eht_capabilities *eht_cap,
|
||||
u16 punct_bitmap)
|
||||
{
|
||||
if (!he_cap || !he_cap->he_supported)
|
||||
he_enabled = 0;
|
||||
|
|
|
@ -45,7 +45,8 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
|
|||
int center_segment0,
|
||||
int center_segment1, u32 vht_caps,
|
||||
struct he_capabilities *he_caps,
|
||||
struct eht_capabilities *eht_cap);
|
||||
struct eht_capabilities *eht_cap,
|
||||
u16 punct_bitmap);
|
||||
void set_disable_ht40(struct ieee80211_ht_capabilities *htcaps,
|
||||
int disabled);
|
||||
int ieee80211ac_cap_check(u32 hw, u32 conf);
|
||||
|
|
|
@ -231,7 +231,7 @@ static int wpas_mesh_update_freq_params(struct wpa_supplicant *wpa_s)
|
|||
hostapd_get_oper_centr_freq_seg0_idx(ifmsh->conf),
|
||||
hostapd_get_oper_centr_freq_seg1_idx(ifmsh->conf),
|
||||
ifmsh->conf->vht_capab,
|
||||
he_capab, NULL)) {
|
||||
he_capab, NULL, 0)) {
|
||||
wpa_printf(MSG_ERROR, "Error updating mesh frequency params");
|
||||
wpa_supplicant_mesh_deinit(wpa_s, true);
|
||||
return -1;
|
||||
|
|
|
@ -3064,7 +3064,7 @@ skip_80mhz:
|
|||
freq->sec_channel_offset,
|
||||
chwidth, seg0, seg1, vht_caps,
|
||||
&mode->he_capab[ieee80211_mode],
|
||||
&mode->eht_capab[ieee80211_mode]) != 0)
|
||||
&mode->eht_capab[ieee80211_mode], 0) != 0)
|
||||
return false;
|
||||
|
||||
*freq = vht_freq;
|
||||
|
|
Loading…
Reference in a new issue