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/starfire.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/starfire.c')
-rw-r--r-- | drivers/net/starfire.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index 6dfa69899019..8a6d27cdc0bd 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1766,7 +1766,7 @@ static void set_rx_mode(struct net_device *dev) | |||
1766 | struct netdev_private *np = netdev_priv(dev); | 1766 | struct netdev_private *np = netdev_priv(dev); |
1767 | void __iomem *ioaddr = np->base; | 1767 | void __iomem *ioaddr = np->base; |
1768 | u32 rx_mode = MinVLANPrio; | 1768 | u32 rx_mode = MinVLANPrio; |
1769 | struct dev_mc_list *mclist; | 1769 | struct netdev_hw_addr *ha; |
1770 | int i; | 1770 | int i; |
1771 | #ifdef VLAN_SUPPORT | 1771 | #ifdef VLAN_SUPPORT |
1772 | 1772 | ||
@@ -1804,8 +1804,8 @@ static void set_rx_mode(struct net_device *dev) | |||
1804 | /* Use the 16 element perfect filter, skip first two entries. */ | 1804 | /* Use the 16 element perfect filter, skip first two entries. */ |
1805 | void __iomem *filter_addr = ioaddr + PerfFilterTable + 2 * 16; | 1805 | void __iomem *filter_addr = ioaddr + PerfFilterTable + 2 * 16; |
1806 | __be16 *eaddrs; | 1806 | __be16 *eaddrs; |
1807 | netdev_for_each_mc_addr(mclist, dev) { | 1807 | netdev_for_each_mc_addr(ha, dev) { |
1808 | eaddrs = (__be16 *)mclist->dmi_addr; | 1808 | eaddrs = (__be16 *) ha->addr; |
1809 | writew(be16_to_cpu(eaddrs[2]), filter_addr); filter_addr += 4; | 1809 | writew(be16_to_cpu(eaddrs[2]), filter_addr); filter_addr += 4; |
1810 | writew(be16_to_cpu(eaddrs[1]), filter_addr); filter_addr += 4; | 1810 | writew(be16_to_cpu(eaddrs[1]), filter_addr); filter_addr += 4; |
1811 | writew(be16_to_cpu(eaddrs[0]), filter_addr); filter_addr += 8; | 1811 | writew(be16_to_cpu(eaddrs[0]), filter_addr); filter_addr += 8; |
@@ -1825,10 +1825,10 @@ static void set_rx_mode(struct net_device *dev) | |||
1825 | __le16 mc_filter[32] __attribute__ ((aligned(sizeof(long)))); /* Multicast hash filter */ | 1825 | __le16 mc_filter[32] __attribute__ ((aligned(sizeof(long)))); /* Multicast hash filter */ |
1826 | 1826 | ||
1827 | memset(mc_filter, 0, sizeof(mc_filter)); | 1827 | memset(mc_filter, 0, sizeof(mc_filter)); |
1828 | netdev_for_each_mc_addr(mclist, dev) { | 1828 | netdev_for_each_mc_addr(ha, dev) { |
1829 | /* The chip uses the upper 9 CRC bits | 1829 | /* The chip uses the upper 9 CRC bits |
1830 | as index into the hash table */ | 1830 | as index into the hash table */ |
1831 | int bit_nr = ether_crc_le(ETH_ALEN, mclist->dmi_addr) >> 23; | 1831 | int bit_nr = ether_crc_le(ETH_ALEN, ha->addr) >> 23; |
1832 | __le32 *fptr = (__le32 *) &mc_filter[(bit_nr >> 4) & ~1]; | 1832 | __le32 *fptr = (__le32 *) &mc_filter[(bit_nr >> 4) & ~1]; |
1833 | 1833 | ||
1834 | *fptr |= cpu_to_le32(1 << (bit_nr & 31)); | 1834 | *fptr |= cpu_to_le32(1 << (bit_nr & 31)); |