ACS: Allow hw_mode=any to be used with internal ACS algorithm
This was already supported in the offload ACS case and this commit completes support for this with the internal ACS algorithm. Signed-off-by: Neo Jou <neojou@gmail.com>
This commit is contained in:
parent
d07f1ade90
commit
b7f1d4f4d6
2 changed files with 11 additions and 4 deletions
|
@ -1085,7 +1085,8 @@ enum hostapd_chan_status acs_init(struct hostapd_iface *iface)
|
|||
return HOSTAPD_CHAN_ACS;
|
||||
}
|
||||
|
||||
if (!iface->current_mode)
|
||||
if (!iface->current_mode &&
|
||||
iface->conf->hw_mode != HOSTAPD_MODE_IEEE80211ANY)
|
||||
return HOSTAPD_CHAN_INVALID;
|
||||
|
||||
acs_cleanup(iface);
|
||||
|
|
|
@ -1041,9 +1041,15 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface)
|
|||
}
|
||||
|
||||
if (iface->current_mode == NULL) {
|
||||
if (!(iface->drv_flags & WPA_DRIVER_FLAGS_ACS_OFFLOAD) ||
|
||||
!(iface->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY))
|
||||
{
|
||||
if ((iface->drv_flags & WPA_DRIVER_FLAGS_ACS_OFFLOAD) &&
|
||||
(iface->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Using offloaded hw_mode=any ACS");
|
||||
} else if (!(iface->drv_flags & WPA_DRIVER_FLAGS_ACS_OFFLOAD) &&
|
||||
iface->conf->hw_mode == HOSTAPD_MODE_IEEE80211ANY) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Using internal ACS for hw_mode=any");
|
||||
} else {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Hardware does not support configured mode");
|
||||
hostapd_logger(iface->bss[0], NULL,
|
||||
|
|
Loading…
Reference in a new issue