summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index f900706f966..8676731af77 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.333 2017/01/22 10:17:38 dlg Exp $ */
+/* $OpenBSD: if_em.c,v 1.334 2017/01/24 03:57:35 dlg Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -206,7 +206,7 @@ void em_defer_attach(struct device*);
int em_detach(struct device *, int);
int em_activate(struct device *, int);
int em_intr(void *);
-void em_start(struct ifnet *);
+void em_start(struct ifqueue *);
int em_ioctl(struct ifnet *, u_long, caddr_t);
void em_watchdog(struct ifnet *);
void em_init(void *);
@@ -583,15 +583,16 @@ err_pci:
**********************************************************************/
void
-em_start(struct ifnet *ifp)
+em_start(struct ifqueue *ifq)
{
+ struct ifnet *ifp = ifq->ifq_if;
struct em_softc *sc = ifp->if_softc;
u_int head, free, used;
struct mbuf *m;
int post = 0;
if (!sc->link_active) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(ifq);
return;
}
@@ -611,11 +612,11 @@ em_start(struct ifnet *ifp)
for (;;) {
/* use 2 because cksum setup can use an extra slot */
if (EM_MAX_SCATTER + 2 > free) {
- ifq_set_oactive(&ifp->if_snd);
+ ifq_set_oactive(ifq);
break;
}
- m = ifq_dequeue(&ifp->if_snd);
+ m = ifq_dequeue(ifq);
if (m == NULL)
break;
@@ -1870,7 +1871,7 @@ em_setup_interface(struct em_softc *sc)
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_xflags = IFXF_MPSAFE;
ifp->if_ioctl = em_ioctl;
- ifp->if_start = em_start;
+ ifp->if_qstart = em_start;
ifp->if_watchdog = em_watchdog;
ifp->if_hardmtu =
sc->hw.max_frame_size - ETHER_HDR_LEN - ETHER_CRC_LEN;