summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-11-08 12:27:58 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-11-08 12:27:58 +0000
commit7b3a9f02e74287ece0a22b140146ed8e4ace729d (patch)
tree216985571b7d38c8cdf8b8c6ed315e8032626cc4
parent09cbf9d3a9c1d6e9a0bfa2da484d1cdd09a8cbc3 (diff)
do not call if_start() from tx_done() unless there is a reason to do so
(IFF_OACTIVE was set.)
-rw-r--r--sys/dev/pci/if_iwn.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index a89942f1629..11cea153158 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.28 2008/11/08 11:05:36 damien Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.29 2008/11/08 12:27:57 damien Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -1860,11 +1860,12 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int retrycnt,
data->ni = NULL;
sc->sc_tx_timer = 0;
- if (--ring->queued < IWN_TX_RING_LOMARK)
+ if (--ring->queued < IWN_TX_RING_LOMARK) {
sc->qfullmsk &= ~(1 << ring->qid);
- if (sc->qfullmsk == 0) {
- ifp->if_flags &= ~IFF_OACTIVE;
- (*ifp->if_start)(ifp);
+ if (sc->qfullmsk == 0 && (ifp->if_flags & IFF_OACTIVE)) {
+ ifp->if_flags &= ~IFF_OACTIVE;
+ (*ifp->if_start)(ifp);
+ }
}
}