]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitae5c06a8f5b2ed0f6dc2ee688525ed8e12a510a7
treed7e2cea7e04eaaad69ca173f620ae3e916180c55
parent5646b08cba1f2bd1b8bcb6da3f313fba776acd22
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