net: stmmac: Determine earlier the size of RX buffer
authorJose Abreu <Jose.Abreu@synopsys.com>
Wed, 18 Dec 2019 10:17:36 +0000 (11:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 11:21:39 +0000 (12:21 +0100)
commitd2e7895b53bc246bb29edf5439c03bf00bf7c064
treee6a58bd1ac7e907edb5efe57756d75a0f81b7827
parent82f8be03f811db982a8686e31ec3a58bf5f44b6a
net: stmmac: Determine earlier the size of RX buffer

[ Upstream commit 5d626c879e238be9585bd59a61eb606c9408178a ]

Split Header feature needs to know the size of RX buffer but current
code is determining it too late. Fix this by moving the RX buffer
computation to earlier stage.

Changes from v2:
- Do not try to align already aligned buffer size

Fixes: 67afd6d1cfdf ("net: stmmac: Add Split Header support and enable it in XGMAC cores")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c