]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/dsa/tag_trailer.c
net: dsa: Introduce dsa_get_cpu_port()
[karo-tx-linux.git] / net / dsa / tag_trailer.c
index b4f6db0944093ce15640d09e2f6b8508dbecebbc..172f1316789622487214678cde9b628a9c85f550 100644 (file)
@@ -61,12 +61,11 @@ static struct sk_buff *trailer_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 *trailer;
        int source_port;
 
-       ds = dst->cpu_dp->ds;
-
        if (skb_linearize(skb))
                return NULL;