]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/dsa/tag_ksz.c
net: dsa: Introduce dsa_get_cpu_port()
[karo-tx-linux.git] / net / dsa / tag_ksz.c
index b94a334a1d02080a6f92fb2434e3813cc1443d9b..fab41de8e9837b512709b3c853ffb4831fe08317 100644 (file)
@@ -75,12 +75,11 @@ static struct sk_buff *ksz_rcv(struct sk_buff *skb, struct net_device *dev,
                               struct net_device *orig_dev)
 {
        struct dsa_switch_tree *dst = dev->dsa_ptr;
-       struct dsa_switch *ds;
+       struct dsa_port *cpu_dp = dsa_get_cpu_port(dst);
+       struct dsa_switch *ds = cpu_dp->ds;
        u8 *tag;
        int source_port;
 
-       ds = dst->cpu_dp->ds;
-
        tag = skb_tail_pointer(skb) - KSZ_EGRESS_TAG_LEN;
 
        source_port = tag[0] & 7;