diff options
Diffstat (limited to 'src/ap/acs.c')
-rw-r--r-- | src/ap/acs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ap/acs.c b/src/ap/acs.c index 03d797fe8836a..5e8380535854f 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -599,8 +599,7 @@ acs_find_ideal_chan(struct hostapd_iface *iface) wpa_printf(MSG_DEBUG, "ACS: Survey analysis for selected bandwidth %d MHz", n_chans == 1 ? 20 : n_chans == 2 ? 40 : - n_chans == 4 ? 80 : - -1); + 80); for (i = 0; i < iface->current_mode->num_channels; i++) { double total_weight; @@ -933,6 +932,9 @@ enum hostapd_chan_status acs_init(struct hostapd_iface *iface) return HOSTAPD_CHAN_ACS; } + if (!iface->current_mode) + return HOSTAPD_CHAN_INVALID; + acs_cleanup(iface); err = acs_request_scan(iface); |