diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-09-03 20:27:01 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-05 11:53:34 -0700 |
commit | 0f15b0986996a4d45090c0010728055c6aa2b458 (patch) | |
tree | 4202382fc625971aed8e7f271c272063a6e79fb0 /net | |
parent | 55199df6d2af55be414f40856efcb527811001bb (diff) |
net: dsa: tag_brcm: Set output queue from skb queue mapping
We originally used skb->priority but that was not quite correct as this
bitfield needs to contain the egress switch queue we intend to send this
SKB to.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/dsa/tag_brcm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c index de74c3f77818..dbb016434ace 100644 --- a/net/dsa/tag_brcm.c +++ b/net/dsa/tag_brcm.c @@ -62,6 +62,7 @@ static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev) { struct dsa_slave_priv *p = netdev_priv(dev); + u16 queue = skb_get_queue_mapping(skb); u8 *brcm_tag; if (skb_cow_head(skb, BRCM_TAG_LEN) < 0) @@ -78,7 +79,7 @@ static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev * deprecated */ brcm_tag[0] = (1 << BRCM_OPCODE_SHIFT) | - ((skb->priority << BRCM_IG_TC_SHIFT) & BRCM_IG_TC_MASK); + ((queue & BRCM_IG_TC_MASK) << BRCM_IG_TC_SHIFT); brcm_tag[1] = 0; brcm_tag[2] = 0; if (p->dp->index == 8) |