aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
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/e1000
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/e1000')
-rw-r--r--drivers/net/e1000/e1000_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8be6faee43e6..41330349b07a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2101,7 +2101,6 @@ static void e1000_set_rx_mode(struct net_device *netdev)
2101 struct e1000_hw *hw = &adapter->hw; 2101 struct e1000_hw *hw = &adapter->hw;
2102 struct netdev_hw_addr *ha; 2102 struct netdev_hw_addr *ha;
2103 bool use_uc = false; 2103 bool use_uc = false;
2104 struct dev_addr_list *mc_ptr;
2105 u32 rctl; 2104 u32 rctl;
2106 u32 hash_value; 2105 u32 hash_value;
2107 int i, rar_entries = E1000_RAR_ENTRIES; 2106 int i, rar_entries = E1000_RAR_ENTRIES;
@@ -2161,17 +2160,17 @@ static void e1000_set_rx_mode(struct net_device *netdev)
2161 2160
2162 WARN_ON(i == rar_entries); 2161 WARN_ON(i == rar_entries);
2163 2162
2164 netdev_for_each_mc_addr(mc_ptr, netdev) { 2163 netdev_for_each_mc_addr(ha, netdev) {
2165 if (i == rar_entries) { 2164 if (i == rar_entries) {
2166 /* load any remaining addresses into the hash table */ 2165 /* load any remaining addresses into the hash table */
2167 u32 hash_reg, hash_bit, mta; 2166 u32 hash_reg, hash_bit, mta;
2168 hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr); 2167 hash_value = e1000_hash_mc_addr(hw, ha->addr);
2169 hash_reg = (hash_value >> 5) & 0x7F; 2168 hash_reg = (hash_value >> 5) & 0x7F;
2170 hash_bit = hash_value & 0x1F; 2169 hash_bit = hash_value & 0x1F;
2171 mta = (1 << hash_bit); 2170 mta = (1 << hash_bit);
2172 mcarray[hash_reg] |= mta; 2171 mcarray[hash_reg] |= mta;
2173 } else { 2172 } else {
2174 e1000_rar_set(hw, mc_ptr->da_addr, i++); 2173 e1000_rar_set(hw, ha->addr, i++);
2175 } 2174 }
2176 } 2175 }
2177 2176