]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:10 +0000 (11:28 +0100)
[ Upstream commit 1613fff7a32e1d9e2ac09db73feba0e71a188445 ]

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: 3c61784cfd03 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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;
 }