diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-10 13:26:43 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-07-10 13:26:43 +0000 |
commit | 7c591251f4b453772c5304abafc8b31add427963 (patch) | |
tree | c3c81adfd569e3d58b2cd875be6a5bd88d1b8bfb /sys/dev/ic | |
parent | 75620858502cb86710140bab76d93d2cfc2277d4 (diff) |
Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.
ok dlg@ tobhe@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/acx.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/aic6915.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/an.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/bcmgenet.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/bwfm.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/bwi.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/dc.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/elink3.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/fxp.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/gem.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/if_wi.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/malo.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/mtd8xx.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/pgt.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/re.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/smc83c170.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/ti.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/xl.c | 8 |
20 files changed, 50 insertions, 50 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 806d8c184a8..b26fce44c8f 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.123 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: acx.c,v 1.124 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -284,7 +284,7 @@ acx_attach(struct acx_softc *sc) ifp->if_watchdog = acx_watchdog; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* Set channels */ for (i = 1; i <= 14; ++i) { diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 78239f2804c..6ace32dbff3 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6915.c,v 1.22 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: aic6915.c,v 1.23 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */ /*- @@ -289,7 +289,7 @@ sf_attach(struct sf_softc *sc) ifp->if_ioctl = sf_ioctl; ifp->if_start = sf_start; ifp->if_watchdog = sf_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, SF_NTXDESC_MASK); + ifq_set_maxlen(&ifp->if_snd, SF_NTXDESC_MASK); /* * Attach the interface. diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index 421e5749ae5..e92aa27a7f0 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $OpenBSD: an.c,v 1.75 2019/11/07 12:56:34 bluhm Exp $ */ +/* $OpenBSD: an.c,v 1.76 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -562,7 +562,7 @@ an_intr(void *arg) if (ifq_is_oactive(&ifp->if_snd) == 0 && sc->sc_ic.ic_state == IEEE80211_S_RUN && - !IFQ_IS_EMPTY(&ifp->if_snd)) + !ifq_empty(&ifp->if_snd)) an_start(ifp); } diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 53f8f22e330..bac05281930 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.120 2020/07/10 13:23:34 patrick Exp $ */ +/* $OpenBSD: ath.c,v 1.121 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -355,7 +355,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) #ifndef __OpenBSD__ ifp->if_stop = ath_stop; /* XXX */ #endif - IFQ_SET_MAXLEN(&ifp->if_snd, ATH_TXBUF * ATH_TXDESC); + ifq_set_maxlen(&ifp->if_snd, ATH_TXBUF * ATH_TXDESC); ic->ic_softc = sc; ic->ic_newassoc = ath_newassoc; diff --git a/sys/dev/ic/bcmgenet.c b/sys/dev/ic/bcmgenet.c index 3da74eaf968..c9b21f7768b 100644 --- a/sys/dev/ic/bcmgenet.c +++ b/sys/dev/ic/bcmgenet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcmgenet.c,v 1.2 2020/06/22 02:27:04 dlg Exp $ */ +/* $OpenBSD: bcmgenet.c,v 1.3 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: bcmgenet.c,v 1.3 2020/02/27 17:30:07 jmcneill Exp $ */ /*- @@ -975,7 +975,7 @@ genet_attach(struct genet_softc *sc) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_start = genet_start; ifp->if_ioctl = genet_ioctl; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* 802.1Q VLAN-sized frames are supported */ ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c index 15f1bbfb510..8942bc3b479 100644 --- a/sys/dev/ic/bwfm.c +++ b/sys/dev/ic/bwfm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwfm.c,v 1.72 2020/06/19 20:56:23 kettenis Exp $ */ +/* $OpenBSD: bwfm.c,v 1.73 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -352,7 +352,7 @@ bwfm_start(struct ifnet *ifp) return; if (ifq_is_oactive(&ifp->if_snd)) return; - if (IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifq_empty(&ifp->if_snd)) return; /* TODO: return if no link? */ diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 73caf29a7f3..91948caf03b 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.129 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: bwi.c,v 1.130 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -789,7 +789,7 @@ bwi_attach(struct bwi_softc *sc) ifp->if_watchdog = bwi_watchdog; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* Get locale */ sc->sc_locale = __SHIFTOUT(bwi_read_sprom(sc, BWI_SPROM_CARD_INFO), diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 9903977378e..7162fd885c9 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.153 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: dc.c,v 1.154 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1698,7 +1698,7 @@ hasmac: ifp->if_ioctl = dc_ioctl; ifp->if_start = dc_start; ifp->if_watchdog = dc_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, DC_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, DC_TX_LIST_CNT - 1); bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -2358,7 +2358,7 @@ dc_tick(void *xsc) if (!sc->dc_link && mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { sc->dc_link++; - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) dc_start(ifp); } @@ -2488,7 +2488,7 @@ dc_intr(void *arg) /* Re-enable interrupts. */ CSR_WRITE_4(sc, DC_IMR, DC_INTRS); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) dc_start(ifp); return (claimed); @@ -2959,7 +2959,7 @@ dc_watchdog(struct ifnet *ifp) dc_init(sc); - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + if (ifq_empty(&ifp->if_snd) == 0) dc_start(ifp); } diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 5b722b758c5..5cab63c21c7 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.96 2018/11/09 14:14:31 claudio Exp $ */ +/* $OpenBSD: elink3.c,v 1.97 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -334,7 +334,7 @@ epconfig(struct ep_softc *sc, u_short chipset, u_int8_t *enaddr) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; /* 64 packets are around 100ms on 10Mbps */ - IFQ_SET_MAXLEN(&ifp->if_snd, 64); + ifq_set_maxlen(&ifp->if_snd, 64); if_attach(ifp); ether_ifattach(ifp); diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 9041fbb8af8..349b17f7168 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.131 2017/01/22 10:17:38 dlg Exp $ */ +/* $OpenBSD: fxp.c,v 1.132 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -429,7 +429,7 @@ fxp_attach(struct fxp_softc *sc, const char *intrstr) ifp->if_ioctl = fxp_ioctl; ifp->if_start = fxp_start; ifp->if_watchdog = fxp_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, FXP_NTXCB - 1); + ifq_set_maxlen(&ifp->if_snd, FXP_NTXCB - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -835,7 +835,7 @@ fxp_intr(void *arg) ifp->if_timer = sc->sc_cbt_cnt ? 5 : 0; sc->sc_cbt_cons = txs; - if (!IFQ_IS_EMPTY(&ifp->if_snd)) { + if (!ifq_empty(&ifp->if_snd)) { /* * Try to start more packets transmitting. */ diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index fc1480d14fe..0cd66dbfd63 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gem.c,v 1.124 2020/06/22 02:27:04 dlg Exp $ */ +/* $OpenBSD: gem.c,v 1.125 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */ /* @@ -222,7 +222,7 @@ gem_config(struct gem_softc *sc) ifp->if_qstart = gem_start; ifp->if_ioctl = gem_ioctl; ifp->if_watchdog = gem_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, GEM_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, GEM_NTXDESC - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index 6ab438eda0a..6895e28c175 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.173 2020/07/10 13:22:19 patrick Exp $ */ +/* $OpenBSD: if_wi.c,v 1.174 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -512,7 +512,7 @@ wi_intr(void *vsc) if (status == 0) return (0); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) wi_start(ifp); return (1); diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index 6f52d451aeb..76e7ae20574 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.120 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: malo.c,v 1.121 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -347,7 +347,7 @@ malo_attach(struct malo_softc *sc) ifp->if_watchdog = malo_watchdog; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* set supported rates */ ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b; diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c index f5639ff1960..1392815ab4c 100644 --- a/sys/dev/ic/mtd8xx.c +++ b/sys/dev/ic/mtd8xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xx.c,v 1.32 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: mtd8xx.c,v 1.33 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -798,7 +798,7 @@ mtd_watchdog(struct ifnet *ifp) mtd_init(ifp); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mtd_start(ifp); } @@ -851,7 +851,7 @@ mtd_intr(void *xsc) /* Re-enable interrupts. */ CSR_WRITE_4(MTD_IMR, IMR_INTRS); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) mtd_start(ifp); return (claimed); diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index 40d8cfe1aea..6847e5c3be9 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.98 2020/02/20 15:32:17 cheloha Exp $ */ +/* $OpenBSD: pgt.c,v 1.99 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -1239,7 +1239,7 @@ pgt_intr(void *arg) pgt_read_4(sc, PGT_REG_CTRL_STAT))); } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) pgt_start(ifp); return (1); @@ -1878,7 +1878,7 @@ pgt_net_attach(struct pgt_softc *sc) ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifq_set_maxlen(&ifp->if_snd, IFQ_MAXLEN); /* * Set channels @@ -2116,7 +2116,7 @@ pgt_start(struct ifnet *ifp) * net80211 management queue. */ for (; sc->sc_dirtyq_count[PGT_QUEUE_DATA_LOW_TX] < - PGT_QUEUE_FULL_THRESHOLD && !IFQ_IS_EMPTY(&ifp->if_snd);) { + PGT_QUEUE_FULL_THRESHOLD && !ifq_empty(&ifp->if_snd);) { pd = TAILQ_FIRST(&sc->sc_freeq[PGT_QUEUE_DATA_LOW_TX]); m = ifq_deq_begin(&ifp->if_snd); if (m == NULL) diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index ce00fbc20da..9a0ad251d86 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.205 2020/06/22 02:27:04 dlg Exp $ */ +/* $OpenBSD: re.c,v 1.206 2020/07/10 13:26:37 patrick Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1008,7 +1008,7 @@ re_attach(struct rl_softc *sc, const char *intrstr) ifp->if_qstart = re_start; ifp->if_watchdog = re_watchdog; ifp->if_hardmtu = sc->rl_max_mtu; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->rl_ldata.rl_tx_desc_cnt); + ifq_set_maxlen(&ifp->if_snd, sc->rl_ldata.rl_tx_desc_cnt); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4; diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 1726d68f218..fa642d3617b 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.97 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.98 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998 @@ -774,7 +774,7 @@ rl_intr(void *arg) /* Re-enable interrupts. */ CSR_WRITE_2(sc, RL_IMR, RL_INTRS); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) rl_start(ifp); return (claimed); diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index 8811dd95783..517e4ab5a7d 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smc83c170.c,v 1.28 2018/07/03 14:33:43 kevlo Exp $ */ +/* $OpenBSD: smc83c170.c,v 1.29 2020/07/10 13:26:37 patrick Exp $ */ /* $NetBSD: smc83c170.c,v 1.59 2005/02/27 00:27:02 perry Exp $ */ /*- @@ -278,7 +278,7 @@ epic_attach(struct epic_softc *sc, const char *intrstr) ifp->if_ioctl = epic_ioctl; ifp->if_start = epic_start; ifp->if_watchdog = epic_watchdog; - IFQ_SET_MAXLEN(&ifp->if_snd, EPIC_NTXDESC - 1); + ifq_set_maxlen(&ifp->if_snd, EPIC_NTXDESC - 1); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c index 43653ca6631..da779ef51ce 100644 --- a/sys/dev/ic/ti.c +++ b/sys/dev/ic/ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ti.c,v 1.26 2019/09/25 09:30:28 kevlo Exp $ */ +/* $OpenBSD: ti.c,v 1.27 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1443,7 +1443,7 @@ ti_attach(struct ti_softc *sc) ifp->if_start = ti_start; ifp->if_watchdog = ti_watchdog; ifp->if_hardmtu = TI_JUMBO_FRAMELEN - ETHER_HDR_LEN; - IFQ_SET_MAXLEN(&ifp->if_snd, TI_TX_RING_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, TI_TX_RING_CNT - 1); bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; @@ -1737,7 +1737,7 @@ ti_intr(void *xsc) /* Re-enable interrupts. */ CSR_WRITE_4(sc, TI_MB_HOSTINTR, 0); - if (ifp->if_flags & IFF_RUNNING && !IFQ_IS_EMPTY(&ifp->if_snd)) + if (ifp->if_flags & IFF_RUNNING && !ifq_empty(&ifp->if_snd)) ti_start(ifp); return (1); diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index e4c3dd23daf..463d1a0297f 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.134 2020/07/10 13:22:20 patrick Exp $ */ +/* $OpenBSD: xl.c,v 1.135 2020/07/10 13:26:37 patrick Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1467,7 +1467,7 @@ xl_intr(void *arg) } } - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) (*ifp->if_start)(ifp); return (claimed); @@ -2234,7 +2234,7 @@ xl_watchdog(struct ifnet *ifp) xl_rxeof(sc); xl_init(sc); - if (!IFQ_IS_EMPTY(&ifp->if_snd)) + if (!ifq_empty(&ifp->if_snd)) (*ifp->if_start)(ifp); } @@ -2462,7 +2462,7 @@ xl_attach(struct xl_softc *sc) ifp->if_start = xl_start; ifp->if_watchdog = xl_watchdog; ifp->if_baudrate = 10000000; - IFQ_SET_MAXLEN(&ifp->if_snd, XL_TX_LIST_CNT - 1); + ifq_set_maxlen(&ifp->if_snd, XL_TX_LIST_CNT - 1); memcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ); ifp->if_capabilities = IFCAP_VLAN_MTU; |