aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-10-01 11:17:35 (GMT)
committerJouni Malinen <j@w1.fi>2008-10-01 11:17:35 (GMT)
commit85141289d50d26db7c01e70bd31352869e604e6b (patch)
tree6f531dee5d09d434989fe304aeeea23ade3c35aa /hostapd/hostapd.c
parentd64dabeebcc1bacd1a38c377d083e3fd3a703d3e (diff)
downloadhostap-06-85141289d50d26db7c01e70bd31352869e604e6b.zip
hostap-06-85141289d50d26db7c01e70bd31352869e604e6b.tar.gz
hostap-06-85141289d50d26db7c01e70bd31352869e604e6b.tar.bz2
Silenced some of the driver-related messages for driver=none case
No need to print these to confuse users that configure hostapd as a RADIUS server without any AP functionality.
Diffstat (limited to 'hostapd/hostapd.c')
-rw-r--r--hostapd/hostapd.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index d9f39e6..69780a4 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -677,6 +677,9 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd)
{
int ret = 0;
+ if (hostapd_drv_none(hapd))
+ return 0;
+
wpa_printf(MSG_DEBUG, "Flushing old station entries");
if (hostapd_flush(hapd)) {
printf("Could not connect to kernel driver.\n");
@@ -1006,6 +1009,9 @@ static int hostapd_validate_bssid_configuration(struct hostapd_iface *iface)
unsigned int i = iface->conf->num_bss, bits = 0, j;
int res;
+ if (hostapd_drv_none(hapd))
+ return 0;
+
/* Generate BSSID mask that is large enough to cover the BSSIDs. */
/* Determine the bits necessary to cover the number of BSSIDs. */
@@ -1253,9 +1259,12 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
conf->ssid.ssid[conf->ssid.ssid_len] = '\0';
}
- printf("Using interface %s with hwaddr " MACSTR " and ssid '%s'\n",
- hapd->conf->iface, MAC2STR(hapd->own_addr),
- hapd->conf->ssid.ssid);
+ if (!hostapd_drv_none(hapd)) {
+ printf("Using interface %s with hwaddr " MACSTR
+ " and ssid '%s'\n",
+ hapd->conf->iface, MAC2STR(hapd->own_addr),
+ hapd->conf->ssid.ssid);
+ }
if (hostapd_setup_wpa_psk(conf)) {
printf("WPA-PSK setup failed.\n");
@@ -1320,18 +1329,21 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
return -1;
}
- if (vlan_init(hapd)) {
+ if (!hostapd_drv_none(hapd) && vlan_init(hapd)) {
printf("VLAN initialization failed.\n");
return -1;
}
#ifdef CONFIG_IEEE80211R
- hapd->l2 = l2_packet_init(hapd->conf->iface, NULL, ETH_P_RRB,
- hostapd_rrb_receive, hapd, 0);
- if (hapd->l2 == NULL &&
- (hapd->driver == NULL || hapd->driver->send_ether == NULL)) {
- printf("Failed to open l2_packet interface\n");
- return -1;
+ if (!hostapd_drv_none(hapd)) {
+ hapd->l2 = l2_packet_init(hapd->conf->iface, NULL, ETH_P_RRB,
+ hostapd_rrb_receive, hapd, 0);
+ if (hapd->l2 == NULL &&
+ (hapd->driver == NULL ||
+ hapd->driver->send_ether == NULL)) {
+ printf("Failed to open l2_packet interface\n");
+ return -1;
+ }
}
#endif /* CONFIG_IEEE80211R */
@@ -1876,7 +1888,7 @@ static void setup_interface_done(struct hostapd_iface *iface, int status)
wpa_printf(MSG_DEBUG, "%s: Unable to setup interface.",
iface->bss[0]->conf->iface);
eloop_terminate();
- } else
+ } else if (!hostapd_drv_none(iface->bss[0]))
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
}