From: Jouni Malinen Date: Tue, 18 Nov 2008 13:01:24 +0000 (+0200) Subject: Improved the error message for passive scan not being available X-Git-Tag: hostap_0_6_6~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba60b94a40a0867c8beb741dd0fe40f7c1f38eba;p=thirdparty%2Fhostap.git Improved the error message for passive scan not being available If the driver wrapper does not implement passive_scan handler, do not try to use strerror() to figure out what the error meant. This is not really an error that the user should be notified about. --- diff --git a/hostapd/hw_features.c b/hostapd/hw_features.c index ad9a7018f..fabb03885 100644 --- a/hostapd/hw_features.c +++ b/hostapd/hw_features.c @@ -234,8 +234,13 @@ static void select_hw_mode2(struct hostapd_iface *iface, int status) iface->conf->passive_scan_listen, NULL, NULL); if (ret) { - wpa_printf(MSG_ERROR, "Could not set passive scanning: %s", - strerror(ret)); + if (ret == -1) { + wpa_printf(MSG_DEBUG, "Passive scanning not " + "supported"); + } else { + wpa_printf(MSG_ERROR, "Could not set passive " + "scanning: %s", strerror(ret)); + } ret = 0; }