diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-07 20:42:57 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2011-07-07 20:42:57 +0000 |
commit | 6dcc67f5a65c901e09cc8c82acd1da6ed4a6ac3a (patch) | |
tree | 707e484e41f3f079840cca13c3499583af1858ce /sys/dev | |
parent | c2c49577053bdab156761ac49dc3b55fc92381ba (diff) |
use IF_LEN/IFQ_LEN to access and ifqueue's length field. ryan ok
with this nothing in the tree fiddles if ifqueue internals any more, of
course except if.c and if.h (and some altq)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/dc.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_de.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_lmc.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index ffb4b9db446..23030834bde 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.123 2011/06/21 16:52:45 tedu Exp $ */ +/* $OpenBSD: dc.c,v 1.124 2011/07/07 20:42:56 henning Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2668,7 +2668,7 @@ dc_start(struct ifnet *ifp) sc = ifp->if_softc; - if (!sc->dc_link && ifp->if_snd.ifq_len < 10) + if (!sc->dc_link && IFQ_LEN(&ifp->if_snd) < 10) return; if (ifp->if_flags & IFF_OACTIVE) diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index fa2f274d47d..e2ce3371cd8 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.108 2011/07/06 02:42:27 henning Exp $ */ +/* $OpenBSD: if_de.c,v 1.109 2011/07/07 20:42:56 henning Exp $ */ /* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */ /*- @@ -3205,7 +3205,7 @@ tulip_rx_intr(tulip_softc_t * const sc) bus_dmamap_t map; int error; - if (fillok && sc->tulip_rxq.ifq_len < TULIP_RXQ_TARGET) + if (fillok && IF_LEN(&sc->tulip_rxq) < TULIP_RXQ_TARGET) goto queue_mbuf; #if defined(TULIP_DEBUG) @@ -3458,7 +3458,7 @@ tulip_rx_intr(tulip_softc_t * const sc) IF_ENQUEUE(&sc->tulip_rxq, ms); } while ((ms = me) != NULL); - if (sc->tulip_rxq.ifq_len >= TULIP_RXQ_TARGET) + if (IF_LEN(&sc->tulip_rxq) >= TULIP_RXQ_TARGET) sc->tulip_flags &= ~TULIP_RXBUFSLOW; TULIP_PERFEND(rxget); } diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c index a60df284061..5f1b3a5b3ed 100644 --- a/sys/dev/pci/if_lmc.c +++ b/sys/dev/pci/if_lmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lmc.c,v 1.24 2010/01/04 18:34:19 chl Exp $ */ +/* $OpenBSD: if_lmc.c,v 1.25 2011/07/07 20:42:56 henning Exp $ */ /* $NetBSD: if_lmc.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */ /*- @@ -507,7 +507,7 @@ lmc_rx_intr(lmc_softc_t * const sc) bus_dmamap_t map; int error; - if (fillok && sc->lmc_rxq.ifq_len < LMC_RXQ_TARGET) + if (fillok && IF_LEN(&sc->lmc_rxq) < LMC_RXQ_TARGET) goto queue_mbuf; /* @@ -737,7 +737,7 @@ lmc_rx_intr(lmc_softc_t * const sc) IF_ENQUEUE(&sc->lmc_rxq, ms); } while ((ms = me) != NULL); - if (sc->lmc_rxq.ifq_len >= LMC_RXQ_TARGET) + if (IF_LEN(&sc->lmc_rxq) >= LMC_RXQ_TARGET) sc->lmc_flags &= ~LMC_RXBUFSLOW; } } |