net: sfc: 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. The check for use_adaptive_tx_coalesce will now be done by the core. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
01a6a62edc
commit
eff87b4f1e
@@ -232,9 +232,6 @@ static int efx_ethtool_set_coalesce(struct net_device *net_dev,
|
||||
bool adaptive, rx_may_override_tx;
|
||||
int rc;
|
||||
|
||||
if (coalesce->use_adaptive_tx_coalesce)
|
||||
return -EINVAL;
|
||||
|
||||
efx_get_irq_moderation(efx, &tx_usecs, &rx_usecs, &adaptive);
|
||||
|
||||
if (coalesce->rx_coalesce_usecs != rx_usecs)
|
||||
@@ -1138,6 +1135,9 @@ static int efx_ethtool_set_fecparam(struct net_device *net_dev,
|
||||
}
|
||||
|
||||
const struct ethtool_ops efx_ethtool_ops = {
|
||||
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
|
||||
ETHTOOL_COALESCE_USECS_IRQ |
|
||||
ETHTOOL_COALESCE_USE_ADAPTIVE_RX,
|
||||
.get_drvinfo = efx_ethtool_get_drvinfo,
|
||||
.get_regs_len = efx_ethtool_get_regs_len,
|
||||
.get_regs = efx_ethtool_get_regs,
|
||||
|
Reference in New Issue
Block a user