From cb487f5664b1bf7d907f5d23fe10cc14dc1bd45a Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 23 May 2012 07:58:06 +0000 Subject: 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 --- arch/powerpc/cpu/mpc8260/ether_fcc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'arch/powerpc/cpu') diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index eed0a4b..1853451 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; -- cgit v1.1