aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igbvf/ethtool.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-08-30 13:07:11 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-10-16 16:18:47 -0400
commitfd38f734cb8200529e281338514945fcbff2364b (patch)
treeb3ebe33151fa90fdfd0196adafb1aa6d4ab7a1de /drivers/net/ethernet/intel/igbvf/ethtool.c
parent11ba69e876e1141fa4b11a7c0efb256a8df9ae7d (diff)
igbvf: convert to ndo_fix_features
Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM. Removing this needs deeper surgery. Things noticed: - HW VLAN acceleration probably can be toggled, but it's left as is - the resets on RX csum offload change can probably be avoided - there is A LOT of copy-and-pasted code here Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igbvf/ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/igbvf/ethtool.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/drivers/net/ethernet/intel/igbvf/ethtool.c b/drivers/net/ethernet/intel/igbvf/ethtool.c
index 0ee8b6845846..2c25858cc0ff 100644
--- a/drivers/net/ethernet/intel/igbvf/ethtool.c
+++ b/drivers/net/ethernet/intel/igbvf/ethtool.c
@@ -128,55 +128,6 @@ static int igbvf_set_pauseparam(struct net_device *netdev,
128 return -EOPNOTSUPP; 128 return -EOPNOTSUPP;
129} 129}
130 130
131static u32 igbvf_get_rx_csum(struct net_device *netdev)
132{
133 struct igbvf_adapter *adapter = netdev_priv(netdev);
134 return !(adapter->flags & IGBVF_FLAG_RX_CSUM_DISABLED);
135}
136
137static int igbvf_set_rx_csum(struct net_device *netdev, u32 data)
138{
139 struct igbvf_adapter *adapter = netdev_priv(netdev);
140
141 if (data)
142 adapter->flags &= ~IGBVF_FLAG_RX_CSUM_DISABLED;
143 else
144 adapter->flags |= IGBVF_FLAG_RX_CSUM_DISABLED;
145
146 return 0;
147}
148
149static u32 igbvf_get_tx_csum(struct net_device *netdev)
150{
151 return (netdev->features & NETIF_F_IP_CSUM) != 0;
152}
153
154static int igbvf_set_tx_csum(struct net_device *netdev, u32 data)
155{
156 if (data)
157 netdev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
158 else
159 netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
160 return 0;
161}
162
163static int igbvf_set_tso(struct net_device *netdev, u32 data)
164{
165 struct igbvf_adapter *adapter = netdev_priv(netdev);
166
167 if (data) {
168 netdev->features |= NETIF_F_TSO;
169 netdev->features |= NETIF_F_TSO6;
170 } else {
171 netdev->features &= ~NETIF_F_TSO;
172 netdev->features &= ~NETIF_F_TSO6;
173 }
174
175 dev_info(&adapter->pdev->dev, "TSO is %s\n",
176 data ? "Enabled" : "Disabled");
177 return 0;
178}
179
180static u32 igbvf_get_msglevel(struct net_device *netdev) 131static u32 igbvf_get_msglevel(struct net_device *netdev)
181{ 132{
182 struct igbvf_adapter *adapter = netdev_priv(netdev); 133 struct igbvf_adapter *adapter = netdev_priv(netdev);
@@ -507,14 +458,6 @@ static const struct ethtool_ops igbvf_ethtool_ops = {
507 .set_ringparam = igbvf_set_ringparam, 458 .set_ringparam = igbvf_set_ringparam,
508 .get_pauseparam = igbvf_get_pauseparam, 459 .get_pauseparam = igbvf_get_pauseparam,
509 .set_pauseparam = igbvf_set_pauseparam, 460 .set_pauseparam = igbvf_set_pauseparam,
510 .get_rx_csum = igbvf_get_rx_csum,
511 .set_rx_csum = igbvf_set_rx_csum,
512 .get_tx_csum = igbvf_get_tx_csum,
513 .set_tx_csum = igbvf_set_tx_csum,
514 .get_sg = ethtool_op_get_sg,
515 .set_sg = ethtool_op_set_sg,
516 .get_tso = ethtool_op_get_tso,
517 .set_tso = igbvf_set_tso,
518 .self_test = igbvf_diag_test, 461 .self_test = igbvf_diag_test,
519 .get_sset_count = igbvf_get_sset_count, 462 .get_sset_count = igbvf_get_sset_count,
520 .get_strings = igbvf_get_strings, 463 .get_strings = igbvf_get_strings,