]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - net/dsa/tag_ksz.c
net: dsa: add slave to port helper
[thirdparty/kernel/linux.git] / net / dsa / tag_ksz.c
index b241c990cde08a8e4e166270b8dbff693ee268b0..66e443fd76757315aa5171daa7fdcc268d0e238d 100644 (file)
@@ -34,7 +34,7 @@
 
 static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       struct dsa_slave_priv *p = netdev_priv(dev);
+       struct dsa_port *dp = dsa_slave_to_port(dev);
        struct sk_buff *nskb;
        int padlen;
        u8 *tag;
@@ -72,7 +72,7 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
 
        tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
        tag[0] = 0;
-       tag[1] = 1 << p->dp->index; /* destination port */
+       tag[1] = 1 << dp->index; /* destination port */
 
        return nskb;
 }