net: cxgb2: reject unsupported coalescing params
authorJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2020 02:15:08 +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/cxgb/cxgb2.c

index 4b8461103dda33d116c7054f87b766767332fab0..99736796e1a05b774c520052e06a915aecad0352 100644 (file)
@@ -793,6 +793,9 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
 }
 
 static const struct ethtool_ops t1_ethtool_ops = {
+       .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
+                                    ETHTOOL_COALESCE_USE_ADAPTIVE_RX |
+                                    ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL,
        .get_drvinfo       = get_drvinfo,
        .get_msglevel      = get_msglevel,
        .set_msglevel      = set_msglevel,