aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-08-12 10:34:49 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-13 17:51:02 -0400
commit6176e89c5734e597f3e2279c8d5629a523cf6537 (patch)
treec9d1ba8878eee8d52a1339fd31577074d5ecd39a
parenta31eb63a0a392d38c00dd292f81623bf933aa6bc (diff)
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: e87a8f24c ("net: resolve symbol conflicts with generic hashtable.h") Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/dec/tulip/de4x5.c4
-rw-r--r--drivers/net/ethernet/dec/tulip/de4x5.h4
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index f0e9e2ef62a0..6620fc861c47 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -1966,7 +1966,7 @@ SetMulticastFilter(struct net_device *dev)
1966 } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ 1966 } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */
1967 netdev_for_each_mc_addr(ha, dev) { 1967 netdev_for_each_mc_addr(ha, dev) {
1968 crc = ether_crc_le(ETH_ALEN, ha->addr); 1968 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 */
1970 1970
1971 byte = hashcode >> 3; /* bit[3-8] -> byte in filter */ 1971 byte = hashcode >> 3; /* bit[3-8] -> byte in filter */
1972 bit = 1 << (hashcode & 0x07);/* bit[0-2] -> bit in byte */ 1972 bit = 1 << (hashcode & 0x07);/* bit[0-2] -> bit in byte */
@@ -5043,7 +5043,7 @@ build_setup_frame(struct net_device *dev, int mode)
5043 *(pa + i) = dev->dev_addr[i]; /* Host address */ 5043 *(pa + i) = dev->dev_addr[i]; /* Host address */
5044 if (i & 0x01) pa += 2; 5044 if (i & 0x01) pa += 2;
5045 } 5045 }
5046 *(lp->setup_frame + (HASH_TABLE_LEN >> 3) - 3) = 0x80; 5046 *(lp->setup_frame + (DE4X5_HASH_TABLE_LEN >> 3) - 3) = 0x80;
5047 } else { 5047 } else {
5048 for (i=0; i<ETH_ALEN; i++) { /* Host address */ 5048 for (i=0; i<ETH_ALEN; i++) { /* Host address */
5049 *(pa + (i&1)) = dev->dev_addr[i]; 5049 *(pa + (i&1)) = dev->dev_addr[i];
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.h b/drivers/net/ethernet/dec/tulip/de4x5.h
index ec756eba397b..1bfdc9b117f6 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.h
+++ b/drivers/net/ethernet/dec/tulip/de4x5.h
@@ -860,8 +860,8 @@
860#define PCI 0 860#define PCI 0
861#define EISA 1 861#define EISA 1
862 862
863#define HASH_TABLE_LEN 512 /* Bits */ 863#define DE4X5_HASH_TABLE_LEN 512 /* Bits */
864#define HASH_BITS 0x01ff /* 9 LS bits */ 864#define DE4X5_HASH_BITS 0x01ff /* 9 LS bits */
865 865
866#define SETUP_FRAME_LEN 192 /* Bytes */ 866#define SETUP_FRAME_LEN 192 /* Bytes */
867#define IMPERF_PA_OFFSET 156 /* Bytes */ 867#define IMPERF_PA_OFFSET 156 /* Bytes */
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 01f7e811739b..fb5c63881340 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2887,7 +2887,7 @@ fec_enet_close(struct net_device *ndev)
2887 * this kind of feature?). 2887 * this kind of feature?).
2888 */ 2888 */
2889 2889
2890#define HASH_BITS 6 /* #bits in hash */ 2890#define FEC_HASH_BITS 6 /* #bits in hash */
2891#define CRC32_POLY 0xEDB88320 2891#define CRC32_POLY 0xEDB88320
2892 2892
2893static void set_multicast_list(struct net_device *ndev) 2893static void set_multicast_list(struct net_device *ndev)
@@ -2935,10 +2935,10 @@ static void set_multicast_list(struct net_device *ndev)
2935 } 2935 }
2936 } 2936 }
2937 2937
2938 /* only upper 6 bits (HASH_BITS) are used 2938 /* only upper 6 bits (FEC_HASH_BITS) are used
2939 * which point to specific bit in he hash registers 2939 * which point to specific bit in he hash registers
2940 */ 2940 */
2941 hash = (crc >> (32 - HASH_BITS)) & 0x3f; 2941 hash = (crc >> (32 - FEC_HASH_BITS)) & 0x3f;
2942 2942
2943 if (hash > 31) { 2943 if (hash > 31) {
2944 tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH); 2944 tmp = readl(fep->hwp + FEC_GRP_HASH_TABLE_HIGH);