OSDN Git Service

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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2019 20:04:17 +0000 (12:04 -0800)
commit5d626c879e238be9585bd59a61eb606c9408178a
treeb9dc096ea2ad116855aae15702e94c3b15db747e
parent08c965430869ed423921bd9058ae59f75207feb6
net: stmmac: Determine earlier the size of RX buffer

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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c