From patchwork Thu Oct 3 15:56:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11173003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 46B1F112B for ; Thu, 3 Oct 2019 17:42:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25F5D222C2 for ; Thu, 3 Oct 2019 17:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729141AbfJCRmP (ORCPT ); Thu, 3 Oct 2019 13:42:15 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:38536 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730948AbfJCP50 (ORCPT ); Thu, 3 Oct 2019 11:57:26 -0400 Received: from smtp2.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id A9606A35AA; Thu, 3 Oct 2019 17:57:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id MEKzUV6e8Xdt; Thu, 3 Oct 2019 17:57:20 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 06/11] backports: skbuff.h: Add skb_mac_offset() Date: Thu, 3 Oct 2019 17:56:37 +0200 Message-Id: <20191003155642.14909-7-hauke@hauke-m.de> In-Reply-To: <20191003155642.14909-1-hauke@hauke-m.de> References: <20191003155642.14909-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org 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 --- backport/backport-include/linux/skbuff.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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