summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-07-23 16:29:31 +0200
committerJakub Kicinski <kuba@kernel.org>2022-07-25 19:38:57 -0700
commit8531c80800c10e8ef7952022326c2f983e1314bf (patch)
treefbafe17caad93fefb2c417be063ab895119d568f /drivers/net/ethernet/stmicro/stmmac/chain_mode.c
parent7028471edb646bfc532fec0973e50e784cdcb7c6 (diff)
downloadlinux-8531c80800c10e8ef7952022326c2f983e1314bf.tar.gz
linux-8531c80800c10e8ef7952022326c2f983e1314bf.tar.bz2
linux-8531c80800c10e8ef7952022326c2f983e1314bf.zip
net: ethernet: stmicro: stmmac: move dma conf to dedicated struct
Move dma buf conf to dedicated struct. This in preparation for code rework that will permit to allocate separate dma_conf without affecting the priv struct. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/chain_mode.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/chain_mode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c b/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
index d2cdc02d9f94..2e8744ac6b91 100644
--- a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
+++ b/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
@@ -46,7 +46,7 @@ static int jumbo_frm(void *p, struct sk_buff *skb, int csum)
while (len != 0) {
tx_q->tx_skbuff[entry] = NULL;
- entry = STMMAC_GET_ENTRY(entry, priv->dma_tx_size);
+ entry = STMMAC_GET_ENTRY(entry, priv->dma_conf.dma_tx_size);
desc = tx_q->dma_tx + entry;
if (len > bmax) {
@@ -137,7 +137,7 @@ static void refill_desc3(void *priv_ptr, struct dma_desc *p)
*/
p->des3 = cpu_to_le32((unsigned int)(rx_q->dma_rx_phy +
(((rx_q->dirty_rx) + 1) %
- priv->dma_rx_size) *
+ priv->dma_conf.dma_rx_size) *
sizeof(struct dma_desc)));
}
@@ -155,7 +155,7 @@ static void clean_desc3(void *priv_ptr, struct dma_desc *p)
*/
p->des3 = cpu_to_le32((unsigned int)((tx_q->dma_tx_phy +
((tx_q->dirty_tx + 1) %
- priv->dma_tx_size))
+ priv->dma_conf.dma_tx_size))
* sizeof(struct dma_desc)));
}