diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 07:58:06 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 17:46:14 -0500 |
commit | cb487f5664b1bf7d907f5d23fe10cc14dc1bd45a (patch) | |
tree | 6ccb6584841af8f1974910d5123805e1d74f4d3b /arch/powerpc/cpu | |
parent | c5c59df04d6bb394209936c2a2c2a3054ead9150 (diff) |
net: cosmetic: Un-typedef Ethernet_t
Separate the Ethernet header from the 802 header.
Base the size constants on the structs.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'arch/powerpc/cpu')
-rw-r--r-- | arch/powerpc/cpu/mpc8260/ether_fcc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index eed0a4babe..18534516a4 100644 --- a/arch/powerpc/cpu/mpc8260/ether_fcc.c +++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c @@ -1049,11 +1049,11 @@ eth_loopback_test (void) } else { ushort datlen = bdp->cbd_datlen; - Ethernet_t *ehp; + struct ethernet_hdr *ehp; ushort prot; int ours, tb, n, nbytes; - ehp = (Ethernet_t *) \ + ehp = (struct ethernet_hdr *) \ &ecp->rxbufs[i][0]; ours = memcmp (ehp->et_src, \ @@ -1063,9 +1063,8 @@ eth_loopback_test (void) tb = prot & 0x8000; n = prot & 0x7fff; - nbytes = ELBT_BUFSZ - \ - offsetof (Ethernet_t, \ - et_dsap) - \ + nbytes = ELBT_BUFSZ - + ETHER_HDR_SIZE - ELBT_CRCSZ; /* check the frame is correct */ @@ -1080,10 +1079,10 @@ eth_loopback_test (void) patwords[n]; uint nbb; - nbb = badbits ( \ - &ehp->et_dsap, \ - nbytes, \ - patword); + nbb = badbits( + ((uchar *)&ehp) + + ETHER_HDR_SIZE, + nbytes, patword); ecp->rxeacc.badbit += \ nbb; |