au1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()
Subsystems (2)
PATCH 1/1 au1000_eth: Duplicate test of RX_OVERLEN bit in update_rx_stats()
in update_rx_stats() the RX_OVERLEN bit is set twice, replace it by RX_RUNT. in au1000_rx() the RX_MISSED_FRAME bit was tested a few lines earlier already
---
please review, I merely guessed it should be RX_RUNT.
drivers/net/au1000_eth.c +1 -3
@@ -721,7 +721,7 @@ static inline void update_rx_stats(struct net_device *dev, u32 status) ps->rx_errors++;if (status &RX_MISSED_FRAME ) ps->rx_missed_errors++; -if (status & (RX_OVERLEN |RX_OVERLEN |RX_LEN_ERROR )) +if (status & (RX_OVERLEN |RX_RUNT |RX_LEN_ERROR )) ps->rx_length_errors++;if (status &RX_CRC_ERROR ) ps->rx_crc_errors++;
@@ -794,8 +794,6 @@ static int au1000_rx(struct net_device *dev)printk ("rx len error\n" );if (status &RX_U_CNTRL_FRAME )printk ("rx u control frame\n" ); -if (status &RX_MISSED_FRAME ) -printk ("rx miss\n" ); } } prxd->buff_stat = (u32)(pDB->dma_addr |RX_DMA_ENABLE );
Quoted 21 lines · Roel Kluin
in
update_rx_stats()theRX_OVERLENbit is set twice, replace it byRX_RUNT. inau1000_rx()theRX_MISSED_FRAMEbit was tested a few lines earlier alreadySigned-off-by Roel Kluin <[email protected]>---
please review, I merely guessed it should beRX_RUNT.drivers/net/au1000_eth.c +1
-1@@ -721,7 +721,7 @@ static inline void update_rx_stats(struct net_device *dev, u32 status) ps->rx_errors++; if (status & RX_MISSED_FRAME) ps->rx_missed_errors++; - if (status & (RX_OVERLEN | RX_OVERLEN | RX_LEN_ERROR)) + if (status & (RX_OVERLEN | RX_RUNT | RX_LEN_ERROR)) ps->rx_length_errors++; if (status & RX_CRC_ERROR) ps->rx_crc_errors++;
drivers/net/au1000_eth.c static int au1000_rx(struct net_device *dev) · line 798
Quoted 5 lines
drivers/net/au1000_eth.c +0
-2@@ -794,8 +794,6 @@ static int au1000_rx(struct net_device *dev) printk("rx len error\n"); if (status & RX_U_CNTRL_FRAME) printk("rx u control frame\n"); - if (status & RX_MISSED_FRAME) - printk("rx miss\n");
Yeah, looks right.
Manuel Lauss
From: Manuel Lauss <[email protected]>
Date: Tue, 6 Oct 2009 21:53:50 +0200
Quoted 5 lines · Roel Kluin
Quoted 4 lines
in
update_rx_stats()theRX_OVERLENbit is set twice, replace it byRX_RUNT. inau1000_rx()theRX_MISSED_FRAMEbit was tested a few lines earlier alreadySigned-off-by Roel Kluin <[email protected]>
...
Quoted 4 lines
Yeah, looks right.
Acked-by Manuel Lauss <[email protected]>
Applied, thanks.