Commit 6176e89c authored by Jiri Kosina's avatar Jiri Kosina Committed by David S. Miller

net: fix up a few missing hashtable.h conflict resolutions

There are a couple of leftover symbol conflicts caused by hashtable.h
being included by netdevice.h; those were not caught as build failure
(they're "only" a warning, but in fact real bugs). Fix those up.

Fixes: e87a8f24 ("net: resolve symbol conflicts with generic hashtable.h")
Reported-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a31eb63a
...@@ -1966,7 +1966,7 @@ SetMulticastFilter(struct net_device *dev) ...@@ -1966,7 +1966,7 @@ SetMulticastFilter(struct net_device *dev)
} else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */
netdev_for_each_mc_addr(ha, dev) { netdev_for_each_mc_addr(ha, dev) {
crc = ether_crc_le(ETH_ALEN, ha->addr); crc = ether_crc_le(ETH_ALEN, ha->addr);
hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ hashcode = crc & DE4X5_HASH_BITS; /* hashcode is 9 LSb of CRC */
byte = hashcode >> 3; /* bit[3-8] -> byte in filter */ byte = hashcode >> 3; /* bit[3-8] -> byte in filter */
bit = 1 << (hashcode & 0x07);/* bit[0-2] -> bit in byte */ bit = 1 << (hashcode & 0x07);/* bit[0-2] -> bit in byte */
...@@ -5043,7 +5043,7 @@ build_setup_frame(struct net_device *dev, int mode) ...@@ -5043,7 +5043,7 @@ build_setup_frame(struct net_device *dev, int mode)
*(pa + i) = dev->dev_addr[i]; /* Host address */ *(pa + i) = dev->dev_addr[i]; /* Host address */
if (i & 0x01) pa += 2; if (i & 0x01) pa += 2;
} }
*(lp->setup_frame + (HASH_TABLE_LEN >> 3) - 3) = 0x80; *(lp->setup_frame + (DE4X5_HASH_TABLE_LEN >> 3) - 3) = 0x80;
} else { } else {
for (i=0; i<ETH_ALEN; i++) { /* Host address */ for (i=0; i<ETH_ALEN; i++) { /* Host address */
*(pa + (i&1)) = dev->dev_addr[i]; *(pa + (i&1)) = dev->dev_addr[i];
......
...@@ -860,8 +860,8 @@ ...@@ -860,8 +860,8 @@
#define PCI 0 #define PCI 0
#define EISA 1 #define EISA 1
#define HASH_TABLE_LEN 512 /* Bits */ #define DE4X5_HASH_TABLE_LEN 512 /* Bits */
#define HASH_BITS 0x01ff /* 9 LS bits */ #define DE4X5_HASH_BITS 0x01ff /* 9 LS bits */
#define SETUP_FRAME_LEN 192 /* Bytes */ #define SETUP_FRAME_LEN 192 /* Bytes */
#define IMPERF_PA_OFFSET 156 /* Bytes */ #define IMPERF_PA_OFFSET 156 /* Bytes */
......
...@@ -2887,7 +2887,7 @@ fec_enet_close(struct net_device *ndev) ...@@ -2887,7 +2887,7 @@ fec_enet_close(struct net_device *ndev)
* this kind of feature?). * this kind of feature?).
*/ */
#define HASH_BITS 6 /* #bits in hash */ #define FEC_HASH_BITS 6 /* #bits in hash */
#define CRC32_POLY 0xEDB88320 #define CRC32_POLY 0xEDB88320
static void set_multicast_list(struct net_device *ndev) static void set_multicast_list(struct net_device *ndev)
...@@ -2935,10 +2935,10 @@ static void set_multicast_list(struct net_device *ndev) ...@@ -2935,10 +2935,10 @@ static void set_multicast_list(struct net_device *ndev)
} }
} }
/* only upper 6 bits (HASH_BITS) are used /* only upper 6 bits (FEC_HASH_BITS) are used
* which point to specific bit in he hash registers * which point to specific bit in he hash registers
*/ */
hash = (crc >> (32 - HASH_BITS)) & 0x3f; hash = (crc >> (32 - FEC_HASH_BITS)) & 0x3f;
if (hash > 31) { if (hash > 31) {
tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH); tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment