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: <s3er...@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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"