diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2005-09-19 18:41:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-19 18:41:28 -0400 |
commit | 3c3f8f25c177e4f9e4e00bcc1b90b28b1be37937 (patch) | |
tree | 7ef934877261ec89145635541a1be6a31755599d | |
parent | 2cf655cd65888e9fed0803d77e9e4f7d1db674cc (diff) |
[8021Q]: Add endian annotations.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/if_vlan.h | 8 | ||||
-rw-r--r-- | net/8021q/vlan_dev.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 17d0c0d40b0e..eef0876d8307 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -42,8 +42,8 @@ struct hlist_node; | |||
42 | struct vlan_ethhdr { | 42 | struct vlan_ethhdr { |
43 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 43 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
44 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 44 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
45 | unsigned short h_vlan_proto; /* Should always be 0x8100 */ | 45 | __be16 h_vlan_proto; /* Should always be 0x8100 */ |
46 | unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ | 46 | __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ |
47 | unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ | 47 | unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ |
48 | }; | 48 | }; |
49 | 49 | ||
@@ -55,8 +55,8 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | struct vlan_hdr { | 57 | struct vlan_hdr { |
58 | unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ | 58 | __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ |
59 | unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ | 59 | __be16 h_vlan_encapsulated_proto; /* packet type ID field (or len) */ |
60 | }; | 60 | }; |
61 | 61 | ||
62 | #define VLAN_VID_MASK 0xfff | 62 | #define VLAN_VID_MASK 0xfff |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 145f5cde96cf..b74864889670 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -120,7 +120,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
120 | unsigned short vid; | 120 | unsigned short vid; |
121 | struct net_device_stats *stats; | 121 | struct net_device_stats *stats; |
122 | unsigned short vlan_TCI; | 122 | unsigned short vlan_TCI; |
123 | unsigned short proto; | 123 | __be16 proto; |
124 | 124 | ||
125 | /* vlan_TCI = ntohs(get_unaligned(&vhdr->h_vlan_TCI)); */ | 125 | /* vlan_TCI = ntohs(get_unaligned(&vhdr->h_vlan_TCI)); */ |
126 | vlan_TCI = ntohs(vhdr->h_vlan_TCI); | 126 | vlan_TCI = ntohs(vhdr->h_vlan_TCI); |