au1000_eth.c: use ether_crc() from <linux/crc32.h>
Subsystems (3)
PATCH 1/1 au1000_eth.c: use ether_crc() from <linux/crc32.h>
since the au1000 driver already selects the CRC32 routines, simply replace the internal ether_crc() implementation with the semantically equivalent one from <linux/crc32.h>
Signed-off-by Herbert Valerio Riedel <[email protected]>
---
drivers/net/au1000_eth.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-)
9360df5368deaaaa8fc7dcaacf9b7ca446af94c4
drivers/net/au1000_eth.c +1 -17
@@ -52,6 +52,7 @@#include <linux/mii.h> #include <linux/skbuff.h> #include <linux/delay.h> +#include <linux/crc32.h> #include <asm/mipsregs.h> #include <asm/irq.h> #include <asm/io.h>
@@ -2070,23 +2071,6 @@ static void au1000_tx_timeout(struct netnetif_wake_queue (dev); } - -static unsigned const ethernet_polynomial =0x04c11db7U ; -static inline u32 ether_crc (int length,unsigned char *data) -{ -int crc =-1 ; - -while (--length >=0 ) { -unsigned char current_octet = *data++; -int bit; -for (bit =0 ; bit <8 ; bit++, current_octet >>=1 ) - crc = (crc <<1 ) ^ - ((crc <0 ) ^ (current_octet &1 ) ? - ethernet_polynomial :0 ); - } -return crc; -} -static void set_rx_mode (struct net_device *dev) {struct au1000_private *aup = (struct au1000_private *) dev->priv;
Signature · 1 line
1.2.6
Quoted 5 lines · Herbert Valerio Riedel
since the au1000 driver already selects the CRC32 routines, simply replace the internal
ether_crc()implementation with the semantically equivalent one from <linux/crc32.h>Signed-off-by Herbert Valerio Riedel <[email protected]>
Looks good to me.
Acked-by Ralf Baechle <[email protected]>
Ralf
Quoted 5 lines · Herbert Valerio Riedel
since the au1000 driver already selects the CRC32 routines, simply replace the internal
ether_crc()implementation with the semantically equivalent one from <linux/crc32.h>Signed-off-by Herbert Valerio Riedel <[email protected]>
does not apply, please resend