diff options
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 4fbd62e45ae9..6564be122acf 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -477,6 +477,7 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
477 | struct rx_desc *rx_desc; | 477 | struct rx_desc *rx_desc; |
478 | unsigned int cmd_sts; | 478 | unsigned int cmd_sts; |
479 | struct sk_buff *skb; | 479 | struct sk_buff *skb; |
480 | u16 byte_cnt; | ||
480 | 481 | ||
481 | rx_desc = &rxq->rx_desc_area[rxq->rx_curr_desc]; | 482 | rx_desc = &rxq->rx_desc_area[rxq->rx_curr_desc]; |
482 | 483 | ||
@@ -499,6 +500,8 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
499 | 500 | ||
500 | mp->work_rx_refill |= 1 << rxq->index; | 501 | mp->work_rx_refill |= 1 << rxq->index; |
501 | 502 | ||
503 | byte_cnt = rx_desc->byte_cnt; | ||
504 | |||
502 | /* | 505 | /* |
503 | * Update statistics. | 506 | * Update statistics. |
504 | * | 507 | * |
@@ -508,7 +511,7 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
508 | * byte CRC at the end of the packet (which we do count). | 511 | * byte CRC at the end of the packet (which we do count). |
509 | */ | 512 | */ |
510 | stats->rx_packets++; | 513 | stats->rx_packets++; |
511 | stats->rx_bytes += rx_desc->byte_cnt - 2; | 514 | stats->rx_bytes += byte_cnt - 2; |
512 | 515 | ||
513 | /* | 516 | /* |
514 | * In case we received a packet without first / last bits | 517 | * In case we received a packet without first / last bits |
@@ -537,7 +540,7 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
537 | * The -4 is for the CRC in the trailer of the | 540 | * The -4 is for the CRC in the trailer of the |
538 | * received packet | 541 | * received packet |
539 | */ | 542 | */ |
540 | skb_put(skb, rx_desc->byte_cnt - 2 - 4); | 543 | skb_put(skb, byte_cnt - 2 - 4); |
541 | 544 | ||
542 | if (cmd_sts & LAYER_4_CHECKSUM_OK) { | 545 | if (cmd_sts & LAYER_4_CHECKSUM_OK) { |
543 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 546 | skb->ip_summed = CHECKSUM_UNNECESSARY; |