net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers
authorOng Boon Leong <boon.leong.ong@intel.com>
Tue, 13 Apr 2021 09:36:22 +0000 (17:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Apr 2021 22:06:50 +0000 (15:06 -0700)
commitda5ec7f22a0f1a10a5a9c3063421e73ae054649d
treed7e2cea7e04eaaad69ca173f620ae3e916180c55
parent80f573c995fc8e385d4aebc0ffce88f6b32bb183
net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers

The per-queue RX buffer allocation in stmmac_reinit_rx_buffers() can be
made to use stmmac_alloc_rx_buffers() by merging the page_pool alloc
checks for "buf->page" and "buf->sec_page" in stmmac_init_rx_buffers().

This is in preparation for XSK pool allocation later.

Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c