aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-01 17:22:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 17:22:15 -0400
commit22bedad3ce112d5ca1eaf043d4990fa2ed698c87 (patch)
treeb6fba5688d48b1396f01d13ee53610dea7749c15 /drivers/net/bnx2x_main.c
parenta748ee2426817a95b1f03012d8f339c45c722ae1 (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/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c18
1 files changed, 9 insertions, 9 deletions
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;