]> git.kernelconcepts.de Git - mv-sheeva.git/blobdiff - drivers/staging/et131x/et131x_netdev.c
Staging: merge staging patches into Linus's main branch
[mv-sheeva.git] / drivers / staging / et131x / et131x_netdev.c
index 226641acd95401c219d0a6dd4eefb604aa47a3f0..40f8954dde478b526039b3729ad9267b9d16ce6f 100644 (file)
@@ -404,9 +404,9 @@ void et131x_multicast(struct net_device *netdev)
 {
        struct et131x_adapter *adapter = netdev_priv(netdev);
        uint32_t PacketFilter = 0;
-       uint32_t count;
        unsigned long flags;
-       struct dev_mc_list *mclist = netdev->mc_list;
+       struct dev_mc_list *mclist;
+       int i;
 
        spin_lock_irqsave(&adapter->Lock, flags);
 
@@ -437,11 +437,11 @@ void et131x_multicast(struct net_device *netdev)
                adapter->PacketFilter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
        }
 
-       if (netdev->mc_count > NIC_MAX_MCAST_LIST) {
+       if (netdev_mc_count(netdev) > NIC_MAX_MCAST_LIST) {
                adapter->PacketFilter |= ET131X_PACKET_TYPE_ALL_MULTICAST;
        }
 
-       if (netdev->mc_count < 1) {
+       if (netdev_mc_count(netdev) < 1) {
                adapter->PacketFilter &= ~ET131X_PACKET_TYPE_ALL_MULTICAST;
                adapter->PacketFilter &= ~ET131X_PACKET_TYPE_MULTICAST;
        } else {
@@ -449,12 +449,13 @@ void et131x_multicast(struct net_device *netdev)
        }
 
        /* Set values in the private adapter struct */
-       adapter->MCAddressCount = netdev->mc_count;
-
-       if (netdev->mc_count) {
-               count = netdev->mc_count - 1;
-               memcpy(adapter->MCList[count], mclist->dmi_addr, ETH_ALEN);
+       i = 0;
+       netdev_for_each_mc_addr(mclist, netdev) {
+               if (i == NIC_MAX_MCAST_LIST)
+                       break;
+               memcpy(adapter->MCList[i++], mclist->dmi_addr, ETH_ALEN);
        }
+       adapter->MCAddressCount = i;
 
        /* Are the new flags different from the previous ones? If not, then no
         * action is required