diff options
Diffstat (limited to 'drivers/net/tlan.h')
| -rw-r--r-- | drivers/net/tlan.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/tlan.h b/drivers/net/tlan.h index 41ce0b665937..4b82f283e985 100644 --- a/drivers/net/tlan.h +++ b/drivers/net/tlan.h | |||
| @@ -13,8 +13,6 @@ | |||
| 13 | * This software may be used and distributed according to the terms | 13 | * This software may be used and distributed according to the terms |
| 14 | * of the GNU General Public License, incorporated herein by reference. | 14 | * of the GNU General Public License, incorporated herein by reference. |
| 15 | * | 15 | * |
| 16 | ** This file is best viewed/edited with tabstop=4, colums>=132 | ||
| 17 | * | ||
| 18 | * | 16 | * |
| 19 | * Dec 10, 1999 Torben Mathiasen <torben.mathiasen@compaq.com> | 17 | * Dec 10, 1999 Torben Mathiasen <torben.mathiasen@compaq.com> |
| 20 | * New Maintainer | 18 | * New Maintainer |
| @@ -45,7 +43,9 @@ | |||
| 45 | #define TLAN_IGNORE 0 | 43 | #define TLAN_IGNORE 0 |
| 46 | #define TLAN_RECORD 1 | 44 | #define TLAN_RECORD 1 |
| 47 | 45 | ||
| 48 | #define TLAN_DBG(lvl, format, args...) if (debug&lvl) printk(KERN_DEBUG "TLAN: " format, ##args ); | 46 | #define TLAN_DBG(lvl, format, args...) \ |
| 47 | do { if (debug&lvl) printk(KERN_DEBUG "TLAN: " format, ##args ); } while(0) | ||
| 48 | |||
| 49 | #define TLAN_DEBUG_GNRL 0x0001 | 49 | #define TLAN_DEBUG_GNRL 0x0001 |
| 50 | #define TLAN_DEBUG_TX 0x0002 | 50 | #define TLAN_DEBUG_TX 0x0002 |
| 51 | #define TLAN_DEBUG_RX 0x0004 | 51 | #define TLAN_DEBUG_RX 0x0004 |
| @@ -194,7 +194,6 @@ typedef struct tlan_private_tag { | |||
| 194 | u32 timerSetAt; | 194 | u32 timerSetAt; |
| 195 | u32 timerType; | 195 | u32 timerType; |
| 196 | struct timer_list timer; | 196 | struct timer_list timer; |
| 197 | struct net_device_stats stats; | ||
| 198 | struct board *adapter; | 197 | struct board *adapter; |
| 199 | u32 adapterRev; | 198 | u32 adapterRev; |
| 200 | u32 aui; | 199 | u32 aui; |
| @@ -205,7 +204,6 @@ typedef struct tlan_private_tag { | |||
| 205 | u32 speed; | 204 | u32 speed; |
| 206 | u8 tlanRev; | 205 | u8 tlanRev; |
| 207 | u8 tlanFullDuplex; | 206 | u8 tlanFullDuplex; |
| 208 | char devName[8]; | ||
| 209 | spinlock_t lock; | 207 | spinlock_t lock; |
| 210 | u8 link; | 208 | u8 link; |
| 211 | u8 is_eisa; | 209 | u8 is_eisa; |
| @@ -517,12 +515,18 @@ static inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) | |||
| 517 | * xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) | 515 | * xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) |
| 518 | * #define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) | 516 | * #define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) |
| 519 | * | 517 | * |
| 520 | * hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) ); | 518 | * hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), |
| 521 | * hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1; | 519 | * DA(a,30), DA(a,36), DA(a,42) ); |
| 522 | * hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2; | 520 | * hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), |
| 523 | * hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3; | 521 | * DA(a,31), DA(a,37), DA(a,43) ) << 1; |
| 524 | * hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4; | 522 | * hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), |
| 525 | * hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5; | 523 | * DA(a,32), DA(a,38), DA(a,44) ) << 2; |
| 524 | * hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), | ||
| 525 | * DA(a,33), DA(a,39), DA(a,45) ) << 3; | ||
| 526 | * hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), | ||
| 527 | * DA(a,34), DA(a,40), DA(a,46) ) << 4; | ||
| 528 | * hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), | ||
| 529 | * DA(a,35), DA(a,41), DA(a,47) ) << 5; | ||
| 526 | * | 530 | * |
| 527 | */ | 531 | */ |
| 528 | static inline u32 TLan_HashFunc( const u8 *a ) | 532 | static inline u32 TLan_HashFunc( const u8 *a ) |
