Commit c68cca35b33c3a7c9fbcfc08de7e91dbdc8cf51f

Authored by Joe Hershberger
1 parent cb487f5664

net: cosmetic: Un-typedef VLAN_Ethernet_t

Eliminate the typedef and remove capital letters

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

Showing 2 changed files with 8 additions and 5 deletions Side-by-side Diff

... ... @@ -185,15 +185,16 @@
185 185 /*
186 186 * Ethernet header
187 187 */
188   -typedef struct {
  188 +struct vlan_ethernet_hdr {
189 189 uchar vet_dest[6]; /* Destination node */
190 190 uchar vet_src[6]; /* Source node */
191 191 ushort vet_vlan_type; /* PROT_VLAN */
192 192 ushort vet_tag; /* TAG of VLAN */
193 193 ushort vet_type; /* protocol type */
194   -} VLAN_Ethernet_t;
  194 +};
195 195  
196   -#define VLAN_ETHER_HDR_SIZE 18 /* VLAN Ethernet header size */
  196 +/* VLAN Ethernet header size */
  197 +#define VLAN_ETHER_HDR_SIZE (sizeof(struct vlan_ethernet_hdr))
197 198  
198 199 #define PROT_IP 0x0800 /* IP protocol */
199 200 #define PROT_ARP 0x0806 /* IP ARP protocol */
... ... @@ -909,7 +909,8 @@
909 909 len -= ETHER_HDR_SIZE;
910 910  
911 911 } else { /* VLAN packet */
912   - VLAN_Ethernet_t *vet = (VLAN_Ethernet_t *)et;
  912 + struct vlan_ethernet_hdr *vet =
  913 + (struct vlan_ethernet_hdr *)et;
913 914  
914 915 debug("VLAN packet received\n");
915 916  
... ... @@ -1232,7 +1233,8 @@
1232 1233 et->et_protlen = htons(prot);
1233 1234 return ETHER_HDR_SIZE;
1234 1235 } else {
1235   - VLAN_Ethernet_t *vet = (VLAN_Ethernet_t *)xet;
  1236 + struct vlan_ethernet_hdr *vet =
  1237 + (struct vlan_ethernet_hdr *)xet;
1236 1238  
1237 1239 vet->vet_vlan_type = htons(PROT_VLAN);
1238 1240 vet->vet_tag = htons((0 << 5) | (myvlanid & VLAN_IDMASK));