net: cpsw: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Mon, 16 Mar 2020 20:47:08 +0000 (13:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 03:56:58 +0000 (20:56 -0700)
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>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/cpsw_new.c

index 6ae4a72e6f439138fff297fc63b8896ea6ca8a29..c2c5bf87da0141cf32f2eea976936cf922774edf 100644 (file)
@@ -1211,6 +1211,7 @@ static int cpsw_set_channels(struct net_device *ndev,
 }
 
 static const struct ethtool_ops cpsw_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS,
        .get_drvinfo    = cpsw_get_drvinfo,
        .get_msglevel   = cpsw_get_msglevel,
        .set_msglevel   = cpsw_set_msglevel,
index 71215db7934b57115c3a2e6652f70d410e123d03..9209e613257dd81d537aa28e834f4422ad755087 100644 (file)
@@ -1175,6 +1175,7 @@ static int cpsw_set_channels(struct net_device *ndev,
 }
 
 static const struct ethtool_ops cpsw_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS,
        .get_drvinfo            = cpsw_get_drvinfo,
        .get_msglevel           = cpsw_get_msglevel,
        .set_msglevel           = cpsw_set_msglevel,