Date: Sun, 15 Mar 2015 20:42:41 +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: r280074 - head/sys/dev/wpi Message-ID: <201503152042.t2FKgfg6068799@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun Mar 15 20:42:41 2015 New Revision: 280074 URL: https://svnweb.freebsd.org/changeset/base/280074 Log: Move some code under WPI_LOCK(). 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 20:41:57 2015 (r280073) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:42:41 2015 (r280074) @@ -2408,6 +2408,9 @@ wpi_cmd2(struct wpi_softc *sc, struct wp if (++ring->queued > WPI_TX_RING_HIMARK) sc->qfullmsk |= 1 << ring->qid; + if (ring->qid < WPI_CMD_QUEUE_NUM) + sc->sc_tx_timer = 5; + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); WPI_TXQ_UNLOCK(sc); @@ -2722,8 +2725,6 @@ wpi_raw_xmit(struct ieee80211_node *ni, return error; } - sc->sc_tx_timer = 5; - DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); return 0; @@ -2771,8 +2772,7 @@ wpi_start_locked(struct ifnet *ifp) ieee80211_free_node(ni); WPI_LOCK(sc); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - } else - sc->sc_tx_timer = 5; + } } DPRINTF(sc, WPI_DEBUG_XMIT, "%s: done\n", __func__); @@ -3195,9 +3195,9 @@ wpi_update_promisc(struct ifnet *ifp) { struct wpi_softc *sc = ifp->if_softc; + WPI_LOCK(sc); wpi_set_promisc(sc); - WPI_LOCK(sc); if (wpi_send_rxon(sc, 1, 1) != 0) { device_printf(sc->sc_dev, "%s: could not send RXON\n", __func__);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503152042.t2FKgfg6068799>