From: Jakub Kicinski Date: Fri, 6 Mar 2020 01:05:58 +0000 (-0800) Subject: tun: reject unsupported coalescing params X-Git-Tag: tags/kvm-5.7-2~35^2~231^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e5ad00b34dc03bb56b1d6c99c214d4d530656868;p=users%2Fdwmw2%2Flinux.git tun: reject unsupported coalescing params 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 Acked-by: Jason Wang Signed-off-by: David S. Miller --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4689e4c62e21a..228fe449dc6d3 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -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,