]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/dsa/tag_brcm.c
net: dsa: Introduce dsa_get_cpu_port()
[karo-tx-linux.git] / net / dsa / tag_brcm.c
index c03860907f281dfc3e543fcca82a14dff15d455b..c697d981517744fbc523d3bd0e3b8204a3a427f8 100644 (file)
@@ -93,12 +93,11 @@ static struct sk_buff *brcm_tag_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;
        int source_port;
        u8 *brcm_tag;
 
-       ds = dst->cpu_dp->ds;
-
        if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN)))
                return NULL;