Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2008 03:40:55 GMT
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 133215 for review
Message-ID:  <200801140340.m0E3et9r008383@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133215

Change 133215 by sephe@sephe_zealot:sam_wifi on 2008/01/14 03:40:20

	- Don't reset watchdog timer, if there are TX descs pending
	- IFF_DRV_OACTIVE is in ifnet.if_drv_flags
	- In rt2661_init(), protect if_drv_flags adjustment by RAL_LOCK

Affected files ...

.. //depot/projects/wifi/sys/dev/ral/rt2661.c#21 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ral/rt2661.c#21 (text) ====

@@ -1022,11 +1022,13 @@
 
 	bus_dmamap_sync(txq->desc_dmat, txq->desc_map, BUS_DMASYNC_PREWRITE);
 
+	if (txq->queued == 0)
+		sc->sc_tx_timer = 0;
+
 	if (txq->queued < txq->count) {
 		struct ifnet *ifp = sc->sc_ic.ic_ifp;
 
-		sc->sc_tx_timer = 0;
-		ifp->if_flags &= ~IFF_DRV_OACTIVE;
+		ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 		rt2661_start(ifp);
 	}
 }
@@ -2647,11 +2649,12 @@
 
 	/* kick Rx */
 	RAL_WRITE(sc, RT2661_RX_CNTL_CSR, 1);
-	RAL_UNLOCK(sc);
 
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 
+	RAL_UNLOCK(sc);
+
 	if (ic->ic_opmode != IEEE80211_M_MONITOR) {
 		if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)
 			ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
@@ -2668,8 +2671,8 @@
 	struct rt2661_softc *sc = priv;
 
 	RAL_LOCK(sc);
+	callout_stop(&sc->watchdog_ch);
 	rt2661_stop_locked(sc);
-	callout_stop(&sc->watchdog_ch);
 	RAL_UNLOCK(sc);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801140340.m0E3et9r008383>