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/gem | |
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/gem')
-rw-r--r-- | sys/dev/gem/if_gem.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index c702ed6..3ed01dc 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -299,7 +299,7 @@ gem_attach(sc) bus_space_write_4(sc->sc_bustag, sc->sc_h, GEM_MIF_CONFIG, sc->sc_mif_config); /* Attach the interface. */ - ether_ifattach(ifp, ETHER_BPF_SUPPORTED); + ether_ifattach(ifp, sc->sc_arpcom.ac_enaddr); #if notyet /* @@ -1546,13 +1546,11 @@ gem_rint(sc) } m->m_data += 2; /* We're already off by two */ - eh = mtod(m, struct ether_header *); m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = len - ETHER_CRC_LEN; - m_adj(m, sizeof(struct ether_header)); /* Pass it on. */ - ether_input(ifp, eh, m); + (*ifp->if_input)(ifp, m); } if (progress) { @@ -1952,7 +1950,7 @@ gem_ioctl(ifp, cmd, data) error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii->mii_media, cmd); break; default: - error = ENOTTY; + error = ENOTTY; /* XXX EINVAL??? */ break; } |