summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sis.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-09-23 03:32:57 +0000
committerwpaul <wpaul@FreeBSD.org>1999-09-23 03:32:57 +0000
commit165d81879ead70b028b140d76d9143aefee5ce16 (patch)
tree6bbbef5ef1ef94b97c53f10e98f93f50d12e1be5 /sys/pci/if_sis.c
parent9e89242d36c564123e515222eb0c9174c38c469c (diff)
downloadFreeBSD-src-165d81879ead70b028b140d76d9143aefee5ce16.zip
FreeBSD-src-165d81879ead70b028b140d76d9143aefee5ce16.tar.gz
As suggested by phk, unconditionalize BPF support in these drivers. Since
there are stubs compiled into the kernel if BPF support is not enabled, there aren't any problems with unresolved symbols. The modules in /modules are compiled with BPF support enabled anyway, so the most this will do is bloat GENERIC a little.
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r--sys/pci/if_sis.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index fe3f50c..fbe57ed 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -54,8 +54,6 @@
* longword aligned.
*/
-#include "bpf.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sockio.h>
@@ -70,9 +68,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
@@ -705,9 +701,7 @@ static int sis_attach(dev)
ether_ifattach(ifp);
callout_handle_init(&sc->sis_stat_ch);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
fail:
splx(s);
@@ -911,7 +905,7 @@ static void sis_rxeof(sc)
ifp->if_ipackets++;
eh = mtod(m, struct ether_header *);
-#if NBPF > 0
+
/*
* Handle BPF listeners. Let the BPF user see the packet, but
* don't pass it up to the ether_input() layer unless it's
@@ -927,7 +921,7 @@ static void sis_rxeof(sc)
continue;
}
}
-#endif
+
/* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
ether_input(ifp, eh, m);
@@ -1164,14 +1158,13 @@ static void sis_start(ifp)
break;
}
-#if NBPF > 0
/*
* If there's a BPF listener, bounce a copy of this frame
* to him.
*/
if (ifp->if_bpf)
bpf_mtap(ifp, m_head);
-#endif
+
}
/* Transmit */
OpenPOWER on IntegriCloud