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>
This commit is contained in:
committed by
David S. Miller
parent
a748ee2426
commit
22bedad3ce
@@ -349,7 +349,7 @@ static void dn_dev_del_ifa(struct dn_dev *dn_db, struct dn_ifaddr **ifap, int de
|
||||
if (dn_db->dev->type == ARPHRD_ETHER) {
|
||||
if (ifa1->ifa_local != dn_eth2dn(dev->dev_addr)) {
|
||||
dn_dn2eth(mac_addr, ifa1->ifa_local);
|
||||
dev_mc_delete(dev, mac_addr, ETH_ALEN, 0);
|
||||
dev_mc_del(dev, mac_addr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ static int dn_dev_insert_ifa(struct dn_dev *dn_db, struct dn_ifaddr *ifa)
|
||||
if (dev->type == ARPHRD_ETHER) {
|
||||
if (ifa->ifa_local != dn_eth2dn(dev->dev_addr)) {
|
||||
dn_dn2eth(mac_addr, ifa->ifa_local);
|
||||
dev_mc_add(dev, mac_addr, ETH_ALEN, 0);
|
||||
dev_mc_add(dev, mac_addr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1000,9 +1000,9 @@ static int dn_eth_up(struct net_device *dev)
|
||||
struct dn_dev *dn_db = dev->dn_ptr;
|
||||
|
||||
if (dn_db->parms.forwarding == 0)
|
||||
dev_mc_add(dev, dn_rt_all_end_mcast, ETH_ALEN, 0);
|
||||
dev_mc_add(dev, dn_rt_all_end_mcast);
|
||||
else
|
||||
dev_mc_add(dev, dn_rt_all_rt_mcast, ETH_ALEN, 0);
|
||||
dev_mc_add(dev, dn_rt_all_rt_mcast);
|
||||
|
||||
dn_db->use_long = 1;
|
||||
|
||||
@@ -1014,9 +1014,9 @@ static void dn_eth_down(struct net_device *dev)
|
||||
struct dn_dev *dn_db = dev->dn_ptr;
|
||||
|
||||
if (dn_db->parms.forwarding == 0)
|
||||
dev_mc_delete(dev, dn_rt_all_end_mcast, ETH_ALEN, 0);
|
||||
dev_mc_del(dev, dn_rt_all_end_mcast);
|
||||
else
|
||||
dev_mc_delete(dev, dn_rt_all_rt_mcast, ETH_ALEN, 0);
|
||||
dev_mc_del(dev, dn_rt_all_rt_mcast);
|
||||
}
|
||||
|
||||
static void dn_dev_set_timer(struct net_device *dev);
|
||||
|
Reference in New Issue
Block a user