diff options
author | Cy Schubert <cy@FreeBSD.org> | 2020-05-20 04:16:13 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2020-05-20 04:16:13 +0000 |
commit | 2ecd01c7c1133e845f66dea5a93d6ba41040bb18 (patch) | |
tree | 13294d823936ff217005bc6197c8ddf8c188147e /contrib/wpa | |
parent | baeeef1d8f795747bd15ea9708b9bbd343eb8b73 (diff) | |
download | src-test-2ecd01c7c1133e845f66dea5a93d6ba41040bb18.tar.gz src-test-2ecd01c7c1133e845f66dea5a93d6ba41040bb18.zip |
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
Notes
Notes:
svn path=/head/; revision=361272
Diffstat (limited to 'contrib/wpa')
-rw-r--r-- | contrib/wpa/src/drivers/driver_bsd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index 77d336f24ffa4..f99122e477c14 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -1358,14 +1358,18 @@ wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx) 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, |