These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / net / dsa / tag_brcm.c
index 83d3572..e2aadb7 100644 (file)
 #define BRCM_EG_TC_MASK                0x7
 #define BRCM_EG_PID_MASK       0x1f
 
-static netdev_tx_t brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev)
+static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct dsa_slave_priv *p = netdev_priv(dev);
        u8 *brcm_tag;
 
-       dev->stats.tx_packets++;
-       dev->stats.tx_bytes += skb->len;
-
        if (skb_cow_head(skb, BRCM_TAG_LEN) < 0)
                goto out_free;
 
@@ -87,17 +84,11 @@ static netdev_tx_t brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev)
                brcm_tag[2] = BRCM_IG_DSTMAP2_MASK;
        brcm_tag[3] = (1 << p->port) & BRCM_IG_DSTMAP1_MASK;
 
-       /* Queue the SKB for transmission on the parent interface, but
-        * do not modify its EtherType
-        */
-       skb->dev = p->parent->dst->master_netdev;
-       dev_queue_xmit(skb);
-
-       return NETDEV_TX_OK;
+       return skb;
 
 out_free:
        kfree_skb(skb);
-       return NETDEV_TX_OK;
+       return NULL;
 }
 
 static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,