aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec.c
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/fec.c
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/fec.c')
-rw-r--r--drivers/net/fec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 848eb1968abf..2b1651aee13f 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -954,7 +954,7 @@ fec_enet_close(struct net_device *dev)
954static void set_multicast_list(struct net_device *dev) 954static void set_multicast_list(struct net_device *dev)
955{ 955{
956 struct fec_enet_private *fep = netdev_priv(dev); 956 struct fec_enet_private *fep = netdev_priv(dev);
957 struct dev_mc_list *dmi; 957 struct netdev_hw_addr *ha;
958 unsigned int i, bit, data, crc, tmp; 958 unsigned int i, bit, data, crc, tmp;
959 unsigned char hash; 959 unsigned char hash;
960 960
@@ -984,16 +984,16 @@ static void set_multicast_list(struct net_device *dev)
984 writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); 984 writel(0, fep->hwp + FEC_GRP_HASH_TABLE_HIGH);
985 writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW); 985 writel(0, fep->hwp + FEC_GRP_HASH_TABLE_LOW);
986 986
987 netdev_for_each_mc_addr(dmi, dev) { 987 netdev_for_each_mc_addr(ha, dev) {
988 /* Only support group multicast for now */ 988 /* Only support group multicast for now */
989 if (!(dmi->dmi_addr[0] & 1)) 989 if (!(ha->addr[0] & 1))
990 continue; 990 continue;
991 991
992 /* calculate crc32 value of mac address */ 992 /* calculate crc32 value of mac address */
993 crc = 0xffffffff; 993 crc = 0xffffffff;
994 994
995 for (i = 0; i < dmi->dmi_addrlen; i++) { 995 for (i = 0; i < dev->addr_len; i++) {
996 data = dmi->dmi_addr[i]; 996 data = ha->addr[i];
997 for (bit = 0; bit < 8; bit++, data >>= 1) { 997 for (bit = 0; bit < 8; bit++, data >>= 1) {
998 crc = (crc >> 1) ^ 998 crc = (crc >> 1) ^
999 (((crc ^ data) & 1) ? CRC32_POLY : 0); 999 (((crc ^ data) & 1) ? CRC32_POLY : 0);