mirror of
https://git.freebsd.org/ports.git
synced 2025-05-30 01:46:55 -04:00
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 MFH: 2020Q2
24 lines
1,004 B
C
24 lines
1,004 B
C
--- src/drivers/driver_bsd.c.orig 2019-08-07 06:25:25.000000000 -0700
|
|
+++ src/drivers/driver_bsd.c 2020-05-19 18:17:48.607660000 -0700
|
|
@@ -1336,14 +1336,18 @@
|
|
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,
|