aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-05-06 13:07:43 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 08:58:14 (GMT)
commit2e021b7cd78ff1db6d1e1c1a3f41d45caea1cf0b (patch)
treea40364307d543d162efa4f2c4cf7c3b0f17e57ea
parent83a88a015c7a52309632b2b96fd0c5f2c459d7cd (diff)
downloadhostap-06-2e021b7cd78ff1db6d1e1c1a3f41d45caea1cf0b.zip
hostap-06-2e021b7cd78ff1db6d1e1c1a3f41d45caea1cf0b.tar.gz
hostap-06-2e021b7cd78ff1db6d1e1c1a3f41d45caea1cf0b.tar.bz2
Reject hostapd configuration without channel for nl80211 drivers
We could use auto-channel selection here eventually, but for now, reject the configuration since it is not going to work correctly (Beacon and Probe Response frames use incorrect value in DS Params). (cherry picked from commit 24c9fcebfb7c354d8cf91f93002921314322a720)
-rw-r--r--hostapd/hw_features.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hostapd/hw_features.c b/hostapd/hw_features.c
index f1288e0..1d6299e 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,