]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: cxgb4: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2020 02:15:10 +0000 (19:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 23:28:53 +0000 (16:28 -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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c

index 2cf35696b1c41f9da6f424bb2957d4726dec26da..398ade42476c28093a7eed7a6a4f5c33ce81c12c 100644 (file)
@@ -1576,6 +1576,10 @@ static int cxgb4_set_priv_flags(struct net_device *netdev, u32 flags)
 }
 
 static const struct ethtool_ops cxgb_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+                                    ETHTOOL_COALESCE_RX_MAX_FRAMES |
+                                    ETHTOOL_COALESCE_TX_USECS_IRQ |
+                                    ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
        .get_link_ksettings = get_link_ksettings,
        .set_link_ksettings = set_link_ksettings,
        .get_fecparam      = get_fecparam,