net: dsa: Initialize CPU port ethtool ops per tree
[deliverable/linux.git] / net / dsa / tag_brcm.c
index e2aadb73111d544c1ce16db13bfd99c7506642fc..21bffde6e4bf1043c65eeef86f206c592e987eb7 100644 (file)
@@ -127,7 +127,7 @@ static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
        source_port = brcm_tag[3] & BRCM_EG_PID_MASK;
 
        /* Validate port against switch setup, either the port is totally */
-       if (source_port >= DSA_MAX_PORTS || ds->ports[source_port] == NULL)
+       if (source_port >= DSA_MAX_PORTS || !ds->ports[source_port].netdev)
                goto out_drop;
 
        /* Remove Broadcom tag and update checksum */
@@ -140,7 +140,7 @@ static int brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
 
        skb_push(skb, ETH_HLEN);
        skb->pkt_type = PACKET_HOST;
-       skb->dev = ds->ports[source_port];
+       skb->dev = ds->ports[source_port].netdev;
        skb->protocol = eth_type_trans(skb, skb->dev);
 
        skb->dev->stats.rx_packets++;
This page took 0.0311 seconds and 5 git commands to generate.