Commit 57d3ae84 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[VLAN]: Turn __constant_htons into htons where possible

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9dfebcc6
...@@ -271,12 +271,12 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short ...@@ -271,12 +271,12 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short
memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN);
/* first, the ethernet type */ /* first, the ethernet type */
veth->h_vlan_proto = __constant_htons(ETH_P_8021Q); veth->h_vlan_proto = htons(ETH_P_8021Q);
/* now, the tag */ /* now, the tag */
veth->h_vlan_TCI = htons(tag); veth->h_vlan_TCI = htons(tag);
skb->protocol = __constant_htons(ETH_P_8021Q); skb->protocol = htons(ETH_P_8021Q);
skb->mac_header -= VLAN_HLEN; skb->mac_header -= VLAN_HLEN;
skb->network_header -= VLAN_HLEN; skb->network_header -= VLAN_HLEN;
...@@ -331,7 +331,7 @@ static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag) ...@@ -331,7 +331,7 @@ static inline int __vlan_get_tag(struct sk_buff *skb, unsigned short *tag)
{ {
struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data;
if (veth->h_vlan_proto != __constant_htons(ETH_P_8021Q)) { if (veth->h_vlan_proto != htons(ETH_P_8021Q)) {
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment