net: use bitrev8

Use bitrev8 for bmac, mace, macmace, macsonic, and skfp drivers.

[akpm@osdl.org: use the API, not the array]
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mirko Lindner <mlindner@syskonnect.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Akinobu Mita
2006-12-19 13:09:08 -08:00
committed by Jeff Garzik
parent 079ca7da1e
commit bc63eb9c7e
9 changed files with 27 additions and 155 deletions

View File

@@ -121,16 +121,12 @@ enum macsonic_type {
* For reversing the PROM address
*/
static unsigned char nibbletab[] = {0, 8, 4, 12, 2, 10, 6, 14,
1, 9, 5, 13, 3, 11, 7, 15};
static inline void bit_reverse_addr(unsigned char addr[6])
{
int i;
for(i = 0; i < 6; i++)
addr[i] = ((nibbletab[addr[i] & 0xf] << 4) |
nibbletab[(addr[i] >> 4) &0xf]);
addr[i] = bitrev8(addr[i]);
}
int __init macsonic_init(struct net_device* dev)