summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-09-18 16:20:21 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-09-18 16:20:21 +0000
commite1c588e2d02b401ea45daad353a9a8aa3a670e36 (patch)
tree624732155d006d7666c3e710d2631b4ebeae6a70 /sys/dev
parent42592bef47dd2f43a20c04421e3b5898a9d74ac0 (diff)
don't use IF_PREPEND() on altq's.
use IFQ_POLL()/IFQ_DEQUEUE() logic instead as described in altq(4).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/rt2560.c6
-rw-r--r--sys/dev/ic/rt2661.c6
-rw-r--r--sys/dev/pci/if_ipw.c7
-rw-r--r--sys/dev/pci/if_iwi.c11
-rw-r--r--sys/dev/pci/if_wpi.c6
-rw-r--r--sys/dev/usb/if_ral.c7
-rw-r--r--sys/dev/usb/if_rum.c7
-rw-r--r--sys/dev/usb/if_uath.c6
-rw-r--r--sys/dev/usb/if_zyd.c7
9 files changed, 29 insertions, 34 deletions
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c
index c66475263dc..dc8627da158 100644
--- a/sys/dev/ic/rt2560.c
+++ b/sys/dev/ic/rt2560.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2560.c,v 1.22 2006/07/18 16:40:30 damien Exp $ */
+/* $OpenBSD: rt2560.c,v 1.23 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -2044,14 +2044,14 @@ rt2560_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->txq.queued >= RT2560_TX_RING_COUNT - 1) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index 11c6981d5ee..70dddcd427b 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.26 2006/08/09 07:46:37 damien Exp $ */
+/* $OpenBSD: rt2661.c,v 1.27 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -1857,15 +1857,15 @@ rt2661_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->txq[0].queued >= RT2661_TX_RING_COUNT - 1) {
/* there is no place left in this ring */
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index b6116cc0dc7..78c76bea317 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.62 2006/08/19 14:57:37 damien Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.63 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -1329,16 +1329,15 @@ ipw_start(struct ifnet *ifp)
return;
for (;;) {
- IF_DEQUEUE(&ifp->if_snd, m);
+ IFQ_POLL(&ifp->if_snd, m);
if (m == NULL)
break;
if (sc->txfree < 1 + IPW_MAX_NSEG) {
- IF_PREPEND(&ifp->if_snd, m);
ifp->if_flags |= IFF_OACTIVE;
break;
}
-
+ IFQ_DEQUEUE(&ifp->if_snd, m);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index f9787fdc6dc..ff20d52d5d5 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.73 2006/08/19 14:57:37 damien Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.74 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -973,7 +973,7 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data,
ic->ic_opmode != IEEE80211_M_MONITOR) {
/*
* Hardware decrypts the frame itself but leaves the WEP bit
- * set in the 802.11 header and don't remove the IV and CRC
+ * set in the 802.11 header and doesn't remove the IV and CRC
* fields.
*/
wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
@@ -1439,16 +1439,15 @@ iwi_start(struct ifnet *ifp)
return;
for (;;) {
- IF_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->txq[0].queued >= IWI_TX_RING_COUNT - 8) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
-
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
@@ -1707,7 +1706,7 @@ iwi_load_firmware(struct iwi_softc *sc, const char *data, int size)
uint32_t sentinel, ctl, src, dst, sum, len, mlen;
int ntries, nsegs, error;
- /* allocate DMA memory for storing firmware image */
+ /* allocate DMA memory to store firmware image */
error = bus_dmamap_create(sc->sc_dmat, size, 1, size, 0,
BUS_DMA_NOWAIT, &map);
if (error != 0) {
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index cb4359551f9..081d411f849 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.31 2006/08/28 19:47:42 damien Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.32 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -1698,15 +1698,15 @@ wpi_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->txq[0].queued >= sc->txq[0].count - 8) {
/* there is no place left in this ring */
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 0d0cc0e5ef9..2cba8840604 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.79 2006/08/24 19:32:21 damien Exp $ */
+/* $OpenBSD: if_ral.c,v 1.80 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -1226,15 +1226,14 @@ ural_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->tx_queued >= RAL_TX_LIST_COUNT) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
-
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index eb224795927..dede128ace7 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.39 2006/08/24 19:32:21 damien Exp $ */
+/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -1190,15 +1190,14 @@ rum_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->tx_queued >= RT2573_TX_LIST_COUNT) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
-
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 086a78a0188..8c3131a7c81 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.5 2006/09/18 01:42:30 jsg Exp $ */
+/* $OpenBSD: if_uath.c,v 1.6 2006/09/18 16:20:20 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -1507,14 +1507,14 @@ uath_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->tx_queued >= UATH_TX_DATA_LIST_COUNT) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
#if NBPFILTER > 0
if (ifp->if_bpf != NULL)
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index c8fb7bbb01d..fd92f627d40 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.25 2006/08/24 13:16:02 jsg Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.26 2006/09/18 16:20:20 damien Exp $ */
/*
* Copyright (c) 2006 by Florian Stoehr <ich@florian-stoehr.de>
@@ -3487,16 +3487,15 @@ zyd_start(struct ifnet *ifp)
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
-
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->tx_queued >= ZYD_TX_LIST_CNT) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
if (m0->m_len < sizeof (struct ether_header) &&
!(m0 = m_pullup(m0, sizeof (struct ether_header))))