nuport-mac: check netif_receive_skb() return value
authorFlorian Fainelli <florian@openwrt.org>
Wed, 11 Jul 2012 08:29:01 +0000 (08:29 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 11 Jul 2012 08:29:01 +0000 (08:29 +0000)
We did not reassign status to netif_receive_skb() return value, we thus
almost always incremented the dropped counter because the descriptor status
value never matches the NET_RX_DROP.

SVN-Revision: 32659

target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c

index 655749dc4bcc37a6c98ec39111da59db7f2d935f..fc5a5a15a255958184b9981e0333bcf1247840ab 100644 (file)
@@ -558,8 +558,7 @@ static int nuport_mac_rx(struct net_device *dev, int limit)
                skb->ip_summed = CHECKSUM_UNNECESSARY;
 
                /* Pass the received packet to network layer */
-               netif_receive_skb(skb);
-
+               status = netif_receive_skb(skb);
                if (status != NET_RX_DROP)
                        dev->stats.rx_bytes += len - 4; /* Without CRC */
                else