diff options
Diffstat (limited to 'hostapd/hw_features.c')
-rw-r--r-- | hostapd/hw_features.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hostapd/hw_features.c b/hostapd/hw_features.c index f1288e0931af2..1d6299e625ed2 100644 --- a/hostapd/hw_features.c +++ b/hostapd/hw_features.c @@ -382,6 +382,13 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface) break; } } + if (iface->conf->channel == 0) { + /* TODO: could request a scan of neighboring BSSes and select + * the channel automatically */ + wpa_printf(MSG_ERROR, "Channel not configured " + "(hw_mode/channel in hostapd.conf)"); + return -1; + } if (ok == 0 && iface->conf->channel != 0) { hostapd_logger(iface->bss[0], NULL, HOSTAPD_MODULE_IEEE80211, |