Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2020 17:49:32 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r361555 - in stable: 11/contrib/wpa/src/drivers 12/contrib/wpa/src/drivers
Message-ID:  <202005271749.04RHnWcu035182@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Wed May 27 17:49:32 2020
New Revision: 361555
URL: https://svnweb.freebsd.org/changeset/base/361555

Log:
  MFC r361272:
  
  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

Modified:
  stable/11/contrib/wpa/src/drivers/driver_bsd.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/contrib/wpa/src/drivers/driver_bsd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/contrib/wpa/src/drivers/driver_bsd.c
==============================================================================
--- stable/11/contrib/wpa/src/drivers/driver_bsd.c	Wed May 27 16:34:47 2020	(r361554)
+++ stable/11/contrib/wpa/src/drivers/driver_bsd.c	Wed May 27 17:49:32 2020	(r361555)
@@ -1349,14 +1349,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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005271749.04RHnWcu035182>