diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-12-19 16:09:08 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-05 16:58:47 -0500 |
commit | bc63eb9c7ec0eb7b091db2d82d46d1e68ff9e231 (patch) | |
tree | dfcbc44d49a516eb2c95ac2f724fbee52427d0fd /drivers/net/macsonic.c | |
parent | 079ca7da1e6d05c7cb82e9c4f2e1d98839332664 (diff) |
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>
Diffstat (limited to 'drivers/net/macsonic.c')
-rw-r--r-- | drivers/net/macsonic.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c index 393d995f1919..24f6050fbf33 100644 --- a/drivers/net/macsonic.c +++ b/drivers/net/macsonic.c | |||
@@ -121,16 +121,12 @@ enum macsonic_type { | |||
121 | * For reversing the PROM address | 121 | * For reversing the PROM address |
122 | */ | 122 | */ |
123 | 123 | ||
124 | static unsigned char nibbletab[] = {0, 8, 4, 12, 2, 10, 6, 14, | ||
125 | 1, 9, 5, 13, 3, 11, 7, 15}; | ||
126 | |||
127 | static inline void bit_reverse_addr(unsigned char addr[6]) | 124 | static inline void bit_reverse_addr(unsigned char addr[6]) |
128 | { | 125 | { |
129 | int i; | 126 | int i; |
130 | 127 | ||
131 | for(i = 0; i < 6; i++) | 128 | for(i = 0; i < 6; i++) |
132 | addr[i] = ((nibbletab[addr[i] & 0xf] << 4) | | 129 | addr[i] = bitrev8(addr[i]); |
133 | nibbletab[(addr[i] >> 4) &0xf]); | ||
134 | } | 130 | } |
135 | 131 | ||
136 | int __init macsonic_init(struct net_device* dev) | 132 | int __init macsonic_init(struct net_device* dev) |