diff options
author | hayeswang <hayeswang@realtek.com> | 2014-03-07 11:04:37 +0800 |
---|---|---|
committer | Seema Khowala <seemaj@nvidia.com> | 2014-04-23 14:07:36 -0700 |
commit | 6148892b7c3a81541b472771e923cf265f999035 (patch) | |
tree | 009d52a4cb4edf2441735114bc1f023fa7e4f915 /drivers/net | |
parent | 2e3b6f7ec3b202ef9418e83365559fe6a6fff87e (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.
Change-Id: Ic7fbe722e41b379f0bcf892356c9b00eacae82dc
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/390295
(cherry picked from commit 36eb4f48ca9366207524859b84e439c8fb0ed6f2)
Reviewed-on: http://git-master/r/396897
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Tested-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/net')
-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 b9811a971ff7..9c3ca4c38d16 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -1454,7 +1454,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); @@ -1463,6 +1463,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); |