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/vx/if_vx.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/vx/if_vx.c')
-rw-r--r-- | sys/dev/vx/if_vx.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index 2062cda..143a821 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -164,7 +164,7 @@ vxattach(sc) ifp->if_watchdog = vxwatchdog; ifp->if_softc = sc; - ether_ifattach(ifp, ETHER_BPF_SUPPORTED); + ether_ifattach(ifp, sc->arpcom.ac_enaddr); sc->tx_start_thresh = 20; /* probably a good starting point. */ @@ -441,9 +441,7 @@ startagain: CSR_WRITE_2(sc, VX_COMMAND, SET_TX_START_THRESH | ((len / 4 + sc->tx_start_thresh) >> 2)); - if (sc->arpcom.ac_if.if_bpf) { - bpf_mtap(&sc->arpcom.ac_if, m); - } + BPF_MTAP(&sc->arpcom.ac_if, m); /* * Do the output at splhigh() so that an interrupt from another device @@ -714,8 +712,7 @@ again: return; } - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + (*ifp->if_input)(ifp, m); /* * In periods of high traffic we can actually receive enough @@ -855,11 +852,6 @@ vxioctl(ifp, cmd, data) s = splimp(); switch (cmd) { - case SIOCSIFADDR: - case SIOCGIFADDR: - ether_ioctl(ifp, cmd, data); - break; - case SIOCSIFFLAGS: if ((ifp->if_flags & IFF_UP) == 0 && (ifp->if_flags & IFF_RUNNING) != 0) { @@ -910,7 +902,8 @@ vxioctl(ifp, cmd, data) default: - error = EINVAL; + error = ether_ioctl(ifp, cmd, data); + break; } splx(s); |