Set hostapd hw_mode automatically based on 6 GHz op_class
Allow hostapd configuration to specify use of the 6 GHz band with the specific op_class values without having to set the hw_mode=a parameter explicitly. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
664fd83d59
commit
86310c2202
3 changed files with 9 additions and 0 deletions
|
@ -3094,6 +3094,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
|||
line, pos);
|
||||
return 1;
|
||||
}
|
||||
conf->hw_mode_set = true;
|
||||
} else if (os_strcmp(buf, "wps_rf_bands") == 0) {
|
||||
if (os_strcmp(pos, "ad") == 0)
|
||||
bss->wps_rf_bands = WPS_RF_60GHZ;
|
||||
|
|
|
@ -1466,6 +1466,13 @@ int hostapd_config_check(struct hostapd_config *conf, int full_config)
|
|||
{
|
||||
size_t i;
|
||||
|
||||
if (full_config && is_6ghz_op_class(conf->op_class) &&
|
||||
!conf->hw_mode_set) {
|
||||
/* Use the appropriate hw_mode value automatically when the
|
||||
* op_class parameter has been set, but hw_mode was not. */
|
||||
conf->hw_mode = HOSTAPD_MODE_IEEE80211A;
|
||||
}
|
||||
|
||||
if (full_config && conf->ieee80211d &&
|
||||
(!conf->country[0] || !conf->country[1])) {
|
||||
wpa_printf(MSG_ERROR, "Cannot enable IEEE 802.11d without "
|
||||
|
|
|
@ -968,6 +968,7 @@ struct hostapd_config {
|
|||
int acs_exclude_dfs;
|
||||
u8 min_tx_power;
|
||||
enum hostapd_hw_mode hw_mode; /* HOSTAPD_MODE_IEEE80211A, .. */
|
||||
bool hw_mode_set;
|
||||
int acs_exclude_6ghz_non_psc;
|
||||
int enable_background_radar;
|
||||
enum {
|
||||
|
|
Loading…
Reference in a new issue