net/vlan: include the shift in skb_vlan_tag_get_prio()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e0a6b80973
commit
9b319148cb
@ -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 @@ proto_again:
|
|||||||
|
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user