aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ehea/ehea_ethtool.c')
-rw-r--r--drivers/net/ehea/ehea_ethtool.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
index 75b099ce49c9..d6cf502906cf 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -261,6 +261,20 @@ static void ehea_get_ethtool_stats(struct net_device *dev,
261 261
262} 262}
263 263
264static int ehea_set_flags(struct net_device *dev, u32 data)
265{
266 /* Avoid changing the VLAN flags */
267 if ((data & (ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN)) !=
268 (ethtool_op_get_flags(dev) & (ETH_FLAG_RXVLAN |
269 ETH_FLAG_TXVLAN))){
270 return -EINVAL;
271 }
272
273 return ethtool_op_set_flags(dev, data, ETH_FLAG_LRO
274 | ETH_FLAG_TXVLAN
275 | ETH_FLAG_RXVLAN);
276}
277
264const struct ethtool_ops ehea_ethtool_ops = { 278const struct ethtool_ops ehea_ethtool_ops = {
265 .get_settings = ehea_get_settings, 279 .get_settings = ehea_get_settings,
266 .get_drvinfo = ehea_get_drvinfo, 280 .get_drvinfo = ehea_get_drvinfo,
@@ -273,6 +287,8 @@ const struct ethtool_ops ehea_ethtool_ops = {
273 .get_ethtool_stats = ehea_get_ethtool_stats, 287 .get_ethtool_stats = ehea_get_ethtool_stats,
274 .get_rx_csum = ehea_get_rx_csum, 288 .get_rx_csum = ehea_get_rx_csum,
275 .set_settings = ehea_set_settings, 289 .set_settings = ehea_set_settings,
290 .get_flags = ethtool_op_get_flags,
291 .set_flags = ehea_set_flags,
276 .nway_reset = ehea_nway_reset, /* Restart autonegotiation */ 292 .nway_reset = ehea_nway_reset, /* Restart autonegotiation */
277}; 293};
278 294