New upstream version 17.11.5
[deb_dpdk.git] / lib / librte_eal / linuxapp / kni / ethtool / ixgbe / ixgbe_ethtool.c
index bc3cb2f..1296829 100644 (file)
@@ -173,6 +173,7 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = {
 #define IXGBE_TEST_LEN (sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN)
 #endif /* ETHTOOL_TEST */
 
+#ifndef ETHTOOL_GLINKSETTINGS
 int ixgbe_get_settings(struct net_device *netdev,
                       struct ethtool_cmd *ecmd)
 {
@@ -362,7 +363,9 @@ int ixgbe_get_settings(struct net_device *netdev,
 
        return 0;
 }
+#endif
 
+#ifndef ETHTOOL_SLINKSETTINGS
 static int ixgbe_set_settings(struct net_device *netdev,
                              struct ethtool_cmd *ecmd)
 {
@@ -406,6 +409,7 @@ static int ixgbe_set_settings(struct net_device *netdev,
        }
        return err;
 }
+#endif
 
 static void ixgbe_get_pauseparam(struct net_device *netdev,
                                 struct ethtool_pauseparam *pause)
@@ -1462,7 +1466,7 @@ static int ixgbe_eeprom_test(struct ixgbe_adapter *adapter, u64 *data)
 
 static irqreturn_t ixgbe_test_intr(int irq, void *data)
 {
-       struct net_device *netdev = (struct net_device *) data;
+       struct net_device *netdev = data;
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
 
        adapter->test_icr |= IXGBE_READ_REG(&adapter->hw, IXGBE_EICR);
@@ -2447,7 +2451,7 @@ static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
                break;
        case ETHTOOL_GRXCLSRLALL:
                ret = ixgbe_get_ethtool_fdir_all(adapter, cmd,
-                                                (u32 *)rule_locs);
+                                                rule_locs);
                break;
        case ETHTOOL_GRXFH:
                ret = ixgbe_get_rss_hash_opts(adapter, cmd);
@@ -2830,8 +2834,12 @@ static int ixgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
 #endif /* ETHTOOL_GRXRINGS */
 //static
 struct ethtool_ops ixgbe_ethtool_ops = {
+#ifndef ETHTOOL_GLINKSETTINGS
        .get_settings           = ixgbe_get_settings,
+#endif
+#ifndef ETHTOOL_SLINKSETTINGS
        .set_settings           = ixgbe_set_settings,
+#endif
        .get_drvinfo            = ixgbe_get_drvinfo,
        .get_regs_len           = ixgbe_get_regs_len,
        .get_regs               = ixgbe_get_regs,