]> git.sur5r.net Git - u-boot/commitdiff
net: cosmetic: Un-typedef VLAN_Ethernet_t
authorJoe Hershberger <joe.hershberger@ni.com>
Wed, 23 May 2012 07:58:07 +0000 (07:58 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 23 May 2012 22:46:14 +0000 (17:46 -0500)
Eliminate the typedef and remove capital letters

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
include/net.h
net/net.c

index 2551516032458ea6fac134c4ca400453dc6a8516..69dceb19f0263450bfaddeb3530f080361baf815 100644 (file)
@@ -185,15 +185,16 @@ struct e802_hdr {
 /*
  *     Ethernet header
  */
-typedef struct {
+struct vlan_ethernet_hdr {
        uchar           vet_dest[6];    /* Destination node             */
        uchar           vet_src[6];     /* Source node                  */
        ushort          vet_vlan_type;  /* PROT_VLAN                    */
        ushort          vet_tag;        /* TAG of VLAN                  */
        ushort          vet_type;       /* protocol type                */
-} VLAN_Ethernet_t;
+};
 
-#define VLAN_ETHER_HDR_SIZE    18      /* VLAN Ethernet header size    */
+/* VLAN Ethernet header size */
+#define VLAN_ETHER_HDR_SIZE    (sizeof(struct vlan_ethernet_hdr))
 
 #define PROT_IP                0x0800          /* IP protocol                  */
 #define PROT_ARP       0x0806          /* IP ARP protocol              */
index 33de3996830ac6e7199aa63bc147e38e72ffb56a..6d342540438908b02074eadc5863684f51b48130 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -909,7 +909,8 @@ NetReceive(uchar *inpkt, int len)
                len -= ETHER_HDR_SIZE;
 
        } else {                        /* VLAN packet */
-               VLAN_Ethernet_t *vet = (VLAN_Ethernet_t *)et;
+               struct vlan_ethernet_hdr *vet =
+                       (struct vlan_ethernet_hdr *)et;
 
                debug("VLAN packet received\n");
 
@@ -1232,7 +1233,8 @@ NetSetEther(uchar *xet, uchar * addr, uint prot)
                et->et_protlen = htons(prot);
                return ETHER_HDR_SIZE;
        } else {
-               VLAN_Ethernet_t *vet = (VLAN_Ethernet_t *)xet;
+               struct vlan_ethernet_hdr *vet =
+                       (struct vlan_ethernet_hdr *)xet;
 
                vet->vet_vlan_type = htons(PROT_VLAN);
                vet->vet_tag = htons((0 << 5) | (myvlanid & VLAN_IDMASK));