]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/enic/enic_main.c
enic: Do not advertise NETIF_F_HW_VLAN_RX
[net-next-2.6.git] / drivers / net / enic / enic_main.c
index c81bc4b1816f44a59d5fcd8048eaba5b451722ed..18c043a3f4617574b81d1275a135c8b618adc121 100644 (file)
@@ -822,16 +822,16 @@ static int enic_set_mac_addr(struct net_device *netdev, char *addr)
 static void enic_set_multicast_list(struct net_device *netdev)
 {
        struct enic *enic = netdev_priv(netdev);
-       struct dev_mc_list *list = netdev->mc_list;
+       struct dev_mc_list *list;
        int directed = 1;
        int multicast = (netdev->flags & IFF_MULTICAST) ? 1 : 0;
        int broadcast = (netdev->flags & IFF_BROADCAST) ? 1 : 0;
        int promisc = (netdev->flags & IFF_PROMISC) ? 1 : 0;
+       unsigned int mc_count = netdev_mc_count(netdev);
        int allmulti = (netdev->flags & IFF_ALLMULTI) ||
-           (netdev->mc_count > ENIC_MULTICAST_PERFECT_FILTERS);
+                      mc_count > ENIC_MULTICAST_PERFECT_FILTERS;
        unsigned int flags = netdev->flags | (allmulti ? IFF_ALLMULTI : 0);
        u8 mc_addr[ENIC_MULTICAST_PERFECT_FILTERS][ETH_ALEN];
-       unsigned int mc_count = netdev->mc_count;
        unsigned int i, j;
 
        if (mc_count > ENIC_MULTICAST_PERFECT_FILTERS)
@@ -851,9 +851,11 @@ static void enic_set_multicast_list(struct net_device *netdev)
         * look for changes to add/del.
         */
 
-       for (i = 0; list && i < mc_count; i++) {
-               memcpy(mc_addr[i], list->dmi_addr, ETH_ALEN);
-               list = list->next;
+       i = 0;
+       netdev_for_each_mc_addr(list, netdev) {
+               if (i == mc_count)
+                       break;
+               memcpy(mc_addr[i++], list->dmi_addr, ETH_ALEN);
        }
 
        for (i = 0; i < enic->mc_count; i++) {
@@ -2056,8 +2058,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
        netdev->watchdog_timeo = 2 * HZ;
        netdev->ethtool_ops = &enic_ethtool_ops;
 
-       netdev->features |= NETIF_F_HW_VLAN_TX |
-               NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER;
+       netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
        if (ENIC_SETTING(enic, TXCSUM))
                netdev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
        if (ENIC_SETTING(enic, TSO))