diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-04-16 20:15:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-17 20:47:35 -0400 |
commit | f4786a96252b97f6f05cd42ea7fe6e967048bfa3 (patch) | |
tree | eb169eb09a4560f5ed75a882fdfcd85551c134f1 | |
parent | 66a1c5413260a8c302b4024555c489cc6731b463 (diff) |
net: ehea: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ehea/ehea_ethtool.c | 23 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 4 |
2 files changed, 3 insertions, 24 deletions
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c index 3e2e734fecb7..5f13491cf2a9 100644 --- a/drivers/net/ehea/ehea_ethtool.c +++ b/drivers/net/ehea/ehea_ethtool.c | |||
@@ -162,11 +162,6 @@ static void ehea_set_msglevel(struct net_device *dev, u32 value) | |||
162 | port->msg_enable = value; | 162 | port->msg_enable = value; |
163 | } | 163 | } |
164 | 164 | ||
165 | static u32 ehea_get_rx_csum(struct net_device *dev) | ||
166 | { | ||
167 | return 1; | ||
168 | } | ||
169 | |||
170 | static char ehea_ethtool_stats_keys[][ETH_GSTRING_LEN] = { | 165 | static char ehea_ethtool_stats_keys[][ETH_GSTRING_LEN] = { |
171 | {"sig_comp_iv"}, | 166 | {"sig_comp_iv"}, |
172 | {"swqe_refill_th"}, | 167 | {"swqe_refill_th"}, |
@@ -263,34 +258,16 @@ static void ehea_get_ethtool_stats(struct net_device *dev, | |||
263 | 258 | ||
264 | } | 259 | } |
265 | 260 | ||
266 | static int ehea_set_flags(struct net_device *dev, u32 data) | ||
267 | { | ||
268 | /* Avoid changing the VLAN flags */ | ||
269 | if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) != | ||
270 | (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN | | ||
271 | ETH_FLAG_TXVLAN))){ | ||
272 | return -EINVAL; | ||
273 | } | ||
274 | |||
275 | return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO | ||
276 | | ETH_FLAG_TXVLAN | ||
277 | | ETH_FLAG_RXVLAN); | ||
278 | } | ||
279 | |||
280 | const struct ethtool_ops ehea_ethtool_ops = { | 261 | const struct ethtool_ops ehea_ethtool_ops = { |
281 | .get_settings = ehea_get_settings, | 262 | .get_settings = ehea_get_settings, |
282 | .get_drvinfo = ehea_get_drvinfo, | 263 | .get_drvinfo = ehea_get_drvinfo, |
283 | .get_msglevel = ehea_get_msglevel, | 264 | .get_msglevel = ehea_get_msglevel, |
284 | .set_msglevel = ehea_set_msglevel, | 265 | .set_msglevel = ehea_set_msglevel, |
285 | .get_link = ethtool_op_get_link, | 266 | .get_link = ethtool_op_get_link, |
286 | .set_tso = ethtool_op_set_tso, | ||
287 | .get_strings = ehea_get_strings, | 267 | .get_strings = ehea_get_strings, |
288 | .get_sset_count = ehea_get_sset_count, | 268 | .get_sset_count = ehea_get_sset_count, |
289 | .get_ethtool_stats = ehea_get_ethtool_stats, | 269 | .get_ethtool_stats = ehea_get_ethtool_stats, |
290 | .get_rx_csum = ehea_get_rx_csum, | ||
291 | .set_settings = ehea_set_settings, | 270 | .set_settings = ehea_set_settings, |
292 | .get_flags = ethtool_op_get_flags, | ||
293 | .set_flags = ehea_set_flags, | ||
294 | .nway_reset = ehea_nway_reset, /* Restart autonegotiation */ | 271 | .nway_reset = ehea_nway_reset, /* Restart autonegotiation */ |
295 | }; | 272 | }; |
296 | 273 | ||
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index f75d3144b8a5..ce2f0ca61d9a 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -3262,10 +3262,12 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | |||
3262 | dev->netdev_ops = &ehea_netdev_ops; | 3262 | dev->netdev_ops = &ehea_netdev_ops; |
3263 | ehea_set_ethtool_ops(dev); | 3263 | ehea_set_ethtool_ops(dev); |
3264 | 3264 | ||
3265 | dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO | ||
3266 | | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX | NETIF_F_LRO; | ||
3265 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO | 3267 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO |
3266 | | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX | 3268 | | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX |
3267 | | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER | 3269 | | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER |
3268 | | NETIF_F_LLTX; | 3270 | | NETIF_F_LLTX | NETIF_F_RXCSUM; |
3269 | dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT; | 3271 | dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT; |
3270 | 3272 | ||
3271 | if (use_lro) | 3273 | if (use_lro) |