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.
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;
}