net: ena: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2020 02:14:58 +0000 (19:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 23:28:52 +0000 (16:28 -0700)
Set ethtool_ops->supported_coalesce_params to let
the core reject unsupported coalescing parameters.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Sameeh Jubran <sameehj@amazon.com>
Acked-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_ethtool.c

index 868265a2ec00a88ba10925d22712f36c5070035a..552d4cbf6dbdbaf9e4eb677975a5847c1d64ecec 100644 (file)
@@ -826,6 +826,8 @@ static int ena_set_tunable(struct net_device *netdev,
 }
 
 static const struct ethtool_ops ena_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_USECS |
+                                    ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
        .get_link_ksettings     = ena_get_link_ksettings,
        .get_drvinfo            = ena_get_drvinfo,
        .get_msglevel           = ena_get_msglevel,