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/smc91x.c | |
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/smc91x.c')
-rw-r--r-- | drivers/net/smc91x.c | 8 |
1 files changed, 4 insertions, 4 deletions
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]] |= |