svn commit: r280078 - head/sys/dev/wpi

Adrian Chadd adrian at FreeBSD.org
Sun Mar 15 20:45:45 UTC 2015


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 <s3erios at gmail.com>

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;


More information about the svn-src-head mailing list