net: mvneta: fix build skb for bm capable devices
authorLorenzo Bianconi <lorenzo@kernel.org>
Wed, 13 Nov 2019 23:25:55 +0000 (01:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Nov 2019 02:04:00 +0000 (18:04 -0800)
commitb37fa92e20ef28aada852cbf03b368d29a20478c
tree4d31191986082456125a2c5f853efa32647e500c
parentf97d139aaafdc20145ad6a6b8d188ac8e58b5413
net: mvneta: fix build skb for bm capable devices

Fix build_skb for bm capable devices when they fall-back using swbm path
(e.g. when bm properties are configured in device tree but
CONFIG_MVNETA_BM_ENABLE is not set). In this case rx_offset_correction is
overwritten so we need to use it building skb instead of
MVNETA_SKB_HEADROOM directly

Fixes: 8dc9a0888f4c ("net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine")
Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reported-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c