nl80211: Explicitly differentiate between 5 GHz and 6 GHz modes

When a device supports both the 5 GHz band and the 6 GHz band,
these are reported as two separate modes, both with mode set to
HOSTAPD_MODE_IEEE80211A. However, as these are different modes,
each with its own characteristics, e.g., rates, capabilities etc.,
specifically differentiate between them by adding a flag to indicate
whether the mode describes a 6 GHz band capabilities or not.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
This commit is contained in:
Ilan Peer 2024-02-20 14:18:09 +01:00 committed by Jouni Malinen
parent b532201034
commit 408a399aa4
4 changed files with 17 additions and 10 deletions

View file

@ -107,9 +107,7 @@ int hostapd_get_hw_features(struct hostapd_iface *iface)
*/
orig_mode_valid = true;
mode = iface->current_mode->mode;
is_6ghz = mode == HOSTAPD_MODE_IEEE80211A &&
iface->current_mode->num_channels > 0 &&
is_6ghz_freq(iface->current_mode->channels[0].freq);
is_6ghz = iface->current_mode->is_6ghz;
iface->current_mode = NULL;
}
hostapd_free_hw_features(iface->hw_features, iface->num_hw_features);
@ -1070,9 +1068,7 @@ static bool skip_mode(struct hostapd_iface *iface,
return true;
if (is_6ghz_op_class(iface->conf->op_class) && iface->freq == 0 &&
(mode->mode != HOSTAPD_MODE_IEEE80211A ||
mode->num_channels == 0 ||
!is_6ghz_freq(mode->channels[0].freq)))
!mode->is_6ghz)
return true;
return false;