diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index a8ba207de..99d10bea9 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -55,6 +55,7 @@ #include "hs20.h" #include "airtime_policy.h" #include "wpa_auth_kay.h" +#include "hw_features.h" static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason); @@ -3775,6 +3776,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd, if (!channel) return -1; + hostapd_determine_mode(hapd->iface); mode = hapd->iface->current_mode; /* if a pointer to old_params is provided we save previous state */ diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 26f8974ba..7d899f50d 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -1040,7 +1040,7 @@ static bool skip_mode(struct hostapd_iface *iface, } -static void hostapd_determine_mode(struct hostapd_iface *iface) +void hostapd_determine_mode(struct hostapd_iface *iface) { int i; enum hostapd_hw_mode target_mode; diff --git a/src/ap/hw_features.h b/src/ap/hw_features.h index ad0ddf7ff..092941f77 100644 --- a/src/ap/hw_features.h +++ b/src/ap/hw_features.h @@ -28,6 +28,7 @@ int hostapd_prepare_rates(struct hostapd_iface *iface, void hostapd_stop_setup_timers(struct hostapd_iface *iface); int hostapd_hw_skip_mode(struct hostapd_iface *iface, struct hostapd_hw_modes *mode); +void hostapd_determine_mode(struct hostapd_iface *iface); #else /* NEED_AP_MLME */ static inline void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, @@ -91,6 +92,10 @@ static inline int hostapd_check_he_6ghz_capab(struct hostapd_iface *iface) return 0; } +static inline void hostapd_determine_mode(struct hostapd_iface *iface) +{ +} + #endif /* NEED_AP_MLME */ #endif /* HW_FEATURES_H */