Date: Sun, 15 Mar 2015 21:29:19 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280116 - head/sys/dev/wpi Message-ID: <201503152129.t2FLTJCB091396@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun Mar 15 21:29:18 2015 New Revision: 280116 URL: https://svnweb.freebsd.org/changeset/base/280116 Log: Don't unlock mutex in interrupt thread (except for wpi_rx_done() - for now) - fixes various races between wpi_notif_intr() and wpi_stop_locked(). (attachment 154381) Committers note: yes, unlock/if_input/lock has to go away, but that'll have to be done later. PR: kern/197143 Submitted by: Andriy Voskoboinyk <s3erios@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 Mar 15 21:27:50 2015 (r280115) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 21:29:18 2015 (r280116) @@ -1960,7 +1960,6 @@ wpi_tx_done(struct wpi_softc *sc, struct /* * Update rate control statistics for the node. */ - WPI_UNLOCK(sc); if ((status & 0xff) != 1) { if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); ieee80211_ratectl_tx_complete(vap, ni, @@ -1972,7 +1971,6 @@ wpi_tx_done(struct wpi_softc *sc, struct } ieee80211_tx_complete(ni, m, (status & 0xff) != 1); - WPI_LOCK(sc); WPI_TXQ_STATE_LOCK(sc); ring->queued -= 1; @@ -2103,13 +2101,10 @@ wpi_notif_intr(struct wpi_softc *sc) le32toh(miss->total)); if (vap->iv_state == IEEE80211_S_RUN && - (ic->ic_flags & IEEE80211_F_SCAN) == 0) { - if (misses >= vap->iv_bmissthreshold) { - WPI_UNLOCK(sc); - ieee80211_beacon_miss(ic); - WPI_LOCK(sc); - } - } + (ic->ic_flags & IEEE80211_F_SCAN) == 0 && + misses >= vap->iv_bmissthreshold) + ieee80211_beacon_miss(ic); + break; } case WPI_UC_READY: @@ -2180,9 +2175,7 @@ wpi_notif_intr(struct wpi_softc *sc) WPI_RXON_LOCK(sc); callout_stop(&sc->scan_timeout); WPI_RXON_UNLOCK(sc); - WPI_UNLOCK(sc); ieee80211_scan_next(vap); - WPI_LOCK(sc); break; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503152129.t2FLTJCB091396>