Commit 39827be2 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

IB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()

Following commit 1437ce39 "ethtool:
Change ethtool_op_set_flags to validate flags", ethtool_op_set_flags
takes a third parameter and cannot be used directly as an
implementation of ethtool_ops::set_flags.

Changes nes and ipoib driver to pass in the appropriate value.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Acked-by: default avatarRoland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5a0c1fd
...@@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd ...@@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd
} }
static int nes_netdev_set_flags(struct net_device *netdev, u32 flags)
{
return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO);
}
static const struct ethtool_ops nes_ethtool_ops = { static const struct ethtool_ops nes_ethtool_ops = {
.get_link = ethtool_op_get_link, .get_link = ethtool_op_get_link,
.get_settings = nes_netdev_get_settings, .get_settings = nes_netdev_get_settings,
...@@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = { ...@@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = {
.get_tso = ethtool_op_get_tso, .get_tso = ethtool_op_get_tso,
.set_tso = ethtool_op_set_tso, .set_tso = ethtool_op_set_tso,
.get_flags = ethtool_op_get_flags, .get_flags = ethtool_op_get_flags,
.set_flags = ethtool_op_set_flags, .set_flags = nes_netdev_set_flags,
}; };
......
...@@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev, ...@@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev,
data[index++] = priv->lro.lro_mgr.stats.no_desc; data[index++] = priv->lro.lro_mgr.stats.no_desc;
} }
static int ipoib_set_flags(struct net_device *dev, u32 flags)
{
return ethtool_op_set_flags(dev, flags, ETH_FLAG_LRO);
}
static const struct ethtool_ops ipoib_ethtool_ops = { static const struct ethtool_ops ipoib_ethtool_ops = {
.get_drvinfo = ipoib_get_drvinfo, .get_drvinfo = ipoib_get_drvinfo,
.get_rx_csum = ipoib_get_rx_csum, .get_rx_csum = ipoib_get_rx_csum,
...@@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = { ...@@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
.get_coalesce = ipoib_get_coalesce, .get_coalesce = ipoib_get_coalesce,
.set_coalesce = ipoib_set_coalesce, .set_coalesce = ipoib_set_coalesce,
.get_flags = ethtool_op_get_flags, .get_flags = ethtool_op_get_flags,
.set_flags = ethtool_op_set_flags, .set_flags = ipoib_set_flags,
.get_strings = ipoib_get_strings, .get_strings = ipoib_get_strings,
.get_sset_count = ipoib_get_sset_count, .get_sset_count = ipoib_get_sset_count,
.get_ethtool_stats = ipoib_get_ethtool_stats, .get_ethtool_stats = ipoib_get_ethtool_stats,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment