Commit 5e2f7485 authored by hayeswang's avatar hayeswang Committed by David S. Miller
Browse files

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: default avatarHayes Wang <>
Signed-off-by: default avatarDavid S. Miller <>
parent 0c3121fc
......@@ -1456,7 +1456,7 @@ static void rx_bottom(struct r8152 *tp)
skb = netdev_alloc_skb_ip_align(netdev, pkt_len);
if (!skb) {
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_bytes += pkt_len;
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment