diff options
author | hayeswang <hayeswang@realtek.com> | 2014-03-07 11:04:37 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-07 16:24:29 -0500 |
commit | 5e2f7485d233ecd231ea298200d9c9a55c5542f1 (patch) | |
tree | 5cb8a1448de57928666fbee9a58f0d38f2ffb991 /drivers/net/usb/r8152.c | |
parent | 0c3121fcf10da24dfd667c5bf8d71fcfa261599c (diff) |
r8152: calculate the dropped packets for rx
Continue dealing with the remain rx packets, even though the allocation
of the skb fail. This could calculate the correct dropped packets.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/r8152.c')
-rw-r--r-- | drivers/net/usb/r8152.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f1eaa18825ab..08f4e87078e5 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -1456,7 +1456,7 @@ static void rx_bottom(struct r8152 *tp) skb = netdev_alloc_skb_ip_align(netdev, pkt_len); if (!skb) { stats->rx_dropped++; - break; + goto find_next_rx; } memcpy(skb->data, rx_data, pkt_len); skb_put(skb, pkt_len); @@ -1465,6 +1465,7 @@ static void rx_bottom(struct r8152 *tp) stats->rx_packets++; stats->rx_bytes += pkt_len; +find_next_rx: rx_data = rx_agg_align(rx_data + pkt_len + CRC_SIZE); rx_desc = (struct rx_desc *)rx_data; len_used = (int)(rx_data - (u8 *)agg->head); |