[PATCH AUTOSEL 4.9 01/13] drivers/net/wan/lapbether: Added needed_tailroom

From: Sasha Levin
Date: Mon Sep 07 2020 - 12:46:09 EST


From: Xie He <xie.he.0141@xxxxxxxxx>

[ Upstream commit 1ee39c1448c4e0d480c5b390e2db1987561fb5c2 ]

The underlying Ethernet device may request necessary tailroom to be
allocated by setting needed_tailroom. This driver should also set
needed_tailroom to request the tailroom needed by the underlying
Ethernet device to be allocated.

Cc: Willem de Bruijn <willemdebruijn.kernel@xxxxxxxxx>
Cc: Martin Schiller <ms@xxxxxxxxxx>
Signed-off-by: Xie He <xie.he.0141@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
drivers/net/wan/lapbether.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 6eb0f7a85e531..5befc7f3f0e7a 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -343,6 +343,7 @@ static int lapbeth_new_device(struct net_device *dev)
*/
ndev->needed_headroom = -1 + 3 + 2 + dev->hard_header_len
+ dev->needed_headroom;
+ ndev->needed_tailroom = dev->needed_tailroom;

lapbeth = netdev_priv(ndev);
lapbeth->axdev = ndev;
--
2.25.1