net: dsa: create a dsa_lag structure
[linux-2.6-microblaze.git] / net / dsa / tag_dsa.c
index 26435bc..c8b4bbd 100644 (file)
@@ -246,12 +246,14 @@ static struct sk_buff *dsa_rcv_ll(struct sk_buff *skb, struct net_device *dev,
 
        if (trunk) {
                struct dsa_port *cpu_dp = dev->dsa_ptr;
+               struct dsa_lag *lag;
 
                /* The exact source port is not available in the tag,
                 * so we inject the frame directly on the upper
                 * team/bond.
                 */
-               skb->dev = dsa_lag_dev(cpu_dp->dst, source_port + 1);
+               lag = dsa_lag_by_id(cpu_dp->dst, source_port + 1);
+               skb->dev = lag ? lag->dev : NULL;
        } else {
                skb->dev = dsa_master_find_slave(dev, source_device,
                                                 source_port);