Skip to content

Commit 6176e89

Browse files
Jiri Kosinadavem330
authored andcommitted
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: e87a8f2 ("net: resolve symbol conflicts with generic hashtable.h") Reported-by: Daniel Borkmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a31eb63 commit 6176e89

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

drivers/net/ethernet/dec/tulip/de4x5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ SetMulticastFilter(struct net_device *dev)
19661966
} else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */
19671967
netdev_for_each_mc_addr(ha, dev) {
19681968
crc = ether_crc_le(ETH_ALEN, ha->addr);
1969-
hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */
1969+
hashcode = crc & DE4X5_HASH_BITS; /* hashcode is 9 LSb of CRC */
19701970

19711971
byte = hashcode >> 3; /* bit[3-8] -> byte in filter */
19721972
bit = 1 << (hashcode & 0x07);/* bit[0-2] -> bit in byte */
@@ -5043,7 +5043,7 @@ build_setup_frame(struct net_device *dev, int mode)
50435043
*(pa + i) = dev->dev_addr[i]; /* Host address */
50445044
if (i & 0x01) pa += 2;
50455045
}
5046-
*(lp->setup_frame + (HASH_TABLE_LEN >> 3) - 3) = 0x80;
5046+
*(lp->setup_frame + (DE4X5_HASH_TABLE_LEN >> 3) - 3) = 0x80;
50475047
} else {
50485048
for (i=0; i<ETH_ALEN; i++) { /* Host address */
50495049
*(pa + (i&1)) = dev->dev_addr[i];

drivers/net/ethernet/dec/tulip/de4x5.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,8 @@
860860
#define PCI 0
861861
#define EISA 1
862862

863-
#define HASH_TABLE_LEN 512 /* Bits */
864-
#define HASH_BITS 0x01ff /* 9 LS bits */
863+
#define DE4X5_HASH_TABLE_LEN 512 /* Bits */
864+
#define DE4X5_HASH_BITS 0x01ff /* 9 LS bits */
865865

866866
#define SETUP_FRAME_LEN 192 /* Bytes */
867867
#define IMPERF_PA_OFFSET 156 /* Bytes */

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2887,7 +2887,7 @@ fec_enet_close(struct net_device *ndev)
28872887
* this kind of feature?).
28882888
*/
28892889

2890-
#define HASH_BITS 6 /* #bits in hash */
2890+
#define FEC_HASH_BITS 6 /* #bits in hash */
28912891
#define CRC32_POLY 0xEDB88320
28922892

28932893
static void set_multicast_list(struct net_device *ndev)
@@ -2935,10 +2935,10 @@ static void set_multicast_list(struct net_device *ndev)
29352935
}
29362936
}
29372937

2938-
/* only upper 6 bits (HASH_BITS) are used
2938+
/* only upper 6 bits (FEC_HASH_BITS) are used
29392939
* which point to specific bit in he hash registers
29402940
*/
2941-
hash = (crc >> (32 - HASH_BITS)) & 0x3f;
2941+
hash = (crc >> (32 - FEC_HASH_BITS)) & 0x3f;
29422942

29432943
if (hash > 31) {
29442944
tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH);

0 commit comments

Comments
 (0)