aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-07-03 05:41:29 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-04 14:48:14 -0400
commit39827be26b36ef9cdbc661c92a269e0484cd9ef5 (patch)
tree5550c007b82f91a6db47681dfcd08dc29b3ff13c
parente5a0c1fd155ca0e98ff8995c2e79b654759cb544 (diff)
IB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()
Following commit 1437ce3983bcbc0447a0dedcd644c14fe833d266 "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: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c8
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ethtool.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 5cc0a9ae5bb1..42e7aad1ec23 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -1567,6 +1567,12 @@ static int nes_netdev_set_settings(struct net_device *netdev, struct ethtool_cmd
1567} 1567}
1568 1568
1569 1569
1570static int nes_netdev_set_flags(struct net_device *netdev, u32 flags)
1571{
1572 return ethtool_op_set_flags(netdev, flags, ETH_FLAG_LRO);
1573}
1574
1575
1570static const struct ethtool_ops nes_ethtool_ops = { 1576static const struct ethtool_ops nes_ethtool_ops = {
1571 .get_link = ethtool_op_get_link, 1577 .get_link = ethtool_op_get_link,
1572 .get_settings = nes_netdev_get_settings, 1578 .get_settings = nes_netdev_get_settings,
@@ -1588,7 +1594,7 @@ static const struct ethtool_ops nes_ethtool_ops = {
1588 .get_tso = ethtool_op_get_tso, 1594 .get_tso = ethtool_op_get_tso,
1589 .set_tso = ethtool_op_set_tso, 1595 .set_tso = ethtool_op_set_tso,
1590 .get_flags = ethtool_op_get_flags, 1596 .get_flags = ethtool_op_get_flags,
1591 .set_flags = ethtool_op_set_flags, 1597 .set_flags = nes_netdev_set_flags,
1592}; 1598};
1593 1599
1594 1600
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index 40e858492f90..1a1657c82edd 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -147,6 +147,11 @@ static void ipoib_get_ethtool_stats(struct net_device *dev,
147 data[index++] = priv->lro.lro_mgr.stats.no_desc; 147 data[index++] = priv->lro.lro_mgr.stats.no_desc;
148} 148}
149 149
150static int ipoib_set_flags(struct net_device *dev, u32 flags)
151{
152 return ethtool_op_set_flags(dev, flags, ETH_FLAG_LRO);
153}
154
150static const struct ethtool_ops ipoib_ethtool_ops = { 155static const struct ethtool_ops ipoib_ethtool_ops = {
151 .get_drvinfo = ipoib_get_drvinfo, 156 .get_drvinfo = ipoib_get_drvinfo,
152 .get_rx_csum = ipoib_get_rx_csum, 157 .get_rx_csum = ipoib_get_rx_csum,
@@ -154,7 +159,7 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
154 .get_coalesce = ipoib_get_coalesce, 159 .get_coalesce = ipoib_get_coalesce,
155 .set_coalesce = ipoib_set_coalesce, 160 .set_coalesce = ipoib_set_coalesce,
156 .get_flags = ethtool_op_get_flags, 161 .get_flags = ethtool_op_get_flags,
157 .set_flags = ethtool_op_set_flags, 162 .set_flags = ipoib_set_flags,
158 .get_strings = ipoib_get_strings, 163 .get_strings = ipoib_get_strings,
159 .get_sset_count = ipoib_get_sset_count, 164 .get_sset_count = ipoib_get_sset_count,
160 .get_ethtool_stats = ipoib_get_ethtool_stats, 165 .get_ethtool_stats = ipoib_get_ethtool_stats,