Commit a3f9dd70 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

net: dpaa: 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
(other than adaptive rx, which will now be rejected by core).
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Acked-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8213f6c9
...@@ -525,7 +525,6 @@ static int dpaa_get_coalesce(struct net_device *dev, ...@@ -525,7 +525,6 @@ static int dpaa_get_coalesce(struct net_device *dev,
c->rx_coalesce_usecs = period; c->rx_coalesce_usecs = period;
c->rx_max_coalesced_frames = thresh; c->rx_max_coalesced_frames = thresh;
c->use_adaptive_rx_coalesce = false;
return 0; return 0;
} }
...@@ -540,9 +539,6 @@ static int dpaa_set_coalesce(struct net_device *dev, ...@@ -540,9 +539,6 @@ static int dpaa_set_coalesce(struct net_device *dev,
u8 thresh, prev_thresh; u8 thresh, prev_thresh;
int cpu, res; int cpu, res;
if (c->use_adaptive_rx_coalesce)
return -EINVAL;
period = c->rx_coalesce_usecs; period = c->rx_coalesce_usecs;
thresh = c->rx_max_coalesced_frames; thresh = c->rx_max_coalesced_frames;
...@@ -582,6 +578,8 @@ static int dpaa_set_coalesce(struct net_device *dev, ...@@ -582,6 +578,8 @@ static int dpaa_set_coalesce(struct net_device *dev,
} }
const struct ethtool_ops dpaa_ethtool_ops = { const struct ethtool_ops dpaa_ethtool_ops = {
.supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
ETHTOOL_COALESCE_RX_MAX_FRAMES,
.get_drvinfo = dpaa_get_drvinfo, .get_drvinfo = dpaa_get_drvinfo,
.get_msglevel = dpaa_get_msglevel, .get_msglevel = dpaa_get_msglevel,
.set_msglevel = dpaa_set_msglevel, .set_msglevel = dpaa_set_msglevel,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment