drivers/net: Convert compare_ether_addr to ether_addr_equal
[deliverable/linux.git] / drivers / net / ethernet / sfc / ethtool.c
index f22f45f515a834e5e686f18cc0b83e5b2db789a4..03ded364c8dab234f43437b629659821c3aa41b4 100644 (file)
@@ -1023,7 +1023,7 @@ static int efx_ethtool_set_class_rule(struct efx_nic *efx,
                        return -EINVAL;
 
                /* Is it a default UC or MC filter? */
-               if (!compare_ether_addr(mac_mask->h_dest, mac_addr_mc_mask) &&
+               if (ether_addr_equal(mac_mask->h_dest, mac_addr_mc_mask) &&
                    vlan_tag_mask == 0) {
                        if (is_multicast_ether_addr(mac_entry->h_dest))
                                rc = efx_filter_set_mc_def(&spec);
@@ -1108,6 +1108,39 @@ static int efx_ethtool_set_rxfh_indir(struct net_device *net_dev,
        return 0;
 }
 
+static int efx_ethtool_get_module_eeprom(struct net_device *net_dev,
+                                        struct ethtool_eeprom *ee,
+                                        u8 *data)
+{
+       struct efx_nic *efx = netdev_priv(net_dev);
+       int ret;
+
+       if (!efx->phy_op || !efx->phy_op->get_module_eeprom)
+               return -EOPNOTSUPP;
+
+       mutex_lock(&efx->mac_lock);
+       ret = efx->phy_op->get_module_eeprom(efx, ee, data);
+       mutex_unlock(&efx->mac_lock);
+
+       return ret;
+}
+
+static int efx_ethtool_get_module_info(struct net_device *net_dev,
+                                      struct ethtool_modinfo *modinfo)
+{
+       struct efx_nic *efx = netdev_priv(net_dev);
+       int ret;
+
+       if (!efx->phy_op || !efx->phy_op->get_module_info)
+               return -EOPNOTSUPP;
+
+       mutex_lock(&efx->mac_lock);
+       ret = efx->phy_op->get_module_info(efx, modinfo);
+       mutex_unlock(&efx->mac_lock);
+
+       return ret;
+}
+
 const struct ethtool_ops efx_ethtool_ops = {
        .get_settings           = efx_ethtool_get_settings,
        .set_settings           = efx_ethtool_set_settings,
@@ -1137,4 +1170,6 @@ const struct ethtool_ops efx_ethtool_ops = {
        .get_rxfh_indir_size    = efx_ethtool_get_rxfh_indir_size,
        .get_rxfh_indir         = efx_ethtool_get_rxfh_indir,
        .set_rxfh_indir         = efx_ethtool_set_rxfh_indir,
+       .get_module_info        = efx_ethtool_get_module_info,
+       .get_module_eeprom      = efx_ethtool_get_module_eeprom,
 };
This page took 0.0784899999999999 seconds and 5 git commands to generate.