aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/pm3393.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/chelsio/pm3393.c')
-rw-r--r--drivers/net/chelsio/pm3393.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c
index a6eb30a6e2b9..7dbb16d36fff 100644
--- a/drivers/net/chelsio/pm3393.c
+++ b/drivers/net/chelsio/pm3393.c
@@ -44,6 +44,7 @@
44#include "suni1x10gexp_regs.h" 44#include "suni1x10gexp_regs.h"
45 45
46#include <linux/crc32.h> 46#include <linux/crc32.h>
47#include <linux/slab.h>
47 48
48#define OFFSET(REG_ADDR) ((REG_ADDR) << 2) 49#define OFFSET(REG_ADDR) ((REG_ADDR) << 2)
49 50
@@ -376,12 +377,13 @@ static int pm3393_set_rx_mode(struct cmac *cmac, struct t1_rx_mode *rm)
376 rx_mode |= SUNI1x10GEXP_BITMSK_RXXG_MHASH_EN; 377 rx_mode |= SUNI1x10GEXP_BITMSK_RXXG_MHASH_EN;
377 } else if (t1_rx_mode_mc_cnt(rm)) { 378 } else if (t1_rx_mode_mc_cnt(rm)) {
378 /* Accept one or more multicast(s). */ 379 /* Accept one or more multicast(s). */
379 struct dev_mc_list *dmi; 380 struct netdev_hw_addr *ha;
380 int bit; 381 int bit;
381 u16 mc_filter[4] = { 0, }; 382 u16 mc_filter[4] = { 0, };
382 383
383 netdev_for_each_mc_addr(dmi, t1_get_netdev(rm)) { 384 netdev_for_each_mc_addr(ha, t1_get_netdev(rm)) {
384 bit = (ether_crc(ETH_ALEN, dmi->dmi_addr) >> 23) & 0x3f; /* bit[23:28] */ 385 /* bit[23:28] */
386 bit = (ether_crc(ETH_ALEN, ha->addr) >> 23) & 0x3f;
385 mc_filter[bit >> 4] |= 1 << (bit & 0xf); 387 mc_filter[bit >> 4] |= 1 << (bit & 0xf);
386 } 388 }
387 pmwrite(cmac, SUNI1x10GEXP_REG_RXXG_MULTICAST_HASH_LOW, mc_filter[0]); 389 pmwrite(cmac, SUNI1x10GEXP_REG_RXXG_MULTICAST_HASH_LOW, mc_filter[0]);