Message ID | 20191003155642.14909-7-hauke@hauke-m.de (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | backports: Update to kernel 5.4-rc1 | expand |
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 589d2499..41e5724b 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -380,6 +380,14 @@ static inline struct sk_buff *__skb_peek(const struct sk_buff_head *list_) } #endif +#if LINUX_VERSION_IS_LESS(4,11,0) +#define skb_mac_offset LINUX_BACKPORT(skb_mac_offset) +static inline int skb_mac_offset(const struct sk_buff *skb) +{ + return skb_mac_header(skb) - skb->data; +} +#endif + #if LINUX_VERSION_IS_LESS(5,4,0) /** * skb_frag_off() - Returns the offset of a skb fragment
Add skb_mac_offset() from upstream kernel commit ea6da4fd388a ("net/skbuff: Introduce skb_mac_offset()") which is used by the wil6210 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- backport/backport-include/linux/skbuff.h | 8 ++++++++ 1 file changed, 8 insertions(+)