From owner-svn-src-all@FreeBSD.ORG Sun Mar 15 20:45:44 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 C4B6680E; Sun, 15 Mar 2015 20:45:44 +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 A68C41C9; Sun, 15 Mar 2015 20:45:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKji2N069494; Sun, 15 Mar 2015 20:45:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKjiX7069492; Sun, 15 Mar 2015 20:45:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152045.t2FKjiX7069492@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 20:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280078 - 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 20:45:45 -0000 Author: adrian Date: Sun Mar 15 20:45:43 2015 New Revision: 280078 URL: https://svnweb.freebsd.org/changeset/base/280078 Log: wpi_tx_done() shouldn't wait for wpi_start(). PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:44:52 2015 (r280077) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:45:43 2015 (r280078) @@ -195,6 +195,7 @@ static int wpi_raw_xmit(struct ieee80211 const struct ieee80211_bpf_params *); static void wpi_start(struct ifnet *); static void wpi_start_locked(struct ifnet *); +static void wpi_start_task(void *, int); static void wpi_watchdog_rfkill(void *); static void wpi_watchdog(void *); static int wpi_ioctl(struct ifnet *, u_long, caddr_t); @@ -515,6 +516,7 @@ wpi_attach(device_t dev) TASK_INIT(&sc->sc_reinittask, 0, wpi_hw_reset, sc); TASK_INIT(&sc->sc_radiooff_task, 0, wpi_radio_off, sc); TASK_INIT(&sc->sc_radioon_task, 0, wpi_radio_on, sc); + TASK_INIT(&sc->sc_start_task, 0, wpi_start_task, sc); wpi_sysctlattach(sc); @@ -644,6 +646,7 @@ wpi_detach(device_t dev) ieee80211_draintask(ic, &sc->sc_reinittask); ieee80211_draintask(ic, &sc->sc_radiooff_task); ieee80211_draintask(ic, &sc->sc_radioon_task); + ieee80211_draintask(ic, &sc->sc_start_task); wpi_stop(sc); @@ -1901,6 +1904,7 @@ wpi_tx_done(struct wpi_softc *sc, struct struct mbuf *m; struct ieee80211_node *ni; struct ieee80211vap *vap; + struct ieee80211com *ic; int ackfailcnt = stat->ackfailcnt / 2; /* wpi_mrr_setup() */ int status = le32toh(stat->status); @@ -1919,6 +1923,7 @@ wpi_tx_done(struct wpi_softc *sc, struct m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; vap = ni->ni_vap; + ic = vap->iv_ic; /* * Update rate control statistics for the node. @@ -1943,7 +1948,7 @@ wpi_tx_done(struct wpi_softc *sc, struct if (sc->qfullmsk == 0 && (ifp->if_drv_flags & IFF_DRV_OACTIVE)) { ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - wpi_start_locked(ifp); + ieee80211_runtask(ic, &sc->sc_start_task); } } @@ -2789,6 +2794,15 @@ wpi_start_locked(struct ifnet *ifp) } static void +wpi_start_task(void *arg0, int pending) +{ + struct wpi_softc *sc = arg0; + struct ifnet *ifp = sc->sc_ifp; + + wpi_start(ifp); +} + +static void wpi_watchdog_rfkill(void *arg) { struct wpi_softc *sc = arg; Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:44:52 2015 (r280077) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:45:43 2015 (r280078) @@ -209,6 +209,7 @@ struct wpi_softc { struct task sc_reinittask; struct task sc_radiooff_task; struct task sc_radioon_task; + struct task sc_start_task; /* Eeprom info. */ uint8_t cap;