Module Name: src
Committed By: msaitoh
Date: Fri Jun 22 04:41:57 UTC 2018
Modified Files:
src/sys/arch/emips/ebus: if_le_ebus.c
src/sys/arch/playstation2/dev: if_smap.c
src/sys/dev/ic: dm9000.c
Log Message:
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/emips/ebus/if_le_ebus.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/playstation2/dev/if_smap.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/dm9000.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/emips/ebus/if_le_ebus.c
diff -u src/sys/arch/emips/ebus/if_le_ebus.c:1.14 src/sys/arch/emips/ebus/if_le_ebus.c:1.15
--- src/sys/arch/emips/ebus/if_le_ebus.c:1.14 Fri Jun 22 04:17:40 2018
+++ src/sys/arch/emips/ebus/if_le_ebus.c Fri Jun 22 04:41:57 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_ebus.c,v 1.14 2018/06/22 04:17:40 msaitoh Exp $ */
+/* $NetBSD: if_le_ebus.c,v 1.15 2018/06/22 04:41:57 msaitoh Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.14 2018/06/22 04:17:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.15 2018/06/22 04:41:57 msaitoh Exp $");
#include "opt_inet.h"
@@ -873,8 +873,7 @@ enic_start(struct ifnet *ifp)
* If BPF is listening on this interface, let it see the packet
* before we commit it to the wire.
*/
- if (ifp->if_bpf)
- bpf_mtap(ifp, m);
+ bpf_mtap(ifp, m);
/*
* Copy the mbuf chain into a contiguous transmit buffer.
Index: src/sys/arch/playstation2/dev/if_smap.c
diff -u src/sys/arch/playstation2/dev/if_smap.c:1.25 src/sys/arch/playstation2/dev/if_smap.c:1.26
--- src/sys/arch/playstation2/dev/if_smap.c:1.25 Fri Jun 22 04:17:41 2018
+++ src/sys/arch/playstation2/dev/if_smap.c Fri Jun 22 04:41:57 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smap.c,v 1.25 2018/06/22 04:17:41 msaitoh Exp $ */
+/* $NetBSD: if_smap.c,v 1.26 2018/06/22 04:41:57 msaitoh Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.25 2018/06/22 04:17:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smap.c,v 1.26 2018/06/22 04:41:57 msaitoh Exp $");
#include "debug_playstation2.h"
@@ -497,8 +497,7 @@ smap_start(struct ifnet *ifp)
IFQ_DEQUEUE(&ifp->if_snd, m0);
KDASSERT(m0 != NULL);
- if (ifp->if_bpf)
- bpf_mtap(ifp, m0);
+ bpf_mtap(ifp, m0);
p = (u_int8_t *)sc->tx_buf;
q = p + sz;
Index: src/sys/dev/ic/dm9000.c
diff -u src/sys/dev/ic/dm9000.c:1.13 src/sys/dev/ic/dm9000.c:1.14
--- src/sys/dev/ic/dm9000.c:1.13 Fri Jun 22 04:17:42 2018
+++ src/sys/dev/ic/dm9000.c Fri Jun 22 04:41:57 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: dm9000.c,v 1.13 2018/06/22 04:17:42 msaitoh Exp $ */
+/* $NetBSD: dm9000.c,v 1.14 2018/06/22 04:41:57 msaitoh Exp $ */
/*
* Copyright (c) 2009 Paul Fleischer
@@ -650,8 +650,7 @@ dme_prepare(struct dme_softc *sc, struct
/* Element has now been removed from the queue, so we better send it */
- if (ifp->if_bpf)
- bpf_mtap(ifp, bufChain);
+ bpf_mtap(ifp, bufChain);
/* Setup the DM9000 to accept the writes, and then write each buf in
the chain. */