diff options
author | sam <sam@FreeBSD.org> | 2002-11-14 23:54:55 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2002-11-14 23:54:55 +0000 |
commit | 14c32b5f40c5ee3bd5649c3737f359f7e65e6944 (patch) | |
tree | 84eb7252cc6a518796c6bf88903ed6e2d12e7b91 /sys/dev/ex/if_ex.c | |
parent | 10eb947d277840d02ef35d6c6303b64329d53806 (diff) | |
download | FreeBSD-src-14c32b5f40c5ee3bd5649c3737f359f7e65e6944.zip FreeBSD-src-14c32b5f40c5ee3bd5649c3737f359f7e65e6944.tar.gz |
network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets
up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls
Reviewed by: many
Approved by: re
Diffstat (limited to 'sys/dev/ex/if_ex.c')
-rw-r--r-- | sys/dev/ex/if_ex.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/ex/if_ex.c b/sys/dev/ex/if_ex.c index f457a40..f7458af 100644 --- a/sys/dev/ex/if_ex.c +++ b/sys/dev/ex/if_ex.c @@ -262,7 +262,7 @@ ex_attach(device_t dev) /* * Attach the interface. */ - ether_ifattach(ifp, ETHER_BPF_SUPPORTED); + ether_ifattach(ifp, sc->arpcom.ac_enaddr); device_printf(sc->dev, "Ethernet address %6D\n", sc->arpcom.ac_enaddr, ":"); @@ -523,9 +523,7 @@ ex_start(struct ifnet *ifp) sc->tx_last = dest; sc->tx_tail = next; - if (ifp->if_bpf != NULL) { - bpf_mtap(ifp, opkt); - } + BPF_MTAP(ifp, opkt); ifp->if_timer = 2; ifp->if_opackets++; @@ -752,8 +750,7 @@ ex_rx_intr(struct ex_softc *sc) } /* QQQ */ } #endif - m_adj(ipkt, sizeof(struct ether_header)); - ether_input(ifp, eh, ipkt); + (*ifp->if_input)(ifp, ipkt); ifp->if_ipackets++; } } else { |