From owner-svn-src-all@FreeBSD.ORG Sun Mar 15 21:29:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FA046CF; Sun, 15 Mar 2015 21:29:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68AFB9F1; Sun, 15 Mar 2015 21:29:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FLTJS2091397; Sun, 15 Mar 2015 21:29:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FLTJCB091396; Sun, 15 Mar 2015 21:29:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152129.t2FLTJCB091396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 21:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280116 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2015 21:29:20 -0000 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 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; } }