diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-04-01 17:22:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-03 17:22:15 -0400 |
commit | 22bedad3ce112d5ca1eaf043d4990fa2ed698c87 (patch) | |
tree | b6fba5688d48b1396f01d13ee53610dea7749c15 /drivers/net | |
parent | a748ee2426817a95b1f03012d8f339c45c722ae1 (diff) |
net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list.
+uses two functions for adding/removing mc address (normal and "global"
variant) instead of a function parameter.
+removes dev_mcast.c completely.
+exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
manipulation with lists on a sandbox (used in bonding and 80211 drivers)
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
176 files changed, 722 insertions, 802 deletions
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index 04b5bba19021..81c8b31e629f 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c | |||
@@ -1216,7 +1216,7 @@ static int elp_close(struct net_device *dev) | |||
1216 | static void elp_set_mc_list(struct net_device *dev) | 1216 | static void elp_set_mc_list(struct net_device *dev) |
1217 | { | 1217 | { |
1218 | elp_device *adapter = netdev_priv(dev); | 1218 | elp_device *adapter = netdev_priv(dev); |
1219 | struct dev_mc_list *dmi; | 1219 | struct netdev_hw_addr *ha; |
1220 | int i; | 1220 | int i; |
1221 | unsigned long flags; | 1221 | unsigned long flags; |
1222 | 1222 | ||
@@ -1231,8 +1231,9 @@ static void elp_set_mc_list(struct net_device *dev) | |||
1231 | adapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST; | 1231 | adapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST; |
1232 | adapter->tx_pcb.length = 6 * netdev_mc_count(dev); | 1232 | adapter->tx_pcb.length = 6 * netdev_mc_count(dev); |
1233 | i = 0; | 1233 | i = 0; |
1234 | netdev_for_each_mc_addr(dmi, dev) | 1234 | netdev_for_each_mc_addr(ha, dev) |
1235 | memcpy(adapter->tx_pcb.data.multicast[i++], dmi->dmi_addr, 6); | 1235 | memcpy(adapter->tx_pcb.data.multicast[i++], |
1236 | ha->addr, 6); | ||
1236 | adapter->got[CMD_LOAD_MULTICAST_LIST] = 0; | 1237 | adapter->got[CMD_LOAD_MULTICAST_LIST] = 0; |
1237 | if (!send_pcb(dev, &adapter->tx_pcb)) | 1238 | if (!send_pcb(dev, &adapter->tx_pcb)) |
1238 | pr_err("%s: couldn't send set_multicast command\n", dev->name); | 1239 | pr_err("%s: couldn't send set_multicast command\n", dev->name); |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index beed4fa10c6e..966cb12e1e0a 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -625,7 +625,7 @@ static int init586(struct net_device *dev) | |||
625 | volatile struct iasetup_cmd_struct *ias_cmd; | 625 | volatile struct iasetup_cmd_struct *ias_cmd; |
626 | volatile struct tdr_cmd_struct *tdr_cmd; | 626 | volatile struct tdr_cmd_struct *tdr_cmd; |
627 | volatile struct mcsetup_cmd_struct *mc_cmd; | 627 | volatile struct mcsetup_cmd_struct *mc_cmd; |
628 | struct dev_mc_list *dmi; | 628 | struct netdev_hw_addr *ha; |
629 | int num_addrs = netdev_mc_count(dev); | 629 | int num_addrs = netdev_mc_count(dev); |
630 | 630 | ||
631 | ptr = (void *) ((char *) p->scb + sizeof(struct scb_struct)); | 631 | ptr = (void *) ((char *) p->scb + sizeof(struct scb_struct)); |
@@ -788,8 +788,9 @@ static int init586(struct net_device *dev) | |||
788 | mc_cmd->cmd_link = 0xffff; | 788 | mc_cmd->cmd_link = 0xffff; |
789 | mc_cmd->mc_cnt = num_addrs * 6; | 789 | mc_cmd->mc_cnt = num_addrs * 6; |
790 | i = 0; | 790 | i = 0; |
791 | netdev_for_each_mc_addr(dmi, dev) | 791 | netdev_for_each_mc_addr(ha, dev) |
792 | memcpy((char *) mc_cmd->mc_list[i++], dmi->dmi_addr, 6); | 792 | memcpy((char *) mc_cmd->mc_list[i++], |
793 | ha->addr, 6); | ||
793 | p->scb->cbl_offset = make16(mc_cmd); | 794 | p->scb->cbl_offset = make16(mc_cmd); |
794 | p->scb->cmd = CUC_START; | 795 | p->scb->cmd = CUC_START; |
795 | elmc_id_attn586(); | 796 | elmc_id_attn586(); |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index 5c07b147ec99..38395dfa4963 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
@@ -1533,7 +1533,7 @@ static void do_mc32_set_multicast_list(struct net_device *dev, int retry) | |||
1533 | { | 1533 | { |
1534 | unsigned char block[62]; | 1534 | unsigned char block[62]; |
1535 | unsigned char *bp; | 1535 | unsigned char *bp; |
1536 | struct dev_mc_list *dmc; | 1536 | struct netdev_hw_addr *ha; |
1537 | 1537 | ||
1538 | if(retry==0) | 1538 | if(retry==0) |
1539 | lp->mc_list_valid = 0; | 1539 | lp->mc_list_valid = 0; |
@@ -1543,8 +1543,8 @@ static void do_mc32_set_multicast_list(struct net_device *dev, int retry) | |||
1543 | block[0]=netdev_mc_count(dev); | 1543 | block[0]=netdev_mc_count(dev); |
1544 | bp=block+2; | 1544 | bp=block+2; |
1545 | 1545 | ||
1546 | netdev_for_each_mc_addr(dmc, dev) { | 1546 | netdev_for_each_mc_addr(ha, dev) { |
1547 | memcpy(bp, dmc->dmi_addr, 6); | 1547 | memcpy(bp, ha->addr, 6); |
1548 | bp+=6; | 1548 | bp+=6; |
1549 | } | 1549 | } |
1550 | if(mc32_command_nowait(dev, 2, block, | 1550 | if(mc32_command_nowait(dev, 2, block, |
diff --git a/drivers/net/7990.c b/drivers/net/7990.c index 4e9a5a20b6a6..818837d8ffe7 100644 --- a/drivers/net/7990.c +++ b/drivers/net/7990.c | |||
@@ -595,7 +595,7 @@ static void lance_load_multicast (struct net_device *dev) | |||
595 | struct lance_private *lp = netdev_priv(dev); | 595 | struct lance_private *lp = netdev_priv(dev); |
596 | volatile struct lance_init_block *ib = lp->init_block; | 596 | volatile struct lance_init_block *ib = lp->init_block; |
597 | volatile u16 *mcast_table = (u16 *)&ib->filter; | 597 | volatile u16 *mcast_table = (u16 *)&ib->filter; |
598 | struct dev_mc_list *dmi; | 598 | struct netdev_hw_addr *ha; |
599 | char *addrs; | 599 | char *addrs; |
600 | u32 crc; | 600 | u32 crc; |
601 | 601 | ||
@@ -610,8 +610,8 @@ static void lance_load_multicast (struct net_device *dev) | |||
610 | ib->filter [1] = 0; | 610 | ib->filter [1] = 0; |
611 | 611 | ||
612 | /* Add addresses */ | 612 | /* Add addresses */ |
613 | netdev_for_each_mc_addr(dmi, dev) { | 613 | netdev_for_each_mc_addr(ha, dev) { |
614 | addrs = dmi->dmi_addr; | 614 | addrs = ha->addr; |
615 | 615 | ||
616 | /* multicast address? */ | 616 | /* multicast address? */ |
617 | if (!(*addrs & 1)) | 617 | if (!(*addrs & 1)) |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 3d4406b16658..e4e2aef11017 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -909,11 +909,11 @@ static void __cp_set_rx_mode (struct net_device *dev) | |||
909 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 909 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
910 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 910 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
911 | } else { | 911 | } else { |
912 | struct dev_mc_list *mclist; | 912 | struct netdev_hw_addr *ha; |
913 | rx_mode = AcceptBroadcast | AcceptMyPhys; | 913 | rx_mode = AcceptBroadcast | AcceptMyPhys; |
914 | mc_filter[1] = mc_filter[0] = 0; | 914 | mc_filter[1] = mc_filter[0] = 0; |
915 | netdev_for_each_mc_addr(mclist, dev) { | 915 | netdev_for_each_mc_addr(ha, dev) { |
916 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 916 | int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; |
917 | 917 | ||
918 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 918 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
919 | rx_mode |= AcceptMulticast; | 919 | rx_mode |= AcceptMulticast; |
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index b4efc913978b..f61784c3c4a2 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -2502,11 +2502,11 @@ static void __set_rx_mode (struct net_device *dev) | |||
2502 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 2502 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
2503 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 2503 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
2504 | } else { | 2504 | } else { |
2505 | struct dev_mc_list *mclist; | 2505 | struct netdev_hw_addr *ha; |
2506 | rx_mode = AcceptBroadcast | AcceptMyPhys; | 2506 | rx_mode = AcceptBroadcast | AcceptMyPhys; |
2507 | mc_filter[1] = mc_filter[0] = 0; | 2507 | mc_filter[1] = mc_filter[0] = 0; |
2508 | netdev_for_each_mc_addr(mclist, dev) { | 2508 | netdev_for_each_mc_addr(ha, dev) { |
2509 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 2509 | int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; |
2510 | 2510 | ||
2511 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 2511 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
2512 | rx_mode |= AcceptMulticast; | 2512 | rx_mode |= AcceptMulticast; |
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index f94d17d78bb0..3a28b1f451d9 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -1542,7 +1542,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1542 | } | 1542 | } |
1543 | 1543 | ||
1544 | if (!netdev_mc_empty(dev)) { | 1544 | if (!netdev_mc_empty(dev)) { |
1545 | struct dev_mc_list *dmi; | 1545 | struct netdev_hw_addr *ha; |
1546 | unsigned char *cp; | 1546 | unsigned char *cp; |
1547 | struct mc_cmd *cmd; | 1547 | struct mc_cmd *cmd; |
1548 | 1548 | ||
@@ -1552,10 +1552,10 @@ static void set_multicast_list(struct net_device *dev) | |||
1552 | cmd->cmd.command = CmdMulticastList; | 1552 | cmd->cmd.command = CmdMulticastList; |
1553 | cmd->mc_cnt = cnt * ETH_ALEN; | 1553 | cmd->mc_cnt = cnt * ETH_ALEN; |
1554 | cp = cmd->mc_addrs; | 1554 | cp = cmd->mc_addrs; |
1555 | netdev_for_each_mc_addr(dmi, dev) { | 1555 | netdev_for_each_mc_addr(ha, dev) { |
1556 | if (!cnt--) | 1556 | if (!cnt--) |
1557 | break; | 1557 | break; |
1558 | memcpy(cp, dmi->dmi_addr, ETH_ALEN); | 1558 | memcpy(cp, ha->addr, ETH_ALEN); |
1559 | if (i596_debug > 1) | 1559 | if (i596_debug > 1) |
1560 | DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n", | 1560 | DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n", |
1561 | dev->name, cp)); | 1561 | dev->name, cp)); |
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index bd4d829eca12..7cce643793c3 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c | |||
@@ -603,7 +603,7 @@ static void lance_load_multicast (struct net_device *dev) | |||
603 | struct lance_private *lp = netdev_priv(dev); | 603 | struct lance_private *lp = netdev_priv(dev); |
604 | volatile struct lance_init_block *ib = lp->init_block; | 604 | volatile struct lance_init_block *ib = lp->init_block; |
605 | volatile u16 *mcast_table = (u16 *)&ib->filter; | 605 | volatile u16 *mcast_table = (u16 *)&ib->filter; |
606 | struct dev_mc_list *dmi; | 606 | struct netdev_hw_addr *ha; |
607 | char *addrs; | 607 | char *addrs; |
608 | u32 crc; | 608 | u32 crc; |
609 | 609 | ||
@@ -618,8 +618,8 @@ static void lance_load_multicast (struct net_device *dev) | |||
618 | ib->filter [1] = 0; | 618 | ib->filter [1] = 0; |
619 | 619 | ||
620 | /* Add addresses */ | 620 | /* Add addresses */ |
621 | netdev_for_each_mc_addr(dmi, dev) { | 621 | netdev_for_each_mc_addr(ha, dev) { |
622 | addrs = dmi->dmi_addr; | 622 | addrs = ha->addr; |
623 | 623 | ||
624 | /* multicast address? */ | 624 | /* multicast address? */ |
625 | if (!(*addrs & 1)) | 625 | if (!(*addrs & 1)) |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index b8a59d255b49..d002c764a26c 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1377,7 +1377,7 @@ list to the device. | |||
1377 | */ | 1377 | */ |
1378 | static void amd8111e_set_multicast_list(struct net_device *dev) | 1378 | static void amd8111e_set_multicast_list(struct net_device *dev) |
1379 | { | 1379 | { |
1380 | struct dev_mc_list *mc_ptr; | 1380 | struct netdev_hw_addr *ha; |
1381 | struct amd8111e_priv *lp = netdev_priv(dev); | 1381 | struct amd8111e_priv *lp = netdev_priv(dev); |
1382 | u32 mc_filter[2] ; | 1382 | u32 mc_filter[2] ; |
1383 | int bit_num; | 1383 | int bit_num; |
@@ -1408,8 +1408,8 @@ static void amd8111e_set_multicast_list(struct net_device *dev) | |||
1408 | /* load all the multicast addresses in the logic filter */ | 1408 | /* load all the multicast addresses in the logic filter */ |
1409 | lp->options |= OPTION_MULTICAST_ENABLE; | 1409 | lp->options |= OPTION_MULTICAST_ENABLE; |
1410 | mc_filter[1] = mc_filter[0] = 0; | 1410 | mc_filter[1] = mc_filter[0] = 0; |
1411 | netdev_for_each_mc_addr(mc_ptr, dev) { | 1411 | netdev_for_each_mc_addr(ha, dev) { |
1412 | bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f; | 1412 | bit_num = (ether_crc_le(ETH_ALEN, ha->addr) >> 26) & 0x3f; |
1413 | mc_filter[bit_num >> 5] |= 1 << (bit_num & 31); | 1413 | mc_filter[bit_num >> 5] |= 1 << (bit_num & 31); |
1414 | } | 1414 | } |
1415 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio+ LADRF); | 1415 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio+ LADRF); |
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c index f1f58c5e27bf..a4b5b08276f8 100644 --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c | |||
@@ -383,12 +383,12 @@ static void am79c961_setmulticastlist (struct net_device *dev) | |||
383 | } else if (dev->flags & IFF_ALLMULTI) { | 383 | } else if (dev->flags & IFF_ALLMULTI) { |
384 | memset(multi_hash, 0xff, sizeof(multi_hash)); | 384 | memset(multi_hash, 0xff, sizeof(multi_hash)); |
385 | } else { | 385 | } else { |
386 | struct dev_mc_list *dmi; | 386 | struct netdev_hw_addr *ha; |
387 | 387 | ||
388 | memset(multi_hash, 0x00, sizeof(multi_hash)); | 388 | memset(multi_hash, 0x00, sizeof(multi_hash)); |
389 | 389 | ||
390 | netdev_for_each_mc_addr(dmi, dev) | 390 | netdev_for_each_mc_addr(ha, dev) |
391 | am79c961_mc_hash(dmi->dmi_addr, multi_hash); | 391 | am79c961_mc_hash(ha->addr, multi_hash); |
392 | } | 392 | } |
393 | 393 | ||
394 | spin_lock_irqsave(&priv->chip_lock, flags); | 394 | spin_lock_irqsave(&priv->chip_lock, flags); |
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index 8b23d5a175bf..f31e8b6cbf73 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c | |||
@@ -556,14 +556,14 @@ static int hash_get_index(__u8 *addr) | |||
556 | */ | 556 | */ |
557 | static void at91ether_sethashtable(struct net_device *dev) | 557 | static void at91ether_sethashtable(struct net_device *dev) |
558 | { | 558 | { |
559 | struct dev_mc_list *curr; | 559 | struct netdev_hw_addr *ha; |
560 | unsigned long mc_filter[2]; | 560 | unsigned long mc_filter[2]; |
561 | unsigned int bitnr; | 561 | unsigned int bitnr; |
562 | 562 | ||
563 | mc_filter[0] = mc_filter[1] = 0; | 563 | mc_filter[0] = mc_filter[1] = 0; |
564 | 564 | ||
565 | netdev_for_each_mc_addr(curr, dev) { | 565 | netdev_for_each_mc_addr(ha, dev) { |
566 | bitnr = hash_get_index(curr->dmi_addr); | 566 | bitnr = hash_get_index(ha->addr); |
567 | mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); | 567 | mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); |
568 | } | 568 | } |
569 | 569 | ||
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 6e2ae1d06df1..f9d168775d06 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -735,7 +735,7 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
735 | static void eth_set_mcast_list(struct net_device *dev) | 735 | static void eth_set_mcast_list(struct net_device *dev) |
736 | { | 736 | { |
737 | struct port *port = netdev_priv(dev); | 737 | struct port *port = netdev_priv(dev); |
738 | struct dev_mc_list *mclist; | 738 | struct netdev_hw_addr *ha; |
739 | u8 diffs[ETH_ALEN], *addr; | 739 | u8 diffs[ETH_ALEN], *addr; |
740 | int i; | 740 | int i; |
741 | 741 | ||
@@ -748,11 +748,11 @@ static void eth_set_mcast_list(struct net_device *dev) | |||
748 | memset(diffs, 0, ETH_ALEN); | 748 | memset(diffs, 0, ETH_ALEN); |
749 | 749 | ||
750 | addr = NULL; | 750 | addr = NULL; |
751 | netdev_for_each_mc_addr(mclist, dev) { | 751 | netdev_for_each_mc_addr(ha, dev) { |
752 | if (!addr) | 752 | if (!addr) |
753 | addr = mclist->dmi_addr; /* first MAC address */ | 753 | addr = ha->addr; /* first MAC address */ |
754 | for (i = 0; i < ETH_ALEN; i++) | 754 | for (i = 0; i < ETH_ALEN; i++) |
755 | diffs[i] |= addr[i] ^ mclist->dmi_addr[i]; | 755 | diffs[i] |= addr[i] ^ ha->addr[i]; |
756 | } | 756 | } |
757 | 757 | ||
758 | for (i = 0; i < ETH_ALEN; i++) { | 758 | for (i = 0; i < ETH_ALEN; i++) { |
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index e7810b74f396..6ec245c6394b 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -331,16 +331,16 @@ ks8695_init_partial_multicast(struct ks8695_priv *ksp, | |||
331 | { | 331 | { |
332 | u32 low, high; | 332 | u32 low, high; |
333 | int i; | 333 | int i; |
334 | struct dev_mc_list *dmi; | 334 | struct netdev_hw_addr *ha; |
335 | 335 | ||
336 | i = 0; | 336 | i = 0; |
337 | netdev_for_each_mc_addr(dmi, ndev) { | 337 | netdev_for_each_mc_addr(ha, ndev) { |
338 | /* Ran out of space in chip? */ | 338 | /* Ran out of space in chip? */ |
339 | BUG_ON(i == KS8695_NR_ADDRESSES); | 339 | BUG_ON(i == KS8695_NR_ADDRESSES); |
340 | 340 | ||
341 | low = (dmi->dmi_addr[2] << 24) | (dmi->dmi_addr[3] << 16) | | 341 | low = (ha->addr[2] << 24) | (ha->addr[3] << 16) | |
342 | (dmi->dmi_addr[4] << 8) | (dmi->dmi_addr[5]); | 342 | (ha->addr[4] << 8) | (ha->addr[5]); |
343 | high = (dmi->dmi_addr[0] << 8) | (dmi->dmi_addr[1]); | 343 | high = (ha->addr[0] << 8) | (ha->addr[1]); |
344 | 344 | ||
345 | ks8695_writereg(ksp, KS8695_AAL_(i), low); | 345 | ks8695_writereg(ksp, KS8695_AAL_(i), low); |
346 | ks8695_writereg(ksp, KS8695_AAH_(i), AAH_E | high); | 346 | ks8695_writereg(ksp, KS8695_AAH_(i), AAH_E | high); |
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index 309843ab8869..e2a549a60e25 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -848,12 +848,12 @@ set_rx_mode(struct net_device *dev) | |||
848 | memset(mc_filter, 0x00, sizeof(mc_filter)); | 848 | memset(mc_filter, 0x00, sizeof(mc_filter)); |
849 | outb(1, ioaddr + RX_MODE); /* Ignore almost all multicasts. */ | 849 | outb(1, ioaddr + RX_MODE); /* Ignore almost all multicasts. */ |
850 | } else { | 850 | } else { |
851 | struct dev_mc_list *mclist; | 851 | struct netdev_hw_addr *ha; |
852 | 852 | ||
853 | memset(mc_filter, 0, sizeof(mc_filter)); | 853 | memset(mc_filter, 0, sizeof(mc_filter)); |
854 | netdev_for_each_mc_addr(mclist, dev) { | 854 | netdev_for_each_mc_addr(ha, dev) { |
855 | unsigned int bit = | 855 | unsigned int bit = |
856 | ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 26; | 856 | ether_crc_le(ETH_ALEN, ha->addr) >> 26; |
857 | mc_filter[bit >> 3] |= (1 << bit); | 857 | mc_filter[bit >> 3] |= (1 << bit); |
858 | } | 858 | } |
859 | outb(0x02, ioaddr + RX_MODE); /* Use normal mode. */ | 859 | outb(0x02, ioaddr + RX_MODE); /* Use normal mode. */ |
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c index a5508e1b261b..3d7051135c3a 100644 --- a/drivers/net/atl1c/atl1c_main.c +++ b/drivers/net/atl1c/atl1c_main.c | |||
@@ -354,7 +354,7 @@ static void atl1c_set_multi(struct net_device *netdev) | |||
354 | { | 354 | { |
355 | struct atl1c_adapter *adapter = netdev_priv(netdev); | 355 | struct atl1c_adapter *adapter = netdev_priv(netdev); |
356 | struct atl1c_hw *hw = &adapter->hw; | 356 | struct atl1c_hw *hw = &adapter->hw; |
357 | struct dev_mc_list *mc_ptr; | 357 | struct netdev_hw_addr *ha; |
358 | u32 mac_ctrl_data; | 358 | u32 mac_ctrl_data; |
359 | u32 hash_value; | 359 | u32 hash_value; |
360 | 360 | ||
@@ -377,8 +377,8 @@ static void atl1c_set_multi(struct net_device *netdev) | |||
377 | AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); | 377 | AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); |
378 | 378 | ||
379 | /* comoute mc addresses' hash value ,and put it into hash table */ | 379 | /* comoute mc addresses' hash value ,and put it into hash table */ |
380 | netdev_for_each_mc_addr(mc_ptr, netdev) { | 380 | netdev_for_each_mc_addr(ha, netdev) { |
381 | hash_value = atl1c_hash_mc_addr(hw, mc_ptr->dmi_addr); | 381 | hash_value = atl1c_hash_mc_addr(hw, ha->addr); |
382 | atl1c_hash_set(hw, hash_value); | 382 | atl1c_hash_set(hw, hash_value); |
383 | } | 383 | } |
384 | } | 384 | } |
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c index 7231b5779122..b6605d433e91 100644 --- a/drivers/net/atl1e/atl1e_main.c +++ b/drivers/net/atl1e/atl1e_main.c | |||
@@ -284,7 +284,7 @@ static void atl1e_set_multi(struct net_device *netdev) | |||
284 | { | 284 | { |
285 | struct atl1e_adapter *adapter = netdev_priv(netdev); | 285 | struct atl1e_adapter *adapter = netdev_priv(netdev); |
286 | struct atl1e_hw *hw = &adapter->hw; | 286 | struct atl1e_hw *hw = &adapter->hw; |
287 | struct dev_mc_list *mc_ptr; | 287 | struct netdev_hw_addr *ha; |
288 | u32 mac_ctrl_data = 0; | 288 | u32 mac_ctrl_data = 0; |
289 | u32 hash_value; | 289 | u32 hash_value; |
290 | 290 | ||
@@ -307,8 +307,8 @@ static void atl1e_set_multi(struct net_device *netdev) | |||
307 | AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); | 307 | AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); |
308 | 308 | ||
309 | /* comoute mc addresses' hash value ,and put it into hash table */ | 309 | /* comoute mc addresses' hash value ,and put it into hash table */ |
310 | netdev_for_each_mc_addr(mc_ptr, netdev) { | 310 | netdev_for_each_mc_addr(ha, netdev) { |
311 | hash_value = atl1e_hash_mc_addr(hw, mc_ptr->dmi_addr); | 311 | hash_value = atl1e_hash_mc_addr(hw, ha->addr); |
312 | atl1e_hash_set(hw, hash_value); | 312 | atl1e_hash_set(hw, hash_value); |
313 | } | 313 | } |
314 | } | 314 | } |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index 199f2c9ce749..078d9d1b427c 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -135,7 +135,7 @@ static void atl2_set_multi(struct net_device *netdev) | |||
135 | { | 135 | { |
136 | struct atl2_adapter *adapter = netdev_priv(netdev); | 136 | struct atl2_adapter *adapter = netdev_priv(netdev); |
137 | struct atl2_hw *hw = &adapter->hw; | 137 | struct atl2_hw *hw = &adapter->hw; |
138 | struct dev_mc_list *mc_ptr; | 138 | struct netdev_hw_addr *ha; |
139 | u32 rctl; | 139 | u32 rctl; |
140 | u32 hash_value; | 140 | u32 hash_value; |
141 | 141 | ||
@@ -157,8 +157,8 @@ static void atl2_set_multi(struct net_device *netdev) | |||
157 | ATL2_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); | 157 | ATL2_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); |
158 | 158 | ||
159 | /* comoute mc addresses' hash value ,and put it into hash table */ | 159 | /* comoute mc addresses' hash value ,and put it into hash table */ |
160 | netdev_for_each_mc_addr(mc_ptr, netdev) { | 160 | netdev_for_each_mc_addr(ha, netdev) { |
161 | hash_value = atl2_hash_mc_addr(hw, mc_ptr->dmi_addr); | 161 | hash_value = atl2_hash_mc_addr(hw, ha->addr); |
162 | atl2_hash_set(hw, hash_value); | 162 | atl2_hash_set(hw, hash_value); |
163 | } | 163 | } |
164 | } | 164 | } |
diff --git a/drivers/net/atlx/atlx.c b/drivers/net/atlx/atlx.c index 72f3306352e2..f979ea2d6d3c 100644 --- a/drivers/net/atlx/atlx.c +++ b/drivers/net/atlx/atlx.c | |||
@@ -123,7 +123,7 @@ static void atlx_set_multi(struct net_device *netdev) | |||
123 | { | 123 | { |
124 | struct atlx_adapter *adapter = netdev_priv(netdev); | 124 | struct atlx_adapter *adapter = netdev_priv(netdev); |
125 | struct atlx_hw *hw = &adapter->hw; | 125 | struct atlx_hw *hw = &adapter->hw; |
126 | struct dev_mc_list *mc_ptr; | 126 | struct netdev_hw_addr *ha; |
127 | u32 rctl; | 127 | u32 rctl; |
128 | u32 hash_value; | 128 | u32 hash_value; |
129 | 129 | ||
@@ -144,8 +144,8 @@ static void atlx_set_multi(struct net_device *netdev) | |||
144 | iowrite32(0, (hw->hw_addr + REG_RX_HASH_TABLE) + (1 << 2)); | 144 | iowrite32(0, (hw->hw_addr + REG_RX_HASH_TABLE) + (1 << 2)); |
145 | 145 | ||
146 | /* compute mc addresses' hash value ,and put it into hash table */ | 146 | /* compute mc addresses' hash value ,and put it into hash table */ |
147 | netdev_for_each_mc_addr(mc_ptr, netdev) { | 147 | netdev_for_each_mc_addr(ha, netdev) { |
148 | hash_value = atlx_hash_mc_addr(hw, mc_ptr->dmi_addr); | 148 | hash_value = atlx_hash_mc_addr(hw, ha->addr); |
149 | atlx_hash_set(hw, hash_value); | 149 | atlx_hash_set(hw, hash_value); |
150 | } | 150 | } |
151 | } | 151 | } |
diff --git a/drivers/net/atp.c b/drivers/net/atp.c index 6ad16205dc17..0d730c8329d4 100644 --- a/drivers/net/atp.c +++ b/drivers/net/atp.c | |||
@@ -883,11 +883,11 @@ static void set_rx_mode_8012(struct net_device *dev) | |||
883 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 883 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
884 | new_mode = CMR2h_Normal; | 884 | new_mode = CMR2h_Normal; |
885 | } else { | 885 | } else { |
886 | struct dev_mc_list *mclist; | 886 | struct netdev_hw_addr *ha; |
887 | 887 | ||
888 | memset(mc_filter, 0, sizeof(mc_filter)); | 888 | memset(mc_filter, 0, sizeof(mc_filter)); |
889 | netdev_for_each_mc_addr(mclist, dev) { | 889 | netdev_for_each_mc_addr(ha, dev) { |
890 | int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f; | 890 | int filterbit = ether_crc_le(ETH_ALEN, ha->addr) & 0x3f; |
891 | mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); | 891 | mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); |
892 | } | 892 | } |
893 | new_mode = CMR2h_Normal; | 893 | new_mode = CMR2h_Normal; |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 4da191b87b0d..29631593cc23 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -957,12 +957,12 @@ static void au1000_multicast_list(struct net_device *dev) | |||
957 | aup->mac->control &= ~MAC_PROMISCUOUS; | 957 | aup->mac->control &= ~MAC_PROMISCUOUS; |
958 | printk(KERN_INFO "%s: Pass all multicast\n", dev->name); | 958 | printk(KERN_INFO "%s: Pass all multicast\n", dev->name); |
959 | } else { | 959 | } else { |
960 | struct dev_mc_list *mclist; | 960 | struct netdev_hw_addr *ha; |
961 | u32 mc_filter[2]; /* Multicast hash filter */ | 961 | u32 mc_filter[2]; /* Multicast hash filter */ |
962 | 962 | ||
963 | mc_filter[1] = mc_filter[0] = 0; | 963 | mc_filter[1] = mc_filter[0] = 0; |
964 | netdev_for_each_mc_addr(mclist, dev) | 964 | netdev_for_each_mc_addr(ha, dev) |
965 | set_bit(ether_crc(ETH_ALEN, mclist->dmi_addr)>>26, | 965 | set_bit(ether_crc(ETH_ALEN, ha->addr)>>26, |
966 | (long *)mc_filter); | 966 | (long *)mc_filter); |
967 | aup->mac->multi_hash_high = mc_filter[1]; | 967 | aup->mac->multi_hash_high = mc_filter[1]; |
968 | aup->mac->multi_hash_low = mc_filter[0]; | 968 | aup->mac->multi_hash_low = mc_filter[0]; |
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 332c60356285..b2c5fd7b63af 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1680,15 +1680,15 @@ static struct net_device_stats *b44_get_stats(struct net_device *dev) | |||
1680 | 1680 | ||
1681 | static int __b44_load_mcast(struct b44 *bp, struct net_device *dev) | 1681 | static int __b44_load_mcast(struct b44 *bp, struct net_device *dev) |
1682 | { | 1682 | { |
1683 | struct dev_mc_list *mclist; | 1683 | struct netdev_hw_addr *ha; |
1684 | int i, num_ents; | 1684 | int i, num_ents; |
1685 | 1685 | ||
1686 | num_ents = min_t(int, netdev_mc_count(dev), B44_MCAST_TABLE_SIZE); | 1686 | num_ents = min_t(int, netdev_mc_count(dev), B44_MCAST_TABLE_SIZE); |
1687 | i = 0; | 1687 | i = 0; |
1688 | netdev_for_each_mc_addr(mclist, dev) { | 1688 | netdev_for_each_mc_addr(ha, dev) { |
1689 | if (i == num_ents) | 1689 | if (i == num_ents) |
1690 | break; | 1690 | break; |
1691 | __b44_cam_write(bp, mclist->dmi_addr, i++ + 1); | 1691 | __b44_cam_write(bp, ha->addr, i++ + 1); |
1692 | } | 1692 | } |
1693 | return i+1; | 1693 | return i+1; |
1694 | } | 1694 | } |
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index 37eb8021de1c..51733404478e 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c | |||
@@ -603,7 +603,7 @@ static int bcm_enet_set_mac_address(struct net_device *dev, void *p) | |||
603 | static void bcm_enet_set_multicast_list(struct net_device *dev) | 603 | static void bcm_enet_set_multicast_list(struct net_device *dev) |
604 | { | 604 | { |
605 | struct bcm_enet_priv *priv; | 605 | struct bcm_enet_priv *priv; |
606 | struct dev_mc_list *mc_list; | 606 | struct netdev_hw_addr *ha; |
607 | u32 val; | 607 | u32 val; |
608 | int i; | 608 | int i; |
609 | 609 | ||
@@ -631,14 +631,14 @@ static void bcm_enet_set_multicast_list(struct net_device *dev) | |||
631 | } | 631 | } |
632 | 632 | ||
633 | i = 0; | 633 | i = 0; |
634 | netdev_for_each_mc_addr(mc_list, dev) { | 634 | netdev_for_each_mc_addr(ha, dev) { |
635 | u8 *dmi_addr; | 635 | u8 *dmi_addr; |
636 | u32 tmp; | 636 | u32 tmp; |
637 | 637 | ||
638 | if (i == 3) | 638 | if (i == 3) |
639 | break; | 639 | break; |
640 | /* update perfect match registers */ | 640 | /* update perfect match registers */ |
641 | dmi_addr = mc_list->dmi_addr; | 641 | dmi_addr = ha->addr; |
642 | tmp = (dmi_addr[2] << 24) | (dmi_addr[3] << 16) | | 642 | tmp = (dmi_addr[2] << 24) | (dmi_addr[3] << 16) | |
643 | (dmi_addr[4] << 8) | dmi_addr[5]; | 643 | (dmi_addr[4] << 8) | dmi_addr[5]; |
644 | enet_writel(priv, tmp, ENET_PML_REG(i + 1)); | 644 | enet_writel(priv, tmp, ENET_PML_REG(i + 1)); |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 9f53d9e86e2b..61a9afdb83f4 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -1159,13 +1159,13 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, | |||
1159 | req->interface_id = if_id; | 1159 | req->interface_id = if_id; |
1160 | if (netdev) { | 1160 | if (netdev) { |
1161 | int i; | 1161 | int i; |
1162 | struct dev_mc_list *mc; | 1162 | struct netdev_hw_addr *ha; |
1163 | 1163 | ||
1164 | req->num_mac = cpu_to_le16(netdev_mc_count(netdev)); | 1164 | req->num_mac = cpu_to_le16(netdev_mc_count(netdev)); |
1165 | 1165 | ||
1166 | i = 0; | 1166 | i = 0; |
1167 | netdev_for_each_mc_addr(mc, netdev) | 1167 | netdev_for_each_mc_addr(ha, netdev) |
1168 | memcpy(req->mac[i].byte, mc->dmi_addr, ETH_ALEN); | 1168 | memcpy(req->mac[i].byte, ha->addr, ETH_ALEN); |
1169 | } else { | 1169 | } else { |
1170 | req->promiscuous = 1; | 1170 | req->promiscuous = 1; |
1171 | } | 1171 | } |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 587f93cf03f6..c488cea8f455 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -812,14 +812,14 @@ static void bfin_mac_timeout(struct net_device *dev) | |||
812 | static void bfin_mac_multicast_hash(struct net_device *dev) | 812 | static void bfin_mac_multicast_hash(struct net_device *dev) |
813 | { | 813 | { |
814 | u32 emac_hashhi, emac_hashlo; | 814 | u32 emac_hashhi, emac_hashlo; |
815 | struct dev_mc_list *dmi; | 815 | struct netdev_hw_addr *ha; |
816 | char *addrs; | 816 | char *addrs; |
817 | u32 crc; | 817 | u32 crc; |
818 | 818 | ||
819 | emac_hashhi = emac_hashlo = 0; | 819 | emac_hashhi = emac_hashlo = 0; |
820 | 820 | ||
821 | netdev_for_each_mc_addr(dmi, dev) { | 821 | netdev_for_each_mc_addr(ha, dev) { |
822 | addrs = dmi->dmi_addr; | 822 | addrs = ha->addr; |
823 | 823 | ||
824 | /* skip non-multicast addresses */ | 824 | /* skip non-multicast addresses */ |
825 | if (!(*addrs & 1)) | 825 | if (!(*addrs & 1)) |
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 119468e76323..1245e9835765 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -971,7 +971,7 @@ bmac_remove_multi(struct net_device *dev, | |||
971 | */ | 971 | */ |
972 | static void bmac_set_multicast(struct net_device *dev) | 972 | static void bmac_set_multicast(struct net_device *dev) |
973 | { | 973 | { |
974 | struct dev_mc_list *dmi; | 974 | struct netdev_hw_addr *ha; |
975 | struct bmac_data *bp = netdev_priv(dev); | 975 | struct bmac_data *bp = netdev_priv(dev); |
976 | int num_addrs = netdev_mc_count(dev); | 976 | int num_addrs = netdev_mc_count(dev); |
977 | unsigned short rx_cfg; | 977 | unsigned short rx_cfg; |
@@ -1000,8 +1000,8 @@ static void bmac_set_multicast(struct net_device *dev) | |||
1000 | rx_cfg = bmac_rx_on(dev, 0, 0); | 1000 | rx_cfg = bmac_rx_on(dev, 0, 0); |
1001 | XXDEBUG(("bmac: multi disabled, rx_cfg=%#08x\n", rx_cfg)); | 1001 | XXDEBUG(("bmac: multi disabled, rx_cfg=%#08x\n", rx_cfg)); |
1002 | } else { | 1002 | } else { |
1003 | netdev_for_each_mc_addr(dmi, dev) | 1003 | netdev_for_each_mc_addr(ha, dev) |
1004 | bmac_addhash(bp, dmi->dmi_addr); | 1004 | bmac_addhash(bp, ha->addr); |
1005 | bmac_update_hash_table_mask(dev, bp); | 1005 | bmac_update_hash_table_mask(dev, bp); |
1006 | rx_cfg = bmac_rx_on(dev, 1, 0); | 1006 | rx_cfg = bmac_rx_on(dev, 1, 0); |
1007 | XXDEBUG(("bmac: multi enabled, rx_cfg=%#08x\n", rx_cfg)); | 1007 | XXDEBUG(("bmac: multi enabled, rx_cfg=%#08x\n", rx_cfg)); |
@@ -1015,7 +1015,7 @@ static void bmac_set_multicast(struct net_device *dev) | |||
1015 | 1015 | ||
1016 | static void bmac_set_multicast(struct net_device *dev) | 1016 | static void bmac_set_multicast(struct net_device *dev) |
1017 | { | 1017 | { |
1018 | struct dev_mc_list *dmi; | 1018 | struct netdev_hw_addr *ha; |
1019 | char *addrs; | 1019 | char *addrs; |
1020 | int i; | 1020 | int i; |
1021 | unsigned short rx_cfg; | 1021 | unsigned short rx_cfg; |
@@ -1039,8 +1039,8 @@ static void bmac_set_multicast(struct net_device *dev) | |||
1039 | 1039 | ||
1040 | for(i = 0; i < 4; i++) hash_table[i] = 0; | 1040 | for(i = 0; i < 4; i++) hash_table[i] = 0; |
1041 | 1041 | ||
1042 | netdev_for_each_mc_addr(dmi, dev) { | 1042 | netdev_for_each_mc_addr(ha, dev) { |
1043 | addrs = dmi->dmi_addr; | 1043 | addrs = ha->addr; |
1044 | 1044 | ||
1045 | if(!(*addrs & 1)) | 1045 | if(!(*addrs & 1)) |
1046 | continue; | 1046 | continue; |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 381887ba677c..0b69ffb7951d 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -3544,7 +3544,6 @@ bnx2_set_rx_mode(struct net_device *dev) | |||
3544 | } | 3544 | } |
3545 | else { | 3545 | else { |
3546 | /* Accept one or more multicast(s). */ | 3546 | /* Accept one or more multicast(s). */ |
3547 | struct dev_mc_list *mclist; | ||
3548 | u32 mc_filter[NUM_MC_HASH_REGISTERS]; | 3547 | u32 mc_filter[NUM_MC_HASH_REGISTERS]; |
3549 | u32 regidx; | 3548 | u32 regidx; |
3550 | u32 bit; | 3549 | u32 bit; |
@@ -3552,8 +3551,8 @@ bnx2_set_rx_mode(struct net_device *dev) | |||
3552 | 3551 | ||
3553 | memset(mc_filter, 0, 4 * NUM_MC_HASH_REGISTERS); | 3552 | memset(mc_filter, 0, 4 * NUM_MC_HASH_REGISTERS); |
3554 | 3553 | ||
3555 | netdev_for_each_mc_addr(mclist, dev) { | 3554 | netdev_for_each_mc_addr(ha, dev) { |
3556 | crc = ether_crc_le(ETH_ALEN, mclist->dmi_addr); | 3555 | crc = ether_crc_le(ETH_ALEN, ha->addr); |
3557 | bit = crc & 0xff; | 3556 | bit = crc & 0xff; |
3558 | regidx = (bit & 0xe0) >> 5; | 3557 | regidx = (bit & 0xe0) >> 5; |
3559 | bit &= 0x1f; | 3558 | bit &= 0x1f; |
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index f4ea99d06c77..fa9275c2ef5c 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -11496,21 +11496,21 @@ static void bnx2x_set_rx_mode(struct net_device *dev) | |||
11496 | else { /* some multicasts */ | 11496 | else { /* some multicasts */ |
11497 | if (CHIP_IS_E1(bp)) { | 11497 | if (CHIP_IS_E1(bp)) { |
11498 | int i, old, offset; | 11498 | int i, old, offset; |
11499 | struct dev_mc_list *mclist; | 11499 | struct netdev_hw_addr *ha; |
11500 | struct mac_configuration_cmd *config = | 11500 | struct mac_configuration_cmd *config = |
11501 | bnx2x_sp(bp, mcast_config); | 11501 | bnx2x_sp(bp, mcast_config); |
11502 | 11502 | ||
11503 | i = 0; | 11503 | i = 0; |
11504 | netdev_for_each_mc_addr(mclist, dev) { | 11504 | netdev_for_each_mc_addr(ha, dev) { |
11505 | config->config_table[i]. | 11505 | config->config_table[i]. |
11506 | cam_entry.msb_mac_addr = | 11506 | cam_entry.msb_mac_addr = |
11507 | swab16(*(u16 *)&mclist->dmi_addr[0]); | 11507 | swab16(*(u16 *)&ha->addr[0]); |
11508 | config->config_table[i]. | 11508 | config->config_table[i]. |
11509 | cam_entry.middle_mac_addr = | 11509 | cam_entry.middle_mac_addr = |
11510 | swab16(*(u16 *)&mclist->dmi_addr[2]); | 11510 | swab16(*(u16 *)&ha->addr[2]); |
11511 | config->config_table[i]. | 11511 | config->config_table[i]. |
11512 | cam_entry.lsb_mac_addr = | 11512 | cam_entry.lsb_mac_addr = |
11513 | swab16(*(u16 *)&mclist->dmi_addr[4]); | 11513 | swab16(*(u16 *)&ha->addr[4]); |
11514 | config->config_table[i].cam_entry.flags = | 11514 | config->config_table[i].cam_entry.flags = |
11515 | cpu_to_le16(port); | 11515 | cpu_to_le16(port); |
11516 | config->config_table[i]. | 11516 | config->config_table[i]. |
@@ -11564,18 +11564,18 @@ static void bnx2x_set_rx_mode(struct net_device *dev) | |||
11564 | 0); | 11564 | 0); |
11565 | } else { /* E1H */ | 11565 | } else { /* E1H */ |
11566 | /* Accept one or more multicasts */ | 11566 | /* Accept one or more multicasts */ |
11567 | struct dev_mc_list *mclist; | 11567 | struct netdev_hw_addr *ha; |
11568 | u32 mc_filter[MC_HASH_SIZE]; | 11568 | u32 mc_filter[MC_HASH_SIZE]; |
11569 | u32 crc, bit, regidx; | 11569 | u32 crc, bit, regidx; |
11570 | int i; | 11570 | int i; |
11571 | 11571 | ||
11572 | memset(mc_filter, 0, 4 * MC_HASH_SIZE); | 11572 | memset(mc_filter, 0, 4 * MC_HASH_SIZE); |
11573 | 11573 | ||
11574 | netdev_for_each_mc_addr(mclist, dev) { | 11574 | netdev_for_each_mc_addr(ha, dev) { |
11575 | DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n", | 11575 | DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n", |
11576 | mclist->dmi_addr); | 11576 | ha->addr); |
11577 | 11577 | ||
11578 | crc = crc32c_le(0, mclist->dmi_addr, ETH_ALEN); | 11578 | crc = crc32c_le(0, ha->addr, ETH_ALEN); |
11579 | bit = (crc >> 24) & 0xff; | 11579 | bit = (crc >> 24) & 0xff; |
11580 | regidx = bit >> 5; | 11580 | regidx = bit >> 5; |
11581 | bit &= 0x1f; | 11581 | bit &= 0x1f; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index d6ae63b2cf00..22682f1c8473 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -762,32 +762,6 @@ static int bond_check_dev_link(struct bonding *bond, | |||
762 | /*----------------------------- Multicast list ------------------------------*/ | 762 | /*----------------------------- Multicast list ------------------------------*/ |
763 | 763 | ||
764 | /* | 764 | /* |
765 | * Returns 0 if dmi1 and dmi2 are the same, non-0 otherwise | ||
766 | */ | ||
767 | static inline int bond_is_dmi_same(const struct dev_mc_list *dmi1, | ||
768 | const struct dev_mc_list *dmi2) | ||
769 | { | ||
770 | return memcmp(dmi1->dmi_addr, dmi2->dmi_addr, dmi1->dmi_addrlen) == 0 && | ||
771 | dmi1->dmi_addrlen == dmi2->dmi_addrlen; | ||
772 | } | ||
773 | |||
774 | /* | ||
775 | * returns dmi entry if found, NULL otherwise | ||
776 | */ | ||
777 | static struct dev_mc_list *bond_mc_list_find_dmi(struct dev_mc_list *dmi, | ||
778 | struct dev_mc_list *mc_list) | ||
779 | { | ||
780 | struct dev_mc_list *idmi; | ||
781 | |||
782 | for (idmi = mc_list; idmi; idmi = idmi->next) { | ||
783 | if (bond_is_dmi_same(dmi, idmi)) | ||
784 | return idmi; | ||
785 | } | ||
786 | |||
787 | return NULL; | ||
788 | } | ||
789 | |||
790 | /* | ||
791 | * Push the promiscuity flag down to appropriate slaves | 765 | * Push the promiscuity flag down to appropriate slaves |
792 | */ | 766 | */ |
793 | static int bond_set_promiscuity(struct bonding *bond, int inc) | 767 | static int bond_set_promiscuity(struct bonding *bond, int inc) |
@@ -839,18 +813,18 @@ static int bond_set_allmulti(struct bonding *bond, int inc) | |||
839 | * Add a Multicast address to slaves | 813 | * Add a Multicast address to slaves |
840 | * according to mode | 814 | * according to mode |
841 | */ | 815 | */ |
842 | static void bond_mc_add(struct bonding *bond, void *addr, int alen) | 816 | static void bond_mc_add(struct bonding *bond, void *addr) |
843 | { | 817 | { |
844 | if (USES_PRIMARY(bond->params.mode)) { | 818 | if (USES_PRIMARY(bond->params.mode)) { |
845 | /* write lock already acquired */ | 819 | /* write lock already acquired */ |
846 | if (bond->curr_active_slave) | 820 | if (bond->curr_active_slave) |
847 | dev_mc_add(bond->curr_active_slave->dev, addr, alen, 0); | 821 | dev_mc_add(bond->curr_active_slave->dev, addr); |
848 | } else { | 822 | } else { |
849 | struct slave *slave; | 823 | struct slave *slave; |
850 | int i; | 824 | int i; |
851 | 825 | ||
852 | bond_for_each_slave(bond, slave, i) | 826 | bond_for_each_slave(bond, slave, i) |
853 | dev_mc_add(slave->dev, addr, alen, 0); | 827 | dev_mc_add(slave->dev, addr); |
854 | } | 828 | } |
855 | } | 829 | } |
856 | 830 | ||
@@ -858,18 +832,17 @@ static void bond_mc_add(struct bonding *bond, void *addr, int alen) | |||
858 | * Remove a multicast address from slave | 832 | * Remove a multicast address from slave |
859 | * according to mode | 833 | * according to mode |
860 | */ | 834 | */ |
861 | static void bond_mc_delete(struct bonding *bond, void *addr, int alen) | 835 | static void bond_mc_del(struct bonding *bond, void *addr) |
862 | { | 836 | { |
863 | if (USES_PRIMARY(bond->params.mode)) { | 837 | if (USES_PRIMARY(bond->params.mode)) { |
864 | /* write lock already acquired */ | 838 | /* write lock already acquired */ |
865 | if (bond->curr_active_slave) | 839 | if (bond->curr_active_slave) |
866 | dev_mc_delete(bond->curr_active_slave->dev, addr, | 840 | dev_mc_del(bond->curr_active_slave->dev, addr); |
867 | alen, 0); | ||
868 | } else { | 841 | } else { |
869 | struct slave *slave; | 842 | struct slave *slave; |
870 | int i; | 843 | int i; |
871 | bond_for_each_slave(bond, slave, i) { | 844 | bond_for_each_slave(bond, slave, i) { |
872 | dev_mc_delete(slave->dev, addr, alen, 0); | 845 | dev_mc_del(slave->dev, addr); |
873 | } | 846 | } |
874 | } | 847 | } |
875 | } | 848 | } |
@@ -896,66 +869,22 @@ static void bond_resend_igmp_join_requests(struct bonding *bond) | |||
896 | } | 869 | } |
897 | 870 | ||
898 | /* | 871 | /* |
899 | * Totally destroys the mc_list in bond | ||
900 | */ | ||
901 | static void bond_mc_list_destroy(struct bonding *bond) | ||
902 | { | ||
903 | struct dev_mc_list *dmi; | ||
904 | |||
905 | dmi = bond->mc_list; | ||
906 | while (dmi) { | ||
907 | bond->mc_list = dmi->next; | ||
908 | kfree(dmi); | ||
909 | dmi = bond->mc_list; | ||
910 | } | ||
911 | |||
912 | bond->mc_list = NULL; | ||
913 | } | ||
914 | |||
915 | /* | ||
916 | * Copy all the Multicast addresses from src to the bonding device dst | ||
917 | */ | ||
918 | static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond, | ||
919 | gfp_t gfp_flag) | ||
920 | { | ||
921 | struct dev_mc_list *dmi, *new_dmi; | ||
922 | |||
923 | for (dmi = mc_list; dmi; dmi = dmi->next) { | ||
924 | new_dmi = kmalloc(sizeof(struct dev_mc_list), gfp_flag); | ||
925 | |||
926 | if (!new_dmi) { | ||
927 | /* FIXME: Potential memory leak !!! */ | ||
928 | return -ENOMEM; | ||
929 | } | ||
930 | |||
931 | new_dmi->next = bond->mc_list; | ||
932 | bond->mc_list = new_dmi; | ||
933 | new_dmi->dmi_addrlen = dmi->dmi_addrlen; | ||
934 | memcpy(new_dmi->dmi_addr, dmi->dmi_addr, dmi->dmi_addrlen); | ||
935 | new_dmi->dmi_users = dmi->dmi_users; | ||
936 | new_dmi->dmi_gusers = dmi->dmi_gusers; | ||
937 | } | ||
938 | |||
939 | return 0; | ||
940 | } | ||
941 | |||
942 | /* | ||
943 | * flush all members of flush->mc_list from device dev->mc_list | 872 | * flush all members of flush->mc_list from device dev->mc_list |
944 | */ | 873 | */ |
945 | static void bond_mc_list_flush(struct net_device *bond_dev, | 874 | static void bond_mc_list_flush(struct net_device *bond_dev, |
946 | struct net_device *slave_dev) | 875 | struct net_device *slave_dev) |
947 | { | 876 | { |
948 | struct bonding *bond = netdev_priv(bond_dev); | 877 | struct bonding *bond = netdev_priv(bond_dev); |
949 | struct dev_mc_list *dmi; | 878 | struct netdev_hw_addr *ha; |
950 | 879 | ||
951 | for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) | 880 | netdev_for_each_mc_addr(ha, bond_dev) |
952 | dev_mc_delete(slave_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0); | 881 | dev_mc_del(slave_dev, ha->addr); |
953 | 882 | ||
954 | if (bond->params.mode == BOND_MODE_8023AD) { | 883 | if (bond->params.mode == BOND_MODE_8023AD) { |
955 | /* del lacpdu mc addr from mc list */ | 884 | /* del lacpdu mc addr from mc list */ |
956 | u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR; | 885 | u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR; |
957 | 886 | ||
958 | dev_mc_delete(slave_dev, lacpdu_multicast, ETH_ALEN, 0); | 887 | dev_mc_del(slave_dev, lacpdu_multicast); |
959 | } | 888 | } |
960 | } | 889 | } |
961 | 890 | ||
@@ -969,7 +898,7 @@ static void bond_mc_list_flush(struct net_device *bond_dev, | |||
969 | static void bond_mc_swap(struct bonding *bond, struct slave *new_active, | 898 | static void bond_mc_swap(struct bonding *bond, struct slave *new_active, |
970 | struct slave *old_active) | 899 | struct slave *old_active) |
971 | { | 900 | { |
972 | struct dev_mc_list *dmi; | 901 | struct netdev_hw_addr *ha; |
973 | 902 | ||
974 | if (!USES_PRIMARY(bond->params.mode)) | 903 | if (!USES_PRIMARY(bond->params.mode)) |
975 | /* nothing to do - mc list is already up-to-date on | 904 | /* nothing to do - mc list is already up-to-date on |
@@ -984,9 +913,8 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active, | |||
984 | if (bond->dev->flags & IFF_ALLMULTI) | 913 | if (bond->dev->flags & IFF_ALLMULTI) |
985 | dev_set_allmulti(old_active->dev, -1); | 914 | dev_set_allmulti(old_active->dev, -1); |
986 | 915 | ||
987 | for (dmi = bond->dev->mc_list; dmi; dmi = dmi->next) | 916 | netdev_for_each_mc_addr(ha, bond->dev) |
988 | dev_mc_delete(old_active->dev, dmi->dmi_addr, | 917 | dev_mc_del(old_active->dev, ha->addr); |
989 | dmi->dmi_addrlen, 0); | ||
990 | } | 918 | } |
991 | 919 | ||
992 | if (new_active) { | 920 | if (new_active) { |
@@ -997,9 +925,8 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active, | |||
997 | if (bond->dev->flags & IFF_ALLMULTI) | 925 | if (bond->dev->flags & IFF_ALLMULTI) |
998 | dev_set_allmulti(new_active->dev, 1); | 926 | dev_set_allmulti(new_active->dev, 1); |
999 | 927 | ||
1000 | for (dmi = bond->dev->mc_list; dmi; dmi = dmi->next) | 928 | netdev_for_each_mc_addr(ha, bond->dev) |
1001 | dev_mc_add(new_active->dev, dmi->dmi_addr, | 929 | dev_mc_add(new_active->dev, ha->addr); |
1002 | dmi->dmi_addrlen, 0); | ||
1003 | bond_resend_igmp_join_requests(bond); | 930 | bond_resend_igmp_join_requests(bond); |
1004 | } | 931 | } |
1005 | } | 932 | } |
@@ -1406,7 +1333,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1406 | struct bonding *bond = netdev_priv(bond_dev); | 1333 | struct bonding *bond = netdev_priv(bond_dev); |
1407 | const struct net_device_ops *slave_ops = slave_dev->netdev_ops; | 1334 | const struct net_device_ops *slave_ops = slave_dev->netdev_ops; |
1408 | struct slave *new_slave = NULL; | 1335 | struct slave *new_slave = NULL; |
1409 | struct dev_mc_list *dmi; | 1336 | struct netdev_hw_addr *ha; |
1410 | struct sockaddr addr; | 1337 | struct sockaddr addr; |
1411 | int link_reporting; | 1338 | int link_reporting; |
1412 | int old_features = bond_dev->features; | 1339 | int old_features = bond_dev->features; |
@@ -1492,7 +1419,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1492 | 1419 | ||
1493 | /* Flush unicast and multicast addresses */ | 1420 | /* Flush unicast and multicast addresses */ |
1494 | dev_uc_flush(bond_dev); | 1421 | dev_uc_flush(bond_dev); |
1495 | dev_addr_discard(bond_dev); | 1422 | dev_mc_flush(bond_dev); |
1496 | 1423 | ||
1497 | if (slave_dev->type != ARPHRD_ETHER) | 1424 | if (slave_dev->type != ARPHRD_ETHER) |
1498 | bond_setup_by_slave(bond_dev, slave_dev); | 1425 | bond_setup_by_slave(bond_dev, slave_dev); |
@@ -1601,9 +1528,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1601 | 1528 | ||
1602 | netif_addr_lock_bh(bond_dev); | 1529 | netif_addr_lock_bh(bond_dev); |
1603 | /* upload master's mc_list to new slave */ | 1530 | /* upload master's mc_list to new slave */ |
1604 | for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) | 1531 | netdev_for_each_mc_addr(ha, bond_dev) |
1605 | dev_mc_add(slave_dev, dmi->dmi_addr, | 1532 | dev_mc_add(slave_dev, ha->addr); |
1606 | dmi->dmi_addrlen, 0); | ||
1607 | netif_addr_unlock_bh(bond_dev); | 1533 | netif_addr_unlock_bh(bond_dev); |
1608 | } | 1534 | } |
1609 | 1535 | ||
@@ -1611,7 +1537,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1611 | /* add lacpdu mc addr to mc list */ | 1537 | /* add lacpdu mc addr to mc list */ |
1612 | u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR; | 1538 | u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR; |
1613 | 1539 | ||
1614 | dev_mc_add(slave_dev, lacpdu_multicast, ETH_ALEN, 0); | 1540 | dev_mc_add(slave_dev, lacpdu_multicast); |
1615 | } | 1541 | } |
1616 | 1542 | ||
1617 | bond_add_vlans_on_slave(bond, slave_dev); | 1543 | bond_add_vlans_on_slave(bond, slave_dev); |
@@ -3913,10 +3839,24 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd | |||
3913 | return res; | 3839 | return res; |
3914 | } | 3840 | } |
3915 | 3841 | ||
3842 | static bool bond_addr_in_mc_list(unsigned char *addr, | ||
3843 | struct netdev_hw_addr_list *list, | ||
3844 | int addrlen) | ||
3845 | { | ||
3846 | struct netdev_hw_addr *ha; | ||
3847 | |||
3848 | netdev_hw_addr_list_for_each(ha, list) | ||
3849 | if (!memcmp(ha->addr, addr, addrlen)) | ||
3850 | return true; | ||
3851 | |||
3852 | return false; | ||
3853 | } | ||
3854 | |||
3916 | static void bond_set_multicast_list(struct net_device *bond_dev) | 3855 | static void bond_set_multicast_list(struct net_device *bond_dev) |
3917 | { | 3856 | { |
3918 | struct bonding *bond = netdev_priv(bond_dev); | 3857 | struct bonding *bond = netdev_priv(bond_dev); |
3919 | struct dev_mc_list *dmi; | 3858 | struct netdev_hw_addr *ha; |
3859 | bool found; | ||
3920 | 3860 | ||
3921 | /* | 3861 | /* |
3922 | * Do promisc before checking multicast_mode | 3862 | * Do promisc before checking multicast_mode |
@@ -3951,20 +3891,25 @@ static void bond_set_multicast_list(struct net_device *bond_dev) | |||
3951 | bond->flags = bond_dev->flags; | 3891 | bond->flags = bond_dev->flags; |
3952 | 3892 | ||
3953 | /* looking for addresses to add to slaves' mc list */ | 3893 | /* looking for addresses to add to slaves' mc list */ |
3954 | for (dmi = bond_dev->mc_list; dmi; dmi = dmi->next) { | 3894 | netdev_for_each_mc_addr(ha, bond_dev) { |
3955 | if (!bond_mc_list_find_dmi(dmi, bond->mc_list)) | 3895 | found = bond_addr_in_mc_list(ha->addr, &bond->mc_list, |
3956 | bond_mc_add(bond, dmi->dmi_addr, dmi->dmi_addrlen); | 3896 | bond_dev->addr_len); |
3897 | if (!found) | ||
3898 | bond_mc_add(bond, ha->addr); | ||
3957 | } | 3899 | } |
3958 | 3900 | ||
3959 | /* looking for addresses to delete from slaves' list */ | 3901 | /* looking for addresses to delete from slaves' list */ |
3960 | for (dmi = bond->mc_list; dmi; dmi = dmi->next) { | 3902 | netdev_hw_addr_list_for_each(ha, &bond->mc_list) { |
3961 | if (!bond_mc_list_find_dmi(dmi, bond_dev->mc_list)) | 3903 | found = bond_addr_in_mc_list(ha->addr, &bond_dev->mc, |
3962 | bond_mc_delete(bond, dmi->dmi_addr, dmi->dmi_addrlen); | 3904 | bond_dev->addr_len); |
3905 | if (!found) | ||
3906 | bond_mc_del(bond, ha->addr); | ||
3963 | } | 3907 | } |
3964 | 3908 | ||
3965 | /* save master's multicast list */ | 3909 | /* save master's multicast list */ |
3966 | bond_mc_list_destroy(bond); | 3910 | __hw_addr_flush(&bond->mc_list); |
3967 | bond_mc_list_copy(bond_dev->mc_list, bond, GFP_ATOMIC); | 3911 | __hw_addr_add_multiple(&bond->mc_list, &bond_dev->mc, |
3912 | bond_dev->addr_len, NETDEV_HW_ADDR_T_MULTICAST); | ||
3968 | 3913 | ||
3969 | read_unlock(&bond->lock); | 3914 | read_unlock(&bond->lock); |
3970 | } | 3915 | } |
@@ -4534,9 +4479,7 @@ static void bond_uninit(struct net_device *bond_dev) | |||
4534 | if (bond->wq) | 4479 | if (bond->wq) |
4535 | destroy_workqueue(bond->wq); | 4480 | destroy_workqueue(bond->wq); |
4536 | 4481 | ||
4537 | netif_addr_lock_bh(bond_dev); | 4482 | __hw_addr_flush(&bond->mc_list); |
4538 | bond_mc_list_destroy(bond); | ||
4539 | netif_addr_unlock_bh(bond_dev); | ||
4540 | } | 4483 | } |
4541 | 4484 | ||
4542 | /*------------------------- Module initialization ---------------------------*/ | 4485 | /*------------------------- Module initialization ---------------------------*/ |
@@ -4908,6 +4851,8 @@ static int bond_init(struct net_device *bond_dev) | |||
4908 | list_add_tail(&bond->bond_list, &bn->dev_list); | 4851 | list_add_tail(&bond->bond_list, &bn->dev_list); |
4909 | 4852 | ||
4910 | bond_prepare_sysfs_group(bond); | 4853 | bond_prepare_sysfs_group(bond); |
4854 | |||
4855 | __hw_addr_init(&bond->mc_list); | ||
4911 | return 0; | 4856 | return 0; |
4912 | } | 4857 | } |
4913 | 4858 | ||
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 257a7a4dfce9..2aa336720591 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -202,7 +202,7 @@ struct bonding { | |||
202 | char proc_file_name[IFNAMSIZ]; | 202 | char proc_file_name[IFNAMSIZ]; |
203 | #endif /* CONFIG_PROC_FS */ | 203 | #endif /* CONFIG_PROC_FS */ |
204 | struct list_head bond_list; | 204 | struct list_head bond_list; |
205 | struct dev_mc_list *mc_list; | 205 | struct netdev_hw_addr_list mc_list; |
206 | int (*xmit_hash_policy)(struct sk_buff *, int); | 206 | int (*xmit_hash_policy)(struct sk_buff *, int); |
207 | __be32 master_ip; | 207 | __be32 master_ip; |
208 | u16 flags; | 208 | u16 flags; |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 9bd155e4111c..bd857a20a755 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -2957,20 +2957,20 @@ static void cas_process_mc_list(struct cas *cp) | |||
2957 | { | 2957 | { |
2958 | u16 hash_table[16]; | 2958 | u16 hash_table[16]; |
2959 | u32 crc; | 2959 | u32 crc; |
2960 | struct dev_mc_list *dmi; | 2960 | struct netdev_hw_addr *ha; |
2961 | int i = 1; | 2961 | int i = 1; |
2962 | 2962 | ||
2963 | memset(hash_table, 0, sizeof(hash_table)); | 2963 | memset(hash_table, 0, sizeof(hash_table)); |
2964 | netdev_for_each_mc_addr(dmi, cp->dev) { | 2964 | netdev_for_each_mc_addr(ha, cp->dev) { |
2965 | if (i <= CAS_MC_EXACT_MATCH_SIZE) { | 2965 | if (i <= CAS_MC_EXACT_MATCH_SIZE) { |
2966 | /* use the alternate mac address registers for the | 2966 | /* use the alternate mac address registers for the |
2967 | * first 15 multicast addresses | 2967 | * first 15 multicast addresses |
2968 | */ | 2968 | */ |
2969 | writel((dmi->dmi_addr[4] << 8) | dmi->dmi_addr[5], | 2969 | writel((ha->addr[4] << 8) | ha->addr[5], |
2970 | cp->regs + REG_MAC_ADDRN(i*3 + 0)); | 2970 | cp->regs + REG_MAC_ADDRN(i*3 + 0)); |
2971 | writel((dmi->dmi_addr[2] << 8) | dmi->dmi_addr[3], | 2971 | writel((ha->addr[2] << 8) | ha->addr[3], |
2972 | cp->regs + REG_MAC_ADDRN(i*3 + 1)); | 2972 | cp->regs + REG_MAC_ADDRN(i*3 + 1)); |
2973 | writel((dmi->dmi_addr[0] << 8) | dmi->dmi_addr[1], | 2973 | writel((ha->addr[0] << 8) | ha->addr[1], |
2974 | cp->regs + REG_MAC_ADDRN(i*3 + 2)); | 2974 | cp->regs + REG_MAC_ADDRN(i*3 + 2)); |
2975 | i++; | 2975 | i++; |
2976 | } | 2976 | } |
@@ -2978,7 +2978,7 @@ static void cas_process_mc_list(struct cas *cp) | |||
2978 | /* use hw hash table for the next series of | 2978 | /* use hw hash table for the next series of |
2979 | * multicast addresses | 2979 | * multicast addresses |
2980 | */ | 2980 | */ |
2981 | crc = ether_crc_le(ETH_ALEN, dmi->dmi_addr); | 2981 | crc = ether_crc_le(ETH_ALEN, ha->addr); |
2982 | crc >>= 24; | 2982 | crc >>= 24; |
2983 | hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf)); | 2983 | hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf)); |
2984 | } | 2984 | } |
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c index a6eb30a6e2b9..13fd9628db1d 100644 --- a/drivers/net/chelsio/pm3393.c +++ b/drivers/net/chelsio/pm3393.c | |||
@@ -376,12 +376,13 @@ static int pm3393_set_rx_mode(struct cmac *cmac, struct t1_rx_mode *rm) | |||
376 | rx_mode |= SUNI1x10GEXP_BITMSK_RXXG_MHASH_EN; | 376 | rx_mode |= SUNI1x10GEXP_BITMSK_RXXG_MHASH_EN; |
377 | } else if (t1_rx_mode_mc_cnt(rm)) { | 377 | } else if (t1_rx_mode_mc_cnt(rm)) { |
378 | /* Accept one or more multicast(s). */ | 378 | /* Accept one or more multicast(s). */ |
379 | struct dev_mc_list *dmi; | 379 | struct netdev_hw_addr *ha; |
380 | int bit; | 380 | int bit; |
381 | u16 mc_filter[4] = { 0, }; | 381 | u16 mc_filter[4] = { 0, }; |
382 | 382 | ||
383 | netdev_for_each_mc_addr(dmi, t1_get_netdev(rm)) { | 383 | netdev_for_each_mc_addr(ha, t1_get_netdev(rm)) { |
384 | bit = (ether_crc(ETH_ALEN, dmi->dmi_addr) >> 23) & 0x3f; /* bit[23:28] */ | 384 | /* bit[23:28] */ |
385 | bit = (ether_crc(ETH_ALEN, ha->addr) >> 23) & 0x3f; | ||
385 | mc_filter[bit >> 4] |= 1 << (bit & 0xf); | 386 | mc_filter[bit >> 4] |= 1 << (bit & 0xf); |
386 | } | 387 | } |
387 | pmwrite(cmac, SUNI1x10GEXP_REG_RXXG_MULTICAST_HASH_LOW, mc_filter[0]); | 388 | pmwrite(cmac, SUNI1x10GEXP_REG_RXXG_MULTICAST_HASH_LOW, mc_filter[0]); |
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index 60777fd90b33..bdfff784645c 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -328,7 +328,7 @@ static int cpmac_config(struct net_device *dev, struct ifmap *map) | |||
328 | 328 | ||
329 | static void cpmac_set_multicast_list(struct net_device *dev) | 329 | static void cpmac_set_multicast_list(struct net_device *dev) |
330 | { | 330 | { |
331 | struct dev_mc_list *iter; | 331 | struct netdev_hw_addr *ha; |
332 | u8 tmp; | 332 | u8 tmp; |
333 | u32 mbp, bit, hash[2] = { 0, }; | 333 | u32 mbp, bit, hash[2] = { 0, }; |
334 | struct cpmac_priv *priv = netdev_priv(dev); | 334 | struct cpmac_priv *priv = netdev_priv(dev); |
@@ -348,19 +348,19 @@ static void cpmac_set_multicast_list(struct net_device *dev) | |||
348 | * cpmac uses some strange mac address hashing | 348 | * cpmac uses some strange mac address hashing |
349 | * (not crc32) | 349 | * (not crc32) |
350 | */ | 350 | */ |
351 | netdev_for_each_mc_addr(iter, dev) { | 351 | netdev_for_each_mc_addr(ha, dev) { |
352 | bit = 0; | 352 | bit = 0; |
353 | tmp = iter->dmi_addr[0]; | 353 | tmp = ha->addr[0]; |
354 | bit ^= (tmp >> 2) ^ (tmp << 4); | 354 | bit ^= (tmp >> 2) ^ (tmp << 4); |
355 | tmp = iter->dmi_addr[1]; | 355 | tmp = ha->addr[1]; |
356 | bit ^= (tmp >> 4) ^ (tmp << 2); | 356 | bit ^= (tmp >> 4) ^ (tmp << 2); |
357 | tmp = iter->dmi_addr[2]; | 357 | tmp = ha->addr[2]; |
358 | bit ^= (tmp >> 6) ^ tmp; | 358 | bit ^= (tmp >> 6) ^ tmp; |
359 | tmp = iter->dmi_addr[3]; | 359 | tmp = ha->addr[3]; |
360 | bit ^= (tmp >> 2) ^ (tmp << 4); | 360 | bit ^= (tmp >> 2) ^ (tmp << 4); |
361 | tmp = iter->dmi_addr[4]; | 361 | tmp = ha->addr[4]; |
362 | bit ^= (tmp >> 4) ^ (tmp << 2); | 362 | bit ^= (tmp >> 4) ^ (tmp << 2); |
363 | tmp = iter->dmi_addr[5]; | 363 | tmp = ha->addr[5]; |
364 | bit ^= (tmp >> 6) ^ tmp; | 364 | bit ^= (tmp >> 6) ^ tmp; |
365 | bit &= 0x3f; | 365 | bit &= 0x3f; |
366 | hash[bit / 32] |= 1 << (bit % 32); | 366 | hash[bit / 32] |= 1 << (bit % 32); |
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index dd24aadb778c..59110bc119a8 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -1596,16 +1596,16 @@ set_multicast_list(struct net_device *dev) | |||
1596 | } else { | 1596 | } else { |
1597 | /* MC mode, receive normal and MC packets */ | 1597 | /* MC mode, receive normal and MC packets */ |
1598 | char hash_ix; | 1598 | char hash_ix; |
1599 | struct dev_mc_list *dmi; | 1599 | struct netdev_hw_addr *ha; |
1600 | char *baddr; | 1600 | char *baddr; |
1601 | 1601 | ||
1602 | lo_bits = 0x00000000ul; | 1602 | lo_bits = 0x00000000ul; |
1603 | hi_bits = 0x00000000ul; | 1603 | hi_bits = 0x00000000ul; |
1604 | netdev_for_each_mc_addr(dmi, dev) { | 1604 | netdev_for_each_mc_addr(ha, dev) { |
1605 | /* Calculate the hash index for the GA registers */ | 1605 | /* Calculate the hash index for the GA registers */ |
1606 | 1606 | ||
1607 | hash_ix = 0; | 1607 | hash_ix = 0; |
1608 | baddr = dmi->dmi_addr; | 1608 | baddr = ha->addr; |
1609 | hash_ix ^= (*baddr) & 0x3f; | 1609 | hash_ix ^= (*baddr) & 0x3f; |
1610 | hash_ix ^= ((*baddr) >> 6) & 0x03; | 1610 | hash_ix ^= ((*baddr) >> 6) & 0x03; |
1611 | ++baddr; | 1611 | ++baddr; |
diff --git a/drivers/net/cxgb3/xgmac.c b/drivers/net/cxgb3/xgmac.c index c142a2132e9f..3af19a550372 100644 --- a/drivers/net/cxgb3/xgmac.c +++ b/drivers/net/cxgb3/xgmac.c | |||
@@ -311,16 +311,16 @@ int t3_mac_set_rx_mode(struct cmac *mac, struct net_device *dev) | |||
311 | if (dev->flags & IFF_ALLMULTI) | 311 | if (dev->flags & IFF_ALLMULTI) |
312 | hash_lo = hash_hi = 0xffffffff; | 312 | hash_lo = hash_hi = 0xffffffff; |
313 | else { | 313 | else { |
314 | struct dev_mc_list *dmi; | 314 | struct netdev_hw_addr *ha; |
315 | int exact_addr_idx = mac->nucast; | 315 | int exact_addr_idx = mac->nucast; |
316 | 316 | ||
317 | hash_lo = hash_hi = 0; | 317 | hash_lo = hash_hi = 0; |
318 | netdev_for_each_mc_addr(dmi, dev) | 318 | netdev_for_each_mc_addr(ha, dev) |
319 | if (exact_addr_idx < EXACT_ADDR_FILTERS) | 319 | if (exact_addr_idx < EXACT_ADDR_FILTERS) |
320 | set_addr_filter(mac, exact_addr_idx++, | 320 | set_addr_filter(mac, exact_addr_idx++, |
321 | dmi->dmi_addr); | 321 | ha->addr); |
322 | else { | 322 | else { |
323 | int hash = hash_hw_addr(dmi->dmi_addr); | 323 | int hash = hash_hw_addr(ha->addr); |
324 | 324 | ||
325 | if (hash < 32) | 325 | if (hash < 32) |
326 | hash_lo |= (1 << hash); | 326 | hash_lo |= (1 << hash); |
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 2b8edd2efbf6..1f9df5c6a75a 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -952,13 +952,14 @@ static void emac_dev_mcast_set(struct net_device *ndev) | |||
952 | emac_add_mcast(priv, EMAC_ALL_MULTI_SET, NULL); | 952 | emac_add_mcast(priv, EMAC_ALL_MULTI_SET, NULL); |
953 | } | 953 | } |
954 | if (!netdev_mc_empty(ndev)) { | 954 | if (!netdev_mc_empty(ndev)) { |
955 | struct dev_mc_list *mc_ptr; | 955 | struct netdev_hw_addr *ha; |
956 | |||
956 | mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST); | 957 | mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST); |
957 | emac_add_mcast(priv, EMAC_ALL_MULTI_CLR, NULL); | 958 | emac_add_mcast(priv, EMAC_ALL_MULTI_CLR, NULL); |
958 | /* program multicast address list into EMAC hardware */ | 959 | /* program multicast address list into EMAC hardware */ |
959 | netdev_for_each_mc_addr(mc_ptr, ndev) { | 960 | netdev_for_each_mc_addr(ha, ndev) { |
960 | emac_add_mcast(priv, EMAC_MULTICAST_ADD, | 961 | emac_add_mcast(priv, EMAC_MULTICAST_ADD, |
961 | (u8 *) mc_ptr->dmi_addr); | 962 | (u8 *) ha->addr); |
962 | } | 963 | } |
963 | } else { | 964 | } else { |
964 | mbp_enable = (mbp_enable & ~EMAC_MBP_RXMCAST); | 965 | mbp_enable = (mbp_enable & ~EMAC_MBP_RXMCAST); |
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index 8cf3cc6f20e2..fb3f0984c289 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c | |||
@@ -940,7 +940,7 @@ static void lance_load_multicast(struct net_device *dev) | |||
940 | { | 940 | { |
941 | struct lance_private *lp = netdev_priv(dev); | 941 | struct lance_private *lp = netdev_priv(dev); |
942 | volatile u16 *ib = (volatile u16 *)dev->mem_start; | 942 | volatile u16 *ib = (volatile u16 *)dev->mem_start; |
943 | struct dev_mc_list *dmi; | 943 | struct netdev_hw_addr *ha; |
944 | char *addrs; | 944 | char *addrs; |
945 | u32 crc; | 945 | u32 crc; |
946 | 946 | ||
@@ -959,8 +959,8 @@ static void lance_load_multicast(struct net_device *dev) | |||
959 | *lib_ptr(ib, filter[3], lp->type) = 0; | 959 | *lib_ptr(ib, filter[3], lp->type) = 0; |
960 | 960 | ||
961 | /* Add addresses */ | 961 | /* Add addresses */ |
962 | netdev_for_each_mc_addr(dmi, dev) { | 962 | netdev_for_each_mc_addr(ha, dev) { |
963 | addrs = dmi->dmi_addr; | 963 | addrs = ha->addr; |
964 | 964 | ||
965 | /* multicast address? */ | 965 | /* multicast address? */ |
966 | if (!(*addrs & 1)) | 966 | if (!(*addrs & 1)) |
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c index ed53a8d45f4e..e5667c55844e 100644 --- a/drivers/net/defxx.c +++ b/drivers/net/defxx.c | |||
@@ -2195,7 +2195,7 @@ static void dfx_ctl_set_multicast_list(struct net_device *dev) | |||
2195 | { | 2195 | { |
2196 | DFX_board_t *bp = netdev_priv(dev); | 2196 | DFX_board_t *bp = netdev_priv(dev); |
2197 | int i; /* used as index in for loop */ | 2197 | int i; /* used as index in for loop */ |
2198 | struct dev_mc_list *dmi; /* ptr to multicast addr entry */ | 2198 | struct netdev_hw_addr *ha; |
2199 | 2199 | ||
2200 | /* Enable LLC frame promiscuous mode, if necessary */ | 2200 | /* Enable LLC frame promiscuous mode, if necessary */ |
2201 | 2201 | ||
@@ -2241,9 +2241,9 @@ static void dfx_ctl_set_multicast_list(struct net_device *dev) | |||
2241 | /* Copy addresses to multicast address table, then update adapter CAM */ | 2241 | /* Copy addresses to multicast address table, then update adapter CAM */ |
2242 | 2242 | ||
2243 | i = 0; | 2243 | i = 0; |
2244 | netdev_for_each_mc_addr(dmi, dev) | 2244 | netdev_for_each_mc_addr(ha, dev) |
2245 | memcpy(&bp->mc_table[i++ * FDDI_K_ALEN], | 2245 | memcpy(&bp->mc_table[i++ * FDDI_K_ALEN], |
2246 | dmi->dmi_addr, FDDI_K_ALEN); | 2246 | ha->addr, FDDI_K_ALEN); |
2247 | 2247 | ||
2248 | if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS) | 2248 | if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS) |
2249 | { | 2249 | { |
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index 744c1928dfca..a88300a0d1e8 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c | |||
@@ -1272,7 +1272,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1272 | static void SetMulticastFilter(struct net_device *dev) | 1272 | static void SetMulticastFilter(struct net_device *dev) |
1273 | { | 1273 | { |
1274 | struct depca_private *lp = netdev_priv(dev); | 1274 | struct depca_private *lp = netdev_priv(dev); |
1275 | struct dev_mc_list *dmi; | 1275 | struct netdev_hw_addr *ha; |
1276 | char *addrs; | 1276 | char *addrs; |
1277 | int i, j, bit, byte; | 1277 | int i, j, bit, byte; |
1278 | u16 hashcode; | 1278 | u16 hashcode; |
@@ -1287,8 +1287,8 @@ static void SetMulticastFilter(struct net_device *dev) | |||
1287 | lp->init_block.mcast_table[i] = 0; | 1287 | lp->init_block.mcast_table[i] = 0; |
1288 | } | 1288 | } |
1289 | /* Add multicast addresses */ | 1289 | /* Add multicast addresses */ |
1290 | netdev_for_each_mc_addr(dmi, dev) { | 1290 | netdev_for_each_mc_addr(ha, dev) { |
1291 | addrs = dmi->dmi_addr; | 1291 | addrs = ha->addr; |
1292 | if ((*addrs & 0x01) == 1) { /* multicast address? */ | 1292 | if ((*addrs & 0x01) == 1) { /* multicast address? */ |
1293 | crc = ether_crc(ETH_ALEN, addrs); | 1293 | crc = ether_crc(ETH_ALEN, addrs); |
1294 | hashcode = (crc & 1); /* hashcode is 6 LSb of CRC ... */ | 1294 | hashcode = (crc & 1); /* hashcode is 6 LSb of CRC ... */ |
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index b05bad829827..6579225dbd91 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -1132,14 +1132,14 @@ set_multicast (struct net_device *dev) | |||
1132 | /* Receive broadcast and multicast frames */ | 1132 | /* Receive broadcast and multicast frames */ |
1133 | rx_mode = ReceiveBroadcast | ReceiveMulticast | ReceiveUnicast; | 1133 | rx_mode = ReceiveBroadcast | ReceiveMulticast | ReceiveUnicast; |
1134 | } else if (!netdev_mc_empty(dev)) { | 1134 | } else if (!netdev_mc_empty(dev)) { |
1135 | struct dev_mc_list *mclist; | 1135 | struct netdev_hw_addr *ha; |
1136 | /* Receive broadcast frames and multicast frames filtering | 1136 | /* Receive broadcast frames and multicast frames filtering |
1137 | by Hashtable */ | 1137 | by Hashtable */ |
1138 | rx_mode = | 1138 | rx_mode = |
1139 | ReceiveBroadcast | ReceiveMulticastHash | ReceiveUnicast; | 1139 | ReceiveBroadcast | ReceiveMulticastHash | ReceiveUnicast; |
1140 | netdev_for_each_mc_addr(mclist, dev) { | 1140 | netdev_for_each_mc_addr(ha, dev) { |
1141 | int bit, index = 0; | 1141 | int bit, index = 0; |
1142 | int crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr); | 1142 | int crc = ether_crc_le(ETH_ALEN, ha->addr); |
1143 | /* The inverted high significant 6 bits of CRC are | 1143 | /* The inverted high significant 6 bits of CRC are |
1144 | used as an index to hashtable */ | 1144 | used as an index to hashtable */ |
1145 | for (bit = 0; bit < 6; bit++) | 1145 | for (bit = 0; bit < 6; bit++) |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 1c67f1138ca7..989f2beb123b 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -724,7 +724,7 @@ static void | |||
724 | dm9000_hash_table(struct net_device *dev) | 724 | dm9000_hash_table(struct net_device *dev) |
725 | { | 725 | { |
726 | board_info_t *db = netdev_priv(dev); | 726 | board_info_t *db = netdev_priv(dev); |
727 | struct dev_mc_list *mcptr; | 727 | struct netdev_hw_addr *ha; |
728 | int i, oft; | 728 | int i, oft; |
729 | u32 hash_val; | 729 | u32 hash_val; |
730 | u16 hash_table[4]; | 730 | u16 hash_table[4]; |
@@ -752,8 +752,8 @@ dm9000_hash_table(struct net_device *dev) | |||
752 | rcr |= RCR_ALL; | 752 | rcr |= RCR_ALL; |
753 | 753 | ||
754 | /* the multicast address in Hash Table : 64 bits */ | 754 | /* the multicast address in Hash Table : 64 bits */ |
755 | netdev_for_each_mc_addr(mcptr, dev) { | 755 | netdev_for_each_mc_addr(ha, dev) { |
756 | hash_val = ether_crc_le(6, mcptr->dmi_addr) & 0x3f; | 756 | hash_val = ether_crc_le(6, ha->addr) & 0x3f; |
757 | hash_table[hash_val / 16] |= (u16) 1 << (hash_val % 16); | 757 | hash_table[hash_val / 16] |= (u16) 1 << (hash_val % 16); |
758 | } | 758 | } |
759 | 759 | ||
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index c0cd57656681..3e8d0005540f 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1545,16 +1545,16 @@ static int e100_hw_init(struct nic *nic) | |||
1545 | static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb) | 1545 | static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb) |
1546 | { | 1546 | { |
1547 | struct net_device *netdev = nic->netdev; | 1547 | struct net_device *netdev = nic->netdev; |
1548 | struct dev_mc_list *list; | 1548 | struct netdev_hw_addr *ha; |
1549 | u16 i, count = min(netdev_mc_count(netdev), E100_MAX_MULTICAST_ADDRS); | 1549 | u16 i, count = min(netdev_mc_count(netdev), E100_MAX_MULTICAST_ADDRS); |
1550 | 1550 | ||
1551 | cb->command = cpu_to_le16(cb_multi); | 1551 | cb->command = cpu_to_le16(cb_multi); |
1552 | cb->u.multi.count = cpu_to_le16(count * ETH_ALEN); | 1552 | cb->u.multi.count = cpu_to_le16(count * ETH_ALEN); |
1553 | i = 0; | 1553 | i = 0; |
1554 | netdev_for_each_mc_addr(list, netdev) { | 1554 | netdev_for_each_mc_addr(ha, netdev) { |
1555 | if (i == count) | 1555 | if (i == count) |
1556 | break; | 1556 | break; |
1557 | memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &list->dmi_addr, | 1557 | memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &ha->addr, |
1558 | ETH_ALEN); | 1558 | ETH_ALEN); |
1559 | } | 1559 | } |
1560 | } | 1560 | } |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 8be6faee43e6..41330349b07a 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2101,7 +2101,6 @@ static void e1000_set_rx_mode(struct net_device *netdev) | |||
2101 | struct e1000_hw *hw = &adapter->hw; | 2101 | struct e1000_hw *hw = &adapter->hw; |
2102 | struct netdev_hw_addr *ha; | 2102 | struct netdev_hw_addr *ha; |
2103 | bool use_uc = false; | 2103 | bool use_uc = false; |
2104 | struct dev_addr_list *mc_ptr; | ||
2105 | u32 rctl; | 2104 | u32 rctl; |
2106 | u32 hash_value; | 2105 | u32 hash_value; |
2107 | int i, rar_entries = E1000_RAR_ENTRIES; | 2106 | int i, rar_entries = E1000_RAR_ENTRIES; |
@@ -2161,17 +2160,17 @@ static void e1000_set_rx_mode(struct net_device *netdev) | |||
2161 | 2160 | ||
2162 | WARN_ON(i == rar_entries); | 2161 | WARN_ON(i == rar_entries); |
2163 | 2162 | ||
2164 | netdev_for_each_mc_addr(mc_ptr, netdev) { | 2163 | netdev_for_each_mc_addr(ha, netdev) { |
2165 | if (i == rar_entries) { | 2164 | if (i == rar_entries) { |
2166 | /* load any remaining addresses into the hash table */ | 2165 | /* load any remaining addresses into the hash table */ |
2167 | u32 hash_reg, hash_bit, mta; | 2166 | u32 hash_reg, hash_bit, mta; |
2168 | hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr); | 2167 | hash_value = e1000_hash_mc_addr(hw, ha->addr); |
2169 | hash_reg = (hash_value >> 5) & 0x7F; | 2168 | hash_reg = (hash_value >> 5) & 0x7F; |
2170 | hash_bit = hash_value & 0x1F; | 2169 | hash_bit = hash_value & 0x1F; |
2171 | mta = (1 << hash_bit); | 2170 | mta = (1 << hash_bit); |
2172 | mcarray[hash_reg] |= mta; | 2171 | mcarray[hash_reg] |= mta; |
2173 | } else { | 2172 | } else { |
2174 | e1000_rar_set(hw, mc_ptr->da_addr, i++); | 2173 | e1000_rar_set(hw, ha->addr, i++); |
2175 | } | 2174 | } |
2176 | } | 2175 | } |
2177 | 2176 | ||
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 5304959ae1f7..02f7d20f3c80 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2567,7 +2567,7 @@ static void e1000_set_multi(struct net_device *netdev) | |||
2567 | { | 2567 | { |
2568 | struct e1000_adapter *adapter = netdev_priv(netdev); | 2568 | struct e1000_adapter *adapter = netdev_priv(netdev); |
2569 | struct e1000_hw *hw = &adapter->hw; | 2569 | struct e1000_hw *hw = &adapter->hw; |
2570 | struct dev_mc_list *mc_ptr; | 2570 | struct netdev_hw_addr *ha; |
2571 | u8 *mta_list; | 2571 | u8 *mta_list; |
2572 | u32 rctl; | 2572 | u32 rctl; |
2573 | int i; | 2573 | int i; |
@@ -2599,9 +2599,8 @@ static void e1000_set_multi(struct net_device *netdev) | |||
2599 | 2599 | ||
2600 | /* prepare a packed array of only addresses. */ | 2600 | /* prepare a packed array of only addresses. */ |
2601 | i = 0; | 2601 | i = 0; |
2602 | netdev_for_each_mc_addr(mc_ptr, netdev) | 2602 | netdev_for_each_mc_addr(ha, netdev) |
2603 | memcpy(mta_list + (i++ * ETH_ALEN), | 2603 | memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); |
2604 | mc_ptr->dmi_addr, ETH_ALEN); | ||
2605 | 2604 | ||
2606 | e1000_update_mc_addr_list(hw, mta_list, i); | 2605 | e1000_update_mc_addr_list(hw, mta_list, i); |
2607 | kfree(mta_list); | 2606 | kfree(mta_list); |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 15d6266b80c3..b01e6997403b 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -1287,7 +1287,7 @@ set_multicast_list(struct net_device *dev) | |||
1287 | struct eepro_local *lp = netdev_priv(dev); | 1287 | struct eepro_local *lp = netdev_priv(dev); |
1288 | short ioaddr = dev->base_addr; | 1288 | short ioaddr = dev->base_addr; |
1289 | unsigned short mode; | 1289 | unsigned short mode; |
1290 | struct dev_mc_list *dmi; | 1290 | struct netdev_hw_addr *ha; |
1291 | int mc_count = netdev_mc_count(dev); | 1291 | int mc_count = netdev_mc_count(dev); |
1292 | 1292 | ||
1293 | if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || mc_count > 63) | 1293 | if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || mc_count > 63) |
@@ -1332,8 +1332,8 @@ set_multicast_list(struct net_device *dev) | |||
1332 | outw(0, ioaddr + IO_PORT); | 1332 | outw(0, ioaddr + IO_PORT); |
1333 | outw(6 * (mc_count + 1), ioaddr + IO_PORT); | 1333 | outw(6 * (mc_count + 1), ioaddr + IO_PORT); |
1334 | 1334 | ||
1335 | netdev_for_each_mc_addr(dmi, dev) { | 1335 | netdev_for_each_mc_addr(ha, dev) { |
1336 | eaddrs = (unsigned short *) dmi->dmi_addr; | 1336 | eaddrs = (unsigned short *) ha->addr; |
1337 | outw(*eaddrs++, ioaddr + IO_PORT); | 1337 | outw(*eaddrs++, ioaddr + IO_PORT); |
1338 | outw(*eaddrs++, ioaddr + IO_PORT); | 1338 | outw(*eaddrs++, ioaddr + IO_PORT); |
1339 | outw(*eaddrs++, ioaddr + IO_PORT); | 1339 | outw(*eaddrs++, ioaddr + IO_PORT); |
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index 7013dc8a6cbc..b3882fd8db6d 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -1576,7 +1576,7 @@ static void eexp_hw_init586(struct net_device *dev) | |||
1576 | 1576 | ||
1577 | static void eexp_setup_filter(struct net_device *dev) | 1577 | static void eexp_setup_filter(struct net_device *dev) |
1578 | { | 1578 | { |
1579 | struct dev_mc_list *dmi; | 1579 | struct netdev_hw_addr *ha; |
1580 | unsigned short ioaddr = dev->base_addr; | 1580 | unsigned short ioaddr = dev->base_addr; |
1581 | int count = netdev_mc_count(dev); | 1581 | int count = netdev_mc_count(dev); |
1582 | int i; | 1582 | int i; |
@@ -1589,8 +1589,8 @@ static void eexp_setup_filter(struct net_device *dev) | |||
1589 | outw(CONF_NR_MULTICAST & ~31, ioaddr+SM_PTR); | 1589 | outw(CONF_NR_MULTICAST & ~31, ioaddr+SM_PTR); |
1590 | outw(6*count, ioaddr+SHADOW(CONF_NR_MULTICAST)); | 1590 | outw(6*count, ioaddr+SHADOW(CONF_NR_MULTICAST)); |
1591 | i = 0; | 1591 | i = 0; |
1592 | netdev_for_each_mc_addr(dmi, dev) { | 1592 | netdev_for_each_mc_addr(ha, dev) { |
1593 | unsigned short *data = (unsigned short *) dmi->dmi_addr; | 1593 | unsigned short *data = (unsigned short *) ha->addr; |
1594 | 1594 | ||
1595 | if (i == count) | 1595 | if (i == count) |
1596 | break; | 1596 | break; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index b004eaba3d7b..b97411aaa77c 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -1966,7 +1966,7 @@ static void ehea_add_multicast_entry(struct ehea_port *port, u8 *mc_mac_addr) | |||
1966 | static void ehea_set_multicast_list(struct net_device *dev) | 1966 | static void ehea_set_multicast_list(struct net_device *dev) |
1967 | { | 1967 | { |
1968 | struct ehea_port *port = netdev_priv(dev); | 1968 | struct ehea_port *port = netdev_priv(dev); |
1969 | struct dev_mc_list *k_mcl_entry; | 1969 | struct netdev_hw_addr *ha; |
1970 | int ret; | 1970 | int ret; |
1971 | 1971 | ||
1972 | if (dev->flags & IFF_PROMISC) { | 1972 | if (dev->flags & IFF_PROMISC) { |
@@ -1997,8 +1997,8 @@ static void ehea_set_multicast_list(struct net_device *dev) | |||
1997 | goto out; | 1997 | goto out; |
1998 | } | 1998 | } |
1999 | 1999 | ||
2000 | netdev_for_each_mc_addr(k_mcl_entry, dev) | 2000 | netdev_for_each_mc_addr(ha, dev) |
2001 | ehea_add_multicast_entry(port, k_mcl_entry->dmi_addr); | 2001 | ehea_add_multicast_entry(port, ha->addr); |
2002 | 2002 | ||
2003 | } | 2003 | } |
2004 | out: | 2004 | out: |
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 6d70c349c954..1232887c243d 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -822,7 +822,7 @@ static int enic_set_mac_addr(struct net_device *netdev, char *addr) | |||
822 | static void enic_set_multicast_list(struct net_device *netdev) | 822 | static void enic_set_multicast_list(struct net_device *netdev) |
823 | { | 823 | { |
824 | struct enic *enic = netdev_priv(netdev); | 824 | struct enic *enic = netdev_priv(netdev); |
825 | struct dev_mc_list *list; | 825 | struct netdev_hw_addr *ha; |
826 | int directed = 1; | 826 | int directed = 1; |
827 | int multicast = (netdev->flags & IFF_MULTICAST) ? 1 : 0; | 827 | int multicast = (netdev->flags & IFF_MULTICAST) ? 1 : 0; |
828 | int broadcast = (netdev->flags & IFF_BROADCAST) ? 1 : 0; | 828 | int broadcast = (netdev->flags & IFF_BROADCAST) ? 1 : 0; |
@@ -852,10 +852,10 @@ static void enic_set_multicast_list(struct net_device *netdev) | |||
852 | */ | 852 | */ |
853 | 853 | ||
854 | i = 0; | 854 | i = 0; |
855 | netdev_for_each_mc_addr(list, netdev) { | 855 | netdev_for_each_mc_addr(ha, netdev) { |
856 | if (i == mc_count) | 856 | if (i == mc_count) |
857 | break; | 857 | break; |
858 | memcpy(mc_addr[i++], list->dmi_addr, ETH_ALEN); | 858 | memcpy(mc_addr[i++], ha->addr, ETH_ALEN); |
859 | } | 859 | } |
860 | 860 | ||
861 | for (i = 0; i < enic->mc_count; i++) { | 861 | for (i = 0; i < enic->mc_count; i++) { |
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 39c271b6be44..f6584a1ad3bc 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -1400,12 +1400,12 @@ static void set_rx_mode(struct net_device *dev) | |||
1400 | outl(0x0004, ioaddr + RxCtrl); | 1400 | outl(0x0004, ioaddr + RxCtrl); |
1401 | return; | 1401 | return; |
1402 | } else { /* Never executed, for now. */ | 1402 | } else { /* Never executed, for now. */ |
1403 | struct dev_mc_list *mclist; | 1403 | struct netdev_hw_addr *ha; |
1404 | 1404 | ||
1405 | memset(mc_filter, 0, sizeof(mc_filter)); | 1405 | memset(mc_filter, 0, sizeof(mc_filter)); |
1406 | netdev_for_each_mc_addr(mclist, dev) { | 1406 | netdev_for_each_mc_addr(ha, dev) { |
1407 | unsigned int bit_nr = | 1407 | unsigned int bit_nr = |
1408 | ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f; | 1408 | ether_crc_le(ETH_ALEN, ha->addr) & 0x3f; |
1409 | mc_filter[bit_nr >> 3] |= (1 << bit_nr); | 1409 | mc_filter[bit_nr >> 3] |= (1 << bit_nr); |
1410 | } | 1410 | } |
1411 | } | 1411 | } |
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 209742304e20..f6be5aeaf94c 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c | |||
@@ -755,7 +755,7 @@ static void ethoc_set_multicast_list(struct net_device *dev) | |||
755 | { | 755 | { |
756 | struct ethoc *priv = netdev_priv(dev); | 756 | struct ethoc *priv = netdev_priv(dev); |
757 | u32 mode = ethoc_read(priv, MODER); | 757 | u32 mode = ethoc_read(priv, MODER); |
758 | struct dev_mc_list *mc; | 758 | struct netdev_hw_addr *ha; |
759 | u32 hash[2] = { 0, 0 }; | 759 | u32 hash[2] = { 0, 0 }; |
760 | 760 | ||
761 | /* set loopback mode if requested */ | 761 | /* set loopback mode if requested */ |
@@ -783,8 +783,8 @@ static void ethoc_set_multicast_list(struct net_device *dev) | |||
783 | hash[0] = 0xffffffff; | 783 | hash[0] = 0xffffffff; |
784 | hash[1] = 0xffffffff; | 784 | hash[1] = 0xffffffff; |
785 | } else { | 785 | } else { |
786 | netdev_for_each_mc_addr(mc, dev) { | 786 | netdev_for_each_mc_addr(ha, dev) { |
787 | u32 crc = ether_crc(ETH_ALEN, mc->dmi_addr); | 787 | u32 crc = ether_crc(ETH_ALEN, ha->addr); |
788 | int bit = (crc >> 26) & 0x3f; | 788 | int bit = (crc >> 26) & 0x3f; |
789 | hash[bit >> 5] |= 1 << (bit & 0x1f); | 789 | hash[bit >> 5] |= 1 << (bit & 0x1f); |
790 | } | 790 | } |
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index a2bade586886..11ba70f49971 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c | |||
@@ -1169,7 +1169,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1169 | static void SetMulticastFilter(struct net_device *dev) | 1169 | static void SetMulticastFilter(struct net_device *dev) |
1170 | { | 1170 | { |
1171 | struct ewrk3_private *lp = netdev_priv(dev); | 1171 | struct ewrk3_private *lp = netdev_priv(dev); |
1172 | struct dev_mc_list *dmi; | 1172 | struct netdev_hw_addr *ha; |
1173 | u_long iobase = dev->base_addr; | 1173 | u_long iobase = dev->base_addr; |
1174 | int i; | 1174 | int i; |
1175 | char *addrs, bit, byte; | 1175 | char *addrs, bit, byte; |
@@ -1213,8 +1213,8 @@ static void SetMulticastFilter(struct net_device *dev) | |||
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | /* Update table */ | 1215 | /* Update table */ |
1216 | netdev_for_each_mc_addr(dmi, dev) { | 1216 | netdev_for_each_mc_addr(ha, dev) { |
1217 | addrs = dmi->dmi_addr; | 1217 | addrs = ha->addr; |
1218 | if ((*addrs & 0x01) == 1) { /* multicast address? */ | 1218 | if ((*addrs & 0x01) == 1) { /* multicast address? */ |
1219 | crc = ether_crc_le(ETH_ALEN, addrs); | 1219 | crc = ether_crc_le(ETH_ALEN, addrs); |
1220 | hashcode = crc & ((1 << 9) - 1); /* hashcode is 9 LSb of CRC */ | 1220 | hashcode = crc & ((1 << 9) - 1); /* hashcode is 9 LSb of CRC */ |
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index 9d5ad08a119f..e8a2705237bf 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -1792,12 +1792,12 @@ static void __set_rx_mode(struct net_device *dev) | |||
1792 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 1792 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
1793 | rx_mode = CR_W_AB | CR_W_AM; | 1793 | rx_mode = CR_W_AB | CR_W_AM; |
1794 | } else { | 1794 | } else { |
1795 | struct dev_mc_list *mclist; | 1795 | struct netdev_hw_addr *ha; |
1796 | 1796 | ||
1797 | memset(mc_filter, 0, sizeof(mc_filter)); | 1797 | memset(mc_filter, 0, sizeof(mc_filter)); |
1798 | netdev_for_each_mc_addr(mclist, dev) { | 1798 | netdev_for_each_mc_addr(ha, dev) { |
1799 | unsigned int bit; | 1799 | unsigned int bit; |
1800 | bit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; | 1800 | bit = (ether_crc(ETH_ALEN, ha->addr) >> 26) ^ 0x3F; |
1801 | mc_filter[bit >> 5] |= (1 << bit); | 1801 | mc_filter[bit >> 5] |= (1 << bit); |
1802 | } | 1802 | } |
1803 | rx_mode = CR_W_AB | CR_W_AM; | 1803 | rx_mode = CR_W_AB | CR_W_AM; |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 848eb1968abf..2b1651aee13f 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -954,7 +954,7 @@ fec_enet_close(struct net_device *dev) | |||
954 | static void set_multicast_list(struct net_device *dev) | 954 | static void set_multicast_list(struct net_device *dev) |
955 | { | 955 | { |
956 | struct fec_enet_private *fep = netdev_priv(dev); | 956 | struct fec_enet_private *fep = netdev_priv(dev); |
957 | struct dev_mc_list *dmi; | 957 | struct netdev_hw_addr *ha; |
958 | unsigned int i, bit, data, crc, tmp; | 958 | unsigned int i, bit, data, crc, tmp; |
959 | unsigned char hash; | 959 | unsigned char hash; |
960 | 960 | ||
@@ -984,16 +984,16 @@ static void set_multicast_list(struct net_device *dev) | |||
984 | writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); | 984 | writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); |
985 | writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW); | 985 | writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW); |
986 | 986 | ||
987 | netdev_for_each_mc_addr(dmi, dev) { | 987 | netdev_for_each_mc_addr(ha, dev) { |
988 | /* Only support group multicast for now */ | 988 | /* Only support group multicast for now */ |
989 | if (!(dmi->dmi_addr[0] & 1)) | 989 | if (!(ha->addr[0] & 1)) |
990 | continue; | 990 | continue; |
991 | 991 | ||
992 | /* calculate crc32 value of mac address */ | 992 | /* calculate crc32 value of mac address */ |
993 | crc = 0xffffffff; | 993 | crc = 0xffffffff; |
994 | 994 | ||
995 | for (i = 0; i < dmi->dmi_addrlen; i++) { | 995 | for (i = 0; i < dev->addr_len; i++) { |
996 | data = dmi->dmi_addr[i]; | 996 | data = ha->addr[i]; |
997 | for (bit = 0; bit < 8; bit++, data >>= 1) { | 997 | for (bit = 0; bit < 8; bit++, data >>= 1) { |
998 | crc = (crc >> 1) ^ | 998 | crc = (crc >> 1) ^ |
999 | (((crc ^ data) & 1) ? CRC32_POLY : 0); | 999 | (((crc ^ data) & 1) ? CRC32_POLY : 0); |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 704155e2bdd1..667ba1391b9d 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -574,12 +574,12 @@ static void mpc52xx_fec_set_multicast_list(struct net_device *dev) | |||
574 | out_be32(&fec->gaddr2, 0xffffffff); | 574 | out_be32(&fec->gaddr2, 0xffffffff); |
575 | } else { | 575 | } else { |
576 | u32 crc; | 576 | u32 crc; |
577 | struct dev_mc_list *dmi; | 577 | struct netdev_hw_addr *ha; |
578 | u32 gaddr1 = 0x00000000; | 578 | u32 gaddr1 = 0x00000000; |
579 | u32 gaddr2 = 0x00000000; | 579 | u32 gaddr2 = 0x00000000; |
580 | 580 | ||
581 | netdev_for_each_mc_addr(dmi, dev) { | 581 | netdev_for_each_mc_addr(ha, dev) { |
582 | crc = ether_crc_le(6, dmi->dmi_addr) >> 26; | 582 | crc = ether_crc_le(6, ha->addr) >> 26; |
583 | if (crc >= 32) | 583 | if (crc >= 32) |
584 | gaddr1 |= 1 << (crc-32); | 584 | gaddr1 |= 1 << (crc-32); |
585 | else | 585 | else |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index ca05e5662029..6a2b64f0a7db 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -3103,12 +3103,14 @@ static void nv_set_multicast(struct net_device *dev) | |||
3103 | if (dev->flags & IFF_ALLMULTI) { | 3103 | if (dev->flags & IFF_ALLMULTI) { |
3104 | alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; | 3104 | alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; |
3105 | } else { | 3105 | } else { |
3106 | struct dev_mc_list *walk; | 3106 | struct netdev_hw_addr *ha; |
3107 | 3107 | ||
3108 | netdev_for_each_mc_addr(walk, dev) { | 3108 | netdev_for_each_mc_addr(ha, dev) { |
3109 | unsigned char *addr = ha->addr; | ||
3109 | u32 a, b; | 3110 | u32 a, b; |
3110 | a = le32_to_cpu(*(__le32 *) walk->dmi_addr); | 3111 | |
3111 | b = le16_to_cpu(*(__le16 *) (&walk->dmi_addr[4])); | 3112 | a = le32_to_cpu(*(__le32 *) addr); |
3113 | b = le16_to_cpu(*(__le16 *) (&addr[4])); | ||
3112 | alwaysOn[0] &= a; | 3114 | alwaysOn[0] &= a; |
3113 | alwaysOff[0] &= ~a; | 3115 | alwaysOff[0] &= ~a; |
3114 | alwaysOn[1] &= b; | 3116 | alwaysOn[1] &= b; |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index cf4f674f9e2e..b3bad7c15d02 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -231,12 +231,12 @@ static void set_multicast_finish(struct net_device *dev) | |||
231 | 231 | ||
232 | static void set_multicast_list(struct net_device *dev) | 232 | static void set_multicast_list(struct net_device *dev) |
233 | { | 233 | { |
234 | struct dev_mc_list *pmc; | 234 | struct netdev_hw_addr *ha; |
235 | 235 | ||
236 | if ((dev->flags & IFF_PROMISC) == 0) { | 236 | if ((dev->flags & IFF_PROMISC) == 0) { |
237 | set_multicast_start(dev); | 237 | set_multicast_start(dev); |
238 | netdev_for_each_mc_addr(pmc, dev) | 238 | netdev_for_each_mc_addr(ha, dev) |
239 | set_multicast_one(dev, pmc->dmi_addr); | 239 | set_multicast_one(dev, ha->addr); |
240 | set_multicast_finish(dev); | 240 | set_multicast_finish(dev); |
241 | } else | 241 | } else |
242 | set_promiscuous_mode(dev); | 242 | set_promiscuous_mode(dev); |
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index cd2c6cca5f24..75974c6d201b 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -232,12 +232,12 @@ static void set_multicast_finish(struct net_device *dev) | |||
232 | 232 | ||
233 | static void set_multicast_list(struct net_device *dev) | 233 | static void set_multicast_list(struct net_device *dev) |
234 | { | 234 | { |
235 | struct dev_mc_list *pmc; | 235 | struct netdev_hw_addr *ha; |
236 | 236 | ||
237 | if ((dev->flags & IFF_PROMISC) == 0) { | 237 | if ((dev->flags & IFF_PROMISC) == 0) { |
238 | set_multicast_start(dev); | 238 | set_multicast_start(dev); |
239 | netdev_for_each_mc_addr(pmc, dev) | 239 | netdev_for_each_mc_addr(ha, dev) |
240 | set_multicast_one(dev, pmc->dmi_addr); | 240 | set_multicast_one(dev, ha->addr); |
241 | set_multicast_finish(dev); | 241 | set_multicast_finish(dev); |
242 | } else | 242 | } else |
243 | set_promiscuous_mode(dev); | 243 | set_promiscuous_mode(dev); |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index c490a466cae1..0ab6a346a193 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -224,12 +224,12 @@ static void set_multicast_finish(struct net_device *dev) | |||
224 | 224 | ||
225 | static void set_multicast_list(struct net_device *dev) | 225 | static void set_multicast_list(struct net_device *dev) |
226 | { | 226 | { |
227 | struct dev_mc_list *pmc; | 227 | struct netdev_hw_addr *ha; |
228 | 228 | ||
229 | if ((dev->flags & IFF_PROMISC) == 0) { | 229 | if ((dev->flags & IFF_PROMISC) == 0) { |
230 | set_multicast_start(dev); | 230 | set_multicast_start(dev); |
231 | netdev_for_each_mc_addr(pmc, dev) | 231 | netdev_for_each_mc_addr(ha, dev) |
232 | set_multicast_one(dev, pmc->dmi_addr); | 232 | set_multicast_one(dev, ha->addr); |
233 | set_multicast_finish(dev); | 233 | set_multicast_finish(dev); |
234 | } else | 234 | } else |
235 | set_promiscuous_mode(dev); | 235 | set_promiscuous_mode(dev); |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index b6715553cf17..fdd26c2b1a2f 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -2797,7 +2797,7 @@ static void adjust_link(struct net_device *dev) | |||
2797 | * whenever dev->flags is changed */ | 2797 | * whenever dev->flags is changed */ |
2798 | static void gfar_set_multi(struct net_device *dev) | 2798 | static void gfar_set_multi(struct net_device *dev) |
2799 | { | 2799 | { |
2800 | struct dev_mc_list *mc_ptr; | 2800 | struct netdev_hw_addr *ha; |
2801 | struct gfar_private *priv = netdev_priv(dev); | 2801 | struct gfar_private *priv = netdev_priv(dev); |
2802 | struct gfar __iomem *regs = priv->gfargrp[0].regs; | 2802 | struct gfar __iomem *regs = priv->gfargrp[0].regs; |
2803 | u32 tempval; | 2803 | u32 tempval; |
@@ -2870,13 +2870,12 @@ static void gfar_set_multi(struct net_device *dev) | |||
2870 | return; | 2870 | return; |
2871 | 2871 | ||
2872 | /* Parse the list, and set the appropriate bits */ | 2872 | /* Parse the list, and set the appropriate bits */ |
2873 | netdev_for_each_mc_addr(mc_ptr, dev) { | 2873 | netdev_for_each_mc_addr(ha, dev) { |
2874 | if (idx < em_num) { | 2874 | if (idx < em_num) { |
2875 | gfar_set_mac_for_addr(dev, idx, | 2875 | gfar_set_mac_for_addr(dev, idx, ha->addr); |
2876 | mc_ptr->dmi_addr); | ||
2877 | idx++; | 2876 | idx++; |
2878 | } else | 2877 | } else |
2879 | gfar_set_hash_for_addr(dev, mc_ptr->dmi_addr); | 2878 | gfar_set_hash_for_addr(dev, ha->addr); |
2880 | } | 2879 | } |
2881 | } | 2880 | } |
2882 | 2881 | ||
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index c5e0d28a6de9..fbe6ab6b919b 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
@@ -988,7 +988,7 @@ static u32 greth_hash_get_index(__u8 *addr) | |||
988 | 988 | ||
989 | static void greth_set_hash_filter(struct net_device *dev) | 989 | static void greth_set_hash_filter(struct net_device *dev) |
990 | { | 990 | { |
991 | struct dev_mc_list *curr; | 991 | struct netdev_hw_addr *ha; |
992 | struct greth_private *greth = netdev_priv(dev); | 992 | struct greth_private *greth = netdev_priv(dev); |
993 | struct greth_regs *regs = (struct greth_regs *) greth->regs; | 993 | struct greth_regs *regs = (struct greth_regs *) greth->regs; |
994 | u32 mc_filter[2]; | 994 | u32 mc_filter[2]; |
@@ -996,8 +996,8 @@ static void greth_set_hash_filter(struct net_device *dev) | |||
996 | 996 | ||
997 | mc_filter[0] = mc_filter[1] = 0; | 997 | mc_filter[0] = mc_filter[1] = 0; |
998 | 998 | ||
999 | netdev_for_each_mc_addr(curr, dev) { | 999 | netdev_for_each_mc_addr(ha, dev) { |
1000 | bitnr = greth_hash_get_index(curr->dmi_addr); | 1000 | bitnr = greth_hash_get_index(ha->addr); |
1001 | mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); | 1001 | mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); |
1002 | } | 1002 | } |
1003 | 1003 | ||
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 373546dd0831..2bfcca6d180c 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -1858,12 +1858,12 @@ static void set_rx_mode(struct net_device *dev) | |||
1858 | /* Too many to match, or accept all multicasts. */ | 1858 | /* Too many to match, or accept all multicasts. */ |
1859 | writew(0x000B, ioaddr + AddrMode); | 1859 | writew(0x000B, ioaddr + AddrMode); |
1860 | } else if (!netdev_mc_empty(dev)) { /* Must use the CAM filter. */ | 1860 | } else if (!netdev_mc_empty(dev)) { /* Must use the CAM filter. */ |
1861 | struct dev_mc_list *mclist; | 1861 | struct netdev_hw_addr *ha; |
1862 | int i = 0; | 1862 | int i = 0; |
1863 | 1863 | ||
1864 | netdev_for_each_mc_addr(mclist, dev) { | 1864 | netdev_for_each_mc_addr(ha, dev) { |
1865 | writel(*(u32*)(mclist->dmi_addr), ioaddr + 0x100 + i*8); | 1865 | writel(*(u32 *)(ha->addr), ioaddr + 0x100 + i*8); |
1866 | writel(0x20000 | (*(u16*)&mclist->dmi_addr[4]), | 1866 | writel(0x20000 | (*(u16 *)&ha->addr[4]), |
1867 | ioaddr + 0x104 + i*8); | 1867 | ioaddr + 0x104 + i*8); |
1868 | i++; | 1868 | i++; |
1869 | } | 1869 | } |
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index b766a69bf0ca..86b2b4332341 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -2100,15 +2100,15 @@ static void hp100_set_multicast_list(struct net_device *dev) | |||
2100 | } else { | 2100 | } else { |
2101 | int i, idx; | 2101 | int i, idx; |
2102 | u_char *addrs; | 2102 | u_char *addrs; |
2103 | struct dev_mc_list *dmi; | 2103 | struct netdev_hw_addr *ha; |
2104 | 2104 | ||
2105 | memset(&lp->hash_bytes, 0x00, 8); | 2105 | memset(&lp->hash_bytes, 0x00, 8); |
2106 | #ifdef HP100_DEBUG | 2106 | #ifdef HP100_DEBUG |
2107 | printk("hp100: %s: computing hash filter - mc_count = %i\n", | 2107 | printk("hp100: %s: computing hash filter - mc_count = %i\n", |
2108 | dev->name, netdev_mc_count(dev)); | 2108 | dev->name, netdev_mc_count(dev)); |
2109 | #endif | 2109 | #endif |
2110 | netdev_for_each_mc_addr(dmi, dev) { | 2110 | netdev_for_each_mc_addr(ha, dev) { |
2111 | addrs = dmi->dmi_addr; | 2111 | addrs = ha->addr; |
2112 | if ((*addrs & 0x01) == 0x01) { /* multicast address? */ | 2112 | if ((*addrs & 0x01) == 0x01) { /* multicast address? */ |
2113 | #ifdef HP100_DEBUG | 2113 | #ifdef HP100_DEBUG |
2114 | printk("hp100: %s: multicast = %pM, ", | 2114 | printk("hp100: %s: multicast = %pM, ", |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index d8533a4ef825..40c78507ef16 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -388,18 +388,19 @@ static void emac_hash_mc(struct emac_instance *dev) | |||
388 | const int regs = EMAC_XAHT_REGS(dev); | 388 | const int regs = EMAC_XAHT_REGS(dev); |
389 | u32 *gaht_base = emac_gaht_base(dev); | 389 | u32 *gaht_base = emac_gaht_base(dev); |
390 | u32 gaht_temp[regs]; | 390 | u32 gaht_temp[regs]; |
391 | struct dev_mc_list *dmi; | 391 | struct netdev_hw_addr *ha; |
392 | int i; | 392 | int i; |
393 | 393 | ||
394 | DBG(dev, "hash_mc %d" NL, netdev_mc_count(dev->ndev)); | 394 | DBG(dev, "hash_mc %d" NL, netdev_mc_count(dev->ndev)); |
395 | 395 | ||
396 | memset(gaht_temp, 0, sizeof (gaht_temp)); | 396 | memset(gaht_temp, 0, sizeof (gaht_temp)); |
397 | 397 | ||
398 | netdev_for_each_mc_addr(dmi, dev->ndev) { | 398 | netdev_for_each_mc_addr(ha, dev->ndev) { |
399 | int slot, reg, mask; | 399 | int slot, reg, mask; |
400 | DBG2(dev, "mc %pM" NL, dmi->dmi_addr); | 400 | DBG2(dev, "mc %pM" NL, ha->addr); |
401 | 401 | ||
402 | slot = EMAC_XAHT_CRC_TO_SLOT(dev, ether_crc(ETH_ALEN, dmi->dmi_addr)); | 402 | slot = EMAC_XAHT_CRC_TO_SLOT(dev, |
403 | ether_crc(ETH_ALEN, ha->addr)); | ||
403 | reg = EMAC_XAHT_SLOT_TO_REG(dev, slot); | 404 | reg = EMAC_XAHT_SLOT_TO_REG(dev, slot); |
404 | mask = EMAC_XAHT_SLOT_TO_MASK(dev, slot); | 405 | mask = EMAC_XAHT_SLOT_TO_MASK(dev, slot); |
405 | 406 | ||
@@ -1176,7 +1177,7 @@ static int emac_open(struct net_device *ndev) | |||
1176 | netif_carrier_on(dev->ndev); | 1177 | netif_carrier_on(dev->ndev); |
1177 | 1178 | ||
1178 | /* Required for Pause packet support in EMAC */ | 1179 | /* Required for Pause packet support in EMAC */ |
1179 | dev_mc_add(ndev, default_mcast_addr, sizeof(default_mcast_addr), 1); | 1180 | dev_mc_add_global(ndev, default_mcast_addr); |
1180 | 1181 | ||
1181 | emac_configure(dev); | 1182 | emac_configure(dev); |
1182 | mal_poll_add(dev->mal, &dev->commac); | 1183 | mal_poll_add(dev->mal, &dev->commac); |
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c index b5d0f4e973f7..76949e08ee84 100644 --- a/drivers/net/ibmlana.c +++ b/drivers/net/ibmlana.c | |||
@@ -385,7 +385,7 @@ static void InitBoard(struct net_device *dev) | |||
385 | int camcnt; | 385 | int camcnt; |
386 | camentry_t cams[16]; | 386 | camentry_t cams[16]; |
387 | u32 cammask; | 387 | u32 cammask; |
388 | struct dev_mc_list *mcptr; | 388 | struct netdev_hw_addr *ha; |
389 | u16 rcrval; | 389 | u16 rcrval; |
390 | 390 | ||
391 | /* reset the SONIC */ | 391 | /* reset the SONIC */ |
@@ -420,8 +420,8 @@ static void InitBoard(struct net_device *dev) | |||
420 | /* start putting the multicast addresses into the CAM list. Stop if | 420 | /* start putting the multicast addresses into the CAM list. Stop if |
421 | it is full. */ | 421 | it is full. */ |
422 | 422 | ||
423 | netdev_for_each_mc_addr(mcptr, dev) { | 423 | netdev_for_each_mc_addr(ha, dev) { |
424 | putcam(cams, &camcnt, mcptr->dmi_addr); | 424 | putcam(cams, &camcnt, ha->addr); |
425 | if (camcnt == 16) | 425 | if (camcnt == 16) |
426 | break; | 426 | break; |
427 | } | 427 | } |
@@ -479,7 +479,7 @@ static void InitBoard(struct net_device *dev) | |||
479 | /* if still multicast addresses left or ALLMULTI is set, set the multicast | 479 | /* if still multicast addresses left or ALLMULTI is set, set the multicast |
480 | enable bit */ | 480 | enable bit */ |
481 | 481 | ||
482 | if ((dev->flags & IFF_ALLMULTI) || (mcptr != NULL)) | 482 | if ((dev->flags & IFF_ALLMULTI) || netdev_mc_count(dev) > camcnt) |
483 | rcrval |= RCREG_AMC; | 483 | rcrval |= RCREG_AMC; |
484 | 484 | ||
485 | /* promiscous mode ? */ | 485 | /* promiscous mode ? */ |
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 0bc777bac9b4..f468590ed454 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -1072,7 +1072,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev) | |||
1072 | ibmveth_error_printk("h_multicast_ctrl rc=%ld when entering promisc mode\n", lpar_rc); | 1072 | ibmveth_error_printk("h_multicast_ctrl rc=%ld when entering promisc mode\n", lpar_rc); |
1073 | } | 1073 | } |
1074 | } else { | 1074 | } else { |
1075 | struct dev_mc_list *mclist; | 1075 | struct netdev_hw_addr *ha; |
1076 | /* clear the filter table & disable filtering */ | 1076 | /* clear the filter table & disable filtering */ |
1077 | lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, | 1077 | lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, |
1078 | IbmVethMcastEnableRecv | | 1078 | IbmVethMcastEnableRecv | |
@@ -1083,10 +1083,10 @@ static void ibmveth_set_multicast_list(struct net_device *netdev) | |||
1083 | ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc); | 1083 | ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc); |
1084 | } | 1084 | } |
1085 | /* add the addresses to the filter table */ | 1085 | /* add the addresses to the filter table */ |
1086 | netdev_for_each_mc_addr(mclist, netdev) { | 1086 | netdev_for_each_mc_addr(ha, netdev) { |
1087 | // add the multicast address to the filter table | 1087 | // add the multicast address to the filter table |
1088 | unsigned long mcast_addr = 0; | 1088 | unsigned long mcast_addr = 0; |
1089 | memcpy(((char *)&mcast_addr)+2, mclist->dmi_addr, 6); | 1089 | memcpy(((char *)&mcast_addr)+2, ha->addr, 6); |
1090 | lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, | 1090 | lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, |
1091 | IbmVethMcastAddFilter, | 1091 | IbmVethMcastAddFilter, |
1092 | mcast_addr); | 1092 | mcast_addr); |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index ea875709f053..78cc742e233f 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2864,7 +2864,7 @@ static int igb_write_mc_addr_list(struct net_device *netdev) | |||
2864 | { | 2864 | { |
2865 | struct igb_adapter *adapter = netdev_priv(netdev); | 2865 | struct igb_adapter *adapter = netdev_priv(netdev); |
2866 | struct e1000_hw *hw = &adapter->hw; | 2866 | struct e1000_hw *hw = &adapter->hw; |
2867 | struct dev_mc_list *mc_ptr; | 2867 | struct netdev_hw_addr *ha; |
2868 | u8 *mta_list; | 2868 | u8 *mta_list; |
2869 | int i; | 2869 | int i; |
2870 | 2870 | ||
@@ -2881,8 +2881,8 @@ static int igb_write_mc_addr_list(struct net_device *netdev) | |||
2881 | 2881 | ||
2882 | /* The shared function expects a packed array of only addresses. */ | 2882 | /* The shared function expects a packed array of only addresses. */ |
2883 | i = 0; | 2883 | i = 0; |
2884 | netdev_for_each_mc_addr(mc_ptr, netdev) | 2884 | netdev_for_each_mc_addr(ha, netdev) |
2885 | memcpy(mta_list + (i++ * ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); | 2885 | memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); |
2886 | 2886 | ||
2887 | igb_update_mc_addr_list(hw, mta_list, i); | 2887 | igb_update_mc_addr_list(hw, mta_list, i); |
2888 | kfree(mta_list); | 2888 | kfree(mta_list); |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index a77afd8a14bb..ea8abf5c1ef2 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -1399,7 +1399,7 @@ static void igbvf_set_multi(struct net_device *netdev) | |||
1399 | { | 1399 | { |
1400 | struct igbvf_adapter *adapter = netdev_priv(netdev); | 1400 | struct igbvf_adapter *adapter = netdev_priv(netdev); |
1401 | struct e1000_hw *hw = &adapter->hw; | 1401 | struct e1000_hw *hw = &adapter->hw; |
1402 | struct dev_mc_list *mc_ptr; | 1402 | struct netdev_hw_addr *ha; |
1403 | u8 *mta_list = NULL; | 1403 | u8 *mta_list = NULL; |
1404 | int i; | 1404 | int i; |
1405 | 1405 | ||
@@ -1414,8 +1414,8 @@ static void igbvf_set_multi(struct net_device *netdev) | |||
1414 | 1414 | ||
1415 | /* prepare a packed array of only addresses. */ | 1415 | /* prepare a packed array of only addresses. */ |
1416 | i = 0; | 1416 | i = 0; |
1417 | netdev_for_each_mc_addr(mc_ptr, netdev) | 1417 | netdev_for_each_mc_addr(ha, netdev) |
1418 | memcpy(mta_list + (i++ * ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); | 1418 | memcpy(mta_list + (i++ * ETH_ALEN), ha->addr, ETH_ALEN); |
1419 | 1419 | ||
1420 | hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0); | 1420 | hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0); |
1421 | kfree(mta_list); | 1421 | kfree(mta_list); |
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 70871b9b045a..57d873da9789 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -1664,7 +1664,7 @@ static int ioc3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1664 | 1664 | ||
1665 | static void ioc3_set_multicast_list(struct net_device *dev) | 1665 | static void ioc3_set_multicast_list(struct net_device *dev) |
1666 | { | 1666 | { |
1667 | struct dev_mc_list *dmi; | 1667 | struct netdev_hw_addr *ha; |
1668 | struct ioc3_private *ip = netdev_priv(dev); | 1668 | struct ioc3_private *ip = netdev_priv(dev); |
1669 | struct ioc3 *ioc3 = ip->regs; | 1669 | struct ioc3 *ioc3 = ip->regs; |
1670 | u64 ehar = 0; | 1670 | u64 ehar = 0; |
@@ -1688,8 +1688,8 @@ static void ioc3_set_multicast_list(struct net_device *dev) | |||
1688 | ip->ehar_h = 0xffffffff; | 1688 | ip->ehar_h = 0xffffffff; |
1689 | ip->ehar_l = 0xffffffff; | 1689 | ip->ehar_l = 0xffffffff; |
1690 | } else { | 1690 | } else { |
1691 | netdev_for_each_mc_addr(dmi, dev) { | 1691 | netdev_for_each_mc_addr(ha, dev) { |
1692 | char *addr = dmi->dmi_addr; | 1692 | char *addr = ha->addr; |
1693 | 1693 | ||
1694 | if (!(*addr & 1)) | 1694 | if (!(*addr & 1)) |
1695 | continue; | 1695 | continue; |
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index 0d7ad3f2d0f3..67cfc7d9d895 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c | |||
@@ -569,7 +569,7 @@ static int ipg_config_autoneg(struct net_device *dev) | |||
569 | static void ipg_nic_set_multicast_list(struct net_device *dev) | 569 | static void ipg_nic_set_multicast_list(struct net_device *dev) |
570 | { | 570 | { |
571 | void __iomem *ioaddr = ipg_ioaddr(dev); | 571 | void __iomem *ioaddr = ipg_ioaddr(dev); |
572 | struct dev_mc_list *mc_list_ptr; | 572 | struct netdev_hw_addr *ha; |
573 | unsigned int hashindex; | 573 | unsigned int hashindex; |
574 | u32 hashtable[2]; | 574 | u32 hashtable[2]; |
575 | u8 receivemode; | 575 | u8 receivemode; |
@@ -608,9 +608,9 @@ static void ipg_nic_set_multicast_list(struct net_device *dev) | |||
608 | hashtable[1] = 0x00000000; | 608 | hashtable[1] = 0x00000000; |
609 | 609 | ||
610 | /* Cycle through all multicast addresses to filter. */ | 610 | /* Cycle through all multicast addresses to filter. */ |
611 | netdev_for_each_mc_addr(mc_list_ptr, dev) { | 611 | netdev_for_each_mc_addr(ha, dev) { |
612 | /* Calculate CRC result for each multicast address. */ | 612 | /* Calculate CRC result for each multicast address. */ |
613 | hashindex = crc32_le(0xffffffff, mc_list_ptr->dmi_addr, | 613 | hashindex = crc32_le(0xffffffff, ha->addr, |
614 | ETH_ALEN); | 614 | ETH_ALEN); |
615 | 615 | ||
616 | /* Use only the least significant 6 bits. */ | 616 | /* Use only the least significant 6 bits. */ |
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index e6e972d9b7ca..cd65b8629bcc 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c | |||
@@ -961,15 +961,15 @@ static void veth_set_multicast_list(struct net_device *dev) | |||
961 | (netdev_mc_count(dev) > VETH_MAX_MCAST)) { | 961 | (netdev_mc_count(dev) > VETH_MAX_MCAST)) { |
962 | port->promiscuous = 1; | 962 | port->promiscuous = 1; |
963 | } else { | 963 | } else { |
964 | struct dev_mc_list *dmi; | 964 | struct netdev_hw_addr *ha; |
965 | 965 | ||
966 | port->promiscuous = 0; | 966 | port->promiscuous = 0; |
967 | 967 | ||
968 | /* Update table */ | 968 | /* Update table */ |
969 | port->num_mcast = 0; | 969 | port->num_mcast = 0; |
970 | 970 | ||
971 | netdev_for_each_mc_addr(dmi, dev) { | 971 | netdev_for_each_mc_addr(ha, dev) { |
972 | u8 *addr = dmi->dmi_addr; | 972 | u8 *addr = ha->addr; |
973 | u64 xaddr = 0; | 973 | u64 xaddr = 0; |
974 | 974 | ||
975 | if (addr[0] & 0x01) {/* multicast address? */ | 975 | if (addr[0] & 0x01) {/* multicast address? */ |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index c9fef65cb98b..912dd1d5772c 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1058,7 +1058,7 @@ ixgb_set_multi(struct net_device *netdev) | |||
1058 | { | 1058 | { |
1059 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 1059 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
1060 | struct ixgb_hw *hw = &adapter->hw; | 1060 | struct ixgb_hw *hw = &adapter->hw; |
1061 | struct dev_mc_list *mc_ptr; | 1061 | struct netdev_hw_addr *ha; |
1062 | u32 rctl; | 1062 | u32 rctl; |
1063 | int i; | 1063 | int i; |
1064 | 1064 | ||
@@ -1089,9 +1089,9 @@ ixgb_set_multi(struct net_device *netdev) | |||
1089 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1089 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1090 | 1090 | ||
1091 | i = 0; | 1091 | i = 0; |
1092 | netdev_for_each_mc_addr(mc_ptr, netdev) | 1092 | netdev_for_each_mc_addr(ha, netdev) |
1093 | memcpy(&mta[i++ * IXGB_ETH_LENGTH_OF_ADDRESS], | 1093 | memcpy(&mta[i++ * IXGB_ETH_LENGTH_OF_ADDRESS], |
1094 | mc_ptr->dmi_addr, IXGB_ETH_LENGTH_OF_ADDRESS); | 1094 | ha->addr, IXGB_ETH_LENGTH_OF_ADDRESS); |
1095 | 1095 | ||
1096 | ixgb_mc_addr_list_update(hw, mta, netdev_mc_count(netdev), 0); | 1096 | ixgb_mc_addr_list_update(hw, mta, netdev_mc_count(netdev), 0); |
1097 | } | 1097 | } |
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 4d1c3a429457..6eb5814ca7da 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -1494,7 +1494,7 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr) | |||
1494 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, | 1494 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, |
1495 | struct net_device *netdev) | 1495 | struct net_device *netdev) |
1496 | { | 1496 | { |
1497 | struct dev_addr_list *dmi; | 1497 | struct netdev_hw_addr *ha; |
1498 | u32 i; | 1498 | u32 i; |
1499 | 1499 | ||
1500 | /* | 1500 | /* |
@@ -1510,9 +1510,9 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, | |||
1510 | IXGBE_WRITE_REG(hw, IXGBE_MTA(i), 0); | 1510 | IXGBE_WRITE_REG(hw, IXGBE_MTA(i), 0); |
1511 | 1511 | ||
1512 | /* Add the new addresses */ | 1512 | /* Add the new addresses */ |
1513 | netdev_for_each_mc_addr(dmi, netdev) { | 1513 | netdev_for_each_mc_addr(ha, netdev) { |
1514 | hw_dbg(hw, " Adding the multicast addresses:\n"); | 1514 | hw_dbg(hw, " Adding the multicast addresses:\n"); |
1515 | ixgbe_set_mta(hw, dmi->dmi_addr); | 1515 | ixgbe_set_mta(hw, ha->addr); |
1516 | } | 1516 | } |
1517 | 1517 | ||
1518 | /* Enable mta */ | 1518 | /* Enable mta */ |
diff --git a/drivers/net/ixgbevf/vf.c b/drivers/net/ixgbevf/vf.c index f457c52b5ed4..852e9c4fd934 100644 --- a/drivers/net/ixgbevf/vf.c +++ b/drivers/net/ixgbevf/vf.c | |||
@@ -259,7 +259,7 @@ static s32 ixgbevf_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, | |||
259 | static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, | 259 | static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, |
260 | struct net_device *netdev) | 260 | struct net_device *netdev) |
261 | { | 261 | { |
262 | struct dev_addr_list *dmi; | 262 | struct netdev_hw_addr *ha; |
263 | struct ixgbe_mbx_info *mbx = &hw->mbx; | 263 | struct ixgbe_mbx_info *mbx = &hw->mbx; |
264 | u32 msgbuf[IXGBE_VFMAILBOX_SIZE]; | 264 | u32 msgbuf[IXGBE_VFMAILBOX_SIZE]; |
265 | u16 *vector_list = (u16 *)&msgbuf[1]; | 265 | u16 *vector_list = (u16 *)&msgbuf[1]; |
@@ -281,10 +281,10 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, | |||
281 | msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT; | 281 | msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT; |
282 | 282 | ||
283 | i = 0; | 283 | i = 0; |
284 | netdev_for_each_mc_addr(dmi, netdev) { | 284 | netdev_for_each_mc_addr(ha, netdev) { |
285 | if (i == cnt) | 285 | if (i == cnt) |
286 | break; | 286 | break; |
287 | vector_list[i++] = ixgbevf_mta_vector(hw, dmi->dmi_addr); | 287 | vector_list[i++] = ixgbevf_mta_vector(hw, ha->addr); |
288 | } | 288 | } |
289 | 289 | ||
290 | mbx->ops.write_posted(hw, msgbuf, IXGBE_VFMAILBOX_SIZE); | 290 | mbx->ops.write_posted(hw, msgbuf, IXGBE_VFMAILBOX_SIZE); |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index c0b59a555384..10e816d2caff 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -2009,12 +2009,12 @@ jme_set_multi(struct net_device *netdev) | |||
2009 | } else if (netdev->flags & IFF_ALLMULTI) { | 2009 | } else if (netdev->flags & IFF_ALLMULTI) { |
2010 | jme->reg_rxmcs |= RXMCS_ALLMULFRAME; | 2010 | jme->reg_rxmcs |= RXMCS_ALLMULFRAME; |
2011 | } else if (netdev->flags & IFF_MULTICAST) { | 2011 | } else if (netdev->flags & IFF_MULTICAST) { |
2012 | struct dev_mc_list *mclist; | 2012 | struct netdev_hw_addr *ha; |
2013 | int bit_nr; | 2013 | int bit_nr; |
2014 | 2014 | ||
2015 | jme->reg_rxmcs |= RXMCS_MULFRAME | RXMCS_MULFILTERED; | 2015 | jme->reg_rxmcs |= RXMCS_MULFRAME | RXMCS_MULFILTERED; |
2016 | netdev_for_each_mc_addr(mclist, netdev) { | 2016 | netdev_for_each_mc_addr(ha, netdev) { |
2017 | bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) & 0x3F; | 2017 | bit_nr = ether_crc(ETH_ALEN, ha->addr) & 0x3F; |
2018 | mc_hash[bit_nr >> 5] |= 1 << (bit_nr & 0x1F); | 2018 | mc_hash[bit_nr >> 5] |= 1 << (bit_nr & 0x1F); |
2019 | } | 2019 | } |
2020 | 2020 | ||
diff --git a/drivers/net/korina.c b/drivers/net/korina.c index edaedc7aa03f..26bf1b76b997 100644 --- a/drivers/net/korina.c +++ b/drivers/net/korina.c | |||
@@ -482,7 +482,7 @@ static void korina_multicast_list(struct net_device *dev) | |||
482 | { | 482 | { |
483 | struct korina_private *lp = netdev_priv(dev); | 483 | struct korina_private *lp = netdev_priv(dev); |
484 | unsigned long flags; | 484 | unsigned long flags; |
485 | struct dev_mc_list *dmi; | 485 | struct netdev_hw_addr *ha; |
486 | u32 recognise = ETH_ARC_AB; /* always accept broadcasts */ | 486 | u32 recognise = ETH_ARC_AB; /* always accept broadcasts */ |
487 | int i; | 487 | int i; |
488 | 488 | ||
@@ -502,8 +502,8 @@ static void korina_multicast_list(struct net_device *dev) | |||
502 | for (i = 0; i < 4; i++) | 502 | for (i = 0; i < 4; i++) |
503 | hash_table[i] = 0; | 503 | hash_table[i] = 0; |
504 | 504 | ||
505 | netdev_for_each_mc_addr(dmi, dev) { | 505 | netdev_for_each_mc_addr(ha, dev) { |
506 | char *addrs = dmi->dmi_addr; | 506 | char *addrs = ha->addr; |
507 | 507 | ||
508 | if (!(*addrs & 1)) | 508 | if (!(*addrs & 1)) |
509 | continue; | 509 | continue; |
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index 66be4e449f02..4dcd61f81ec2 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c | |||
@@ -956,13 +956,13 @@ static void ks8851_set_rx_mode(struct net_device *dev) | |||
956 | rxctrl.rxcr1 = (RXCR1_RXME | RXCR1_RXAE | | 956 | rxctrl.rxcr1 = (RXCR1_RXME | RXCR1_RXAE | |
957 | RXCR1_RXPAFMA | RXCR1_RXMAFMA); | 957 | RXCR1_RXPAFMA | RXCR1_RXMAFMA); |
958 | } else if (dev->flags & IFF_MULTICAST && !netdev_mc_empty(dev)) { | 958 | } else if (dev->flags & IFF_MULTICAST && !netdev_mc_empty(dev)) { |
959 | struct dev_mc_list *mcptr; | 959 | struct netdev_hw_addr *ha; |
960 | u32 crc; | 960 | u32 crc; |
961 | 961 | ||
962 | /* accept some multicast */ | 962 | /* accept some multicast */ |
963 | 963 | ||
964 | netdev_for_each_mc_addr(mcptr, dev) { | 964 | netdev_for_each_mc_addr(ha, dev) { |
965 | crc = ether_crc(ETH_ALEN, mcptr->dmi_addr); | 965 | crc = ether_crc(ETH_ALEN, ha->addr); |
966 | crc >>= (32 - 6); /* get top six bits */ | 966 | crc >>= (32 - 6); /* get top six bits */ |
967 | 967 | ||
968 | rxctrl.mchash[crc >> 4] |= (1 << (crc & 0xf)); | 968 | rxctrl.mchash[crc >> 4] |= (1 << (crc & 0xf)); |
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index ee3fe30b2ad7..70a3d98f4bd7 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c | |||
@@ -362,7 +362,6 @@ static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 }; | |||
362 | 362 | ||
363 | #define MAX_MCAST_LST 32 | 363 | #define MAX_MCAST_LST 32 |
364 | #define HW_MCAST_SIZE 8 | 364 | #define HW_MCAST_SIZE 8 |
365 | #define MAC_ADDR_LEN 6 | ||
366 | 365 | ||
367 | /** | 366 | /** |
368 | * union ks_tx_hdr - tx header data | 367 | * union ks_tx_hdr - tx header data |
@@ -450,7 +449,7 @@ struct ks_net { | |||
450 | u16 promiscuous; | 449 | u16 promiscuous; |
451 | u16 all_mcast; | 450 | u16 all_mcast; |
452 | u16 mcast_lst_size; | 451 | u16 mcast_lst_size; |
453 | u8 mcast_lst[MAX_MCAST_LST][MAC_ADDR_LEN]; | 452 | u8 mcast_lst[MAX_MCAST_LST][ETH_ALEN]; |
454 | u8 mcast_bits[HW_MCAST_SIZE]; | 453 | u8 mcast_bits[HW_MCAST_SIZE]; |
455 | u8 mac_addr[6]; | 454 | u8 mac_addr[6]; |
456 | u8 fid; | 455 | u8 fid; |
@@ -1170,7 +1169,7 @@ static void ks_set_mcast(struct ks_net *ks, u16 mcast) | |||
1170 | static void ks_set_rx_mode(struct net_device *netdev) | 1169 | static void ks_set_rx_mode(struct net_device *netdev) |
1171 | { | 1170 | { |
1172 | struct ks_net *ks = netdev_priv(netdev); | 1171 | struct ks_net *ks = netdev_priv(netdev); |
1173 | struct dev_mc_list *ptr; | 1172 | struct netdev_hw_addr *ha; |
1174 | 1173 | ||
1175 | /* Turn on/off promiscuous mode. */ | 1174 | /* Turn on/off promiscuous mode. */ |
1176 | if ((netdev->flags & IFF_PROMISC) == IFF_PROMISC) | 1175 | if ((netdev->flags & IFF_PROMISC) == IFF_PROMISC) |
@@ -1187,13 +1186,12 @@ static void ks_set_rx_mode(struct net_device *netdev) | |||
1187 | if (netdev_mc_count(netdev) <= MAX_MCAST_LST) { | 1186 | if (netdev_mc_count(netdev) <= MAX_MCAST_LST) { |
1188 | int i = 0; | 1187 | int i = 0; |
1189 | 1188 | ||
1190 | netdev_for_each_mc_addr(ptr, netdev) { | 1189 | netdev_for_each_mc_addr(ha, netdev) { |
1191 | if (!(*ptr->dmi_addr & 1)) | 1190 | if (!(*ha->addr & 1)) |
1192 | continue; | 1191 | continue; |
1193 | if (i >= MAX_MCAST_LST) | 1192 | if (i >= MAX_MCAST_LST) |
1194 | break; | 1193 | break; |
1195 | memcpy(ks->mcast_lst[i++], ptr->dmi_addr, | 1194 | memcpy(ks->mcast_lst[i++], ha->addr, ETH_ALEN); |
1196 | MAC_ADDR_LEN); | ||
1197 | } | 1195 | } |
1198 | ks->mcast_lst_size = (u8)i; | 1196 | ks->mcast_lst_size = (u8)i; |
1199 | ks_set_grpaddr(ks); | 1197 | ks_set_grpaddr(ks); |
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c index b843bf7d8c17..348769521615 100644 --- a/drivers/net/ksz884x.c +++ b/drivers/net/ksz884x.c | |||
@@ -5763,7 +5763,7 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5763 | struct dev_priv *priv = netdev_priv(dev); | 5763 | struct dev_priv *priv = netdev_priv(dev); |
5764 | struct dev_info *hw_priv = priv->adapter; | 5764 | struct dev_info *hw_priv = priv->adapter; |
5765 | struct ksz_hw *hw = &hw_priv->hw; | 5765 | struct ksz_hw *hw = &hw_priv->hw; |
5766 | struct dev_mc_list *mc_ptr; | 5766 | struct netdev_hw_addr *ha; |
5767 | int multicast = (dev->flags & IFF_ALLMULTI); | 5767 | int multicast = (dev->flags & IFF_ALLMULTI); |
5768 | 5768 | ||
5769 | dev_set_promiscuous(dev, priv, hw, (dev->flags & IFF_PROMISC)); | 5769 | dev_set_promiscuous(dev, priv, hw, (dev->flags & IFF_PROMISC)); |
@@ -5780,7 +5780,7 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5780 | int i = 0; | 5780 | int i = 0; |
5781 | 5781 | ||
5782 | /* List too big to support so turn on all multicast mode. */ | 5782 | /* List too big to support so turn on all multicast mode. */ |
5783 | if (dev->mc_count > MAX_MULTICAST_LIST) { | 5783 | if (netdev_mc_count(dev) > MAX_MULTICAST_LIST) { |
5784 | if (MAX_MULTICAST_LIST != hw->multi_list_size) { | 5784 | if (MAX_MULTICAST_LIST != hw->multi_list_size) { |
5785 | hw->multi_list_size = MAX_MULTICAST_LIST; | 5785 | hw->multi_list_size = MAX_MULTICAST_LIST; |
5786 | ++hw->all_multi; | 5786 | ++hw->all_multi; |
@@ -5789,13 +5789,12 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5789 | return; | 5789 | return; |
5790 | } | 5790 | } |
5791 | 5791 | ||
5792 | netdev_for_each_mc_addr(mc_ptr, dev) { | 5792 | netdev_for_each_mc_addr(ha, dev) { |
5793 | if (!(*mc_ptr->dmi_addr & 1)) | 5793 | if (!(*ha->addr & 1)) |
5794 | continue; | 5794 | continue; |
5795 | if (i >= MAX_MULTICAST_LIST) | 5795 | if (i >= MAX_MULTICAST_LIST) |
5796 | break; | 5796 | break; |
5797 | memcpy(hw->multi_list[i++], mc_ptr->dmi_addr, | 5797 | memcpy(hw->multi_list[i++], ha->addr, MAC_ADDR_LEN); |
5798 | MAC_ADDR_LEN); | ||
5799 | } | 5798 | } |
5800 | hw->multi_list_size = (u8) i; | 5799 | hw->multi_list_size = (u8) i; |
5801 | hw_set_grp_addr(hw); | 5800 | hw_set_grp_addr(hw); |
diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c index 443c39a3732f..fddaf921885e 100644 --- a/drivers/net/lib82596.c +++ b/drivers/net/lib82596.c | |||
@@ -1388,7 +1388,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | if (!netdev_mc_empty(dev)) { | 1390 | if (!netdev_mc_empty(dev)) { |
1391 | struct dev_mc_list *dmi; | 1391 | struct netdev_hw_addr *ha; |
1392 | unsigned char *cp; | 1392 | unsigned char *cp; |
1393 | struct mc_cmd *cmd; | 1393 | struct mc_cmd *cmd; |
1394 | 1394 | ||
@@ -1396,10 +1396,10 @@ static void set_multicast_list(struct net_device *dev) | |||
1396 | cmd->cmd.command = SWAP16(CmdMulticastList); | 1396 | cmd->cmd.command = SWAP16(CmdMulticastList); |
1397 | cmd->mc_cnt = SWAP16(netdev_mc_count(dev) * 6); | 1397 | cmd->mc_cnt = SWAP16(netdev_mc_count(dev) * 6); |
1398 | cp = cmd->mc_addrs; | 1398 | cp = cmd->mc_addrs; |
1399 | netdev_for_each_mc_addr(dmi, dev) { | 1399 | netdev_for_each_mc_addr(ha, dev) { |
1400 | if (!cnt--) | 1400 | if (!cnt--) |
1401 | break; | 1401 | break; |
1402 | memcpy(cp, dmi->dmi_addr, 6); | 1402 | memcpy(cp, ha->addr, 6); |
1403 | if (i596_debug > 1) | 1403 | if (i596_debug > 1) |
1404 | DEB(DEB_MULTI, | 1404 | DEB(DEB_MULTI, |
1405 | printk(KERN_DEBUG | 1405 | printk(KERN_DEBUG |
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c index 56f66f485400..526dc9cbc3c6 100644 --- a/drivers/net/lib8390.c +++ b/drivers/net/lib8390.c | |||
@@ -905,10 +905,10 @@ static struct net_device_stats *__ei_get_stats(struct net_device *dev) | |||
905 | 905 | ||
906 | static inline void make_mc_bits(u8 *bits, struct net_device *dev) | 906 | static inline void make_mc_bits(u8 *bits, struct net_device *dev) |
907 | { | 907 | { |
908 | struct dev_mc_list *dmi; | 908 | struct netdev_hw_addr *ha; |
909 | 909 | ||
910 | netdev_for_each_mc_addr(dmi, dev) { | 910 | netdev_for_each_mc_addr(ha, dev) { |
911 | u32 crc = ether_crc(ETH_ALEN, dmi->dmi_addr); | 911 | u32 crc = ether_crc(ETH_ALEN, ha->addr); |
912 | /* | 912 | /* |
913 | * The 8390 uses the 6 most significant bits of the | 913 | * The 8390 uses the 6 most significant bits of the |
914 | * CRC to index the multicast table. | 914 | * CRC to index the multicast table. |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index a18e3485476e..30474d6b15c3 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -250,20 +250,20 @@ static void temac_set_multicast_list(struct net_device *ndev) | |||
250 | temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); | 250 | temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); |
251 | dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); | 251 | dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); |
252 | } else if (!netdev_mc_empty(ndev)) { | 252 | } else if (!netdev_mc_empty(ndev)) { |
253 | struct dev_mc_list *mclist; | 253 | struct netdev_hw_addr *ha; |
254 | 254 | ||
255 | i = 0; | 255 | i = 0; |
256 | netdev_for_each_mc_addr(mclist, ndev) { | 256 | netdev_for_each_mc_addr(ha, ndev) { |
257 | if (i >= MULTICAST_CAM_TABLE_NUM) | 257 | if (i >= MULTICAST_CAM_TABLE_NUM) |
258 | break; | 258 | break; |
259 | multi_addr_msw = ((mclist->dmi_addr[3] << 24) | | 259 | multi_addr_msw = ((ha->addr[3] << 24) | |
260 | (mclist->dmi_addr[2] << 16) | | 260 | (ha->addr[2] << 16) | |
261 | (mclist->dmi_addr[1] << 8) | | 261 | (ha->addr[1] << 8) | |
262 | (mclist->dmi_addr[0])); | 262 | (ha->addr[0])); |
263 | temac_indirect_out32(lp, XTE_MAW0_OFFSET, | 263 | temac_indirect_out32(lp, XTE_MAW0_OFFSET, |
264 | multi_addr_msw); | 264 | multi_addr_msw); |
265 | multi_addr_lsw = ((mclist->dmi_addr[5] << 8) | | 265 | multi_addr_lsw = ((ha->addr[5] << 8) | |
266 | (mclist->dmi_addr[4]) | (i << 16)); | 266 | (ha->addr[4]) | (i << 16)); |
267 | temac_indirect_out32(lp, XTE_MAW1_OFFSET, | 267 | temac_indirect_out32(lp, XTE_MAW1_OFFSET, |
268 | multi_addr_lsw); | 268 | multi_addr_lsw); |
269 | i++; | 269 | i++; |
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index 3e3cc04defd0..72379c5439dc 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c | |||
@@ -1256,7 +1256,7 @@ static void set_multicast_list(struct net_device *dev) { | |||
1256 | dev->name, netdev_mc_count(dev)); | 1256 | dev->name, netdev_mc_count(dev)); |
1257 | 1257 | ||
1258 | if (!netdev_mc_empty(dev)) { | 1258 | if (!netdev_mc_empty(dev)) { |
1259 | struct dev_mc_list *dmi; | 1259 | struct netdev_hw_addr *ha; |
1260 | char *cp; | 1260 | char *cp; |
1261 | cmd = kmalloc(sizeof(struct i596_cmd) + 2 + | 1261 | cmd = kmalloc(sizeof(struct i596_cmd) + 2 + |
1262 | netdev_mc_count(dev) * 6, GFP_ATOMIC); | 1262 | netdev_mc_count(dev) * 6, GFP_ATOMIC); |
@@ -1267,8 +1267,8 @@ static void set_multicast_list(struct net_device *dev) { | |||
1267 | cmd->command = CmdMulticastList; | 1267 | cmd->command = CmdMulticastList; |
1268 | *((unsigned short *) (cmd + 1)) = netdev_mc_count(dev) * 6; | 1268 | *((unsigned short *) (cmd + 1)) = netdev_mc_count(dev) * 6; |
1269 | cp = ((char *)(cmd + 1))+2; | 1269 | cp = ((char *)(cmd + 1))+2; |
1270 | netdev_for_each_mc_addr(dmi, dev) { | 1270 | netdev_for_each_mc_addr(ha, dev) { |
1271 | memcpy(cp, dmi->dmi_addr, 6); | 1271 | memcpy(cp, ha->addr, 6); |
1272 | cp += 6; | 1272 | cp += 6; |
1273 | } | 1273 | } |
1274 | if (i596_debug & LOG_SRCDST) | 1274 | if (i596_debug & LOG_SRCDST) |
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index c8a18a6203c8..eab121945d7c 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -882,15 +882,15 @@ static int hash_get_index(__u8 *addr) | |||
882 | */ | 882 | */ |
883 | static void macb_sethashtable(struct net_device *dev) | 883 | static void macb_sethashtable(struct net_device *dev) |
884 | { | 884 | { |
885 | struct dev_mc_list *curr; | 885 | struct netdev_hw_addr *ha; |
886 | unsigned long mc_filter[2]; | 886 | unsigned long mc_filter[2]; |
887 | unsigned int bitnr; | 887 | unsigned int bitnr; |
888 | struct macb *bp = netdev_priv(dev); | 888 | struct macb *bp = netdev_priv(dev); |
889 | 889 | ||
890 | mc_filter[0] = mc_filter[1] = 0; | 890 | mc_filter[0] = mc_filter[1] = 0; |
891 | 891 | ||
892 | netdev_for_each_mc_addr(curr, dev) { | 892 | netdev_for_each_mc_addr(ha, dev) { |
893 | bitnr = hash_get_index(curr->dmi_addr); | 893 | bitnr = hash_get_index(ha->addr); |
894 | mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); | 894 | mc_filter[bitnr >> 5] |= 1 << (bitnr & 31); |
895 | } | 895 | } |
896 | 896 | ||
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index ab5f0bf6d1ae..2328a7399dcb 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -598,7 +598,7 @@ static void mace_set_multicast(struct net_device *dev) | |||
598 | mp->maccc |= PROM; | 598 | mp->maccc |= PROM; |
599 | } else { | 599 | } else { |
600 | unsigned char multicast_filter[8]; | 600 | unsigned char multicast_filter[8]; |
601 | struct dev_mc_list *dmi; | 601 | struct netdev_hw_addr *ha; |
602 | 602 | ||
603 | if (dev->flags & IFF_ALLMULTI) { | 603 | if (dev->flags & IFF_ALLMULTI) { |
604 | for (i = 0; i < 8; i++) | 604 | for (i = 0; i < 8; i++) |
@@ -606,8 +606,8 @@ static void mace_set_multicast(struct net_device *dev) | |||
606 | } else { | 606 | } else { |
607 | for (i = 0; i < 8; i++) | 607 | for (i = 0; i < 8; i++) |
608 | multicast_filter[i] = 0; | 608 | multicast_filter[i] = 0; |
609 | netdev_for_each_mc_addr(dmi, dev) { | 609 | netdev_for_each_mc_addr(ha, dev) { |
610 | crc = ether_crc_le(6, dmi->dmi_addr); | 610 | crc = ether_crc_le(6, ha->addr); |
611 | i = crc >> 26; /* bit number in multicast_filter */ | 611 | i = crc >> 26; /* bit number in multicast_filter */ |
612 | multicast_filter[i >> 3] |= 1 << (i & 7); | 612 | multicast_filter[i >> 3] |= 1 << (i & 7); |
613 | } | 613 | } |
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c index 13ba8f4afb7e..8a50c67e5928 100644 --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c | |||
@@ -508,7 +508,7 @@ static void mace_set_multicast(struct net_device *dev) | |||
508 | mb->maccc |= PROM; | 508 | mb->maccc |= PROM; |
509 | } else { | 509 | } else { |
510 | unsigned char multicast_filter[8]; | 510 | unsigned char multicast_filter[8]; |
511 | struct dev_mc_list *dmi; | 511 | struct netdev_hw_addr *ha; |
512 | 512 | ||
513 | if (dev->flags & IFF_ALLMULTI) { | 513 | if (dev->flags & IFF_ALLMULTI) { |
514 | for (i = 0; i < 8; i++) { | 514 | for (i = 0; i < 8; i++) { |
@@ -517,8 +517,8 @@ static void mace_set_multicast(struct net_device *dev) | |||
517 | } else { | 517 | } else { |
518 | for (i = 0; i < 8; i++) | 518 | for (i = 0; i < 8; i++) |
519 | multicast_filter[i] = 0; | 519 | multicast_filter[i] = 0; |
520 | netdev_for_each_mc_addr(dmi, dev) { | 520 | netdev_for_each_mc_addr(ha, dev) { |
521 | crc = ether_crc_le(6, dmi->dmi_addr); | 521 | crc = ether_crc_le(6, ha->addr); |
522 | /* bit number in multicast_filter */ | 522 | /* bit number in multicast_filter */ |
523 | i = crc >> 26; | 523 | i = crc >> 26; |
524 | multicast_filter[i >> 3] |= 1 << (i & 7); | 524 | multicast_filter[i >> 3] |= 1 << (i & 7); |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 5eb96fe6ec5c..455464223b43 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -168,7 +168,7 @@ static void mlx4_en_clear_list(struct net_device *dev) | |||
168 | static void mlx4_en_cache_mclist(struct net_device *dev) | 168 | static void mlx4_en_cache_mclist(struct net_device *dev) |
169 | { | 169 | { |
170 | struct mlx4_en_priv *priv = netdev_priv(dev); | 170 | struct mlx4_en_priv *priv = netdev_priv(dev); |
171 | struct dev_mc_list *mclist; | 171 | struct netdev_hw_addr *ha; |
172 | char *mc_addrs; | 172 | char *mc_addrs; |
173 | int mc_addrs_cnt = netdev_mc_count(dev); | 173 | int mc_addrs_cnt = netdev_mc_count(dev); |
174 | int i; | 174 | int i; |
@@ -179,8 +179,8 @@ static void mlx4_en_cache_mclist(struct net_device *dev) | |||
179 | return; | 179 | return; |
180 | } | 180 | } |
181 | i = 0; | 181 | i = 0; |
182 | netdev_for_each_mc_addr(mclist, dev) | 182 | netdev_for_each_mc_addr(ha, dev) |
183 | memcpy(mc_addrs + i++ * ETH_ALEN, mclist->dmi_addr, ETH_ALEN); | 183 | memcpy(mc_addrs + i++ * ETH_ALEN, ha->addr, ETH_ALEN); |
184 | priv->mc_addrs = mc_addrs; | 184 | priv->mc_addrs = mc_addrs; |
185 | priv->mc_addrs_cnt = mc_addrs_cnt; | 185 | priv->mc_addrs_cnt = mc_addrs_cnt; |
186 | } | 186 | } |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index c97b6e4365a9..d5ebe43b0e65 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -1769,7 +1769,7 @@ static void mv643xx_eth_program_multicast_filter(struct net_device *dev) | |||
1769 | struct mv643xx_eth_private *mp = netdev_priv(dev); | 1769 | struct mv643xx_eth_private *mp = netdev_priv(dev); |
1770 | u32 *mc_spec; | 1770 | u32 *mc_spec; |
1771 | u32 *mc_other; | 1771 | u32 *mc_other; |
1772 | struct dev_addr_list *addr; | 1772 | struct netdev_hw_addr *ha; |
1773 | int i; | 1773 | int i; |
1774 | 1774 | ||
1775 | if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) { | 1775 | if (dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) { |
@@ -1794,8 +1794,8 @@ oom: | |||
1794 | memset(mc_spec, 0, 0x100); | 1794 | memset(mc_spec, 0, 0x100); |
1795 | memset(mc_other, 0, 0x100); | 1795 | memset(mc_other, 0, 0x100); |
1796 | 1796 | ||
1797 | netdev_for_each_mc_addr(addr, dev) { | 1797 | netdev_for_each_mc_addr(ha, dev) { |
1798 | u8 *a = addr->da_addr; | 1798 | u8 *a = ha->addr; |
1799 | u32 *table; | 1799 | u32 *table; |
1800 | int entry; | 1800 | int entry; |
1801 | 1801 | ||
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index e84dd3ee9c5a..6d33adf988dc 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -3001,7 +3001,7 @@ static void myri10ge_set_multicast_list(struct net_device *dev) | |||
3001 | { | 3001 | { |
3002 | struct myri10ge_priv *mgp = netdev_priv(dev); | 3002 | struct myri10ge_priv *mgp = netdev_priv(dev); |
3003 | struct myri10ge_cmd cmd; | 3003 | struct myri10ge_cmd cmd; |
3004 | struct dev_mc_list *mc_list; | 3004 | struct netdev_hw_addr *ha; |
3005 | __be32 data[2] = { 0, 0 }; | 3005 | __be32 data[2] = { 0, 0 }; |
3006 | int err; | 3006 | int err; |
3007 | 3007 | ||
@@ -3038,8 +3038,8 @@ static void myri10ge_set_multicast_list(struct net_device *dev) | |||
3038 | } | 3038 | } |
3039 | 3039 | ||
3040 | /* Walk the multicast list, and add each address */ | 3040 | /* Walk the multicast list, and add each address */ |
3041 | netdev_for_each_mc_addr(mc_list, dev) { | 3041 | netdev_for_each_mc_addr(ha, dev) { |
3042 | memcpy(data, &mc_list->dmi_addr, 6); | 3042 | memcpy(data, &ha->addr, 6); |
3043 | cmd.data0 = ntohl(data[0]); | 3043 | cmd.data0 = ntohl(data[0]); |
3044 | cmd.data1 = ntohl(data[1]); | 3044 | cmd.data1 = ntohl(data[1]); |
3045 | err = myri10ge_send_cmd(mgp, MXGEFW_JOIN_MULTICAST_GROUP, | 3045 | err = myri10ge_send_cmd(mgp, MXGEFW_JOIN_MULTICAST_GROUP, |
@@ -3047,7 +3047,7 @@ static void myri10ge_set_multicast_list(struct net_device *dev) | |||
3047 | 3047 | ||
3048 | if (err != 0) { | 3048 | if (err != 0) { |
3049 | netdev_err(dev, "Failed MXGEFW_JOIN_MULTICAST_GROUP, error status:%d %pM\n", | 3049 | netdev_err(dev, "Failed MXGEFW_JOIN_MULTICAST_GROUP, error status:%d %pM\n", |
3050 | err, mc_list->dmi_addr); | 3050 | err, ha->addr); |
3051 | goto abort; | 3051 | goto abort; |
3052 | } | 3052 | } |
3053 | } | 3053 | } |
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index e52038783245..9250bf6573ec 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
@@ -2493,12 +2493,12 @@ static void __set_rx_mode(struct net_device *dev) | |||
2493 | rx_mode = RxFilterEnable | AcceptBroadcast | 2493 | rx_mode = RxFilterEnable | AcceptBroadcast |
2494 | | AcceptAllMulticast | AcceptMyPhys; | 2494 | | AcceptAllMulticast | AcceptMyPhys; |
2495 | } else { | 2495 | } else { |
2496 | struct dev_mc_list *mclist; | 2496 | struct netdev_hw_addr *ha; |
2497 | int i; | 2497 | int i; |
2498 | 2498 | ||
2499 | memset(mc_filter, 0, sizeof(mc_filter)); | 2499 | memset(mc_filter, 0, sizeof(mc_filter)); |
2500 | netdev_for_each_mc_addr(mclist, dev) { | 2500 | netdev_for_each_mc_addr(ha, dev) { |
2501 | int b = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 23) & 0x1ff; | 2501 | int b = (ether_crc(ETH_ALEN, ha->addr) >> 23) & 0x1ff; |
2502 | mc_filter[b/8] |= (1 << (b & 0x07)); | 2502 | mc_filter[b/8] |= (1 << (b & 0x07)); |
2503 | } | 2503 | } |
2504 | rx_mode = RxFilterEnable | AcceptBroadcast | 2504 | rx_mode = RxFilterEnable | AcceptBroadcast |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index a945591298a8..781ca893ee0a 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -537,7 +537,7 @@ netxen_nic_set_mcast_addr(struct netxen_adapter *adapter, | |||
537 | void netxen_p2_nic_set_multi(struct net_device *netdev) | 537 | void netxen_p2_nic_set_multi(struct net_device *netdev) |
538 | { | 538 | { |
539 | struct netxen_adapter *adapter = netdev_priv(netdev); | 539 | struct netxen_adapter *adapter = netdev_priv(netdev); |
540 | struct dev_mc_list *mc_ptr; | 540 | struct netdev_hw_addr *ha; |
541 | u8 null_addr[6]; | 541 | u8 null_addr[6]; |
542 | int i; | 542 | int i; |
543 | 543 | ||
@@ -571,8 +571,8 @@ void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
571 | netxen_nic_enable_mcast_filter(adapter); | 571 | netxen_nic_enable_mcast_filter(adapter); |
572 | 572 | ||
573 | i = 0; | 573 | i = 0; |
574 | netdev_for_each_mc_addr(mc_ptr, netdev) | 574 | netdev_for_each_mc_addr(ha, netdev) |
575 | netxen_nic_set_mcast_addr(adapter, i++, mc_ptr->dmi_addr); | 575 | netxen_nic_set_mcast_addr(adapter, i++, ha->addr); |
576 | 576 | ||
577 | /* Clear out remaining addresses */ | 577 | /* Clear out remaining addresses */ |
578 | while (i < adapter->max_mc_count) | 578 | while (i < adapter->max_mc_count) |
@@ -680,7 +680,7 @@ static int nx_p3_nic_add_mac(struct netxen_adapter *adapter, | |||
680 | void netxen_p3_nic_set_multi(struct net_device *netdev) | 680 | void netxen_p3_nic_set_multi(struct net_device *netdev) |
681 | { | 681 | { |
682 | struct netxen_adapter *adapter = netdev_priv(netdev); | 682 | struct netxen_adapter *adapter = netdev_priv(netdev); |
683 | struct dev_mc_list *mc_ptr; | 683 | struct netdev_hw_addr *ha; |
684 | u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 684 | u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
685 | u32 mode = VPORT_MISS_MODE_DROP; | 685 | u32 mode = VPORT_MISS_MODE_DROP; |
686 | LIST_HEAD(del_list); | 686 | LIST_HEAD(del_list); |
@@ -707,8 +707,8 @@ void netxen_p3_nic_set_multi(struct net_device *netdev) | |||
707 | } | 707 | } |
708 | 708 | ||
709 | if (!netdev_mc_empty(netdev)) { | 709 | if (!netdev_mc_empty(netdev)) { |
710 | netdev_for_each_mc_addr(mc_ptr, netdev) | 710 | netdev_for_each_mc_addr(ha, netdev) |
711 | nx_p3_nic_add_mac(adapter, mc_ptr->dmi_addr, &del_list); | 711 | nx_p3_nic_add_mac(adapter, ha->addr, &del_list); |
712 | } | 712 | } |
713 | 713 | ||
714 | send_fw_cmd: | 714 | send_fw_cmd: |
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index 05c29c2cef2a..a76fabe26292 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c | |||
@@ -596,7 +596,7 @@ static int init586(struct net_device *dev) | |||
596 | struct iasetup_cmd_struct __iomem *ias_cmd; | 596 | struct iasetup_cmd_struct __iomem *ias_cmd; |
597 | struct tdr_cmd_struct __iomem *tdr_cmd; | 597 | struct tdr_cmd_struct __iomem *tdr_cmd; |
598 | struct mcsetup_cmd_struct __iomem *mc_cmd; | 598 | struct mcsetup_cmd_struct __iomem *mc_cmd; |
599 | struct dev_mc_list *dmi; | 599 | struct netdev_hw_addr *ha; |
600 | int num_addrs = netdev_mc_count(dev); | 600 | int num_addrs = netdev_mc_count(dev); |
601 | 601 | ||
602 | ptr = p->scb + 1; | 602 | ptr = p->scb + 1; |
@@ -725,8 +725,8 @@ static int init586(struct net_device *dev) | |||
725 | writew(num_addrs * 6, &mc_cmd->mc_cnt); | 725 | writew(num_addrs * 6, &mc_cmd->mc_cnt); |
726 | 726 | ||
727 | i = 0; | 727 | i = 0; |
728 | netdev_for_each_mc_addr(dmi, dev) | 728 | netdev_for_each_mc_addr(ha, dev) |
729 | memcpy_toio(mc_cmd->mc_list[i++], dmi->dmi_addr, 6); | 729 | memcpy_toio(mc_cmd->mc_list[i++], ha->addr, 6); |
730 | 730 | ||
731 | writew(make16(mc_cmd), &p->scb->cbl_offset); | 731 | writew(make16(mc_cmd), &p->scb->cbl_offset); |
732 | writeb(CUC_START, &p->scb->cmd_cuc); | 732 | writeb(CUC_START, &p->scb->cmd_cuc); |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 0678f3106cbc..7b52c466cf48 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -6313,7 +6313,6 @@ static void niu_set_rx_mode(struct net_device *dev) | |||
6313 | { | 6313 | { |
6314 | struct niu *np = netdev_priv(dev); | 6314 | struct niu *np = netdev_priv(dev); |
6315 | int i, alt_cnt, err; | 6315 | int i, alt_cnt, err; |
6316 | struct dev_addr_list *addr; | ||
6317 | struct netdev_hw_addr *ha; | 6316 | struct netdev_hw_addr *ha; |
6318 | unsigned long flags; | 6317 | unsigned long flags; |
6319 | u16 hash[16] = { 0, }; | 6318 | u16 hash[16] = { 0, }; |
@@ -6365,8 +6364,8 @@ static void niu_set_rx_mode(struct net_device *dev) | |||
6365 | for (i = 0; i < 16; i++) | 6364 | for (i = 0; i < 16; i++) |
6366 | hash[i] = 0xffff; | 6365 | hash[i] = 0xffff; |
6367 | } else if (!netdev_mc_empty(dev)) { | 6366 | } else if (!netdev_mc_empty(dev)) { |
6368 | netdev_for_each_mc_addr(addr, dev) { | 6367 | netdev_for_each_mc_addr(ha, dev) { |
6369 | u32 crc = ether_crc_le(ETH_ALEN, addr->da_addr); | 6368 | u32 crc = ether_crc_le(ETH_ALEN, ha->addr); |
6370 | 6369 | ||
6371 | crc >>= 24; | 6370 | crc >>= 24; |
6372 | hash[crc >> 4] |= (1 << (15 - (crc & 0xf))); | 6371 | hash[crc >> 4] |= (1 << (15 - (crc & 0xf))); |
diff --git a/drivers/net/octeon/octeon_mgmt.c b/drivers/net/octeon/octeon_mgmt.c index be368e5cbf75..ee894ed35f7f 100644 --- a/drivers/net/octeon/octeon_mgmt.c +++ b/drivers/net/octeon/octeon_mgmt.c | |||
@@ -474,7 +474,7 @@ static void octeon_mgmt_set_rx_filtering(struct net_device *netdev) | |||
474 | unsigned int cam_mode = 1; /* 1 - Accept on CAM match */ | 474 | unsigned int cam_mode = 1; /* 1 - Accept on CAM match */ |
475 | unsigned int multicast_mode = 1; /* 1 - Reject all multicast. */ | 475 | unsigned int multicast_mode = 1; /* 1 - Reject all multicast. */ |
476 | struct octeon_mgmt_cam_state cam_state; | 476 | struct octeon_mgmt_cam_state cam_state; |
477 | struct dev_addr_list *list; | 477 | struct netdev_hw_addr *ha; |
478 | struct list_head *pos; | 478 | struct list_head *pos; |
479 | int available_cam_entries; | 479 | int available_cam_entries; |
480 | 480 | ||
@@ -510,8 +510,8 @@ static void octeon_mgmt_set_rx_filtering(struct net_device *netdev) | |||
510 | } | 510 | } |
511 | } | 511 | } |
512 | if (multicast_mode == 0) { | 512 | if (multicast_mode == 0) { |
513 | netdev_for_each_mc_addr(list, netdev) | 513 | netdev_for_each_mc_addr(ha, netdev) |
514 | octeon_mgmt_cam_state_add(&cam_state, list->da_addr); | 514 | octeon_mgmt_cam_state_add(&cam_state, ha->addr); |
515 | } | 515 | } |
516 | 516 | ||
517 | 517 | ||
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index 36785853a149..dc3b4c7914fd 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c | |||
@@ -1813,12 +1813,12 @@ static void netdrv_set_rx_mode(struct net_device *dev) | |||
1813 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1813 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1814 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 1814 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
1815 | } else { | 1815 | } else { |
1816 | struct dev_mc_list *mclist; | 1816 | struct netdev_hw_addr *ha; |
1817 | 1817 | ||
1818 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1818 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1819 | mc_filter[1] = mc_filter[0] = 0; | 1819 | mc_filter[1] = mc_filter[0] = 0; |
1820 | netdev_for_each_mc_addr(mclist, dev) { | 1820 | netdev_for_each_mc_addr(ha, dev) { |
1821 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 1821 | int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; |
1822 | 1822 | ||
1823 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 1823 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
1824 | } | 1824 | } |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 09291e60d309..333cb3344d54 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1623,11 +1623,11 @@ static struct net_device_stats *get_stats(struct net_device *dev) | |||
1623 | 1623 | ||
1624 | static inline void make_mc_bits(u8 *bits, struct net_device *dev) | 1624 | static inline void make_mc_bits(u8 *bits, struct net_device *dev) |
1625 | { | 1625 | { |
1626 | struct dev_mc_list *dmi; | 1626 | struct netdev_hw_addr *ha; |
1627 | u32 crc; | 1627 | u32 crc; |
1628 | 1628 | ||
1629 | netdev_for_each_mc_addr(dmi, dev) { | 1629 | netdev_for_each_mc_addr(ha, dev) { |
1630 | crc = ether_crc(ETH_ALEN, dmi->dmi_addr); | 1630 | crc = ether_crc(ETH_ALEN, ha->addr); |
1631 | /* | 1631 | /* |
1632 | * The 8390 uses the 6 most significant bits of the | 1632 | * The 8390 uses the 6 most significant bits of the |
1633 | * CRC to index the multicast table. | 1633 | * CRC to index the multicast table. |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index b9dc80b9d04a..6734f7d6da98 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -1196,11 +1196,11 @@ static void set_rx_mode(struct net_device *dev) | |||
1196 | memset(mc_filter, 0x00, sizeof(mc_filter)); | 1196 | memset(mc_filter, 0x00, sizeof(mc_filter)); |
1197 | outb(1, ioaddr + RX_MODE); /* Ignore almost all multicasts. */ | 1197 | outb(1, ioaddr + RX_MODE); /* Ignore almost all multicasts. */ |
1198 | } else { | 1198 | } else { |
1199 | struct dev_mc_list *mclist; | 1199 | struct netdev_hw_addr *ha; |
1200 | 1200 | ||
1201 | memset(mc_filter, 0, sizeof(mc_filter)); | 1201 | memset(mc_filter, 0, sizeof(mc_filter)); |
1202 | netdev_for_each_mc_addr(mclist, dev) { | 1202 | netdev_for_each_mc_addr(ha, dev) { |
1203 | unsigned int bit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 26; | 1203 | unsigned int bit = ether_crc_le(ETH_ALEN, ha->addr) >> 26; |
1204 | mc_filter[bit >> 3] |= (1 << (bit & 7)); | 1204 | mc_filter[bit >> 3] |= (1 << (bit & 7)); |
1205 | } | 1205 | } |
1206 | outb(2, ioaddr + RX_MODE); /* Use normal mode. */ | 1206 | outb(2, ioaddr + RX_MODE); /* Use normal mode. */ |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index c717b143f11a..c516c1996354 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -1475,7 +1475,7 @@ static void set_multicast_list(struct net_device *dev) | |||
1475 | { | 1475 | { |
1476 | mace_private *lp = netdev_priv(dev); | 1476 | mace_private *lp = netdev_priv(dev); |
1477 | int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */ | 1477 | int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */ |
1478 | struct dev_mc_list *dmi; | 1478 | struct netdev_hw_addr *ha; |
1479 | 1479 | ||
1480 | #ifdef PCMCIA_DEBUG | 1480 | #ifdef PCMCIA_DEBUG |
1481 | { | 1481 | { |
@@ -1495,8 +1495,8 @@ static void set_multicast_list(struct net_device *dev) | |||
1495 | if (num_addrs > 0) { | 1495 | if (num_addrs > 0) { |
1496 | /* Calculate multicast logical address filter */ | 1496 | /* Calculate multicast logical address filter */ |
1497 | memset(lp->multicast_ladrf, 0, MACE_LADRF_LEN); | 1497 | memset(lp->multicast_ladrf, 0, MACE_LADRF_LEN); |
1498 | netdev_for_each_mc_addr(dmi, dev) { | 1498 | netdev_for_each_mc_addr(ha, dev) { |
1499 | memcpy(adr, dmi->dmi_addr, ETHER_ADDR_LEN); | 1499 | memcpy(adr, ha->addr, ETHER_ADDR_LEN); |
1500 | BuildLAF(lp->multicast_ladrf, adr); | 1500 | BuildLAF(lp->multicast_ladrf, adr); |
1501 | } | 1501 | } |
1502 | } | 1502 | } |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 5adc662c4bfb..f45c626003a4 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1616,12 +1616,12 @@ static void set_rx_mode(struct net_device *dev) | |||
1616 | rx_cfg_setting = RxStripCRC | RxEnable | RxAllMulti; | 1616 | rx_cfg_setting = RxStripCRC | RxEnable | RxAllMulti; |
1617 | else { | 1617 | else { |
1618 | if (!netdev_mc_empty(dev)) { | 1618 | if (!netdev_mc_empty(dev)) { |
1619 | struct dev_mc_list *mc_addr; | 1619 | struct netdev_hw_addr *ha; |
1620 | 1620 | ||
1621 | netdev_for_each_mc_addr(mc_addr, dev) { | 1621 | netdev_for_each_mc_addr(ha, dev) { |
1622 | u_int position = ether_crc(6, mc_addr->dmi_addr); | 1622 | u_int position = ether_crc(6, ha->addr); |
1623 | #ifndef final_version /* Verify multicast address. */ | 1623 | #ifndef final_version /* Verify multicast address. */ |
1624 | if ((mc_addr->dmi_addr[0] & 1) == 0) | 1624 | if ((ha->addr[0] & 1) == 0) |
1625 | continue; | 1625 | continue; |
1626 | #endif | 1626 | #endif |
1627 | multicast_table[position >> 29] |= 1 << ((position >> 26) & 7); | 1627 | multicast_table[position >> 29] |= 1 << ((position >> 26) & 7); |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 4d1802e457be..656be931207a 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -1398,7 +1398,7 @@ static void set_addresses(struct net_device *dev) | |||
1398 | { | 1398 | { |
1399 | unsigned int ioaddr = dev->base_addr; | 1399 | unsigned int ioaddr = dev->base_addr; |
1400 | local_info_t *lp = netdev_priv(dev); | 1400 | local_info_t *lp = netdev_priv(dev); |
1401 | struct dev_mc_list *dmi; | 1401 | struct netdev_hw_addr *ha; |
1402 | struct set_address_info sa_info; | 1402 | struct set_address_info sa_info; |
1403 | int i; | 1403 | int i; |
1404 | 1404 | ||
@@ -1413,10 +1413,10 @@ static void set_addresses(struct net_device *dev) | |||
1413 | 1413 | ||
1414 | set_address(&sa_info, dev->dev_addr); | 1414 | set_address(&sa_info, dev->dev_addr); |
1415 | i = 0; | 1415 | i = 0; |
1416 | netdev_for_each_mc_addr(dmi, dev) { | 1416 | netdev_for_each_mc_addr(ha, dev) { |
1417 | if (i++ == 9) | 1417 | if (i++ == 9) |
1418 | break; | 1418 | break; |
1419 | set_address(&sa_info, dmi->dmi_addr); | 1419 | set_address(&sa_info, ha->addr); |
1420 | } | 1420 | } |
1421 | while (i++ < 9) | 1421 | while (i++ < 9) |
1422 | set_address(&sa_info, dev->dev_addr); | 1422 | set_address(&sa_info, dev->dev_addr); |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 084d78dd1637..a2254f749a9a 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -2590,7 +2590,7 @@ static void pcnet32_load_multicast(struct net_device *dev) | |||
2590 | struct pcnet32_private *lp = netdev_priv(dev); | 2590 | struct pcnet32_private *lp = netdev_priv(dev); |
2591 | volatile struct pcnet32_init_block *ib = lp->init_block; | 2591 | volatile struct pcnet32_init_block *ib = lp->init_block; |
2592 | volatile __le16 *mcast_table = (__le16 *)ib->filter; | 2592 | volatile __le16 *mcast_table = (__le16 *)ib->filter; |
2593 | struct dev_mc_list *dmi; | 2593 | struct netdev_hw_addr *ha; |
2594 | unsigned long ioaddr = dev->base_addr; | 2594 | unsigned long ioaddr = dev->base_addr; |
2595 | char *addrs; | 2595 | char *addrs; |
2596 | int i; | 2596 | int i; |
@@ -2611,8 +2611,8 @@ static void pcnet32_load_multicast(struct net_device *dev) | |||
2611 | ib->filter[1] = 0; | 2611 | ib->filter[1] = 0; |
2612 | 2612 | ||
2613 | /* Add addresses */ | 2613 | /* Add addresses */ |
2614 | netdev_for_each_mc_addr(dmi, dev) { | 2614 | netdev_for_each_mc_addr(ha, dev) { |
2615 | addrs = dmi->dmi_addr; | 2615 | addrs = ha->addr; |
2616 | 2616 | ||
2617 | /* multicast address? */ | 2617 | /* multicast address? */ |
2618 | if (!(*addrs & 1)) | 2618 | if (!(*addrs & 1)) |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index a602da6418c8..fed5df9c5ea1 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -546,7 +546,7 @@ out: | |||
546 | void gelic_net_set_multi(struct net_device *netdev) | 546 | void gelic_net_set_multi(struct net_device *netdev) |
547 | { | 547 | { |
548 | struct gelic_card *card = netdev_card(netdev); | 548 | struct gelic_card *card = netdev_card(netdev); |
549 | struct dev_mc_list *mc; | 549 | struct netdev_hw_addr *ha; |
550 | unsigned int i; | 550 | unsigned int i; |
551 | uint8_t *p; | 551 | uint8_t *p; |
552 | u64 addr; | 552 | u64 addr; |
@@ -580,9 +580,9 @@ void gelic_net_set_multi(struct net_device *netdev) | |||
580 | } | 580 | } |
581 | 581 | ||
582 | /* set multicast addresses */ | 582 | /* set multicast addresses */ |
583 | netdev_for_each_mc_addr(mc, netdev) { | 583 | netdev_for_each_mc_addr(ha, netdev) { |
584 | addr = 0; | 584 | addr = 0; |
585 | p = mc->dmi_addr; | 585 | p = ha->addr; |
586 | for (i = 0; i < ETH_ALEN; i++) { | 586 | for (i = 0; i < ETH_ALEN; i++) { |
587 | addr <<= 8; | 587 | addr <<= 8; |
588 | addr |= *p++; | 588 | addr |= *p++; |
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index 14c999ab4222..9a1daa4ebe22 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c | |||
@@ -415,7 +415,7 @@ static int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, u8 *addr) | |||
415 | void qlcnic_set_multi(struct net_device *netdev) | 415 | void qlcnic_set_multi(struct net_device *netdev) |
416 | { | 416 | { |
417 | struct qlcnic_adapter *adapter = netdev_priv(netdev); | 417 | struct qlcnic_adapter *adapter = netdev_priv(netdev); |
418 | struct dev_mc_list *mc_ptr; | 418 | struct netdev_hw_addr *ha; |
419 | u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 419 | u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
420 | u32 mode = VPORT_MISS_MODE_DROP; | 420 | u32 mode = VPORT_MISS_MODE_DROP; |
421 | 421 | ||
@@ -434,8 +434,8 @@ void qlcnic_set_multi(struct net_device *netdev) | |||
434 | } | 434 | } |
435 | 435 | ||
436 | if (!netdev_mc_empty(netdev)) { | 436 | if (!netdev_mc_empty(netdev)) { |
437 | netdev_for_each_mc_addr(mc_ptr, netdev) { | 437 | netdev_for_each_mc_addr(ha, netdev) { |
438 | qlcnic_nic_add_mac(adapter, mc_ptr->dmi_addr); | 438 | qlcnic_nic_add_mac(adapter, ha->addr); |
439 | } | 439 | } |
440 | } | 440 | } |
441 | 441 | ||
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index fd34f266c0a8..76df96813a7b 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -4207,7 +4207,7 @@ static struct net_device_stats *qlge_get_stats(struct net_device | |||
4207 | static void qlge_set_multicast_list(struct net_device *ndev) | 4207 | static void qlge_set_multicast_list(struct net_device *ndev) |
4208 | { | 4208 | { |
4209 | struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev); | 4209 | struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev); |
4210 | struct dev_mc_list *mc_ptr; | 4210 | struct netdev_hw_addr *ha; |
4211 | int i, status; | 4211 | int i, status; |
4212 | 4212 | ||
4213 | status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); | 4213 | status = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); |
@@ -4271,8 +4271,8 @@ static void qlge_set_multicast_list(struct net_device *ndev) | |||
4271 | if (status) | 4271 | if (status) |
4272 | goto exit; | 4272 | goto exit; |
4273 | i = 0; | 4273 | i = 0; |
4274 | netdev_for_each_mc_addr(mc_ptr, ndev) { | 4274 | netdev_for_each_mc_addr(ha, ndev) { |
4275 | if (ql_set_mac_addr_reg(qdev, (u8 *) mc_ptr->dmi_addr, | 4275 | if (ql_set_mac_addr_reg(qdev, (u8 *) ha->addr, |
4276 | MAC_ADDR_TYPE_MULTI_MAC, i)) { | 4276 | MAC_ADDR_TYPE_MULTI_MAC, i)) { |
4277 | netif_err(qdev, hw, qdev->ndev, | 4277 | netif_err(qdev, hw, qdev->ndev, |
4278 | "Failed to loadmulticast address.\n"); | 4278 | "Failed to loadmulticast address.\n"); |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 15d5373dc8f3..f5a0e963e688 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -938,7 +938,7 @@ static void r6040_multicast_list(struct net_device *dev) | |||
938 | u16 *adrp; | 938 | u16 *adrp; |
939 | u16 reg; | 939 | u16 reg; |
940 | unsigned long flags; | 940 | unsigned long flags; |
941 | struct dev_mc_list *dmi; | 941 | struct netdev_hw_addr *ha; |
942 | int i; | 942 | int i; |
943 | 943 | ||
944 | /* MAC Address */ | 944 | /* MAC Address */ |
@@ -973,8 +973,8 @@ static void r6040_multicast_list(struct net_device *dev) | |||
973 | for (i = 0; i < 4; i++) | 973 | for (i = 0; i < 4; i++) |
974 | hash_table[i] = 0; | 974 | hash_table[i] = 0; |
975 | 975 | ||
976 | netdev_for_each_mc_addr(dmi, dev) { | 976 | netdev_for_each_mc_addr(ha, dev) { |
977 | char *addrs = dmi->dmi_addr; | 977 | char *addrs = ha->addr; |
978 | 978 | ||
979 | if (!(*addrs & 1)) | 979 | if (!(*addrs & 1)) |
980 | continue; | 980 | continue; |
@@ -994,9 +994,9 @@ static void r6040_multicast_list(struct net_device *dev) | |||
994 | } | 994 | } |
995 | /* Multicast Address 1~4 case */ | 995 | /* Multicast Address 1~4 case */ |
996 | i = 0; | 996 | i = 0; |
997 | netdev_for_each_mc_addr(dmi, dev) { | 997 | netdev_for_each_mc_addr(ha, dev) { |
998 | if (i < MCAST_MAX) { | 998 | if (i < MCAST_MAX) { |
999 | adrp = (u16 *) dmi->dmi_addr; | 999 | adrp = (u16 *) ha->addr; |
1000 | iowrite16(adrp[0], ioaddr + MID_1L + 8 * i); | 1000 | iowrite16(adrp[0], ioaddr + MID_1L + 8 * i); |
1001 | iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); | 1001 | iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); |
1002 | iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); | 1002 | iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index f7ffa5d8ffeb..64cd250f642d 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -4785,12 +4785,12 @@ static void rtl_set_rx_mode(struct net_device *dev) | |||
4785 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 4785 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
4786 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 4786 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
4787 | } else { | 4787 | } else { |
4788 | struct dev_mc_list *mclist; | 4788 | struct netdev_hw_addr *ha; |
4789 | 4789 | ||
4790 | rx_mode = AcceptBroadcast | AcceptMyPhys; | 4790 | rx_mode = AcceptBroadcast | AcceptMyPhys; |
4791 | mc_filter[1] = mc_filter[0] = 0; | 4791 | mc_filter[1] = mc_filter[0] = 0; |
4792 | netdev_for_each_mc_addr(mclist, dev) { | 4792 | netdev_for_each_mc_addr(ha, dev) { |
4793 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 4793 | int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; |
4794 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 4794 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
4795 | rx_mode |= AcceptMulticast; | 4795 | rx_mode |= AcceptMulticast; |
4796 | } | 4796 | } |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 2eb7f8a0d926..ad5a6a873b29 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -4964,7 +4964,7 @@ static struct net_device_stats *s2io_get_stats(struct net_device *dev) | |||
4964 | static void s2io_set_multicast(struct net_device *dev) | 4964 | static void s2io_set_multicast(struct net_device *dev) |
4965 | { | 4965 | { |
4966 | int i, j, prev_cnt; | 4966 | int i, j, prev_cnt; |
4967 | struct dev_mc_list *mclist; | 4967 | struct netdev_hw_addr *ha; |
4968 | struct s2io_nic *sp = netdev_priv(dev); | 4968 | struct s2io_nic *sp = netdev_priv(dev); |
4969 | struct XENA_dev_config __iomem *bar0 = sp->bar0; | 4969 | struct XENA_dev_config __iomem *bar0 = sp->bar0; |
4970 | u64 val64 = 0, multi_mac = 0x010203040506ULL, mask = | 4970 | u64 val64 = 0, multi_mac = 0x010203040506ULL, mask = |
@@ -5093,12 +5093,12 @@ static void s2io_set_multicast(struct net_device *dev) | |||
5093 | 5093 | ||
5094 | /* Create the new Rx filter list and update the same in H/W. */ | 5094 | /* Create the new Rx filter list and update the same in H/W. */ |
5095 | i = 0; | 5095 | i = 0; |
5096 | netdev_for_each_mc_addr(mclist, dev) { | 5096 | netdev_for_each_mc_addr(ha, dev) { |
5097 | memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr, | 5097 | memcpy(sp->usr_addrs[i].addr, ha->addr, |
5098 | ETH_ALEN); | 5098 | ETH_ALEN); |
5099 | mac_addr = 0; | 5099 | mac_addr = 0; |
5100 | for (j = 0; j < ETH_ALEN; j++) { | 5100 | for (j = 0; j < ETH_ALEN; j++) { |
5101 | mac_addr |= mclist->dmi_addr[j]; | 5101 | mac_addr |= ha->addr[j]; |
5102 | mac_addr <<= 8; | 5102 | mac_addr <<= 8; |
5103 | } | 5103 | } |
5104 | mac_addr >>= 8; | 5104 | mac_addr >>= 8; |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 9944e5d662c0..f7de960ca06f 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2112,7 +2112,7 @@ static void sbmac_setmulti(struct sbmac_softc *sc) | |||
2112 | uint64_t reg; | 2112 | uint64_t reg; |
2113 | void __iomem *port; | 2113 | void __iomem *port; |
2114 | int idx; | 2114 | int idx; |
2115 | struct dev_mc_list *mclist; | 2115 | struct netdev_hw_addr *ha; |
2116 | struct net_device *dev = sc->sbm_dev; | 2116 | struct net_device *dev = sc->sbm_dev; |
2117 | 2117 | ||
2118 | /* | 2118 | /* |
@@ -2161,10 +2161,10 @@ static void sbmac_setmulti(struct sbmac_softc *sc) | |||
2161 | * XXX if the table overflows */ | 2161 | * XXX if the table overflows */ |
2162 | 2162 | ||
2163 | idx = 1; /* skip station address */ | 2163 | idx = 1; /* skip station address */ |
2164 | netdev_for_each_mc_addr(mclist, dev) { | 2164 | netdev_for_each_mc_addr(ha, dev) { |
2165 | if (idx == MAC_ADDR_COUNT) | 2165 | if (idx == MAC_ADDR_COUNT) |
2166 | break; | 2166 | break; |
2167 | reg = sbmac_addr2reg(mclist->dmi_addr); | 2167 | reg = sbmac_addr2reg(ha->addr); |
2168 | port = sc->sbm_base + R_MAC_ADDR_BASE+(idx * sizeof(uint64_t)); | 2168 | port = sc->sbm_base + R_MAC_ADDR_BASE+(idx * sizeof(uint64_t)); |
2169 | __raw_writeq(reg, port); | 2169 | __raw_writeq(reg, port); |
2170 | idx++; | 2170 | idx++; |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index d87c4787fffa..1b3260588933 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -433,13 +433,13 @@ static void _sc92031_set_mar(struct net_device *dev) | |||
433 | (dev->flags & IFF_ALLMULTI)) | 433 | (dev->flags & IFF_ALLMULTI)) |
434 | mar0 = mar1 = 0xffffffff; | 434 | mar0 = mar1 = 0xffffffff; |
435 | else if (dev->flags & IFF_MULTICAST) { | 435 | else if (dev->flags & IFF_MULTICAST) { |
436 | struct dev_mc_list *mc_list; | 436 | struct netdev_hw_addr *ha; |
437 | 437 | ||
438 | netdev_for_each_mc_addr(mc_list, dev) { | 438 | netdev_for_each_mc_addr(ha, dev) { |
439 | u32 crc; | 439 | u32 crc; |
440 | unsigned bit = 0; | 440 | unsigned bit = 0; |
441 | 441 | ||
442 | crc = ~ether_crc(ETH_ALEN, mc_list->dmi_addr); | 442 | crc = ~ether_crc(ETH_ALEN, ha->addr); |
443 | crc >>= 24; | 443 | crc >>= 24; |
444 | 444 | ||
445 | if (crc & 0x01) bit |= 0x02; | 445 | if (crc & 0x01) bit |= 0x02; |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 88f2fb193abe..e07b82b266d9 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -1602,7 +1602,7 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data) | |||
1602 | static void efx_set_multicast_list(struct net_device *net_dev) | 1602 | static void efx_set_multicast_list(struct net_device *net_dev) |
1603 | { | 1603 | { |
1604 | struct efx_nic *efx = netdev_priv(net_dev); | 1604 | struct efx_nic *efx = netdev_priv(net_dev); |
1605 | struct dev_mc_list *mc_list; | 1605 | struct netdev_hw_addr *ha; |
1606 | union efx_multicast_hash *mc_hash = &efx->multicast_hash; | 1606 | union efx_multicast_hash *mc_hash = &efx->multicast_hash; |
1607 | u32 crc; | 1607 | u32 crc; |
1608 | int bit; | 1608 | int bit; |
@@ -1614,8 +1614,8 @@ static void efx_set_multicast_list(struct net_device *net_dev) | |||
1614 | memset(mc_hash, 0xff, sizeof(*mc_hash)); | 1614 | memset(mc_hash, 0xff, sizeof(*mc_hash)); |
1615 | } else { | 1615 | } else { |
1616 | memset(mc_hash, 0x00, sizeof(*mc_hash)); | 1616 | memset(mc_hash, 0x00, sizeof(*mc_hash)); |
1617 | netdev_for_each_mc_addr(mc_list, net_dev) { | 1617 | netdev_for_each_mc_addr(ha, net_dev) { |
1618 | crc = ether_crc_le(ETH_ALEN, mc_list->dmi_addr); | 1618 | crc = ether_crc_le(ETH_ALEN, ha->addr); |
1619 | bit = crc & (EFX_MCAST_HASH_ENTRIES - 1); | 1619 | bit = crc & (EFX_MCAST_HASH_ENTRIES - 1); |
1620 | set_bit_le(bit, mc_hash->byte); | 1620 | set_bit_le(bit, mc_hash->byte); |
1621 | } | 1621 | } |
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 760d9e83a465..6a05b93ae6c9 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -848,13 +848,13 @@ static void sis190_set_rx_mode(struct net_device *dev) | |||
848 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 848 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
849 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 849 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
850 | } else { | 850 | } else { |
851 | struct dev_mc_list *mclist; | 851 | struct netdev_hw_addr *ha; |
852 | 852 | ||
853 | rx_mode = AcceptBroadcast | AcceptMyPhys; | 853 | rx_mode = AcceptBroadcast | AcceptMyPhys; |
854 | mc_filter[1] = mc_filter[0] = 0; | 854 | mc_filter[1] = mc_filter[0] = 0; |
855 | netdev_for_each_mc_addr(mclist, dev) { | 855 | netdev_for_each_mc_addr(ha, dev) { |
856 | int bit_nr = | 856 | int bit_nr = |
857 | ether_crc(ETH_ALEN, mclist->dmi_addr) & 0x3f; | 857 | ether_crc(ETH_ALEN, ha->addr) & 0x3f; |
858 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 858 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
859 | rx_mode |= AcceptMulticast; | 859 | rx_mode |= AcceptMulticast; |
860 | } | 860 | } |
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index bc7ff411aad5..6293592635be 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -2298,12 +2298,14 @@ static void set_rx_mode(struct net_device *net_dev) | |||
2298 | /* Accept Broadcast packet, destination address matchs our | 2298 | /* Accept Broadcast packet, destination address matchs our |
2299 | * MAC address, use Receive Filter to reject unwanted MCAST | 2299 | * MAC address, use Receive Filter to reject unwanted MCAST |
2300 | * packets */ | 2300 | * packets */ |
2301 | struct dev_mc_list *mclist; | 2301 | struct netdev_hw_addr *ha; |
2302 | rx_mode = RFAAB; | 2302 | rx_mode = RFAAB; |
2303 | 2303 | ||
2304 | netdev_for_each_mc_addr(mclist, net_dev) { | 2304 | netdev_for_each_mc_addr(ha, net_dev) { |
2305 | unsigned int bit_nr = | 2305 | unsigned int bit_nr; |
2306 | sis900_mcast_bitnr(mclist->dmi_addr, sis_priv->chipset_rev); | 2306 | |
2307 | bit_nr = sis900_mcast_bitnr(ha->addr, | ||
2308 | sis_priv->chipset_rev); | ||
2307 | mc_filter[bit_nr >> 4] |= (1 << (bit_nr & 0xf)); | 2309 | mc_filter[bit_nr >> 4] |= (1 << (bit_nr & 0xf)); |
2308 | } | 2310 | } |
2309 | } | 2311 | } |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 1921a54ea995..7e5b9f310fb2 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -852,7 +852,7 @@ static void skfp_ctl_set_multicast_list(struct net_device *dev) | |||
852 | static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) | 852 | static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) |
853 | { | 853 | { |
854 | struct s_smc *smc = netdev_priv(dev); | 854 | struct s_smc *smc = netdev_priv(dev); |
855 | struct dev_mc_list *dmi; | 855 | struct netdev_hw_addr *ha; |
856 | 856 | ||
857 | /* Enable promiscuous mode, if necessary */ | 857 | /* Enable promiscuous mode, if necessary */ |
858 | if (dev->flags & IFF_PROMISC) { | 858 | if (dev->flags & IFF_PROMISC) { |
@@ -876,13 +876,13 @@ static void skfp_ctl_set_multicast_list_wo_lock(struct net_device *dev) | |||
876 | /* use exact filtering */ | 876 | /* use exact filtering */ |
877 | 877 | ||
878 | // point to first multicast addr | 878 | // point to first multicast addr |
879 | netdev_for_each_mc_addr(dmi, dev) { | 879 | netdev_for_each_mc_addr(ha, dev) { |
880 | mac_add_multicast(smc, | 880 | mac_add_multicast(smc, |
881 | (struct fddi_addr *)dmi->dmi_addr, | 881 | (struct fddi_addr *)ha->addr, |
882 | 1); | 882 | 1); |
883 | 883 | ||
884 | pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", | 884 | pr_debug(KERN_INFO "ENABLE MC ADDRESS: %pMF\n", |
885 | dmi->dmi_addr); | 885 | ha->addr); |
886 | } | 886 | } |
887 | 887 | ||
888 | } else { // more MC addresses than HW supports | 888 | } else { // more MC addresses than HW supports |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index bd8c5e8413b1..de5ef3877baf 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2917,7 +2917,7 @@ static void genesis_set_multicast(struct net_device *dev) | |||
2917 | struct skge_port *skge = netdev_priv(dev); | 2917 | struct skge_port *skge = netdev_priv(dev); |
2918 | struct skge_hw *hw = skge->hw; | 2918 | struct skge_hw *hw = skge->hw; |
2919 | int port = skge->port; | 2919 | int port = skge->port; |
2920 | struct dev_mc_list *list; | 2920 | struct netdev_hw_addr *ha; |
2921 | u32 mode; | 2921 | u32 mode; |
2922 | u8 filter[8]; | 2922 | u8 filter[8]; |
2923 | 2923 | ||
@@ -2937,8 +2937,8 @@ static void genesis_set_multicast(struct net_device *dev) | |||
2937 | skge->flow_status == FLOW_STAT_SYMMETRIC) | 2937 | skge->flow_status == FLOW_STAT_SYMMETRIC) |
2938 | genesis_add_filter(filter, pause_mc_addr); | 2938 | genesis_add_filter(filter, pause_mc_addr); |
2939 | 2939 | ||
2940 | netdev_for_each_mc_addr(list, dev) | 2940 | netdev_for_each_mc_addr(ha, dev) |
2941 | genesis_add_filter(filter, list->dmi_addr); | 2941 | genesis_add_filter(filter, ha->addr); |
2942 | } | 2942 | } |
2943 | 2943 | ||
2944 | xm_write32(hw, port, XM_MODE, mode); | 2944 | xm_write32(hw, port, XM_MODE, mode); |
@@ -2956,7 +2956,7 @@ static void yukon_set_multicast(struct net_device *dev) | |||
2956 | struct skge_port *skge = netdev_priv(dev); | 2956 | struct skge_port *skge = netdev_priv(dev); |
2957 | struct skge_hw *hw = skge->hw; | 2957 | struct skge_hw *hw = skge->hw; |
2958 | int port = skge->port; | 2958 | int port = skge->port; |
2959 | struct dev_mc_list *list; | 2959 | struct netdev_hw_addr *ha; |
2960 | int rx_pause = (skge->flow_status == FLOW_STAT_REM_SEND || | 2960 | int rx_pause = (skge->flow_status == FLOW_STAT_REM_SEND || |
2961 | skge->flow_status == FLOW_STAT_SYMMETRIC); | 2961 | skge->flow_status == FLOW_STAT_SYMMETRIC); |
2962 | u16 reg; | 2962 | u16 reg; |
@@ -2979,8 +2979,8 @@ static void yukon_set_multicast(struct net_device *dev) | |||
2979 | if (rx_pause) | 2979 | if (rx_pause) |
2980 | yukon_add_filter(filter, pause_mc_addr); | 2980 | yukon_add_filter(filter, pause_mc_addr); |
2981 | 2981 | ||
2982 | netdev_for_each_mc_addr(list, dev) | 2982 | netdev_for_each_mc_addr(ha, dev) |
2983 | yukon_add_filter(filter, list->dmi_addr); | 2983 | yukon_add_filter(filter, ha->addr); |
2984 | } | 2984 | } |
2985 | 2985 | ||
2986 | 2986 | ||
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index f1c0ec308bfe..5b97edb7a35f 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -3627,7 +3627,7 @@ static void sky2_set_multicast(struct net_device *dev) | |||
3627 | struct sky2_port *sky2 = netdev_priv(dev); | 3627 | struct sky2_port *sky2 = netdev_priv(dev); |
3628 | struct sky2_hw *hw = sky2->hw; | 3628 | struct sky2_hw *hw = sky2->hw; |
3629 | unsigned port = sky2->port; | 3629 | unsigned port = sky2->port; |
3630 | struct dev_mc_list *list; | 3630 | struct netdev_hw_addr *ha; |
3631 | u16 reg; | 3631 | u16 reg; |
3632 | u8 filter[8]; | 3632 | u8 filter[8]; |
3633 | int rx_pause; | 3633 | int rx_pause; |
@@ -3651,8 +3651,8 @@ static void sky2_set_multicast(struct net_device *dev) | |||
3651 | if (rx_pause) | 3651 | if (rx_pause) |
3652 | sky2_add_filter(filter, pause_mc_addr); | 3652 | sky2_add_filter(filter, pause_mc_addr); |
3653 | 3653 | ||
3654 | netdev_for_each_mc_addr(list, dev) | 3654 | netdev_for_each_mc_addr(ha, dev) |
3655 | sky2_add_filter(filter, list->dmi_addr); | 3655 | sky2_add_filter(filter, ha->addr); |
3656 | } | 3656 | } |
3657 | 3657 | ||
3658 | gma_write16(hw, port, GM_MC_ADDR_H1, | 3658 | gma_write16(hw, port, GM_MC_ADDR_H1, |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 0f97b5af91e4..6278734c735f 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1341,7 +1341,7 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1341 | * within that register. | 1341 | * within that register. |
1342 | */ | 1342 | */ |
1343 | else if (!netdev_mc_empty(dev)) { | 1343 | else if (!netdev_mc_empty(dev)) { |
1344 | struct dev_mc_list *cur_addr; | 1344 | struct netdev_hw_addr *ha; |
1345 | 1345 | ||
1346 | /* Set the Hash perfec mode */ | 1346 | /* Set the Hash perfec mode */ |
1347 | mcr |= MAC_CR_HPFILT_; | 1347 | mcr |= MAC_CR_HPFILT_; |
@@ -1349,19 +1349,16 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1349 | /* start with a table of all zeros: reject all */ | 1349 | /* start with a table of all zeros: reject all */ |
1350 | memset(multicast_table, 0, sizeof(multicast_table)); | 1350 | memset(multicast_table, 0, sizeof(multicast_table)); |
1351 | 1351 | ||
1352 | netdev_for_each_mc_addr(cur_addr, dev) { | 1352 | netdev_for_each_mc_addr(ha, dev) { |
1353 | u32 position; | 1353 | u32 position; |
1354 | 1354 | ||
1355 | /* do we have a pointer here? */ | ||
1356 | if (!cur_addr) | ||
1357 | break; | ||
1358 | /* make sure this is a multicast address - | 1355 | /* make sure this is a multicast address - |
1359 | shouldn't this be a given if we have it here ? */ | 1356 | shouldn't this be a given if we have it here ? */ |
1360 | if (!(*cur_addr->dmi_addr & 1)) | 1357 | if (!(*ha->addr & 1)) |
1361 | continue; | 1358 | continue; |
1362 | 1359 | ||
1363 | /* upper 6 bits are used as hash index */ | 1360 | /* upper 6 bits are used as hash index */ |
1364 | position = ether_crc(ETH_ALEN, cur_addr->dmi_addr)>>26; | 1361 | position = ether_crc(ETH_ALEN, ha->addr)>>26; |
1365 | 1362 | ||
1366 | multicast_table[position>>5] |= 1 << (position&0x1f); | 1363 | multicast_table[position>>5] |= 1 << (position&0x1f); |
1367 | } | 1364 | } |
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index ee1487791d55..9e5e9e792e86 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c | |||
@@ -417,7 +417,7 @@ static void smc_shutdown( int ioaddr ) | |||
417 | 417 | ||
418 | 418 | ||
419 | /* | 419 | /* |
420 | . Function: smc_setmulticast( int ioaddr, int count, dev_mc_list * adds ) | 420 | . Function: smc_setmulticast( int ioaddr, struct net_device *dev ) |
421 | . Purpose: | 421 | . Purpose: |
422 | . This sets the internal hardware table to filter out unwanted multicast | 422 | . This sets the internal hardware table to filter out unwanted multicast |
423 | . packets before they take up memory. | 423 | . packets before they take up memory. |
@@ -438,26 +438,23 @@ static void smc_setmulticast(int ioaddr, struct net_device *dev) | |||
438 | { | 438 | { |
439 | int i; | 439 | int i; |
440 | unsigned char multicast_table[ 8 ]; | 440 | unsigned char multicast_table[ 8 ]; |
441 | struct dev_mc_list *cur_addr; | 441 | struct netdev_hw_addr *ha; |
442 | /* table for flipping the order of 3 bits */ | 442 | /* table for flipping the order of 3 bits */ |
443 | unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; | 443 | unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; |
444 | 444 | ||
445 | /* start with a table of all zeros: reject all */ | 445 | /* start with a table of all zeros: reject all */ |
446 | memset( multicast_table, 0, sizeof( multicast_table ) ); | 446 | memset( multicast_table, 0, sizeof( multicast_table ) ); |
447 | 447 | ||
448 | netdev_for_each_mc_addr(cur_addr, dev) { | 448 | netdev_for_each_mc_addr(ha, dev) { |
449 | int position; | 449 | int position; |
450 | 450 | ||
451 | /* do we have a pointer here? */ | ||
452 | if ( !cur_addr ) | ||
453 | break; | ||
454 | /* make sure this is a multicast address - shouldn't this | 451 | /* make sure this is a multicast address - shouldn't this |
455 | be a given if we have it here ? */ | 452 | be a given if we have it here ? */ |
456 | if ( !( *cur_addr->dmi_addr & 1 ) ) | 453 | if (!(*ha->addr & 1)) |
457 | continue; | 454 | continue; |
458 | 455 | ||
459 | /* only use the low order bits */ | 456 | /* only use the low order bits */ |
460 | position = ether_crc_le(6, cur_addr->dmi_addr) & 0x3f; | 457 | position = ether_crc_le(6, ha->addr) & 0x3f; |
461 | 458 | ||
462 | /* do some messy swapping to put the bit in the right spot */ | 459 | /* do some messy swapping to put the bit in the right spot */ |
463 | multicast_table[invert3[position&7]] |= | 460 | multicast_table[invert3[position&7]] |= |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 2e8133809dc0..20c756577631 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1413,7 +1413,7 @@ static void smc_set_multicast_list(struct net_device *dev) | |||
1413 | * within that register. | 1413 | * within that register. |
1414 | */ | 1414 | */ |
1415 | else if (!netdev_mc_empty(dev)) { | 1415 | else if (!netdev_mc_empty(dev)) { |
1416 | struct dev_mc_list *cur_addr; | 1416 | struct netdev_hw_addr *ha; |
1417 | 1417 | ||
1418 | /* table for flipping the order of 3 bits */ | 1418 | /* table for flipping the order of 3 bits */ |
1419 | static const unsigned char invert3[] = {0, 4, 2, 6, 1, 5, 3, 7}; | 1419 | static const unsigned char invert3[] = {0, 4, 2, 6, 1, 5, 3, 7}; |
@@ -1421,16 +1421,16 @@ static void smc_set_multicast_list(struct net_device *dev) | |||
1421 | /* start with a table of all zeros: reject all */ | 1421 | /* start with a table of all zeros: reject all */ |
1422 | memset(multicast_table, 0, sizeof(multicast_table)); | 1422 | memset(multicast_table, 0, sizeof(multicast_table)); |
1423 | 1423 | ||
1424 | netdev_for_each_mc_addr(cur_addr, dev) { | 1424 | netdev_for_each_mc_addr(ha, dev) { |
1425 | int position; | 1425 | int position; |
1426 | 1426 | ||
1427 | /* make sure this is a multicast address - | 1427 | /* make sure this is a multicast address - |
1428 | shouldn't this be a given if we have it here ? */ | 1428 | shouldn't this be a given if we have it here ? */ |
1429 | if (!(*cur_addr->dmi_addr & 1)) | 1429 | if (!(*ha->addr & 1)) |
1430 | continue; | 1430 | continue; |
1431 | 1431 | ||
1432 | /* only use the low order bits */ | 1432 | /* only use the low order bits */ |
1433 | position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f; | 1433 | position = crc32_le(~0, ha->addr, 6) & 0x3f; |
1434 | 1434 | ||
1435 | /* do some messy swapping to put the bit in the right spot */ | 1435 | /* do some messy swapping to put the bit in the right spot */ |
1436 | multicast_table[invert3[position&7]] |= | 1436 | multicast_table[invert3[position&7]] |= |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 4fd1d8b38788..d6e3a12d65d3 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -1383,13 +1383,13 @@ static void smsc911x_set_multicast_list(struct net_device *dev) | |||
1383 | /* Enabling specific multicast addresses */ | 1383 | /* Enabling specific multicast addresses */ |
1384 | unsigned int hash_high = 0; | 1384 | unsigned int hash_high = 0; |
1385 | unsigned int hash_low = 0; | 1385 | unsigned int hash_low = 0; |
1386 | struct dev_mc_list *mc_list; | 1386 | struct netdev_hw_addr *ha; |
1387 | 1387 | ||
1388 | pdata->set_bits_mask = MAC_CR_HPFILT_; | 1388 | pdata->set_bits_mask = MAC_CR_HPFILT_; |
1389 | pdata->clear_bits_mask = (MAC_CR_PRMS_ | MAC_CR_MCPAS_); | 1389 | pdata->clear_bits_mask = (MAC_CR_PRMS_ | MAC_CR_MCPAS_); |
1390 | 1390 | ||
1391 | netdev_for_each_mc_addr(mc_list, dev) { | 1391 | netdev_for_each_mc_addr(ha, dev) { |
1392 | unsigned int bitnum = smsc911x_hash(mc_list->dmi_addr); | 1392 | unsigned int bitnum = smsc911x_hash(ha->addr); |
1393 | unsigned int mask = 0x01 << (bitnum & 0x1F); | 1393 | unsigned int mask = 0x01 << (bitnum & 0x1F); |
1394 | 1394 | ||
1395 | if (bitnum & 0x20) | 1395 | if (bitnum & 0x20) |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index 34fa10d8ad40..5409ec1a5fd7 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -1063,12 +1063,12 @@ static void smsc9420_set_multicast_list(struct net_device *dev) | |||
1063 | mac_cr |= MAC_CR_MCPAS_; | 1063 | mac_cr |= MAC_CR_MCPAS_; |
1064 | mac_cr &= (~MAC_CR_HPFILT_); | 1064 | mac_cr &= (~MAC_CR_HPFILT_); |
1065 | } else if (!netdev_mc_empty(dev)) { | 1065 | } else if (!netdev_mc_empty(dev)) { |
1066 | struct dev_mc_list *mc_list; | 1066 | struct netdev_hw_addr *ha; |
1067 | u32 hash_lo = 0, hash_hi = 0; | 1067 | u32 hash_lo = 0, hash_hi = 0; |
1068 | 1068 | ||
1069 | smsc_dbg(HW, "Multicast filter enabled"); | 1069 | smsc_dbg(HW, "Multicast filter enabled"); |
1070 | netdev_for_each_mc_addr(mc_list, dev) { | 1070 | netdev_for_each_mc_addr(ha, dev) { |
1071 | u32 bit_num = smsc9420_hash(mc_list->dmi_addr); | 1071 | u32 bit_num = smsc9420_hash(ha->addr); |
1072 | u32 mask = 1 << (bit_num & 0x1F); | 1072 | u32 mask = 1 << (bit_num & 0x1F); |
1073 | 1073 | ||
1074 | if (bit_num & 0x20) | 1074 | if (bit_num & 0x20) |
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index 287c251075e5..e5d67327d707 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c | |||
@@ -531,7 +531,7 @@ static void sonic_multicast_list(struct net_device *dev) | |||
531 | { | 531 | { |
532 | struct sonic_local *lp = netdev_priv(dev); | 532 | struct sonic_local *lp = netdev_priv(dev); |
533 | unsigned int rcr; | 533 | unsigned int rcr; |
534 | struct dev_mc_list *dmi; | 534 | struct netdev_hw_addr *ha; |
535 | unsigned char *addr; | 535 | unsigned char *addr; |
536 | int i; | 536 | int i; |
537 | 537 | ||
@@ -550,8 +550,8 @@ static void sonic_multicast_list(struct net_device *dev) | |||
550 | netdev_mc_count(dev)); | 550 | netdev_mc_count(dev)); |
551 | sonic_set_cam_enable(dev, 1); /* always enable our own address */ | 551 | sonic_set_cam_enable(dev, 1); /* always enable our own address */ |
552 | i = 1; | 552 | i = 1; |
553 | netdev_for_each_mc_addr(dmi, dev) { | 553 | netdev_for_each_mc_addr(ha, dev) { |
554 | addr = dmi->dmi_addr; | 554 | addr = ha->addr; |
555 | sonic_cda_put(dev, i, SONIC_CD_CAP0, addr[1] << 8 | addr[0]); | 555 | sonic_cda_put(dev, i, SONIC_CD_CAP0, addr[1] << 8 | addr[0]); |
556 | sonic_cda_put(dev, i, SONIC_CD_CAP1, addr[3] << 8 | addr[2]); | 556 | sonic_cda_put(dev, i, SONIC_CD_CAP1, addr[3] << 8 | addr[2]); |
557 | sonic_cda_put(dev, i, SONIC_CD_CAP2, addr[5] << 8 | addr[4]); | 557 | sonic_cda_put(dev, i, SONIC_CD_CAP2, addr[5] << 8 | addr[4]); |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 5ba9d989f8fc..c04c8f9a2d96 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -625,7 +625,7 @@ spider_net_get_multicast_hash(struct net_device *netdev, __u8 *addr) | |||
625 | static void | 625 | static void |
626 | spider_net_set_multi(struct net_device *netdev) | 626 | spider_net_set_multi(struct net_device *netdev) |
627 | { | 627 | { |
628 | struct dev_mc_list *mc; | 628 | struct netdev_hw_addr *ha; |
629 | u8 hash; | 629 | u8 hash; |
630 | int i; | 630 | int i; |
631 | u32 reg; | 631 | u32 reg; |
@@ -646,8 +646,8 @@ spider_net_set_multi(struct net_device *netdev) | |||
646 | hash = spider_net_get_multicast_hash(netdev, netdev->broadcast); */ | 646 | hash = spider_net_get_multicast_hash(netdev, netdev->broadcast); */ |
647 | set_bit(0xfd, bitmask); | 647 | set_bit(0xfd, bitmask); |
648 | 648 | ||
649 | netdev_for_each_mc_addr(mc, netdev) { | 649 | netdev_for_each_mc_addr(ha, netdev) { |
650 | hash = spider_net_get_multicast_hash(netdev, mc->dmi_addr); | 650 | hash = spider_net_get_multicast_hash(netdev, ha->addr); |
651 | set_bit(hash, bitmask); | 651 | set_bit(hash, bitmask); |
652 | } | 652 | } |
653 | 653 | ||
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 6dfa69899019..8a6d27cdc0bd 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1766,7 +1766,7 @@ static void set_rx_mode(struct net_device *dev) | |||
1766 | struct netdev_private *np = netdev_priv(dev); | 1766 | struct netdev_private *np = netdev_priv(dev); |
1767 | void __iomem *ioaddr = np->base; | 1767 | void __iomem *ioaddr = np->base; |
1768 | u32 rx_mode = MinVLANPrio; | 1768 | u32 rx_mode = MinVLANPrio; |
1769 | struct dev_mc_list *mclist; | 1769 | struct netdev_hw_addr *ha; |
1770 | int i; | 1770 | int i; |
1771 | #ifdef VLAN_SUPPORT | 1771 | #ifdef VLAN_SUPPORT |
1772 | 1772 | ||
@@ -1804,8 +1804,8 @@ static void set_rx_mode(struct net_device *dev) | |||
1804 | /* Use the 16 element perfect filter, skip first two entries. */ | 1804 | /* Use the 16 element perfect filter, skip first two entries. */ |
1805 | void __iomem *filter_addr = ioaddr + PerfFilterTable + 2 * 16; | 1805 | void __iomem *filter_addr = ioaddr + PerfFilterTable + 2 * 16; |
1806 | __be16 *eaddrs; | 1806 | __be16 *eaddrs; |
1807 | netdev_for_each_mc_addr(mclist, dev) { | 1807 | netdev_for_each_mc_addr(ha, dev) { |
1808 | eaddrs = (__be16 *)mclist->dmi_addr; | 1808 | eaddrs = (__be16 *) ha->addr; |
1809 | writew(be16_to_cpu(eaddrs[2]), filter_addr); filter_addr += 4; | 1809 | writew(be16_to_cpu(eaddrs[2]), filter_addr); filter_addr += 4; |
1810 | writew(be16_to_cpu(eaddrs[1]), filter_addr); filter_addr += 4; | 1810 | writew(be16_to_cpu(eaddrs[1]), filter_addr); filter_addr += 4; |
1811 | writew(be16_to_cpu(eaddrs[0]), filter_addr); filter_addr += 8; | 1811 | writew(be16_to_cpu(eaddrs[0]), filter_addr); filter_addr += 8; |
@@ -1825,10 +1825,10 @@ static void set_rx_mode(struct net_device *dev) | |||
1825 | __le16 mc_filter[32] __attribute__ ((aligned(sizeof(long)))); /* Multicast hash filter */ | 1825 | __le16 mc_filter[32] __attribute__ ((aligned(sizeof(long)))); /* Multicast hash filter */ |
1826 | 1826 | ||
1827 | memset(mc_filter, 0, sizeof(mc_filter)); | 1827 | memset(mc_filter, 0, sizeof(mc_filter)); |
1828 | netdev_for_each_mc_addr(mclist, dev) { | 1828 | netdev_for_each_mc_addr(ha, dev) { |
1829 | /* The chip uses the upper 9 CRC bits | 1829 | /* The chip uses the upper 9 CRC bits |
1830 | as index into the hash table */ | 1830 | as index into the hash table */ |
1831 | int bit_nr = ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 23; | 1831 | int bit_nr = ether_crc_le(ETH_ALEN, ha->addr) >> 23; |
1832 | __le32 *fptr = (__le32 *) &mc_filter[(bit_nr >> 4) & ~1]; | 1832 | __le32 *fptr = (__le32 *) &mc_filter[(bit_nr >> 4) & ~1]; |
1833 | 1833 | ||
1834 | *fptr |= cpu_to_le32(1 << (bit_nr & 31)); | 1834 | *fptr |= cpu_to_le32(1 << (bit_nr & 31)); |
diff --git a/drivers/net/stmmac/dwmac100.c b/drivers/net/stmmac/dwmac100.c index a183de29c39a..c0a1c9df3ac7 100644 --- a/drivers/net/stmmac/dwmac100.c +++ b/drivers/net/stmmac/dwmac100.c | |||
@@ -316,7 +316,7 @@ static void dwmac100_set_filter(struct net_device *dev) | |||
316 | MAC_CONTROL_HO | MAC_CONTROL_HP); | 316 | MAC_CONTROL_HO | MAC_CONTROL_HP); |
317 | } else { | 317 | } else { |
318 | u32 mc_filter[2]; | 318 | u32 mc_filter[2]; |
319 | struct dev_mc_list *mclist; | 319 | struct netdev_hw_addr *ha; |
320 | 320 | ||
321 | /* Perfect filter mode for physical address and Hash | 321 | /* Perfect filter mode for physical address and Hash |
322 | filter for multicast */ | 322 | filter for multicast */ |
@@ -325,11 +325,11 @@ static void dwmac100_set_filter(struct net_device *dev) | |||
325 | MAC_CONTROL_IF | MAC_CONTROL_HO); | 325 | MAC_CONTROL_IF | MAC_CONTROL_HO); |
326 | 326 | ||
327 | memset(mc_filter, 0, sizeof(mc_filter)); | 327 | memset(mc_filter, 0, sizeof(mc_filter)); |
328 | netdev_for_each_mc_addr(mclist, dev) { | 328 | netdev_for_each_mc_addr(ha, dev) { |
329 | /* The upper 6 bits of the calculated CRC are used to | 329 | /* The upper 6 bits of the calculated CRC are used to |
330 | * index the contens of the hash table */ | 330 | * index the contens of the hash table */ |
331 | int bit_nr = | 331 | int bit_nr = |
332 | ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 332 | ether_crc(ETH_ALEN, ha->addr) >> 26; |
333 | /* The most significant bit determines the register to | 333 | /* The most significant bit determines the register to |
334 | * use (H/L) while the other 5 bits determine the bit | 334 | * use (H/L) while the other 5 bits determine the bit |
335 | * within the register. */ | 335 | * within the register. */ |
diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c index a6538ae4694c..bf73fda6adfb 100644 --- a/drivers/net/stmmac/dwmac1000_core.c +++ b/drivers/net/stmmac/dwmac1000_core.c | |||
@@ -94,17 +94,17 @@ static void dwmac1000_set_filter(struct net_device *dev) | |||
94 | writel(0xffffffff, ioaddr + GMAC_HASH_LOW); | 94 | writel(0xffffffff, ioaddr + GMAC_HASH_LOW); |
95 | } else if (!netdev_mc_empty(dev)) { | 95 | } else if (!netdev_mc_empty(dev)) { |
96 | u32 mc_filter[2]; | 96 | u32 mc_filter[2]; |
97 | struct dev_mc_list *mclist; | 97 | struct netdev_hw_addr *ha; |
98 | 98 | ||
99 | /* Hash filter for multicast */ | 99 | /* Hash filter for multicast */ |
100 | value = GMAC_FRAME_FILTER_HMC; | 100 | value = GMAC_FRAME_FILTER_HMC; |
101 | 101 | ||
102 | memset(mc_filter, 0, sizeof(mc_filter)); | 102 | memset(mc_filter, 0, sizeof(mc_filter)); |
103 | netdev_for_each_mc_addr(mclist, dev) { | 103 | netdev_for_each_mc_addr(ha, dev) { |
104 | /* The upper 6 bits of the calculated CRC are used to | 104 | /* The upper 6 bits of the calculated CRC are used to |
105 | index the contens of the hash table */ | 105 | index the contens of the hash table */ |
106 | int bit_nr = | 106 | int bit_nr = |
107 | bitrev32(~crc32_le(~0, mclist->dmi_addr, 6)) >> 26; | 107 | bitrev32(~crc32_le(~0, ha->addr, 6)) >> 26; |
108 | /* The most significant bit determines the register to | 108 | /* The most significant bit determines the register to |
109 | * use (H/L) while the other 5 bits determine the bit | 109 | * use (H/L) while the other 5 bits determine the bit |
110 | * within the register. */ | 110 | * within the register. */ |
diff --git a/drivers/net/sun3_82586.c b/drivers/net/sun3_82586.c index 2f6a760e5f21..2cfa065c39c0 100644 --- a/drivers/net/sun3_82586.c +++ b/drivers/net/sun3_82586.c | |||
@@ -413,7 +413,7 @@ static int init586(struct net_device *dev) | |||
413 | volatile struct iasetup_cmd_struct *ias_cmd; | 413 | volatile struct iasetup_cmd_struct *ias_cmd; |
414 | volatile struct tdr_cmd_struct *tdr_cmd; | 414 | volatile struct tdr_cmd_struct *tdr_cmd; |
415 | volatile struct mcsetup_cmd_struct *mc_cmd; | 415 | volatile struct mcsetup_cmd_struct *mc_cmd; |
416 | struct dev_mc_list *dmi; | 416 | struct netdev_hw_addr *ha; |
417 | int num_addrs=netdev_mc_count(dev); | 417 | int num_addrs=netdev_mc_count(dev); |
418 | 418 | ||
419 | ptr = (void *) ((char *)p->scb + sizeof(struct scb_struct)); | 419 | ptr = (void *) ((char *)p->scb + sizeof(struct scb_struct)); |
@@ -537,9 +537,9 @@ static int init586(struct net_device *dev) | |||
537 | mc_cmd->mc_cnt = swab16(num_addrs * 6); | 537 | mc_cmd->mc_cnt = swab16(num_addrs * 6); |
538 | 538 | ||
539 | i = 0; | 539 | i = 0; |
540 | netdev_for_each_mc_addr(dmi, dev) | 540 | netdev_for_each_mc_addr(ha, dev) |
541 | memcpy((char *) mc_cmd->mc_list[i++], | 541 | memcpy((char *) mc_cmd->mc_list[i++], |
542 | dmi->dmi_addr, ETH_ALEN); | 542 | ha->addr, ETH_ALEN); |
543 | 543 | ||
544 | p->scb->cbl_offset = make16(mc_cmd); | 544 | p->scb->cbl_offset = make16(mc_cmd); |
545 | p->scb->cmd_cuc = CUC_START; | 545 | p->scb->cmd_cuc = CUC_START; |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index a0bd361d5eca..4dd159b4116b 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -999,7 +999,7 @@ static void bigmac_set_multicast(struct net_device *dev) | |||
999 | { | 999 | { |
1000 | struct bigmac *bp = netdev_priv(dev); | 1000 | struct bigmac *bp = netdev_priv(dev); |
1001 | void __iomem *bregs = bp->bregs; | 1001 | void __iomem *bregs = bp->bregs; |
1002 | struct dev_mc_list *dmi; | 1002 | struct netdev_hw_addr *ha; |
1003 | char *addrs; | 1003 | char *addrs; |
1004 | int i; | 1004 | int i; |
1005 | u32 tmp, crc; | 1005 | u32 tmp, crc; |
@@ -1028,8 +1028,8 @@ static void bigmac_set_multicast(struct net_device *dev) | |||
1028 | for (i = 0; i < 4; i++) | 1028 | for (i = 0; i < 4; i++) |
1029 | hash_table[i] = 0; | 1029 | hash_table[i] = 0; |
1030 | 1030 | ||
1031 | netdev_for_each_mc_addr(dmi, dev) { | 1031 | netdev_for_each_mc_addr(ha, dev) { |
1032 | addrs = dmi->dmi_addr; | 1032 | addrs = ha->addr; |
1033 | 1033 | ||
1034 | if (!(*addrs & 1)) | 1034 | if (!(*addrs & 1)) |
1035 | continue; | 1035 | continue; |
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index a855934dfc3b..47e8cce10d1e 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -1523,13 +1523,13 @@ static void set_rx_mode(struct net_device *dev) | |||
1523 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 1523 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
1524 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1524 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1525 | } else if (!netdev_mc_empty(dev)) { | 1525 | } else if (!netdev_mc_empty(dev)) { |
1526 | struct dev_mc_list *mclist; | 1526 | struct netdev_hw_addr *ha; |
1527 | int bit; | 1527 | int bit; |
1528 | int index; | 1528 | int index; |
1529 | int crc; | 1529 | int crc; |
1530 | memset (mc_filter, 0, sizeof (mc_filter)); | 1530 | memset (mc_filter, 0, sizeof (mc_filter)); |
1531 | netdev_for_each_mc_addr(mclist, dev) { | 1531 | netdev_for_each_mc_addr(ha, dev) { |
1532 | crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr); | 1532 | crc = ether_crc_le(ETH_ALEN, ha->addr); |
1533 | for (index=0, bit=0; bit < 6; bit++, crc <<= 1) | 1533 | for (index=0, bit=0; bit < 6; bit++, crc <<= 1) |
1534 | if (crc & 0x80000000) index |= 1 << bit; | 1534 | if (crc & 0x80000000) index |= 1 << bit; |
1535 | mc_filter[index/16] |= (1 << (index % 16)); | 1535 | mc_filter[index/16] |= (1 << (index % 16)); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 70196bc5fe61..58a27541ae39 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -1846,12 +1846,12 @@ static u32 gem_setup_multicast(struct gem *gp) | |||
1846 | } else { | 1846 | } else { |
1847 | u16 hash_table[16]; | 1847 | u16 hash_table[16]; |
1848 | u32 crc; | 1848 | u32 crc; |
1849 | struct dev_mc_list *dmi; | 1849 | struct netdev_hw_addr *ha; |
1850 | int i; | 1850 | int i; |
1851 | 1851 | ||
1852 | memset(hash_table, 0, sizeof(hash_table)); | 1852 | memset(hash_table, 0, sizeof(hash_table)); |
1853 | netdev_for_each_mc_addr(dmi, gp->dev) { | 1853 | netdev_for_each_mc_addr(ha, gp->dev) { |
1854 | char *addrs = dmi->dmi_addr; | 1854 | char *addrs = ha->addr; |
1855 | 1855 | ||
1856 | if (!(*addrs & 1)) | 1856 | if (!(*addrs & 1)) |
1857 | continue; | 1857 | continue; |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index b17dbb11bd67..20deb14e98ff 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -1523,13 +1523,13 @@ static int happy_meal_init(struct happy_meal *hp) | |||
1523 | hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); | 1523 | hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); |
1524 | } else if ((hp->dev->flags & IFF_PROMISC) == 0) { | 1524 | } else if ((hp->dev->flags & IFF_PROMISC) == 0) { |
1525 | u16 hash_table[4]; | 1525 | u16 hash_table[4]; |
1526 | struct dev_mc_list *dmi; | 1526 | struct netdev_hw_addr *ha; |
1527 | char *addrs; | 1527 | char *addrs; |
1528 | u32 crc; | 1528 | u32 crc; |
1529 | 1529 | ||
1530 | memset(hash_table, 0, sizeof(hash_table)); | 1530 | memset(hash_table, 0, sizeof(hash_table)); |
1531 | netdev_for_each_mc_addr(dmi, hp->dev) { | 1531 | netdev_for_each_mc_addr(ha, hp->dev) { |
1532 | addrs = dmi->dmi_addr; | 1532 | addrs = ha->addr; |
1533 | 1533 | ||
1534 | if (!(*addrs & 1)) | 1534 | if (!(*addrs & 1)) |
1535 | continue; | 1535 | continue; |
@@ -2362,7 +2362,7 @@ static void happy_meal_set_multicast(struct net_device *dev) | |||
2362 | { | 2362 | { |
2363 | struct happy_meal *hp = netdev_priv(dev); | 2363 | struct happy_meal *hp = netdev_priv(dev); |
2364 | void __iomem *bregs = hp->bigmacregs; | 2364 | void __iomem *bregs = hp->bigmacregs; |
2365 | struct dev_mc_list *dmi; | 2365 | struct netdev_hw_addr *ha; |
2366 | char *addrs; | 2366 | char *addrs; |
2367 | u32 crc; | 2367 | u32 crc; |
2368 | 2368 | ||
@@ -2380,8 +2380,8 @@ static void happy_meal_set_multicast(struct net_device *dev) | |||
2380 | u16 hash_table[4]; | 2380 | u16 hash_table[4]; |
2381 | 2381 | ||
2382 | memset(hash_table, 0, sizeof(hash_table)); | 2382 | memset(hash_table, 0, sizeof(hash_table)); |
2383 | netdev_for_each_mc_addr(dmi, dev) { | 2383 | netdev_for_each_mc_addr(ha, dev) { |
2384 | addrs = dmi->dmi_addr; | 2384 | addrs = ha->addr; |
2385 | 2385 | ||
2386 | if (!(*addrs & 1)) | 2386 | if (!(*addrs & 1)) |
2387 | continue; | 2387 | continue; |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index d7c73f478ef5..674570584bd5 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1170,7 +1170,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1170 | static void lance_load_multicast(struct net_device *dev) | 1170 | static void lance_load_multicast(struct net_device *dev) |
1171 | { | 1171 | { |
1172 | struct lance_private *lp = netdev_priv(dev); | 1172 | struct lance_private *lp = netdev_priv(dev); |
1173 | struct dev_mc_list *dmi; | 1173 | struct netdev_hw_addr *ha; |
1174 | char *addrs; | 1174 | char *addrs; |
1175 | u32 crc; | 1175 | u32 crc; |
1176 | u32 val; | 1176 | u32 val; |
@@ -1195,8 +1195,8 @@ static void lance_load_multicast(struct net_device *dev) | |||
1195 | return; | 1195 | return; |
1196 | 1196 | ||
1197 | /* Add addresses */ | 1197 | /* Add addresses */ |
1198 | netdev_for_each_mc_addr(dmi, dev) { | 1198 | netdev_for_each_mc_addr(ha, dev) { |
1199 | addrs = dmi->dmi_addr; | 1199 | addrs = ha->addr; |
1200 | 1200 | ||
1201 | /* multicast address? */ | 1201 | /* multicast address? */ |
1202 | if (!(*addrs & 1)) | 1202 | if (!(*addrs & 1)) |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index be637dce944c..239f09772191 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -627,7 +627,7 @@ static int qe_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
627 | static void qe_set_multicast(struct net_device *dev) | 627 | static void qe_set_multicast(struct net_device *dev) |
628 | { | 628 | { |
629 | struct sunqe *qep = netdev_priv(dev); | 629 | struct sunqe *qep = netdev_priv(dev); |
630 | struct dev_mc_list *dmi; | 630 | struct netdev_hw_addr *ha; |
631 | u8 new_mconfig = qep->mconfig; | 631 | u8 new_mconfig = qep->mconfig; |
632 | char *addrs; | 632 | char *addrs; |
633 | int i; | 633 | int i; |
@@ -651,8 +651,8 @@ static void qe_set_multicast(struct net_device *dev) | |||
651 | u8 *hbytes = (unsigned char *) &hash_table[0]; | 651 | u8 *hbytes = (unsigned char *) &hash_table[0]; |
652 | 652 | ||
653 | memset(hash_table, 0, sizeof(hash_table)); | 653 | memset(hash_table, 0, sizeof(hash_table)); |
654 | netdev_for_each_mc_addr(dmi, dev) { | 654 | netdev_for_each_mc_addr(ha, dev) { |
655 | addrs = dmi->dmi_addr; | 655 | addrs = ha->addr; |
656 | 656 | ||
657 | if (!(*addrs & 1)) | 657 | if (!(*addrs & 1)) |
658 | continue; | 658 | continue; |
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c index 6b1b7cea7f6b..6cf8b06be5cd 100644 --- a/drivers/net/sunvnet.c +++ b/drivers/net/sunvnet.c | |||
@@ -763,12 +763,12 @@ static struct vnet_mcast_entry *__vnet_mc_find(struct vnet *vp, u8 *addr) | |||
763 | 763 | ||
764 | static void __update_mc_list(struct vnet *vp, struct net_device *dev) | 764 | static void __update_mc_list(struct vnet *vp, struct net_device *dev) |
765 | { | 765 | { |
766 | struct dev_addr_list *p; | 766 | struct netdev_hw_addr *ha; |
767 | 767 | ||
768 | netdev_for_each_mc_addr(p, dev) { | 768 | netdev_for_each_mc_addr(ha, dev) { |
769 | struct vnet_mcast_entry *m; | 769 | struct vnet_mcast_entry *m; |
770 | 770 | ||
771 | m = __vnet_mc_find(vp, p->dmi_addr); | 771 | m = __vnet_mc_find(vp, ha->addr); |
772 | if (m) { | 772 | if (m) { |
773 | m->hit = 1; | 773 | m->hit = 1; |
774 | continue; | 774 | continue; |
@@ -778,7 +778,7 @@ static void __update_mc_list(struct vnet *vp, struct net_device *dev) | |||
778 | m = kzalloc(sizeof(*m), GFP_ATOMIC); | 778 | m = kzalloc(sizeof(*m), GFP_ATOMIC); |
779 | if (!m) | 779 | if (!m) |
780 | continue; | 780 | continue; |
781 | memcpy(m->addr, p->dmi_addr, ETH_ALEN); | 781 | memcpy(m->addr, ha->addr, ETH_ALEN); |
782 | m->hit = 1; | 782 | m->hit = 1; |
783 | 783 | ||
784 | m->next = vp->mcast_list; | 784 | m->next = vp->mcast_list; |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 49bd84c0d583..36149ddace46 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -1954,16 +1954,16 @@ tc35815_set_multicast_list(struct net_device *dev) | |||
1954 | /* Disable promiscuous mode, use normal mode. */ | 1954 | /* Disable promiscuous mode, use normal mode. */ |
1955 | tc_writel(CAM_CompEn | CAM_BroadAcc | CAM_GroupAcc, &tr->CAM_Ctl); | 1955 | tc_writel(CAM_CompEn | CAM_BroadAcc | CAM_GroupAcc, &tr->CAM_Ctl); |
1956 | } else if (!netdev_mc_empty(dev)) { | 1956 | } else if (!netdev_mc_empty(dev)) { |
1957 | struct dev_mc_list *cur_addr; | 1957 | struct netdev_hw_addr *ha; |
1958 | int i; | 1958 | int i; |
1959 | int ena_bits = CAM_Ena_Bit(CAM_ENTRY_SOURCE); | 1959 | int ena_bits = CAM_Ena_Bit(CAM_ENTRY_SOURCE); |
1960 | 1960 | ||
1961 | tc_writel(0, &tr->CAM_Ctl); | 1961 | tc_writel(0, &tr->CAM_Ctl); |
1962 | /* Walk the address list, and load the filter */ | 1962 | /* Walk the address list, and load the filter */ |
1963 | i = 0; | 1963 | i = 0; |
1964 | netdev_for_each_mc_addr(cur_addr, dev) { | 1964 | netdev_for_each_mc_addr(ha, dev) { |
1965 | /* entry 0,1 is reserved. */ | 1965 | /* entry 0,1 is reserved. */ |
1966 | tc35815_set_cam_entry(dev, i + 2, cur_addr->dmi_addr); | 1966 | tc35815_set_cam_entry(dev, i + 2, ha->addr); |
1967 | ena_bits |= CAM_Ena_Bit(i + 2); | 1967 | ena_bits |= CAM_Ena_Bit(i + 2); |
1968 | i++; | 1968 | i++; |
1969 | } | 1969 | } |
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 068a47174fca..a38aede5c8d6 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c | |||
@@ -808,7 +808,7 @@ static void bdx_setmulti(struct net_device *ndev) | |||
808 | WRITE_REG(priv, regRX_MCST_HASH0 + i * 4, ~0); | 808 | WRITE_REG(priv, regRX_MCST_HASH0 + i * 4, ~0); |
809 | } else if (!netdev_mc_empty(ndev)) { | 809 | } else if (!netdev_mc_empty(ndev)) { |
810 | u8 hash; | 810 | u8 hash; |
811 | struct dev_mc_list *mclist; | 811 | struct netdev_hw_addr *ha; |
812 | u32 reg, val; | 812 | u32 reg, val; |
813 | 813 | ||
814 | /* set IMF to deny all multicast frames */ | 814 | /* set IMF to deny all multicast frames */ |
@@ -825,10 +825,10 @@ static void bdx_setmulti(struct net_device *ndev) | |||
825 | * into RX_MAC_MCST regs. we skip this phase now and accept ALL | 825 | * into RX_MAC_MCST regs. we skip this phase now and accept ALL |
826 | * multicast frames throu IMF */ | 826 | * multicast frames throu IMF */ |
827 | /* accept the rest of addresses throu IMF */ | 827 | /* accept the rest of addresses throu IMF */ |
828 | netdev_for_each_mc_addr(mclist, ndev) { | 828 | netdev_for_each_mc_addr(ha, ndev) { |
829 | hash = 0; | 829 | hash = 0; |
830 | for (i = 0; i < ETH_ALEN; i++) | 830 | for (i = 0; i < ETH_ALEN; i++) |
831 | hash ^= mclist->dmi_addr[i]; | 831 | hash ^= ha->addr[i]; |
832 | reg = regRX_MCST_HASH0 + ((hash >> 5) << 2); | 832 | reg = regRX_MCST_HASH0 + ((hash >> 5) << 2); |
833 | val = READ_REG(priv, reg); | 833 | val = READ_REG(priv, reg); |
834 | val |= (1 << (hash % 32)); | 834 | val |= (1 << (hash % 32)); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 22cf1c446de3..aff11f84f525 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -9457,14 +9457,14 @@ static void __tg3_set_rx_mode(struct net_device *dev) | |||
9457 | tg3_set_multi (tp, 0); | 9457 | tg3_set_multi (tp, 0); |
9458 | } else { | 9458 | } else { |
9459 | /* Accept one or more multicast(s). */ | 9459 | /* Accept one or more multicast(s). */ |
9460 | struct dev_mc_list *mclist; | 9460 | struct netdev_hw_addr *ha; |
9461 | u32 mc_filter[4] = { 0, }; | 9461 | u32 mc_filter[4] = { 0, }; |
9462 | u32 regidx; | 9462 | u32 regidx; |
9463 | u32 bit; | 9463 | u32 bit; |
9464 | u32 crc; | 9464 | u32 crc; |
9465 | 9465 | ||
9466 | netdev_for_each_mc_addr(mclist, dev) { | 9466 | netdev_for_each_mc_addr(ha, dev) { |
9467 | crc = calc_crc (mclist->dmi_addr, ETH_ALEN); | 9467 | crc = calc_crc(ha->addr, ETH_ALEN); |
9468 | bit = ~crc & 0x7f; | 9468 | bit = ~crc & 0x7f; |
9469 | regidx = (bit & 0x60) >> 5; | 9469 | regidx = (bit & 0x60) >> 5; |
9470 | bit &= 0x1f; | 9470 | bit &= 0x1f; |
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 05ea30a94e89..8ffec22b74bf 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1314,7 +1314,7 @@ static struct net_device_stats *TLan_GetStats( struct net_device *dev ) | |||
1314 | 1314 | ||
1315 | static void TLan_SetMulticastList( struct net_device *dev ) | 1315 | static void TLan_SetMulticastList( struct net_device *dev ) |
1316 | { | 1316 | { |
1317 | struct dev_mc_list *dmi; | 1317 | struct netdev_hw_addr *ha; |
1318 | u32 hash1 = 0; | 1318 | u32 hash1 = 0; |
1319 | u32 hash2 = 0; | 1319 | u32 hash2 = 0; |
1320 | int i; | 1320 | int i; |
@@ -1336,12 +1336,12 @@ static void TLan_SetMulticastList( struct net_device *dev ) | |||
1336 | TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); | 1336 | TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); |
1337 | } else { | 1337 | } else { |
1338 | i = 0; | 1338 | i = 0; |
1339 | netdev_for_each_mc_addr(dmi, dev) { | 1339 | netdev_for_each_mc_addr(ha, dev) { |
1340 | if ( i < 3 ) { | 1340 | if ( i < 3 ) { |
1341 | TLan_SetMac( dev, i + 1, | 1341 | TLan_SetMac( dev, i + 1, |
1342 | (char *) &dmi->dmi_addr ); | 1342 | (char *) &ha->addr); |
1343 | } else { | 1343 | } else { |
1344 | offset = TLan_HashFunc( (u8 *) &dmi->dmi_addr ); | 1344 | offset = TLan_HashFunc((u8 *)&ha->addr); |
1345 | if ( offset < 32 ) | 1345 | if ( offset < 32 ) |
1346 | hash1 |= ( 1 << offset ); | 1346 | hash1 |= ( 1 << offset ); |
1347 | else | 1347 | else |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 8c54d89e60d7..4673e38c52a9 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -1390,7 +1390,7 @@ static int xl_close(struct net_device *dev) | |||
1390 | static void xl_set_rx_mode(struct net_device *dev) | 1390 | static void xl_set_rx_mode(struct net_device *dev) |
1391 | { | 1391 | { |
1392 | struct xl_private *xl_priv = netdev_priv(dev); | 1392 | struct xl_private *xl_priv = netdev_priv(dev); |
1393 | struct dev_mc_list *dmi; | 1393 | struct netdev_hw_addr *ha; |
1394 | unsigned char dev_mc_address[4] ; | 1394 | unsigned char dev_mc_address[4] ; |
1395 | u16 options ; | 1395 | u16 options ; |
1396 | 1396 | ||
@@ -1407,11 +1407,11 @@ static void xl_set_rx_mode(struct net_device *dev) | |||
1407 | 1407 | ||
1408 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; | 1408 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; |
1409 | 1409 | ||
1410 | netdev_for_each_mc_addr(dmi, dev) { | 1410 | netdev_for_each_mc_addr(ha, dev) { |
1411 | dev_mc_address[0] |= dmi->dmi_addr[2] ; | 1411 | dev_mc_address[0] |= ha->addr[2]; |
1412 | dev_mc_address[1] |= dmi->dmi_addr[3] ; | 1412 | dev_mc_address[1] |= ha->addr[3]; |
1413 | dev_mc_address[2] |= dmi->dmi_addr[4] ; | 1413 | dev_mc_address[2] |= ha->addr[4]; |
1414 | dev_mc_address[3] |= dmi->dmi_addr[5] ; | 1414 | dev_mc_address[3] |= ha->addr[5]; |
1415 | } | 1415 | } |
1416 | 1416 | ||
1417 | if (memcmp(xl_priv->xl_functional_addr,dev_mc_address,4) != 0) { /* Options have changed, run the command */ | 1417 | if (memcmp(xl_priv->xl_functional_addr,dev_mc_address,4) != 0) { /* Options have changed, run the command */ |
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 1a0967246e2f..eebdaae24328 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -986,7 +986,7 @@ static void open_sap(unsigned char type, struct net_device *dev) | |||
986 | static void tok_set_multicast_list(struct net_device *dev) | 986 | static void tok_set_multicast_list(struct net_device *dev) |
987 | { | 987 | { |
988 | struct tok_info *ti = netdev_priv(dev); | 988 | struct tok_info *ti = netdev_priv(dev); |
989 | struct dev_mc_list *mclist; | 989 | struct netdev_hw_addr *ha; |
990 | unsigned char address[4]; | 990 | unsigned char address[4]; |
991 | 991 | ||
992 | int i; | 992 | int i; |
@@ -995,11 +995,11 @@ static void tok_set_multicast_list(struct net_device *dev) | |||
995 | /*BMS ifconfig tr down or hot unplug a PCMCIA card ??hownowbrowncow*/ | 995 | /*BMS ifconfig tr down or hot unplug a PCMCIA card ??hownowbrowncow*/ |
996 | if (/*BMSHELPdev->start == 0 ||*/ ti->open_status != OPEN) return; | 996 | if (/*BMSHELPdev->start == 0 ||*/ ti->open_status != OPEN) return; |
997 | address[0] = address[1] = address[2] = address[3] = 0; | 997 | address[0] = address[1] = address[2] = address[3] = 0; |
998 | netdev_for_each_mc_addr(mclist, dev) { | 998 | netdev_for_each_mc_addr(ha, dev) { |
999 | address[0] |= mclist->dmi_addr[2]; | 999 | address[0] |= ha->addr[2]; |
1000 | address[1] |= mclist->dmi_addr[3]; | 1000 | address[1] |= ha->addr[3]; |
1001 | address[2] |= mclist->dmi_addr[4]; | 1001 | address[2] |= ha->addr[4]; |
1002 | address[3] |= mclist->dmi_addr[5]; | 1002 | address[3] |= ha->addr[5]; |
1003 | } | 1003 | } |
1004 | SET_PAGE(ti->srb_page); | 1004 | SET_PAGE(ti->srb_page); |
1005 | for (i = 0; i < sizeof(struct srb_set_funct_addr); i++) | 1005 | for (i = 0; i < sizeof(struct srb_set_funct_addr); i++) |
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 01c780f25e98..88c893100c2b 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -1266,7 +1266,7 @@ static void streamer_set_rx_mode(struct net_device *dev) | |||
1266 | netdev_priv(dev); | 1266 | netdev_priv(dev); |
1267 | __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; | 1267 | __u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio; |
1268 | __u8 options = 0; | 1268 | __u8 options = 0; |
1269 | struct dev_mc_list *dmi; | 1269 | struct netdev_hw_addr *ha; |
1270 | unsigned char dev_mc_address[5]; | 1270 | unsigned char dev_mc_address[5]; |
1271 | 1271 | ||
1272 | writel(streamer_priv->srb, streamer_mmio + LAPA); | 1272 | writel(streamer_priv->srb, streamer_mmio + LAPA); |
@@ -1302,11 +1302,11 @@ static void streamer_set_rx_mode(struct net_device *dev) | |||
1302 | writel(streamer_priv->srb,streamer_mmio+LAPA); | 1302 | writel(streamer_priv->srb,streamer_mmio+LAPA); |
1303 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; | 1303 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; |
1304 | 1304 | ||
1305 | netdev_for_each_mc_addr(dmi, dev) { | 1305 | netdev_for_each_mc_addr(ha, dev) { |
1306 | dev_mc_address[0] |= dmi->dmi_addr[2] ; | 1306 | dev_mc_address[0] |= ha->addr[2]; |
1307 | dev_mc_address[1] |= dmi->dmi_addr[3] ; | 1307 | dev_mc_address[1] |= ha->addr[3]; |
1308 | dev_mc_address[2] |= dmi->dmi_addr[4] ; | 1308 | dev_mc_address[2] |= ha->addr[4]; |
1309 | dev_mc_address[3] |= dmi->dmi_addr[5] ; | 1309 | dev_mc_address[3] |= ha->addr[5]; |
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | writew(htons(SRB_SET_FUNC_ADDRESS << 8),streamer_mmio+LAPDINC); | 1312 | writew(htons(SRB_SET_FUNC_ADDRESS << 8),streamer_mmio+LAPDINC); |
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index 3decaf4b6cf2..3d2fbe60b46e 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -1139,7 +1139,7 @@ static void olympic_set_rx_mode(struct net_device *dev) | |||
1139 | u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ; | 1139 | u8 __iomem *olympic_mmio = olympic_priv->olympic_mmio ; |
1140 | u8 options = 0; | 1140 | u8 options = 0; |
1141 | u8 __iomem *srb; | 1141 | u8 __iomem *srb; |
1142 | struct dev_mc_list *dmi; | 1142 | struct netdev_hw_addr *ha; |
1143 | unsigned char dev_mc_address[4] ; | 1143 | unsigned char dev_mc_address[4] ; |
1144 | 1144 | ||
1145 | writel(olympic_priv->srb,olympic_mmio+LAPA); | 1145 | writel(olympic_priv->srb,olympic_mmio+LAPA); |
@@ -1177,11 +1177,11 @@ static void olympic_set_rx_mode(struct net_device *dev) | |||
1177 | 1177 | ||
1178 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; | 1178 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; |
1179 | 1179 | ||
1180 | netdev_for_each_mc_addr(dmi, dev) { | 1180 | netdev_for_each_mc_addr(ha, dev) { |
1181 | dev_mc_address[0] |= dmi->dmi_addr[2] ; | 1181 | dev_mc_address[0] |= ha->addr[2]; |
1182 | dev_mc_address[1] |= dmi->dmi_addr[3] ; | 1182 | dev_mc_address[1] |= ha->addr[3]; |
1183 | dev_mc_address[2] |= dmi->dmi_addr[4] ; | 1183 | dev_mc_address[2] |= ha->addr[4]; |
1184 | dev_mc_address[3] |= dmi->dmi_addr[5] ; | 1184 | dev_mc_address[3] |= ha->addr[5]; |
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | writeb(SRB_SET_FUNC_ADDRESS,srb+0); | 1187 | writeb(SRB_SET_FUNC_ADDRESS,srb+0); |
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index b545e20d2898..9fa2c36ff904 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -1212,17 +1212,17 @@ static void tms380tr_set_multicast_list(struct net_device *dev) | |||
1212 | } | 1212 | } |
1213 | else | 1213 | else |
1214 | { | 1214 | { |
1215 | struct dev_mc_list *mclist; | 1215 | struct netdev_hw_addr *ha; |
1216 | 1216 | ||
1217 | netdev_for_each_mc_addr(mclist, dev) { | 1217 | netdev_for_each_mc_addr(ha, dev) { |
1218 | ((char *)(&tp->ocpl.FunctAddr))[0] |= | 1218 | ((char *)(&tp->ocpl.FunctAddr))[0] |= |
1219 | mclist->dmi_addr[2]; | 1219 | ha->addr[2]; |
1220 | ((char *)(&tp->ocpl.FunctAddr))[1] |= | 1220 | ((char *)(&tp->ocpl.FunctAddr))[1] |= |
1221 | mclist->dmi_addr[3]; | 1221 | ha->addr[3]; |
1222 | ((char *)(&tp->ocpl.FunctAddr))[2] |= | 1222 | ((char *)(&tp->ocpl.FunctAddr))[2] |= |
1223 | mclist->dmi_addr[4]; | 1223 | ha->addr[4]; |
1224 | ((char *)(&tp->ocpl.FunctAddr))[3] |= | 1224 | ((char *)(&tp->ocpl.FunctAddr))[3] |= |
1225 | mclist->dmi_addr[5]; | 1225 | ha->addr[5]; |
1226 | } | 1226 | } |
1227 | } | 1227 | } |
1228 | tms380tr_exec_cmd(dev, OC_SET_FUNCT_ADDR); | 1228 | tms380tr_exec_cmd(dev, OC_SET_FUNCT_ADDR); |
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 80333a4d3287..1366541c30a2 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c | |||
@@ -1186,15 +1186,15 @@ static void tsi108_set_rx_mode(struct net_device *dev) | |||
1186 | 1186 | ||
1187 | if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev)) { | 1187 | if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev)) { |
1188 | int i; | 1188 | int i; |
1189 | struct dev_mc_list *mc; | 1189 | struct netdev_hw_addr *ha; |
1190 | rxcfg |= TSI108_EC_RXCFG_MFE | TSI108_EC_RXCFG_MC_HASH; | 1190 | rxcfg |= TSI108_EC_RXCFG_MFE | TSI108_EC_RXCFG_MC_HASH; |
1191 | 1191 | ||
1192 | memset(data->mc_hash, 0, sizeof(data->mc_hash)); | 1192 | memset(data->mc_hash, 0, sizeof(data->mc_hash)); |
1193 | 1193 | ||
1194 | netdev_for_each_mc_addr(mc, dev) { | 1194 | netdev_for_each_mc_addr(ha, dev) { |
1195 | u32 hash, crc; | 1195 | u32 hash, crc; |
1196 | 1196 | ||
1197 | crc = ether_crc(6, mc->dmi_addr); | 1197 | crc = ether_crc(6, ha->addr); |
1198 | hash = crc >> 23; | 1198 | hash = crc >> 23; |
1199 | __set_bit(hash, &data->mc_hash[0]); | 1199 | __set_bit(hash, &data->mc_hash[0]); |
1200 | } | 1200 | } |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index cb429723b2c8..a68b91764627 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -670,15 +670,15 @@ static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev) | |||
670 | { | 670 | { |
671 | struct de_private *de = netdev_priv(dev); | 671 | struct de_private *de = netdev_priv(dev); |
672 | u16 hash_table[32]; | 672 | u16 hash_table[32]; |
673 | struct dev_mc_list *mclist; | 673 | struct netdev_hw_addr *ha; |
674 | int i; | 674 | int i; |
675 | u16 *eaddrs; | 675 | u16 *eaddrs; |
676 | 676 | ||
677 | memset(hash_table, 0, sizeof(hash_table)); | 677 | memset(hash_table, 0, sizeof(hash_table)); |
678 | set_bit_le(255, hash_table); /* Broadcast entry */ | 678 | set_bit_le(255, hash_table); /* Broadcast entry */ |
679 | /* This should work on big-endian machines as well. */ | 679 | /* This should work on big-endian machines as well. */ |
680 | netdev_for_each_mc_addr(mclist, dev) { | 680 | netdev_for_each_mc_addr(ha, dev) { |
681 | int index = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x1ff; | 681 | int index = ether_crc_le(ETH_ALEN, ha->addr) & 0x1ff; |
682 | 682 | ||
683 | set_bit_le(index, hash_table); | 683 | set_bit_le(index, hash_table); |
684 | } | 684 | } |
@@ -699,13 +699,13 @@ static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev) | |||
699 | static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev) | 699 | static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev) |
700 | { | 700 | { |
701 | struct de_private *de = netdev_priv(dev); | 701 | struct de_private *de = netdev_priv(dev); |
702 | struct dev_mc_list *mclist; | 702 | struct netdev_hw_addr *ha; |
703 | u16 *eaddrs; | 703 | u16 *eaddrs; |
704 | 704 | ||
705 | /* We have <= 14 addresses so we can use the wonderful | 705 | /* We have <= 14 addresses so we can use the wonderful |
706 | 16 address perfect filtering of the Tulip. */ | 706 | 16 address perfect filtering of the Tulip. */ |
707 | netdev_for_each_mc_addr(mclist, dev) { | 707 | netdev_for_each_mc_addr(ha, dev) { |
708 | eaddrs = (u16 *)mclist->dmi_addr; | 708 | eaddrs = (u16 *) ha->addr; |
709 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; | 709 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; |
710 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; | 710 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; |
711 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; | 711 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 55ade8949a68..cac4bcc83187 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -1951,7 +1951,7 @@ static void | |||
1951 | SetMulticastFilter(struct net_device *dev) | 1951 | SetMulticastFilter(struct net_device *dev) |
1952 | { | 1952 | { |
1953 | struct de4x5_private *lp = netdev_priv(dev); | 1953 | struct de4x5_private *lp = netdev_priv(dev); |
1954 | struct dev_mc_list *dmi; | 1954 | struct netdev_hw_addr *ha; |
1955 | u_long iobase = dev->base_addr; | 1955 | u_long iobase = dev->base_addr; |
1956 | int i, bit, byte; | 1956 | int i, bit, byte; |
1957 | u16 hashcode; | 1957 | u16 hashcode; |
@@ -1966,8 +1966,8 @@ SetMulticastFilter(struct net_device *dev) | |||
1966 | if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 14)) { | 1966 | if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 14)) { |
1967 | omr |= OMR_PM; /* Pass all multicasts */ | 1967 | omr |= OMR_PM; /* Pass all multicasts */ |
1968 | } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ | 1968 | } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ |
1969 | netdev_for_each_mc_addr(dmi, dev) { | 1969 | netdev_for_each_mc_addr(ha, dev) { |
1970 | addrs = dmi->dmi_addr; | 1970 | addrs = ha->addr; |
1971 | if ((*addrs & 0x01) == 1) { /* multicast address? */ | 1971 | if ((*addrs & 0x01) == 1) { /* multicast address? */ |
1972 | crc = ether_crc_le(ETH_ALEN, addrs); | 1972 | crc = ether_crc_le(ETH_ALEN, addrs); |
1973 | hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ | 1973 | hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ |
@@ -1983,8 +1983,8 @@ SetMulticastFilter(struct net_device *dev) | |||
1983 | } | 1983 | } |
1984 | } | 1984 | } |
1985 | } else { /* Perfect filtering */ | 1985 | } else { /* Perfect filtering */ |
1986 | netdev_for_each_mc_addr(dmi, dev) { | 1986 | netdev_for_each_mc_addr(ha, dev) { |
1987 | addrs = dmi->dmi_addr; | 1987 | addrs = ha->addr; |
1988 | for (i=0; i<ETH_ALEN; i++) { | 1988 | for (i=0; i<ETH_ALEN; i++) { |
1989 | *(pa + (i&1)) = *addrs++; | 1989 | *(pa + (i&1)) = *addrs++; |
1990 | if (i & 0x01) pa += 4; | 1990 | if (i & 0x01) pa += 4; |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 95b38d803e9b..a039c8ab98b2 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -1454,7 +1454,7 @@ static void update_cr6(u32 cr6_data, unsigned long ioaddr) | |||
1454 | 1454 | ||
1455 | static void dm9132_id_table(struct DEVICE *dev) | 1455 | static void dm9132_id_table(struct DEVICE *dev) |
1456 | { | 1456 | { |
1457 | struct dev_mc_list *mcptr; | 1457 | struct netdev_hw_addr *ha; |
1458 | u16 * addrptr; | 1458 | u16 * addrptr; |
1459 | unsigned long ioaddr = dev->base_addr+0xc0; /* ID Table */ | 1459 | unsigned long ioaddr = dev->base_addr+0xc0; /* ID Table */ |
1460 | u32 hash_val; | 1460 | u32 hash_val; |
@@ -1478,8 +1478,8 @@ static void dm9132_id_table(struct DEVICE *dev) | |||
1478 | hash_table[3] = 0x8000; | 1478 | hash_table[3] = 0x8000; |
1479 | 1479 | ||
1480 | /* the multicast address in Hash Table : 64 bits */ | 1480 | /* the multicast address in Hash Table : 64 bits */ |
1481 | netdev_for_each_mc_addr(mcptr, dev) { | 1481 | netdev_for_each_mc_addr(ha, dev) { |
1482 | hash_val = cal_CRC((char *) mcptr->dmi_addr, 6, 0) & 0x3f; | 1482 | hash_val = cal_CRC((char *) ha->addr, 6, 0) & 0x3f; |
1483 | hash_table[hash_val / 16] |= (u16) 1 << (hash_val % 16); | 1483 | hash_table[hash_val / 16] |= (u16) 1 << (hash_val % 16); |
1484 | } | 1484 | } |
1485 | 1485 | ||
@@ -1497,7 +1497,7 @@ static void dm9132_id_table(struct DEVICE *dev) | |||
1497 | static void send_filter_frame(struct DEVICE *dev) | 1497 | static void send_filter_frame(struct DEVICE *dev) |
1498 | { | 1498 | { |
1499 | struct dmfe_board_info *db = netdev_priv(dev); | 1499 | struct dmfe_board_info *db = netdev_priv(dev); |
1500 | struct dev_mc_list *mcptr; | 1500 | struct netdev_hw_addr *ha; |
1501 | struct tx_desc *txptr; | 1501 | struct tx_desc *txptr; |
1502 | u16 * addrptr; | 1502 | u16 * addrptr; |
1503 | u32 * suptr; | 1503 | u32 * suptr; |
@@ -1520,8 +1520,8 @@ static void send_filter_frame(struct DEVICE *dev) | |||
1520 | *suptr++ = 0xffff; | 1520 | *suptr++ = 0xffff; |
1521 | 1521 | ||
1522 | /* fit the multicast address */ | 1522 | /* fit the multicast address */ |
1523 | netdev_for_each_mc_addr(mcptr, dev) { | 1523 | netdev_for_each_mc_addr(ha, dev) { |
1524 | addrptr = (u16 *) mcptr->dmi_addr; | 1524 | addrptr = (u16 *) ha->addr; |
1525 | *suptr++ = addrptr[0]; | 1525 | *suptr++ = addrptr[0]; |
1526 | *suptr++ = addrptr[1]; | 1526 | *suptr++ = addrptr[1]; |
1527 | *suptr++ = addrptr[2]; | 1527 | *suptr++ = addrptr[2]; |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 7f544ef2f5fc..c4b7cd726b69 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -990,15 +990,15 @@ static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev) | |||
990 | { | 990 | { |
991 | struct tulip_private *tp = netdev_priv(dev); | 991 | struct tulip_private *tp = netdev_priv(dev); |
992 | u16 hash_table[32]; | 992 | u16 hash_table[32]; |
993 | struct dev_mc_list *mclist; | 993 | struct netdev_hw_addr *ha; |
994 | int i; | 994 | int i; |
995 | u16 *eaddrs; | 995 | u16 *eaddrs; |
996 | 996 | ||
997 | memset(hash_table, 0, sizeof(hash_table)); | 997 | memset(hash_table, 0, sizeof(hash_table)); |
998 | set_bit_le(255, hash_table); /* Broadcast entry */ | 998 | set_bit_le(255, hash_table); /* Broadcast entry */ |
999 | /* This should work on big-endian machines as well. */ | 999 | /* This should work on big-endian machines as well. */ |
1000 | netdev_for_each_mc_addr(mclist, dev) { | 1000 | netdev_for_each_mc_addr(ha, dev) { |
1001 | int index = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x1ff; | 1001 | int index = ether_crc_le(ETH_ALEN, ha->addr) & 0x1ff; |
1002 | 1002 | ||
1003 | set_bit_le(index, hash_table); | 1003 | set_bit_le(index, hash_table); |
1004 | } | 1004 | } |
@@ -1018,13 +1018,13 @@ static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev) | |||
1018 | static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev) | 1018 | static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev) |
1019 | { | 1019 | { |
1020 | struct tulip_private *tp = netdev_priv(dev); | 1020 | struct tulip_private *tp = netdev_priv(dev); |
1021 | struct dev_mc_list *mclist; | 1021 | struct netdev_hw_addr *ha; |
1022 | u16 *eaddrs; | 1022 | u16 *eaddrs; |
1023 | 1023 | ||
1024 | /* We have <= 14 addresses so we can use the wonderful | 1024 | /* We have <= 14 addresses so we can use the wonderful |
1025 | 16 address perfect filtering of the Tulip. */ | 1025 | 16 address perfect filtering of the Tulip. */ |
1026 | netdev_for_each_mc_addr(mclist, dev) { | 1026 | netdev_for_each_mc_addr(ha, dev) { |
1027 | eaddrs = (u16 *)mclist->dmi_addr; | 1027 | eaddrs = (u16 *) ha->addr; |
1028 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; | 1028 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; |
1029 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; | 1029 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; |
1030 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; | 1030 | *setup_frm++ = *eaddrs; *setup_frm++ = *eaddrs++; |
@@ -1061,7 +1061,7 @@ static void set_rx_mode(struct net_device *dev) | |||
1061 | } else if (tp->flags & MC_HASH_ONLY) { | 1061 | } else if (tp->flags & MC_HASH_ONLY) { |
1062 | /* Some work-alikes have only a 64-entry hash filter table. */ | 1062 | /* Some work-alikes have only a 64-entry hash filter table. */ |
1063 | /* Should verify correctness on big-endian/__powerpc__ */ | 1063 | /* Should verify correctness on big-endian/__powerpc__ */ |
1064 | struct dev_mc_list *mclist; | 1064 | struct netdev_hw_addr *ha; |
1065 | if (netdev_mc_count(dev) > 64) { | 1065 | if (netdev_mc_count(dev) > 64) { |
1066 | /* Arbitrary non-effective limit. */ | 1066 | /* Arbitrary non-effective limit. */ |
1067 | tp->csr6 |= AcceptAllMulticast; | 1067 | tp->csr6 |= AcceptAllMulticast; |
@@ -1069,18 +1069,21 @@ static void set_rx_mode(struct net_device *dev) | |||
1069 | } else { | 1069 | } else { |
1070 | u32 mc_filter[2] = {0, 0}; /* Multicast hash filter */ | 1070 | u32 mc_filter[2] = {0, 0}; /* Multicast hash filter */ |
1071 | int filterbit; | 1071 | int filterbit; |
1072 | netdev_for_each_mc_addr(mclist, dev) { | 1072 | netdev_for_each_mc_addr(ha, dev) { |
1073 | if (tp->flags & COMET_MAC_ADDR) | 1073 | if (tp->flags & COMET_MAC_ADDR) |
1074 | filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr); | 1074 | filterbit = ether_crc_le(ETH_ALEN, |
1075 | ha->addr); | ||
1075 | else | 1076 | else |
1076 | filterbit = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 1077 | filterbit = ether_crc(ETH_ALEN, |
1078 | ha->addr) >> 26; | ||
1077 | filterbit &= 0x3f; | 1079 | filterbit &= 0x3f; |
1078 | mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); | 1080 | mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); |
1079 | if (tulip_debug > 2) | 1081 | if (tulip_debug > 2) |
1080 | dev_info(&dev->dev, | 1082 | dev_info(&dev->dev, |
1081 | "Added filter for %pM %08x bit %d\n", | 1083 | "Added filter for %pM %08x bit %d\n", |
1082 | mclist->dmi_addr, | 1084 | ha->addr, |
1083 | ether_crc(ETH_ALEN, mclist->dmi_addr), filterbit); | 1085 | ether_crc(ETH_ALEN, ha->addr), |
1086 | filterbit); | ||
1084 | } | 1087 | } |
1085 | if (mc_filter[0] == tp->mc_filter[0] && | 1088 | if (mc_filter[0] == tp->mc_filter[0] && |
1086 | mc_filter[1] == tp->mc_filter[1]) | 1089 | mc_filter[1] == tp->mc_filter[1]) |
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 0ab05af237e5..b79d908fe34e 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -1392,7 +1392,7 @@ static void update_cr6(u32 cr6_data, unsigned long ioaddr) | |||
1392 | static void send_filter_frame(struct net_device *dev, int mc_cnt) | 1392 | static void send_filter_frame(struct net_device *dev, int mc_cnt) |
1393 | { | 1393 | { |
1394 | struct uli526x_board_info *db = netdev_priv(dev); | 1394 | struct uli526x_board_info *db = netdev_priv(dev); |
1395 | struct dev_mc_list *mcptr; | 1395 | struct netdev_hw_addr *ha; |
1396 | struct tx_desc *txptr; | 1396 | struct tx_desc *txptr; |
1397 | u16 * addrptr; | 1397 | u16 * addrptr; |
1398 | u32 * suptr; | 1398 | u32 * suptr; |
@@ -1415,8 +1415,8 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt) | |||
1415 | *suptr++ = 0xffff << FLT_SHIFT; | 1415 | *suptr++ = 0xffff << FLT_SHIFT; |
1416 | 1416 | ||
1417 | /* fit the multicast address */ | 1417 | /* fit the multicast address */ |
1418 | netdev_for_each_mc_addr(mcptr, dev) { | 1418 | netdev_for_each_mc_addr(ha, dev) { |
1419 | addrptr = (u16 *) mcptr->dmi_addr; | 1419 | addrptr = (u16 *) ha->addr; |
1420 | *suptr++ = addrptr[0] << FLT_SHIFT; | 1420 | *suptr++ = addrptr[0] << FLT_SHIFT; |
1421 | *suptr++ = addrptr[1] << FLT_SHIFT; | 1421 | *suptr++ = addrptr[1] << FLT_SHIFT; |
1422 | *suptr++ = addrptr[2] << FLT_SHIFT; | 1422 | *suptr++ = addrptr[2] << FLT_SHIFT; |
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 304f43866c44..3e3822c98a0d 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -1367,13 +1367,15 @@ static u32 __set_rx_mode(struct net_device *dev) | |||
1367 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 1367 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
1368 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1368 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1369 | } else { | 1369 | } else { |
1370 | struct dev_mc_list *mclist; | 1370 | struct netdev_hw_addr *ha; |
1371 | 1371 | ||
1372 | memset(mc_filter, 0, sizeof(mc_filter)); | 1372 | memset(mc_filter, 0, sizeof(mc_filter)); |
1373 | netdev_for_each_mc_addr(mclist, dev) { | 1373 | netdev_for_each_mc_addr(ha, dev) { |
1374 | int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; | 1374 | int filbit; |
1375 | filterbit &= 0x3f; | 1375 | |
1376 | mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); | 1376 | filbit = (ether_crc(ETH_ALEN, ha->addr) >> 26) ^ 0x3F; |
1377 | filbit &= 0x3f; | ||
1378 | mc_filter[filbit >> 5] |= 1 << (filbit & 31); | ||
1377 | } | 1379 | } |
1378 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1380 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1379 | } | 1381 | } |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index cd24e5f2b2a2..3053f85aa066 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -921,11 +921,11 @@ typhoon_set_rx_mode(struct net_device *dev) | |||
921 | /* Too many to match, or accept all multicasts. */ | 921 | /* Too many to match, or accept all multicasts. */ |
922 | filter |= TYPHOON_RX_FILTER_ALL_MCAST; | 922 | filter |= TYPHOON_RX_FILTER_ALL_MCAST; |
923 | } else if (!netdev_mc_empty(dev)) { | 923 | } else if (!netdev_mc_empty(dev)) { |
924 | struct dev_mc_list *mclist; | 924 | struct netdev_hw_addr *ha; |
925 | 925 | ||
926 | memset(mc_filter, 0, sizeof(mc_filter)); | 926 | memset(mc_filter, 0, sizeof(mc_filter)); |
927 | netdev_for_each_mc_addr(mclist, dev) { | 927 | netdev_for_each_mc_addr(ha, dev) { |
928 | int bit = ether_crc(ETH_ALEN, mclist->dmi_addr) & 0x3f; | 928 | int bit = ether_crc(ETH_ALEN, ha->addr) & 0x3f; |
929 | mc_filter[bit >> 5] |= 1 << (bit & 0x1f); | 929 | mc_filter[bit >> 5] |= 1 << (bit & 0x1f); |
930 | } | 930 | } |
931 | 931 | ||
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 75743a76bbe8..081f76bff341 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -1999,7 +1999,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) | |||
1999 | static void ucc_geth_set_multi(struct net_device *dev) | 1999 | static void ucc_geth_set_multi(struct net_device *dev) |
2000 | { | 2000 | { |
2001 | struct ucc_geth_private *ugeth; | 2001 | struct ucc_geth_private *ugeth; |
2002 | struct dev_mc_list *dmi; | 2002 | struct netdev_hw_addr *ha; |
2003 | struct ucc_fast __iomem *uf_regs; | 2003 | struct ucc_fast __iomem *uf_regs; |
2004 | struct ucc_geth_82xx_address_filtering_pram __iomem *p_82xx_addr_filt; | 2004 | struct ucc_geth_82xx_address_filtering_pram __iomem *p_82xx_addr_filt; |
2005 | 2005 | ||
@@ -2028,16 +2028,16 @@ static void ucc_geth_set_multi(struct net_device *dev) | |||
2028 | out_be32(&p_82xx_addr_filt->gaddr_h, 0x0); | 2028 | out_be32(&p_82xx_addr_filt->gaddr_h, 0x0); |
2029 | out_be32(&p_82xx_addr_filt->gaddr_l, 0x0); | 2029 | out_be32(&p_82xx_addr_filt->gaddr_l, 0x0); |
2030 | 2030 | ||
2031 | netdev_for_each_mc_addr(dmi, dev) { | 2031 | netdev_for_each_mc_addr(ha, dev) { |
2032 | /* Only support group multicast for now. | 2032 | /* Only support group multicast for now. |
2033 | */ | 2033 | */ |
2034 | if (!(dmi->dmi_addr[0] & 1)) | 2034 | if (!(ha->addr[0] & 1)) |
2035 | continue; | 2035 | continue; |
2036 | 2036 | ||
2037 | /* Ask CPM to run CRC and set bit in | 2037 | /* Ask CPM to run CRC and set bit in |
2038 | * filter mask. | 2038 | * filter mask. |
2039 | */ | 2039 | */ |
2040 | hw_add_addr_in_hash(ugeth, dmi->dmi_addr); | 2040 | hw_add_addr_in_hash(ugeth, ha->addr); |
2041 | } | 2041 | } |
2042 | } | 2042 | } |
2043 | } | 2043 | } |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 9e05639435f2..763364f0972e 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -557,16 +557,14 @@ static void asix_set_multicast(struct net_device *net) | |||
557 | * for our 8 byte filter buffer | 557 | * for our 8 byte filter buffer |
558 | * to avoid allocating memory that | 558 | * to avoid allocating memory that |
559 | * is tricky to free later */ | 559 | * is tricky to free later */ |
560 | struct dev_mc_list *mc_list; | 560 | struct netdev_hw_addr *ha; |
561 | u32 crc_bits; | 561 | u32 crc_bits; |
562 | 562 | ||
563 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); | 563 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); |
564 | 564 | ||
565 | /* Build the multicast hash filter. */ | 565 | /* Build the multicast hash filter. */ |
566 | netdev_for_each_mc_addr(mc_list, net) { | 566 | netdev_for_each_mc_addr(ha, net) { |
567 | crc_bits = | 567 | crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; |
568 | ether_crc(ETH_ALEN, | ||
569 | mc_list->dmi_addr) >> 26; | ||
570 | data->multi_filter[crc_bits >> 3] |= | 568 | data->multi_filter[crc_bits >> 3] |= |
571 | 1 << (crc_bits & 7); | 569 | 1 << (crc_bits & 7); |
572 | } | 570 | } |
@@ -793,16 +791,14 @@ static void ax88172_set_multicast(struct net_device *net) | |||
793 | * for our 8 byte filter buffer | 791 | * for our 8 byte filter buffer |
794 | * to avoid allocating memory that | 792 | * to avoid allocating memory that |
795 | * is tricky to free later */ | 793 | * is tricky to free later */ |
796 | struct dev_mc_list *mc_list; | 794 | struct netdev_hw_addr *ha; |
797 | u32 crc_bits; | 795 | u32 crc_bits; |
798 | 796 | ||
799 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); | 797 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); |
800 | 798 | ||
801 | /* Build the multicast hash filter. */ | 799 | /* Build the multicast hash filter. */ |
802 | netdev_for_each_mc_addr(mc_list, net) { | 800 | netdev_for_each_mc_addr(ha, net) { |
803 | crc_bits = | 801 | crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; |
804 | ether_crc(ETH_ALEN, | ||
805 | mc_list->dmi_addr) >> 26; | ||
806 | data->multi_filter[crc_bits >> 3] |= | 802 | data->multi_filter[crc_bits >> 3] |= |
807 | 1 << (crc_bits & 7); | 803 | 1 << (crc_bits & 7); |
808 | } | 804 | } |
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 96f1ebe0d348..0c48ff97f47c 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -629,7 +629,7 @@ static void catc_multicast(unsigned char *addr, u8 *multicast) | |||
629 | static void catc_set_multicast_list(struct net_device *netdev) | 629 | static void catc_set_multicast_list(struct net_device *netdev) |
630 | { | 630 | { |
631 | struct catc *catc = netdev_priv(netdev); | 631 | struct catc *catc = netdev_priv(netdev); |
632 | struct dev_mc_list *mc; | 632 | struct netdev_hw_addr *ha; |
633 | u8 broadcast[6]; | 633 | u8 broadcast[6]; |
634 | u8 rx = RxEnable | RxPolarity | RxMultiCast; | 634 | u8 rx = RxEnable | RxPolarity | RxMultiCast; |
635 | 635 | ||
@@ -647,8 +647,8 @@ static void catc_set_multicast_list(struct net_device *netdev) | |||
647 | if (netdev->flags & IFF_ALLMULTI) { | 647 | if (netdev->flags & IFF_ALLMULTI) { |
648 | memset(catc->multicast, 0xff, 64); | 648 | memset(catc->multicast, 0xff, 64); |
649 | } else { | 649 | } else { |
650 | netdev_for_each_mc_addr(mc, netdev) { | 650 | netdev_for_each_mc_addr(ha, netdev) { |
651 | u32 crc = ether_crc_le(6, mc->dmi_addr); | 651 | u32 crc = ether_crc_le(6, ha->addr); |
652 | if (!catc->is_f5u011) { | 652 | if (!catc->is_f5u011) { |
653 | catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7); | 653 | catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7); |
654 | } else { | 654 | } else { |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 269339769f47..4eb1fb31ff0b 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -386,10 +386,10 @@ static void dm9601_set_multicast(struct net_device *net) | |||
386 | netdev_mc_count(net) > DM_MAX_MCAST) { | 386 | netdev_mc_count(net) > DM_MAX_MCAST) { |
387 | rx_ctl |= 0x04; | 387 | rx_ctl |= 0x04; |
388 | } else if (!netdev_mc_empty(net)) { | 388 | } else if (!netdev_mc_empty(net)) { |
389 | struct dev_mc_list *mc_list; | 389 | struct netdev_hw_addr *ha; |
390 | 390 | ||
391 | netdev_for_each_mc_addr(mc_list, net) { | 391 | netdev_for_each_mc_addr(ha, net) { |
392 | u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; | 392 | u32 crc = ether_crc(ETH_ALEN, ha->addr) >> 26; |
393 | hashes[crc >> 3] |= 1 << (crc & 0x7); | 393 | hashes[crc >> 3] |= 1 << (crc & 0x7); |
394 | } | 394 | } |
395 | } | 395 | } |
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index 70978219e98a..0dc92c8ba4b2 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c | |||
@@ -452,12 +452,12 @@ static void mcs7830_data_set_multicast(struct net_device *net) | |||
452 | * for our 8 byte filter buffer | 452 | * for our 8 byte filter buffer |
453 | * to avoid allocating memory that | 453 | * to avoid allocating memory that |
454 | * is tricky to free later */ | 454 | * is tricky to free later */ |
455 | struct dev_mc_list *mc_list; | 455 | struct netdev_hw_addr *ha; |
456 | u32 crc_bits; | 456 | u32 crc_bits; |
457 | 457 | ||
458 | /* Build the multicast hash filter. */ | 458 | /* Build the multicast hash filter. */ |
459 | netdev_for_each_mc_addr(mc_list, net) { | 459 | netdev_for_each_mc_addr(ha, net) { |
460 | crc_bits = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; | 460 | crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; |
461 | data->multi_filter[crc_bits >> 3] |= 1 << (crc_bits & 7); | 461 | data->multi_filter[crc_bits >> 3] |= 1 << (crc_bits & 7); |
462 | } | 462 | } |
463 | } | 463 | } |
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index 300e3e764fa2..b8b00d06ea79 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c | |||
@@ -444,14 +444,14 @@ static void smsc75xx_set_multicast(struct net_device *netdev) | |||
444 | netif_dbg(dev, drv, dev->net, "receive all multicast enabled"); | 444 | netif_dbg(dev, drv, dev->net, "receive all multicast enabled"); |
445 | pdata->rfe_ctl |= RFE_CTL_AM | RFE_CTL_DPF; | 445 | pdata->rfe_ctl |= RFE_CTL_AM | RFE_CTL_DPF; |
446 | } else if (!netdev_mc_empty(dev->net)) { | 446 | } else if (!netdev_mc_empty(dev->net)) { |
447 | struct dev_mc_list *mc_list; | 447 | struct netdev_hw_addr *ha; |
448 | 448 | ||
449 | netif_dbg(dev, drv, dev->net, "receive multicast hash filter"); | 449 | netif_dbg(dev, drv, dev->net, "receive multicast hash filter"); |
450 | 450 | ||
451 | pdata->rfe_ctl |= RFE_CTL_MHF | RFE_CTL_DPF; | 451 | pdata->rfe_ctl |= RFE_CTL_MHF | RFE_CTL_DPF; |
452 | 452 | ||
453 | netdev_for_each_mc_addr(mc_list, netdev) { | 453 | netdev_for_each_mc_addr(ha, netdev) { |
454 | u32 bitnum = smsc75xx_hash(mc_list->dmi_addr); | 454 | u32 bitnum = smsc75xx_hash(ha->addr); |
455 | pdata->multicast_hash_table[bitnum / 32] |= | 455 | pdata->multicast_hash_table[bitnum / 32] |= |
456 | (1 << (bitnum % 32)); | 456 | (1 << (bitnum % 32)); |
457 | } | 457 | } |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 73f9a31cf94d..ccd55ca3a06a 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -384,13 +384,13 @@ static void smsc95xx_set_multicast(struct net_device *netdev) | |||
384 | pdata->mac_cr |= MAC_CR_MCPAS_; | 384 | pdata->mac_cr |= MAC_CR_MCPAS_; |
385 | pdata->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_HPFILT_); | 385 | pdata->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_HPFILT_); |
386 | } else if (!netdev_mc_empty(dev->net)) { | 386 | } else if (!netdev_mc_empty(dev->net)) { |
387 | struct dev_mc_list *mc_list; | 387 | struct netdev_hw_addr *ha; |
388 | 388 | ||
389 | pdata->mac_cr |= MAC_CR_HPFILT_; | 389 | pdata->mac_cr |= MAC_CR_HPFILT_; |
390 | pdata->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_); | 390 | pdata->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_); |
391 | 391 | ||
392 | netdev_for_each_mc_addr(mc_list, netdev) { | 392 | netdev_for_each_mc_addr(ha, netdev) { |
393 | u32 bitnum = smsc95xx_hash(mc_list->dmi_addr); | 393 | u32 bitnum = smsc95xx_hash(ha->addr); |
394 | u32 mask = 0x01 << (bitnum & 0x1F); | 394 | u32 mask = 0x01 << (bitnum & 0x1F); |
395 | if (bitnum & 0x20) | 395 | if (bitnum & 0x20) |
396 | hash_hi |= mask; | 396 | hash_hi |= mask; |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 50f881aa3939..d9133c62a2f5 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -1704,11 +1704,11 @@ static void rhine_set_rx_mode(struct net_device *dev) | |||
1704 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); | 1704 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); |
1705 | rx_mode = 0x0C; | 1705 | rx_mode = 0x0C; |
1706 | } else { | 1706 | } else { |
1707 | struct dev_mc_list *mclist; | 1707 | struct netdev_hw_addr *ha; |
1708 | 1708 | ||
1709 | memset(mc_filter, 0, sizeof(mc_filter)); | 1709 | memset(mc_filter, 0, sizeof(mc_filter)); |
1710 | netdev_for_each_mc_addr(mclist, dev) { | 1710 | netdev_for_each_mc_addr(ha, dev) { |
1711 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 1711 | int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; |
1712 | 1712 | ||
1713 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 1713 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
1714 | } | 1714 | } |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 3a486f3bad3d..91f3b841288c 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -1126,7 +1126,7 @@ static void velocity_set_multi(struct net_device *dev) | |||
1126 | struct mac_regs __iomem *regs = vptr->mac_regs; | 1126 | struct mac_regs __iomem *regs = vptr->mac_regs; |
1127 | u8 rx_mode; | 1127 | u8 rx_mode; |
1128 | int i; | 1128 | int i; |
1129 | struct dev_mc_list *mclist; | 1129 | struct netdev_hw_addr *ha; |
1130 | 1130 | ||
1131 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ | 1131 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ |
1132 | writel(0xffffffff, ®s->MARCAM[0]); | 1132 | writel(0xffffffff, ®s->MARCAM[0]); |
@@ -1142,8 +1142,8 @@ static void velocity_set_multi(struct net_device *dev) | |||
1142 | mac_get_cam_mask(regs, vptr->mCAMmask); | 1142 | mac_get_cam_mask(regs, vptr->mCAMmask); |
1143 | 1143 | ||
1144 | i = 0; | 1144 | i = 0; |
1145 | netdev_for_each_mc_addr(mclist, dev) { | 1145 | netdev_for_each_mc_addr(ha, dev) { |
1146 | mac_set_cam(regs, i + offset, mclist->dmi_addr); | 1146 | mac_set_cam(regs, i + offset, ha->addr); |
1147 | vptr->mCAMmask[(offset + i) / 8] |= 1 << ((offset + i) & 7); | 1147 | vptr->mCAMmask[(offset + i) / 8] |= 1 << ((offset + i) & 7); |
1148 | i++; | 1148 | i++; |
1149 | } | 1149 | } |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3f5be35dea25..ecec9a8527f3 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -721,7 +721,6 @@ static void virtnet_set_rx_mode(struct net_device *dev) | |||
721 | struct scatterlist sg[2]; | 721 | struct scatterlist sg[2]; |
722 | u8 promisc, allmulti; | 722 | u8 promisc, allmulti; |
723 | struct virtio_net_ctrl_mac *mac_data; | 723 | struct virtio_net_ctrl_mac *mac_data; |
724 | struct dev_addr_list *addr; | ||
725 | struct netdev_hw_addr *ha; | 724 | struct netdev_hw_addr *ha; |
726 | int uc_count; | 725 | int uc_count; |
727 | int mc_count; | 726 | int mc_count; |
@@ -778,8 +777,8 @@ static void virtnet_set_rx_mode(struct net_device *dev) | |||
778 | 777 | ||
779 | mac_data->entries = mc_count; | 778 | mac_data->entries = mc_count; |
780 | i = 0; | 779 | i = 0; |
781 | netdev_for_each_mc_addr(addr, dev) | 780 | netdev_for_each_mc_addr(ha, dev) |
782 | memcpy(&mac_data->macs[i++][0], addr->da_addr, ETH_ALEN); | 781 | memcpy(&mac_data->macs[i++][0], ha->addr, ETH_ALEN); |
783 | 782 | ||
784 | sg_set_buf(&sg[1], mac_data, | 783 | sg_set_buf(&sg[1], mac_data, |
785 | sizeof(mac_data->entries) + (mc_count * ETH_ALEN)); | 784 | sizeof(mac_data->entries) + (mc_count * ETH_ALEN)); |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index cff3485d9673..58dfa367bf86 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -1675,11 +1675,11 @@ vmxnet3_copy_mc(struct net_device *netdev) | |||
1675 | /* We may be called with BH disabled */ | 1675 | /* We may be called with BH disabled */ |
1676 | buf = kmalloc(sz, GFP_ATOMIC); | 1676 | buf = kmalloc(sz, GFP_ATOMIC); |
1677 | if (buf) { | 1677 | if (buf) { |
1678 | struct dev_mc_list *mc; | 1678 | struct netdev_hw_addr *ha; |
1679 | int i = 0; | 1679 | int i = 0; |
1680 | 1680 | ||
1681 | netdev_for_each_mc_addr(mc, netdev) | 1681 | netdev_for_each_mc_addr(ha, netdev) |
1682 | memcpy(buf + i++ * ETH_ALEN, mc->dmi_addr, | 1682 | memcpy(buf + i++ * ETH_ALEN, ha->addr, |
1683 | ETH_ALEN); | 1683 | ETH_ALEN); |
1684 | } | 1684 | } |
1685 | } | 1685 | } |
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index e5f2d3ee0df3..37836a10d093 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -1117,7 +1117,7 @@ vxge_tx_term(void *dtrh, enum vxge_hw_txdl_state state, void *userdata) | |||
1117 | */ | 1117 | */ |
1118 | static void vxge_set_multicast(struct net_device *dev) | 1118 | static void vxge_set_multicast(struct net_device *dev) |
1119 | { | 1119 | { |
1120 | struct dev_mc_list *mclist; | 1120 | struct netdev_hw_addr *ha; |
1121 | struct vxgedev *vdev; | 1121 | struct vxgedev *vdev; |
1122 | int i, mcast_cnt = 0; | 1122 | int i, mcast_cnt = 0; |
1123 | struct __vxge_hw_device *hldev; | 1123 | struct __vxge_hw_device *hldev; |
@@ -1217,8 +1217,8 @@ static void vxge_set_multicast(struct net_device *dev) | |||
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | /* Add new ones */ | 1219 | /* Add new ones */ |
1220 | netdev_for_each_mc_addr(mclist, dev) { | 1220 | netdev_for_each_mc_addr(ha, dev) { |
1221 | memcpy(mac_info.macaddr, mclist->dmi_addr, ETH_ALEN); | 1221 | memcpy(mac_info.macaddr, ha->addr, ETH_ALEN); |
1222 | for (vpath_idx = 0; vpath_idx < vdev->no_of_vpath; | 1222 | for (vpath_idx = 0; vpath_idx < vdev->no_of_vpath; |
1223 | vpath_idx++) { | 1223 | vpath_idx++) { |
1224 | mac_info.vpath_no = vpath_idx; | 1224 | mac_info.vpath_no = vpath_idx; |
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c index 547912e6843f..2277998b7264 100644 --- a/drivers/net/wireless/adm8211.c +++ b/drivers/net/wireless/adm8211.c | |||
@@ -1317,21 +1317,19 @@ static void adm8211_bss_info_changed(struct ieee80211_hw *dev, | |||
1317 | } | 1317 | } |
1318 | 1318 | ||
1319 | static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw, | 1319 | static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw, |
1320 | int mc_count, struct dev_addr_list *mclist) | 1320 | struct netdev_hw_addr_list *mc_list) |
1321 | { | 1321 | { |
1322 | unsigned int bit_nr, i; | 1322 | unsigned int bit_nr; |
1323 | u32 mc_filter[2]; | 1323 | u32 mc_filter[2]; |
1324 | struct netdev_hw_addr *ha; | ||
1324 | 1325 | ||
1325 | mc_filter[1] = mc_filter[0] = 0; | 1326 | mc_filter[1] = mc_filter[0] = 0; |
1326 | 1327 | ||
1327 | for (i = 0; i < mc_count; i++) { | 1328 | netdev_hw_addr_list_for_each(ha, mc_list) { |
1328 | if (!mclist) | 1329 | bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; |
1329 | break; | ||
1330 | bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | ||
1331 | 1330 | ||
1332 | bit_nr &= 0x3F; | 1331 | bit_nr &= 0x3F; |
1333 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 1332 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |
1334 | mclist = mclist->next; | ||
1335 | } | 1333 | } |
1336 | 1334 | ||
1337 | return mc_filter[0] | ((u64)(mc_filter[1]) << 32); | 1335 | return mc_filter[0] | ((u64)(mc_filter[1]) << 32); |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 257c734733d1..b43d4b006d7e 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -2045,21 +2045,17 @@ out: | |||
2045 | return err; | 2045 | return err; |
2046 | } | 2046 | } |
2047 | 2047 | ||
2048 | static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | 2048 | static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, |
2049 | struct dev_addr_list *mclist) | 2049 | struct netdev_hw_addr_list *mc_list) |
2050 | { | 2050 | { |
2051 | u64 mchash; | 2051 | u64 mchash; |
2052 | int i; | 2052 | struct netdev_hw_addr *ha; |
2053 | 2053 | ||
2054 | /* always get broadcast frames */ | 2054 | /* always get broadcast frames */ |
2055 | mchash = 1ULL << (0xff >> 2); | 2055 | mchash = 1ULL << (0xff >> 2); |
2056 | 2056 | ||
2057 | for (i = 0; i < mc_count; i++) { | 2057 | netdev_hw_addr_list_for_each(ha, mc_list) |
2058 | if (WARN_ON(!mclist)) | 2058 | mchash |= 1ULL << (ha->addr[5] >> 2); |
2059 | break; | ||
2060 | mchash |= 1ULL << (mclist->dmi_addr[5] >> 2); | ||
2061 | mclist = mclist->next; | ||
2062 | } | ||
2063 | 2059 | ||
2064 | return mchash; | 2060 | return mchash; |
2065 | } | 2061 | } |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index b142a78ed1e5..53a2340f52bc 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -230,7 +230,7 @@ static void ath5k_remove_interface(struct ieee80211_hw *hw, | |||
230 | struct ieee80211_vif *vif); | 230 | struct ieee80211_vif *vif); |
231 | static int ath5k_config(struct ieee80211_hw *hw, u32 changed); | 231 | static int ath5k_config(struct ieee80211_hw *hw, u32 changed); |
232 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | 232 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, |
233 | int mc_count, struct dev_addr_list *mc_list); | 233 | struct netdev_hw_addr_list *mc_list); |
234 | static void ath5k_configure_filter(struct ieee80211_hw *hw, | 234 | static void ath5k_configure_filter(struct ieee80211_hw *hw, |
235 | unsigned int changed_flags, | 235 | unsigned int changed_flags, |
236 | unsigned int *new_flags, | 236 | unsigned int *new_flags, |
@@ -2999,22 +2999,20 @@ unlock: | |||
2999 | } | 2999 | } |
3000 | 3000 | ||
3001 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | 3001 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, |
3002 | int mc_count, struct dev_addr_list *mclist) | 3002 | struct netdev_hw_addr_list *mc_list) |
3003 | { | 3003 | { |
3004 | u32 mfilt[2], val; | 3004 | u32 mfilt[2], val; |
3005 | int i; | ||
3006 | u8 pos; | 3005 | u8 pos; |
3006 | struct netdev_hw_addr *ha; | ||
3007 | 3007 | ||
3008 | mfilt[0] = 0; | 3008 | mfilt[0] = 0; |
3009 | mfilt[1] = 1; | 3009 | mfilt[1] = 1; |
3010 | 3010 | ||
3011 | for (i = 0; i < mc_count; i++) { | 3011 | netdev_hw_addr_list_for_each(ha, mc_list) { |
3012 | if (!mclist) | ||
3013 | break; | ||
3014 | /* calculate XOR of eight 6-bit values */ | 3012 | /* calculate XOR of eight 6-bit values */ |
3015 | val = get_unaligned_le32(mclist->dmi_addr + 0); | 3013 | val = get_unaligned_le32(ha->addr + 0); |
3016 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | 3014 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; |
3017 | val = get_unaligned_le32(mclist->dmi_addr + 3); | 3015 | val = get_unaligned_le32(ha->addr + 3); |
3018 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | 3016 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; |
3019 | pos &= 0x3f; | 3017 | pos &= 0x3f; |
3020 | mfilt[pos / 32] |= (1 << (pos % 32)); | 3018 | mfilt[pos / 32] |= (1 << (pos % 32)); |
@@ -3022,8 +3020,7 @@ static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | |||
3022 | * but not sure, needs testing, if we do use this we'd | 3020 | * but not sure, needs testing, if we do use this we'd |
3023 | * neet to inform below to not reset the mcast */ | 3021 | * neet to inform below to not reset the mcast */ |
3024 | /* ath5k_hw_set_mcast_filterindex(ah, | 3022 | /* ath5k_hw_set_mcast_filterindex(ah, |
3025 | * mclist->dmi_addr[5]); */ | 3023 | * ha->addr[5]); */ |
3026 | mclist = mclist->next; | ||
3027 | } | 3024 | } |
3028 | 3025 | ||
3029 | return ((u64)(mfilt[1]) << 32) | mfilt[0]; | 3026 | return ((u64)(mfilt[1]) << 32) | mfilt[0]; |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 3c889f43d909..ff7b0d0cca56 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -318,7 +318,7 @@ static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd, | |||
318 | struct net_device *dev, int nr_addrs) | 318 | struct net_device *dev, int nr_addrs) |
319 | { | 319 | { |
320 | int i = nr_addrs; | 320 | int i = nr_addrs; |
321 | struct dev_mc_list *mc_list; | 321 | struct netdev_hw_addr *ha; |
322 | int cnt; | 322 | int cnt; |
323 | 323 | ||
324 | if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST)) | 324 | if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST)) |
@@ -326,19 +326,19 @@ static int lbs_add_mcast_addrs(struct cmd_ds_mac_multicast_adr *cmd, | |||
326 | 326 | ||
327 | netif_addr_lock_bh(dev); | 327 | netif_addr_lock_bh(dev); |
328 | cnt = netdev_mc_count(dev); | 328 | cnt = netdev_mc_count(dev); |
329 | netdev_for_each_mc_addr(mc_list, dev) { | 329 | netdev_for_each_mc_addr(ha, dev) { |
330 | if (mac_in_list(cmd->maclist, nr_addrs, mc_list->dmi_addr)) { | 330 | if (mac_in_list(cmd->maclist, nr_addrs, ha->addr)) { |
331 | lbs_deb_net("mcast address %s:%pM skipped\n", dev->name, | 331 | lbs_deb_net("mcast address %s:%pM skipped\n", dev->name, |
332 | mc_list->dmi_addr); | 332 | ha->addr); |
333 | cnt--; | 333 | cnt--; |
334 | continue; | 334 | continue; |
335 | } | 335 | } |
336 | 336 | ||
337 | if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE) | 337 | if (i == MRVDRV_MAX_MULTICAST_LIST_SIZE) |
338 | break; | 338 | break; |
339 | memcpy(&cmd->maclist[6*i], mc_list->dmi_addr, ETH_ALEN); | 339 | memcpy(&cmd->maclist[6*i], ha->addr, ETH_ALEN); |
340 | lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name, | 340 | lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name, |
341 | mc_list->dmi_addr); | 341 | ha->addr); |
342 | i++; | 342 | i++; |
343 | cnt--; | 343 | cnt--; |
344 | } | 344 | } |
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c index 6ab30033c26c..c20eef6b95c2 100644 --- a/drivers/net/wireless/libertas_tf/main.c +++ b/drivers/net/wireless/libertas_tf/main.c | |||
@@ -367,22 +367,20 @@ static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) | |||
367 | } | 367 | } |
368 | 368 | ||
369 | static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, | 369 | static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, |
370 | int mc_count, struct dev_addr_list *mclist) | 370 | struct netdev_hw_addr_list *mc_list) |
371 | { | 371 | { |
372 | struct lbtf_private *priv = hw->priv; | 372 | struct lbtf_private *priv = hw->priv; |
373 | int i; | 373 | int i; |
374 | struct netdev_hw_addr *ha; | ||
375 | int mc_count = netdev_hw_addr_list_count(mc_list); | ||
374 | 376 | ||
375 | if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) | 377 | if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) |
376 | return mc_count; | 378 | return mc_count; |
377 | 379 | ||
378 | priv->nr_of_multicastmacaddr = mc_count; | 380 | priv->nr_of_multicastmacaddr = mc_count; |
379 | for (i = 0; i < mc_count; i++) { | 381 | i = 0; |
380 | if (!mclist) | 382 | netdev_hw_addr_list_for_each(ha, mc_list) |
381 | break; | 383 | memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN); |
382 | memcpy(&priv->multicastlist[i], mclist->da_addr, | ||
383 | ETH_ALEN); | ||
384 | mclist = mclist->next; | ||
385 | } | ||
386 | 384 | ||
387 | return mc_count; | 385 | return mc_count; |
388 | } | 386 | } |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index ac65e13eb0de..6599fd15e675 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -1938,11 +1938,15 @@ struct mwl8k_cmd_mac_multicast_adr { | |||
1938 | 1938 | ||
1939 | static struct mwl8k_cmd_pkt * | 1939 | static struct mwl8k_cmd_pkt * |
1940 | __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, | 1940 | __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, |
1941 | int mc_count, struct dev_addr_list *mclist) | 1941 | struct netdev_hw_addr_list *mc_list) |
1942 | { | 1942 | { |
1943 | struct mwl8k_priv *priv = hw->priv; | 1943 | struct mwl8k_priv *priv = hw->priv; |
1944 | struct mwl8k_cmd_mac_multicast_adr *cmd; | 1944 | struct mwl8k_cmd_mac_multicast_adr *cmd; |
1945 | int size; | 1945 | int size; |
1946 | int mc_count = 0; | ||
1947 | |||
1948 | if (mc_list) | ||
1949 | mc_count = netdev_hw_addr_list_count(mc_list); | ||
1946 | 1950 | ||
1947 | if (allmulti || mc_count > priv->num_mcaddrs) { | 1951 | if (allmulti || mc_count > priv->num_mcaddrs) { |
1948 | allmulti = 1; | 1952 | allmulti = 1; |
@@ -1963,17 +1967,13 @@ __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti, | |||
1963 | if (allmulti) { | 1967 | if (allmulti) { |
1964 | cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST); | 1968 | cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST); |
1965 | } else if (mc_count) { | 1969 | } else if (mc_count) { |
1966 | int i; | 1970 | struct netdev_hw_addr *ha; |
1971 | int i = 0; | ||
1967 | 1972 | ||
1968 | cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); | 1973 | cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_MULTICAST); |
1969 | cmd->numaddr = cpu_to_le16(mc_count); | 1974 | cmd->numaddr = cpu_to_le16(mc_count); |
1970 | for (i = 0; i < mc_count && mclist; i++) { | 1975 | netdev_hw_addr_list_for_each(ha, mc_list) { |
1971 | if (mclist->da_addrlen != ETH_ALEN) { | 1976 | memcpy(cmd->addr[i], ha->addr, ETH_ALEN); |
1972 | kfree(cmd); | ||
1973 | return NULL; | ||
1974 | } | ||
1975 | memcpy(cmd->addr[i], mclist->da_addr, ETH_ALEN); | ||
1976 | mclist = mclist->next; | ||
1977 | } | 1977 | } |
1978 | } | 1978 | } |
1979 | 1979 | ||
@@ -3552,7 +3552,7 @@ mwl8k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
3552 | } | 3552 | } |
3553 | 3553 | ||
3554 | static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, | 3554 | static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, |
3555 | int mc_count, struct dev_addr_list *mclist) | 3555 | struct netdev_hw_addr_list *mc_list) |
3556 | { | 3556 | { |
3557 | struct mwl8k_cmd_pkt *cmd; | 3557 | struct mwl8k_cmd_pkt *cmd; |
3558 | 3558 | ||
@@ -3563,7 +3563,7 @@ static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw, | |||
3563 | * we'll end up throwing this packet away and creating a new | 3563 | * we'll end up throwing this packet away and creating a new |
3564 | * one in mwl8k_configure_filter(). | 3564 | * one in mwl8k_configure_filter(). |
3565 | */ | 3565 | */ |
3566 | cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_count, mclist); | 3566 | cmd = __mwl8k_cmd_mac_multicast_adr(hw, 0, mc_list); |
3567 | 3567 | ||
3568 | return (unsigned long)cmd; | 3568 | return (unsigned long)cmd; |
3569 | } | 3569 | } |
@@ -3686,7 +3686,7 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw, | |||
3686 | */ | 3686 | */ |
3687 | if (*total_flags & FIF_ALLMULTI) { | 3687 | if (*total_flags & FIF_ALLMULTI) { |
3688 | kfree(cmd); | 3688 | kfree(cmd); |
3689 | cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, 0, NULL); | 3689 | cmd = __mwl8k_cmd_mac_multicast_adr(hw, 1, NULL); |
3690 | } | 3690 | } |
3691 | 3691 | ||
3692 | if (cmd != NULL) { | 3692 | if (cmd != NULL) { |
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index 883b8f868626..9f657afaa3e5 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c | |||
@@ -1056,14 +1056,14 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv, | |||
1056 | * group address if either we want to multicast, or if we were | 1056 | * group address if either we want to multicast, or if we were |
1057 | * multicasting and want to stop */ | 1057 | * multicasting and want to stop */ |
1058 | if (!promisc && (mc_count || priv->mc_count)) { | 1058 | if (!promisc && (mc_count || priv->mc_count)) { |
1059 | struct dev_mc_list *p; | 1059 | struct netdev_hw_addr *ha; |
1060 | struct hermes_multicast mclist; | 1060 | struct hermes_multicast mclist; |
1061 | int i = 0; | 1061 | int i = 0; |
1062 | 1062 | ||
1063 | netdev_for_each_mc_addr(p, dev) { | 1063 | netdev_for_each_mc_addr(ha, dev) { |
1064 | if (i == mc_count) | 1064 | if (i == mc_count) |
1065 | break; | 1065 | break; |
1066 | memcpy(mclist.addr[i++], p->dmi_addr, ETH_ALEN); | 1066 | memcpy(mclist.addr[i++], ha->addr, ETH_ALEN); |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | err = hermes_write_ltv(hw, USER_BAP, | 1069 | err = hermes_write_ltv(hw, USER_BAP, |
diff --git a/drivers/net/wireless/orinoco/hw.h b/drivers/net/wireless/orinoco/hw.h index 9799a1d14a63..97af71e79950 100644 --- a/drivers/net/wireless/orinoco/hw.h +++ b/drivers/net/wireless/orinoco/hw.h | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | /* Forward declarations */ | 23 | /* Forward declarations */ |
24 | struct orinoco_private; | 24 | struct orinoco_private; |
25 | struct dev_addr_list; | ||
26 | 25 | ||
27 | int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name, | 26 | int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name, |
28 | size_t fw_name_len, u32 *hw_ver); | 27 | size_t fw_name_len, u32 *hw_ver); |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 4f5bdb528ef7..54680a3a5acb 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -1875,17 +1875,17 @@ static void ray_update_multi_list(struct net_device *dev, int all) | |||
1875 | writeb(0xff, &pccs->var); | 1875 | writeb(0xff, &pccs->var); |
1876 | local->num_multi = 0xff; | 1876 | local->num_multi = 0xff; |
1877 | } else { | 1877 | } else { |
1878 | struct dev_mc_list *dmi; | 1878 | struct netdev_hw_addr *ha; |
1879 | int i = 0; | 1879 | int i = 0; |
1880 | 1880 | ||
1881 | /* Copy the kernel's list of MC addresses to card */ | 1881 | /* Copy the kernel's list of MC addresses to card */ |
1882 | netdev_for_each_mc_addr(dmi, dev) { | 1882 | netdev_for_each_mc_addr(ha, dev) { |
1883 | memcpy_toio(p, dmi->dmi_addr, ETH_ALEN); | 1883 | memcpy_toio(p, ha->addr, ETH_ALEN); |
1884 | dev_dbg(&link->dev, | 1884 | dev_dbg(&link->dev, |
1885 | "ray_update_multi add addr %02x%02x%02x%02x%02x%02x\n", | 1885 | "ray_update_multi add addr %02x%02x%02x%02x%02x%02x\n", |
1886 | dmi->dmi_addr[0], dmi->dmi_addr[1], | 1886 | ha->addr[0], ha->addr[1], |
1887 | dmi->dmi_addr[2], dmi->dmi_addr[3], | 1887 | ha->addr[2], ha->addr[3], |
1888 | dmi->dmi_addr[4], dmi->dmi_addr[5]); | 1888 | ha->addr[4], ha->addr[5]); |
1889 | p += ETH_ALEN; | 1889 | p += ETH_ALEN; |
1890 | i++; | 1890 | i++; |
1891 | } | 1891 | } |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index aceb95ef7274..8ab9f094747b 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -1545,7 +1545,7 @@ static int remove_key(struct usbnet *usbdev, int index, const u8 *bssid) | |||
1545 | static void set_multicast_list(struct usbnet *usbdev) | 1545 | static void set_multicast_list(struct usbnet *usbdev) |
1546 | { | 1546 | { |
1547 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); | 1547 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); |
1548 | struct dev_mc_list *mclist; | 1548 | struct netdev_hw_addr *ha; |
1549 | __le32 filter, basefilter; | 1549 | __le32 filter, basefilter; |
1550 | int ret; | 1550 | int ret; |
1551 | char *mc_addrs = NULL; | 1551 | char *mc_addrs = NULL; |
@@ -1584,9 +1584,9 @@ static void set_multicast_list(struct usbnet *usbdev) | |||
1584 | return; | 1584 | return; |
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | netdev_for_each_mc_addr(mclist, usbdev->net) | 1587 | netdev_for_each_mc_addr(ha, usbdev->net) |
1588 | memcpy(mc_addrs + i++ * ETH_ALEN, | 1588 | memcpy(mc_addrs + i++ * ETH_ALEN, |
1589 | mclist->dmi_addr, ETH_ALEN); | 1589 | ha->addr, ETH_ALEN); |
1590 | } | 1590 | } |
1591 | netif_addr_unlock_bh(usbdev->net); | 1591 | netif_addr_unlock_bh(usbdev->net); |
1592 | 1592 | ||
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c index 2b928ecf47bd..fb8a62f2b9b4 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c | |||
@@ -723,10 +723,10 @@ static void rtl8180_bss_info_changed(struct ieee80211_hw *dev, | |||
723 | priv->rf->conf_erp(dev, info); | 723 | priv->rf->conf_erp(dev, info); |
724 | } | 724 | } |
725 | 725 | ||
726 | static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, int mc_count, | 726 | static u64 rtl8180_prepare_multicast(struct ieee80211_hw *dev, |
727 | struct dev_addr_list *mc_list) | 727 | struct netdev_hw_addr_list *mc_list) |
728 | { | 728 | { |
729 | return mc_count; | 729 | return netdev_hw_addr_list_count(mc_list); |
730 | } | 730 | } |
731 | 731 | ||
732 | static void rtl8180_configure_filter(struct ieee80211_hw *dev, | 732 | static void rtl8180_configure_filter(struct ieee80211_hw *dev, |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 0fb850e0c656..441d817ed489 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -1193,9 +1193,9 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev, | |||
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev, | 1195 | static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev, |
1196 | int mc_count, struct dev_addr_list *mc_list) | 1196 | struct netdev_hw_addr_list *mc_list) |
1197 | { | 1197 | { |
1198 | return mc_count; | 1198 | return netdev_hw_addr_list_count(mc_list); |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | static void rtl8187_configure_filter(struct ieee80211_hw *dev, | 1201 | static void rtl8187_configure_filter(struct ieee80211_hw *dev, |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 3daba6c0c77f..6036d0206fec 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -1266,11 +1266,11 @@ struct wl1271_filter_params { | |||
1266 | u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; | 1266 | u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN]; |
1267 | }; | 1267 | }; |
1268 | 1268 | ||
1269 | static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | 1269 | static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, |
1270 | struct dev_addr_list *mc_list) | 1270 | struct netdev_hw_addr_list *mc_list) |
1271 | { | 1271 | { |
1272 | struct wl1271_filter_params *fp; | 1272 | struct wl1271_filter_params *fp; |
1273 | int i; | 1273 | struct netdev_hw_addr *ha; |
1274 | 1274 | ||
1275 | fp = kzalloc(sizeof(*fp), GFP_ATOMIC); | 1275 | fp = kzalloc(sizeof(*fp), GFP_ATOMIC); |
1276 | if (!fp) { | 1276 | if (!fp) { |
@@ -1279,21 +1279,16 @@ static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | |||
1279 | } | 1279 | } |
1280 | 1280 | ||
1281 | /* update multicast filtering parameters */ | 1281 | /* update multicast filtering parameters */ |
1282 | fp->enabled = true; | ||
1283 | if (mc_count > ACX_MC_ADDRESS_GROUP_MAX) { | ||
1284 | mc_count = 0; | ||
1285 | fp->enabled = false; | ||
1286 | } | ||
1287 | |||
1288 | fp->mc_list_length = 0; | 1282 | fp->mc_list_length = 0; |
1289 | for (i = 0; i < mc_count; i++) { | 1283 | if (netdev_hw_addr_list_count(mc_list) > ACX_MC_ADDRESS_GROUP_MAX) { |
1290 | if (mc_list->da_addrlen == ETH_ALEN) { | 1284 | fp->enabled = false; |
1285 | } else { | ||
1286 | fp->enabled = true; | ||
1287 | netdev_hw_addr_list_for_each(ha, mc_list) { | ||
1291 | memcpy(fp->mc_list[fp->mc_list_length], | 1288 | memcpy(fp->mc_list[fp->mc_list_length], |
1292 | mc_list->da_addr, ETH_ALEN); | 1289 | ha->addr, ETH_ALEN); |
1293 | fp->mc_list_length++; | 1290 | fp->mc_list_length++; |
1294 | } else | 1291 | } |
1295 | wl1271_warning("Unknown mc address length."); | ||
1296 | mc_list = mc_list->next; | ||
1297 | } | 1292 | } |
1298 | 1293 | ||
1299 | return (u64)(unsigned long)fp; | 1294 | return (u64)(unsigned long)fp; |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 6917286edcae..74530b2d672c 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -875,7 +875,7 @@ static struct iw_statistics *zd1201_get_wireless_stats(struct net_device *dev) | |||
875 | static void zd1201_set_multicast(struct net_device *dev) | 875 | static void zd1201_set_multicast(struct net_device *dev) |
876 | { | 876 | { |
877 | struct zd1201 *zd = netdev_priv(dev); | 877 | struct zd1201 *zd = netdev_priv(dev); |
878 | struct dev_mc_list *mc; | 878 | struct netdev_hw_addr *ha; |
879 | unsigned char reqbuf[ETH_ALEN*ZD1201_MAXMULTI]; | 879 | unsigned char reqbuf[ETH_ALEN*ZD1201_MAXMULTI]; |
880 | int i; | 880 | int i; |
881 | 881 | ||
@@ -883,8 +883,8 @@ static void zd1201_set_multicast(struct net_device *dev) | |||
883 | return; | 883 | return; |
884 | 884 | ||
885 | i = 0; | 885 | i = 0; |
886 | netdev_for_each_mc_addr(mc, dev) | 886 | netdev_for_each_mc_addr(ha, dev) |
887 | memcpy(reqbuf + i++ * ETH_ALEN, mc->dmi_addr, ETH_ALEN); | 887 | memcpy(reqbuf + i++ * ETH_ALEN, ha->addr, ETH_ALEN); |
888 | zd1201_setconfig(zd, ZD1201_RID_CNFGROUPADDRESS, reqbuf, | 888 | zd1201_setconfig(zd, ZD1201_RID_CNFGROUPADDRESS, reqbuf, |
889 | netdev_mc_count(dev) * ETH_ALEN, 0); | 889 | netdev_mc_count(dev) * ETH_ALEN, 0); |
890 | } | 890 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 00e09e26c826..6d95e4d74d7f 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -947,20 +947,17 @@ static void set_rx_filter_handler(struct work_struct *work) | |||
947 | } | 947 | } |
948 | 948 | ||
949 | static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, | 949 | static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, |
950 | int mc_count, struct dev_addr_list *mclist) | 950 | struct netdev_hw_addr_list *mc_list) |
951 | { | 951 | { |
952 | struct zd_mac *mac = zd_hw_mac(hw); | 952 | struct zd_mac *mac = zd_hw_mac(hw); |
953 | struct zd_mc_hash hash; | 953 | struct zd_mc_hash hash; |
954 | int i; | 954 | struct netdev_hw_addr *ha; |
955 | 955 | ||
956 | zd_mc_clear(&hash); | 956 | zd_mc_clear(&hash); |
957 | 957 | ||
958 | for (i = 0; i < mc_count; i++) { | 958 | netdev_hw_addr_list_for_each(ha, mc_list) { |
959 | if (!mclist) | 959 | dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", ha->addr); |
960 | break; | 960 | zd_mc_add_addr(&hash, ha->addr); |
961 | dev_dbg_f(zd_mac_dev(mac), "mc addr %pM\n", mclist->dmi_addr); | ||
962 | zd_mc_add_addr(&hash, mclist->dmi_addr); | ||
963 | mclist = mclist->next; | ||
964 | } | 961 | } |
965 | 962 | ||
966 | return hash.low | ((u64)hash.high << 32); | 963 | return hash.low | ((u64)hash.high << 32); |
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index 7d4107f5eeb0..34c91cf5d839 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
@@ -1300,25 +1300,25 @@ static void set_rx_mode(struct net_device *dev) | |||
1300 | /* Too many to filter well, or accept all multicasts. */ | 1300 | /* Too many to filter well, or accept all multicasts. */ |
1301 | iowrite16(0x000B, ioaddr + AddrMode); | 1301 | iowrite16(0x000B, ioaddr + AddrMode); |
1302 | } else if (!netdev_mc_empty(dev)) { /* Must use the multicast hash table. */ | 1302 | } else if (!netdev_mc_empty(dev)) { /* Must use the multicast hash table. */ |
1303 | struct dev_mc_list *mclist; | 1303 | struct netdev_hw_addr *ha; |
1304 | u16 hash_table[4]; | 1304 | u16 hash_table[4]; |
1305 | int i; | 1305 | int i; |
1306 | 1306 | ||
1307 | memset(hash_table, 0, sizeof(hash_table)); | 1307 | memset(hash_table, 0, sizeof(hash_table)); |
1308 | netdev_for_each_mc_addr(mclist, dev) { | 1308 | netdev_for_each_mc_addr(ha, dev) { |
1309 | unsigned int bit; | 1309 | unsigned int bit; |
1310 | 1310 | ||
1311 | /* Due to a bug in the early chip versions, multiple filter | 1311 | /* Due to a bug in the early chip versions, multiple filter |
1312 | slots must be set for each address. */ | 1312 | slots must be set for each address. */ |
1313 | if (yp->drv_flags & HasMulticastBug) { | 1313 | if (yp->drv_flags & HasMulticastBug) { |
1314 | bit = (ether_crc_le(3, mclist->dmi_addr) >> 3) & 0x3f; | 1314 | bit = (ether_crc_le(3, ha->addr) >> 3) & 0x3f; |
1315 | hash_table[bit >> 4] |= (1 << bit); | 1315 | hash_table[bit >> 4] |= (1 << bit); |
1316 | bit = (ether_crc_le(4, mclist->dmi_addr) >> 3) & 0x3f; | 1316 | bit = (ether_crc_le(4, ha->addr) >> 3) & 0x3f; |
1317 | hash_table[bit >> 4] |= (1 << bit); | 1317 | hash_table[bit >> 4] |= (1 << bit); |
1318 | bit = (ether_crc_le(5, mclist->dmi_addr) >> 3) & 0x3f; | 1318 | bit = (ether_crc_le(5, ha->addr) >> 3) & 0x3f; |
1319 | hash_table[bit >> 4] |= (1 << bit); | 1319 | hash_table[bit >> 4] |= (1 << bit); |
1320 | } | 1320 | } |
1321 | bit = (ether_crc_le(6, mclist->dmi_addr) >> 3) & 0x3f; | 1321 | bit = (ether_crc_le(6, ha->addr) >> 3) & 0x3f; |
1322 | hash_table[bit >> 4] |= (1 << bit); | 1322 | hash_table[bit >> 4] |= (1 << bit); |
1323 | } | 1323 | } |
1324 | /* Copy the hash table to the chip. */ | 1324 | /* Copy the hash table to the chip. */ |