tun: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Fri, 6 Mar 2020 01:05:58 +0000 (17:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Mar 2020 06:45:55 +0000 (22:45 -0800)
Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

This driver did not previously reject unsupported parameters.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c

index 4689e4c62e21aed5c50784246c88f2987eb99566..228fe449dc6d3ad265995ff7c23afbb98edf659a 100644 (file)
@@ -3546,6 +3546,7 @@ static int tun_set_coalesce(struct net_device *dev,
 }
 
 static const struct ethtool_ops tun_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_RX_MAX_FRAMES,
        .get_drvinfo    = tun_get_drvinfo,
        .get_msglevel   = tun_get_msglevel,
        .set_msglevel   = tun_set_msglevel,