mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
net: stmmac: simplify stmmac_set_queue_rx_buf_size()
Clean up the new stmmac_set_queue_rx_buf_size() to simplify the code. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1w1LWY-0000000DGSd-49H6@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a32734d25d
commit
337191f377
|
|
@ -399,16 +399,12 @@ static void stmmac_set_queue_rx_buf_size(struct stmmac_priv *priv,
|
|||
{
|
||||
u32 buf_size;
|
||||
|
||||
if (rx_q->xsk_pool && rx_q->buf_alloc_num) {
|
||||
if (rx_q->xsk_pool && rx_q->buf_alloc_num)
|
||||
buf_size = xsk_pool_get_rx_frame_size(rx_q->xsk_pool);
|
||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||
buf_size,
|
||||
rx_q->queue_index);
|
||||
} else {
|
||||
stmmac_set_dma_bfsize(priv, priv->ioaddr,
|
||||
priv->dma_conf.dma_buf_sz,
|
||||
rx_q->queue_index);
|
||||
}
|
||||
else
|
||||
buf_size = priv->dma_conf.dma_buf_sz;
|
||||
|
||||
stmmac_set_dma_bfsize(priv, priv->ioaddr, buf_size, rx_q->queue_index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user