svn commit: r361272 - head/contrib/wpa/src/drivers
Cy Schubert
cy at FreeBSD.org
Wed May 20 04:16:14 UTC 2020
Author: cy
Date: Wed May 20 04:16:13 2020
New Revision: 361272
URL: https://svnweb.freebsd.org/changeset/base/361272
Log:
Silence the once per second CTRL-EVENT-SCAN-FAILED errors when the WiFi
radio is disabled through the communication device toggle key (also known
as the RF raidio kill button). Only the CTRL-EVENT-DISCONNECTED will be
issued.
Submitted by: avg
Reported by: avg
MFC after: 1 week
Modified:
head/contrib/wpa/src/drivers/driver_bsd.c
Modified: head/contrib/wpa/src/drivers/driver_bsd.c
==============================================================================
--- head/contrib/wpa/src/drivers/driver_bsd.c Wed May 20 02:33:41 2020 (r361271)
+++ head/contrib/wpa/src/drivers/driver_bsd.c Wed May 20 04:16:13 2020 (r361272)
@@ -1358,14 +1358,18 @@ wpa_driver_bsd_event_receive(int sock, void *ctx, void
drv = bsd_get_drvindex(global, ifm->ifm_index);
if (drv == NULL)
return;
- if ((ifm->ifm_flags & IFF_UP) == 0 &&
- (drv->flags & IFF_UP) != 0) {
+ if (((ifm->ifm_flags & IFF_UP) == 0 ||
+ (ifm->ifm_flags & IFF_RUNNING) == 0) &&
+ (drv->flags & IFF_UP) != 0 &&
+ (drv->flags & IFF_RUNNING) != 0) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED,
NULL);
} else if ((ifm->ifm_flags & IFF_UP) != 0 &&
- (drv->flags & IFF_UP) == 0) {
+ (ifm->ifm_flags & IFF_RUNNING) != 0 &&
+ ((drv->flags & IFF_UP) == 0 ||
+ (drv->flags & IFF_RUNNING) == 0)) {
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
drv->ifname);
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED,
More information about the svn-src-head
mailing list