svn commit: r289127 - head/sys/dev/wpi
Adrian Chadd
adrian at FreeBSD.org
Sun Oct 11 01:56:48 UTC 2015
Author: adrian
Date: Sun Oct 11 01:56:46 2015
New Revision: 289127
URL: https://svnweb.freebsd.org/changeset/base/289127
Log:
wpi(4): fix possible race between TX/RX threads.
Tested:
* Tested with Intel 3945BG, STA mode
Submitted by: <s3erios at gmail.com>
Differential Revision: https://reviews.freebsd.org/D3766
Modified:
head/sys/dev/wpi/if_wpi.c
Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:53:51 2015 (r289126)
+++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:56:46 2015 (r289127)
@@ -1093,6 +1093,7 @@ wpi_update_rx_ring_ps(struct wpi_softc *
return;
}
+ WPI_TXQ_LOCK(sc);
WPI_SETBITS(sc, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ);
if (WPI_READ(sc, WPI_GP_CNTRL) & WPI_GP_CNTRL_SLEEP) {
DPRINTF(sc, WPI_DEBUG_PWRSAVE, "%s: wakeup request\n",
@@ -1102,6 +1103,7 @@ wpi_update_rx_ring_ps(struct wpi_softc *
wpi_update_rx_ring(sc);
WPI_CLRBITS(sc, WPI_GP_CNTRL, WPI_GP_CNTRL_MAC_ACCESS_REQ);
}
+ WPI_TXQ_UNLOCK(sc);
}
static void
More information about the svn-src-head
mailing list