hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/ethernet/synopsys/dwc-xlgmac-ethtool.c
....@@ -151,7 +151,6 @@
151151 {
152152 struct xlgmac_pdata *pdata = netdev_priv(netdev);
153153
154
- memset(ec, 0, sizeof(struct ethtool_coalesce));
155154 ec->rx_coalesce_usecs = pdata->rx_usecs;
156155 ec->rx_max_coalesced_frames = pdata->rx_frames;
157156 ec->tx_max_coalesced_frames = pdata->tx_frames;
....@@ -166,20 +165,6 @@
166165 struct xlgmac_hw_ops *hw_ops = &pdata->hw_ops;
167166 unsigned int rx_frames, rx_riwt, rx_usecs;
168167 unsigned int tx_frames;
169
-
170
- /* Check for not supported parameters */
171
- if ((ec->rx_coalesce_usecs_irq) || (ec->rx_max_coalesced_frames_irq) ||
172
- (ec->tx_coalesce_usecs) || (ec->tx_coalesce_usecs_high) ||
173
- (ec->tx_max_coalesced_frames_irq) || (ec->tx_coalesce_usecs_irq) ||
174
- (ec->stats_block_coalesce_usecs) || (ec->pkt_rate_low) ||
175
- (ec->use_adaptive_rx_coalesce) || (ec->use_adaptive_tx_coalesce) ||
176
- (ec->rx_max_coalesced_frames_low) || (ec->rx_coalesce_usecs_low) ||
177
- (ec->tx_coalesce_usecs_low) || (ec->tx_max_coalesced_frames_low) ||
178
- (ec->pkt_rate_high) || (ec->rx_coalesce_usecs_high) ||
179
- (ec->rx_max_coalesced_frames_high) ||
180
- (ec->tx_max_coalesced_frames_high) ||
181
- (ec->rate_sample_interval))
182
- return -EOPNOTSUPP;
183168
184169 rx_usecs = ec->rx_coalesce_usecs;
185170 rx_riwt = hw_ops->usec_to_riwt(pdata, rx_usecs);
....@@ -257,6 +242,8 @@
257242 }
258243
259244 static const struct ethtool_ops xlgmac_ethtool_ops = {
245
+ .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
246
+ ETHTOOL_COALESCE_MAX_FRAMES,
260247 .get_drvinfo = xlgmac_ethtool_get_drvinfo,
261248 .get_link = ethtool_op_get_link,
262249 .get_msglevel = xlgmac_ethtool_get_msglevel,