PERFORCE change 133215 for review
Sepherosa Ziehau
sephe at FreeBSD.org
Sun Jan 13 19:40:56 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=133215
Change 133215 by sephe at 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);
}
More information about the p4-projects
mailing list