diff mbox series

[07/10] patches: make mt76 use skb_pad() instead of __skb_pad()

Message ID 20180923174535.16198-8-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show
Series backports: misc fixes to improve support of 4.19 | expand

Commit Message

Hauke Mehrtens Sept. 23, 2018, 5:45 p.m. UTC
__skb_pad() was only added with kernel 4.13.
The free_on_error parameter of __skb_pad() is set to constant true,
which is also the setting used by skb_pad() so it should be save to use
skb_pad() instead.
This patch should be added to the mainline Linux kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0090-use-skb_pad.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 patches/0090-use-skb_pad.patch
diff mbox series

Patch

diff --git a/patches/0090-use-skb_pad.patch b/patches/0090-use-skb_pad.patch
new file mode 100644
index 00000000..086328c1
--- /dev/null
+++ b/patches/0090-use-skb_pad.patch
@@ -0,0 +1,11 @@ 
+--- a/drivers/net/wireless/mediatek/mt76/usb.c
++++ b/drivers/net/wireless/mediatek/mt76/usb.c
+@@ -535,7 +535,7 @@ int mt76u_skb_dma_info(struct sk_buff *s
+ 	}
+ 
+ 	if (unlikely(pad)) {
+-		if (__skb_pad(last, pad, true))
++		if (skb_pad(last, pad))
+ 			return -ENOMEM;
+ 		__skb_put(last, pad);
+ 	}