aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arm
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/arm
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/arm')
-rw-r--r--drivers/net/arm/am79c961a.c6
-rw-r--r--drivers/net/arm/at91_ether.c6
-rw-r--r--drivers/net/arm/ixp4xx_eth.c8
-rw-r--r--drivers/net/arm/ks8695net.c10
4 files changed, 15 insertions, 15 deletions
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 */
557static void at91ether_sethashtable(struct net_device *dev) 557static 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)
735static void eth_set_mcast_list(struct net_device *dev) 735static 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);