Commit 9b319148 authored by Michał Mirosław's avatar Michał Mirosław Committed by David S. Miller

net/vlan: include the shift in skb_vlan_tag_get_prio()

Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0a6b809
...@@ -81,7 +81,7 @@ static inline bool is_vlan_dev(const struct net_device *dev) ...@@ -81,7 +81,7 @@ static inline bool is_vlan_dev(const struct net_device *dev)
#define skb_vlan_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT) #define skb_vlan_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
#define skb_vlan_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT) #define skb_vlan_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
#define skb_vlan_tag_get_id(__skb) ((__skb)->vlan_tci & VLAN_VID_MASK) #define skb_vlan_tag_get_id(__skb) ((__skb)->vlan_tci & VLAN_VID_MASK)
#define skb_vlan_tag_get_prio(__skb) ((__skb)->vlan_tci & VLAN_PRIO_MASK) #define skb_vlan_tag_get_prio(__skb) (((__skb)->vlan_tci & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT)
static inline int vlan_get_rx_ctag_filter_info(struct net_device *dev) static inline int vlan_get_rx_ctag_filter_info(struct net_device *dev)
{ {
......
...@@ -952,8 +952,7 @@ bool __skb_flow_dissect(const struct sk_buff *skb, ...@@ -952,8 +952,7 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
if (!vlan) { if (!vlan) {
key_vlan->vlan_id = skb_vlan_tag_get_id(skb); key_vlan->vlan_id = skb_vlan_tag_get_id(skb);
key_vlan->vlan_priority = key_vlan->vlan_priority = skb_vlan_tag_get_prio(skb);
(skb_vlan_tag_get_prio(skb) >> VLAN_PRIO_SHIFT);
} else { } else {
key_vlan->vlan_id = ntohs(vlan->h_vlan_TCI) & key_vlan->vlan_id = ntohs(vlan->h_vlan_TCI) &
VLAN_VID_MASK; VLAN_VID_MASK;
......
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