svn commit: r282388 - head/sys/dev/wpi

Adrian Chadd adrian at FreeBSD.org
Sun May 3 23:21:17 UTC 2015


Author: adrian
Date: Sun May  3 23:21:16 2015
New Revision: 282388
URL: https://svnweb.freebsd.org/changeset/base/282388

Log:
  Improve beacon miss detection.
  
  PR:		kern/197143
  Submitted by:	 Andriy Voskoboinyk <s3erios at gmail.com>

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c	Sun May  3 23:18:28 2015	(r282387)
+++ head/sys/dev/wpi/if_wpi.c	Sun May  3 23:21:16 2015	(r282388)
@@ -2115,11 +2115,14 @@ wpi_notif_intr(struct wpi_softc *sc)
 		{
 			struct wpi_beacon_missed *miss =
 			    (struct wpi_beacon_missed *)(desc + 1);
-			uint32_t misses;
+			uint32_t expected, misses, received;
 
 			bus_dmamap_sync(sc->rxq.data_dmat, data->map,
 			    BUS_DMASYNC_POSTREAD);
+
 			misses = le32toh(miss->consecutive);
+			expected = le32toh(miss->expected);
+			received = le32toh(miss->received);
 
 			DPRINTF(sc, WPI_DEBUG_BMISS,
 			    "%s: beacons missed %d/%d\n", __func__, misses,
@@ -2127,7 +2130,9 @@ wpi_notif_intr(struct wpi_softc *sc)
 
 			if (vap->iv_state == IEEE80211_S_RUN &&
 			    (ic->ic_flags & IEEE80211_F_SCAN) == 0 &&
-			    misses >= vap->iv_bmissthreshold)
+			    (misses >= vap->iv_bmissthreshold ||
+			    (received == 0 &&
+			    expected >= vap->iv_bmissthreshold)))
 				ieee80211_beacon_miss(ic);
 
 			break;


More information about the svn-src-head mailing list