]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc8260/ether_fcc.c
net: cosmetic: Un-typedef Ethernet_t
[u-boot] / arch / powerpc / cpu / mpc8260 / ether_fcc.c
index eed0a4babe7b79d43154715e41aee53aee15175e..18534516a4cd6860c4a58be9ed7b72368b74b964 100644 (file)
@@ -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;