net: use netdev_mc_count and netdev_mc_empty when appropriate
[safe/jmp/linux-2.6] / drivers / infiniband / hw / nes / nes_nic.c
index 5a7b554..c04f8fc 100644 (file)
@@ -862,7 +862,7 @@ static void nes_netdev_set_multicast_list(struct net_device *netdev)
        }
 
        nes_debug(NES_DBG_NIC_RX, "Number of MC entries = %d, Promiscous = %d, All Multicast = %d.\n",
-                 netdev->mc_count, !!(netdev->flags & IFF_PROMISC),
+                 netdev_mc_count(netdev), !!(netdev->flags & IFF_PROMISC),
                  !!(netdev->flags & IFF_ALLMULTI));
        if (!mc_all_on) {
                multicast_addr = netdev->mc_list;
@@ -1080,11 +1080,14 @@ static int nes_netdev_set_rx_csum(struct net_device *netdev, u32 enable)
 
 
 /**
- * nes_netdev_get_stats_count
+ * nes_netdev_get_sset_count
  */
-static int nes_netdev_get_stats_count(struct net_device *netdev)
+static int nes_netdev_get_sset_count(struct net_device *netdev, int stringset)
 {
-       return NES_ETHTOOL_STAT_COUNT;
+       if (stringset == ETH_SS_STATS)
+               return NES_ETHTOOL_STAT_COUNT;
+       else
+               return -EINVAL;
 }
 
 
@@ -1264,7 +1267,6 @@ static void nes_netdev_get_drvinfo(struct net_device *netdev,
        sprintf(drvinfo->fw_version, "%u.%u", nesadapter->firmware_version>>16,
                                nesadapter->firmware_version & 0x000000ff);
        strcpy(drvinfo->version, DRV_VERSION);
-       drvinfo->n_stats = nes_netdev_get_stats_count(netdev);
        drvinfo->testinfo_len = 0;
        drvinfo->eedump_len = 0;
        drvinfo->regdump_len = 0;
@@ -1516,7 +1518,7 @@ static const struct ethtool_ops nes_ethtool_ops = {
        .get_rx_csum = nes_netdev_get_rx_csum,
        .get_sg = ethtool_op_get_sg,
        .get_strings = nes_netdev_get_strings,
-       .get_stats_count = nes_netdev_get_stats_count,
+       .get_sset_count = nes_netdev_get_sset_count,
        .get_ethtool_stats = nes_netdev_get_ethtool_stats,
        .get_drvinfo = nes_netdev_get_drvinfo,
        .get_coalesce = nes_netdev_get_coalesce,