can: mcp251xfd: mcp251xfd_ring_set_ringparam(): assign missing tx_obj_num_coalesce_irq
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 23 Jan 2023 08:03:42 +0000 (09:03 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Feb 2023 09:33:27 +0000 (10:33 +0100)
If the a new ring layout is set, the max coalesced frames for RX and
TX are re-calculated, too. Add the missing assignment of the newly
calculated TX max coalesced frames.

Fixes: 656fc12ddaf8 ("can: mcp251xfd: add TX IRQ coalescing ethtool support")
Link: https://lore.kernel.org/all/20230130154334.1578518-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-ethtool.c

index 3585f02575dfbd005d268522dd247f4fbeb180a3..57eeb066a9456b237eab7166b3407b4dd8b12ec5 100644 (file)
@@ -48,6 +48,7 @@ mcp251xfd_ring_set_ringparam(struct net_device *ndev,
        priv->rx_obj_num = layout.cur_rx;
        priv->rx_obj_num_coalesce_irq = layout.rx_coalesce;
        priv->tx->obj_num = layout.cur_tx;
+       priv->tx_obj_num_coalesce_irq = layout.tx_coalesce;
 
        return 0;
 }