diff options
author | ru <ru@FreeBSD.org> | 2005-11-11 16:04:59 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-11-11 16:04:59 +0000 |
commit | f70f525b491a7d4a0a4f60eb7d69095f6f6e12e4 (patch) | |
tree | c961eb29eda0888de8f7fedb7d3eb12e58d687d3 /sys/dev/de | |
parent | f82904627463e2f13912d433c5855e8bc112a3f3 (diff) | |
download | FreeBSD-src-f70f525b491a7d4a0a4f60eb7d69095f6f6e12e4.zip FreeBSD-src-f70f525b491a7d4a0a4f60eb7d69095f6f6e12e4.tar.gz |
- Store pointer to the link-level address right in "struct ifnet"
rather than in ifindex_table[]; all (except one) accesses are
through ifp anyway. IF_LLADDR() works faster, and all (except
one) ifaddr_byindex() users were converted to use ifp->if_addr.
- Stop storing a (pointer to) Ethernet address in "struct arpcom",
and drop the IFP2ENADDR() macro; all users have been converted
to use IF_LLADDR() instead.
Diffstat (limited to 'sys/dev/de')
-rw-r--r-- | sys/dev/de/if_de.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 46ec2da..7f1752c 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -260,8 +260,8 @@ tulip_txprobe(tulip_softc_t * const sc) /* * Construct a LLC TEST message which will point to ourselves. */ - bcopy(IFP2ENADDR(sc->tulip_ifp), mtod(m, struct ether_header *)->ether_dhost, 6); - bcopy(IFP2ENADDR(sc->tulip_ifp), mtod(m, struct ether_header *)->ether_shost, 6); + bcopy(IF_LLADDR(sc->tulip_ifp), mtod(m, struct ether_header *)->ether_dhost, 6); + bcopy(IF_LLADDR(sc->tulip_ifp), mtod(m, struct ether_header *)->ether_shost, 6); mtod(m, struct ether_header *)->ether_type = htons(3); mtod(m, unsigned char *)[14] = 0; mtod(m, unsigned char *)[15] = 0; @@ -3081,12 +3081,12 @@ tulip_addr_filter(tulip_softc_t * const sc) hash = tulip_mchash(ifp->if_broadcastaddr); sp[hash >> 4] |= htole32(1 << (hash & 0xF)); if (sc->tulip_flags & TULIP_WANTHASHONLY) { - hash = tulip_mchash(IFP2ENADDR(ifp)); + hash = tulip_mchash(IF_LLADDR(ifp)); sp[hash >> 4] |= htole32(1 << (hash & 0xF)); } else { - sp[39] = TULIP_SP_MAC(((u_int16_t *)IFP2ENADDR(ifp))[0]); - sp[40] = TULIP_SP_MAC(((u_int16_t *)IFP2ENADDR(ifp))[1]); - sp[41] = TULIP_SP_MAC(((u_int16_t *)IFP2ENADDR(ifp))[2]); + sp[39] = TULIP_SP_MAC(((u_int16_t *)IF_LLADDR(ifp))[0]); + sp[40] = TULIP_SP_MAC(((u_int16_t *)IF_LLADDR(ifp))[1]); + sp[41] = TULIP_SP_MAC(((u_int16_t *)IF_LLADDR(ifp))[2]); } } } @@ -3118,9 +3118,9 @@ tulip_addr_filter(tulip_softc_t * const sc) * Pad the rest with our hardware address */ for (; idx < 16; idx++) { - *sp++ = TULIP_SP_MAC(((u_int16_t *)IFP2ENADDR(ifp))[0]); - *sp++ = TULIP_SP_MAC(((u_int16_t *)IFP2ENADDR(ifp))[1]); - *sp++ = TULIP_SP_MAC(((u_int16_t *)IFP2ENADDR(ifp))[2]); + *sp++ = TULIP_SP_MAC(((u_int16_t *)IF_LLADDR(ifp))[0]); + *sp++ = TULIP_SP_MAC(((u_int16_t *)IF_LLADDR(ifp))[1]); + *sp++ = TULIP_SP_MAC(((u_int16_t *)IF_LLADDR(ifp))[2]); } } IF_ADDR_UNLOCK(ifp); |