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/ksz884x.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/ksz884x.c')
-rw-r--r-- | drivers/net/ksz884x.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c index b843bf7d8c17..348769521615 100644 --- a/drivers/net/ksz884x.c +++ b/drivers/net/ksz884x.c | |||
@@ -5763,7 +5763,7 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5763 | struct dev_priv *priv = netdev_priv(dev); | 5763 | struct dev_priv *priv = netdev_priv(dev); |
5764 | struct dev_info *hw_priv = priv->adapter; | 5764 | struct dev_info *hw_priv = priv->adapter; |
5765 | struct ksz_hw *hw = &hw_priv->hw; | 5765 | struct ksz_hw *hw = &hw_priv->hw; |
5766 | struct dev_mc_list *mc_ptr; | 5766 | struct netdev_hw_addr *ha; |
5767 | int multicast = (dev->flags & IFF_ALLMULTI); | 5767 | int multicast = (dev->flags & IFF_ALLMULTI); |
5768 | 5768 | ||
5769 | dev_set_promiscuous(dev, priv, hw, (dev->flags & IFF_PROMISC)); | 5769 | dev_set_promiscuous(dev, priv, hw, (dev->flags & IFF_PROMISC)); |
@@ -5780,7 +5780,7 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5780 | int i = 0; | 5780 | int i = 0; |
5781 | 5781 | ||
5782 | /* List too big to support so turn on all multicast mode. */ | 5782 | /* List too big to support so turn on all multicast mode. */ |
5783 | if (dev->mc_count > MAX_MULTICAST_LIST) { | 5783 | if (netdev_mc_count(dev) > MAX_MULTICAST_LIST) { |
5784 | if (MAX_MULTICAST_LIST != hw->multi_list_size) { | 5784 | if (MAX_MULTICAST_LIST != hw->multi_list_size) { |
5785 | hw->multi_list_size = MAX_MULTICAST_LIST; | 5785 | hw->multi_list_size = MAX_MULTICAST_LIST; |
5786 | ++hw->all_multi; | 5786 | ++hw->all_multi; |
@@ -5789,13 +5789,12 @@ static void netdev_set_rx_mode(struct net_device *dev) | |||
5789 | return; | 5789 | return; |
5790 | } | 5790 | } |
5791 | 5791 | ||
5792 | netdev_for_each_mc_addr(mc_ptr, dev) { | 5792 | netdev_for_each_mc_addr(ha, dev) { |
5793 | if (!(*mc_ptr->dmi_addr & 1)) | 5793 | if (!(*ha->addr & 1)) |
5794 | continue; | 5794 | continue; |
5795 | if (i >= MAX_MULTICAST_LIST) | 5795 | if (i >= MAX_MULTICAST_LIST) |
5796 | break; | 5796 | break; |
5797 | memcpy(hw->multi_list[i++], mc_ptr->dmi_addr, | 5797 | memcpy(hw->multi_list[i++], ha->addr, MAC_ADDR_LEN); |
5798 | MAC_ADDR_LEN); | ||
5799 | } | 5798 | } |
5800 | hw->multi_list_size = (u8) i; | 5799 | hw->multi_list_size = (u8) i; |
5801 | hw_set_grp_addr(hw); | 5800 | hw_set_grp_addr(hw); |