]> err.no Git - linux-2.6/commitdiff
[8021Q]: Add endian annotations.
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 19 Sep 2005 22:41:28 +0000 (15:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Sep 2005 22:41:28 +0000 (15:41 -0700)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
net/8021q/vlan_dev.c

index 17d0c0d40b0e376b80e0fa95768dc022961ee671..eef0876d8307b11b5678a25469043f26adc17ddd 100644 (file)
@@ -42,8 +42,8 @@ struct hlist_node;
 struct vlan_ethhdr {
    unsigned char       h_dest[ETH_ALEN];          /* destination eth addr      */
    unsigned char       h_source[ETH_ALEN];        /* source ether addr */
-   unsigned short       h_vlan_proto;              /* Should always be 0x8100 */
-   unsigned short       h_vlan_TCI;                /* Encapsulates priority and VLAN ID */
+   __be16               h_vlan_proto;              /* Should always be 0x8100 */
+   __be16               h_vlan_TCI;                /* Encapsulates priority and VLAN ID */
    unsigned short      h_vlan_encapsulated_proto; /* packet type ID field (or len) */
 };
 
@@ -55,8 +55,8 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
 }
 
 struct vlan_hdr {
-   unsigned short       h_vlan_TCI;                /* Encapsulates priority and VLAN ID */
-   unsigned short       h_vlan_encapsulated_proto; /* packet type ID field (or len) */
+   __be16               h_vlan_TCI;                /* Encapsulates priority and VLAN ID */
+   __be16               h_vlan_encapsulated_proto; /* packet type ID field (or len) */
 };
 
 #define VLAN_VID_MASK  0xfff
index 145f5cde96cf7a0ece22d77da07e0c4fc0311e53..b7486488967074b9b40c4b5916533f0b969f265c 100644 (file)
@@ -120,7 +120,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        unsigned short vid;
        struct net_device_stats *stats;
        unsigned short vlan_TCI;
-       unsigned short proto;
+       __be16 proto;
 
        /* vlan_TCI = ntohs(get_unaligned(&vhdr->h_vlan_TCI)); */
        vlan_TCI = ntohs(vhdr->h_vlan_TCI);