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/cpmac.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/cpmac.c')
-rw-r--r-- | drivers/net/cpmac.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); |