From nobody Sun Sep 01 13:28:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WxXkq47FGz5VCrN; Sun, 01 Sep 2024 13:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WxXkq13Lkz4Kc7; Sun, 1 Sep 2024 13:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725197283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3BYlo+siynmO72SyI4HQVkLcx/RCxox/TahQIPa2SDY=; b=tMmfHiM9shKgWzSg+RgoVmndZh4KTu+gbBRBvn/pHerHdXUKz1WjNYKomUJ5VUnsJTRnrT Ks4JMYKbci8RmMY614u0wQZvz6L1k4z/2waOgvv51g/qRxImjyHbFAT8gGqGzdzRTQg6tc fxehs741aatR0zipcobSU5WD1/NKb4SB32tPiHoprCowqACHr7ltUcMdjfJcS6+VQe0MG+ Bpjjq/6iQfuPDFuAttLOR261rLO1OmO7YF3e5N2aGEJ9zNbKvdS11mxkrANN5tfliN2VtB 96akNr8oglNI/ZibcxZ7EApiCkjgrYWUS08B9yyhV/8IQ+uAtODjU89CNMH/7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725197283; a=rsa-sha256; cv=none; b=m4ya36CkIMBQdWDksnFK2q38Jd0V9QBDHU3RPPvSMWj3XGM3WMy+2EKJi7X1qI9xUmx2d2 6pvCQDu9e7fD6CywA74Sb4k+n59b8G8Jun2WdP4HbxsI8+164lI4Zmy3zTMmmEdg+LK645 qkn1DJY9EFbaXZCoe0NmxdT6WFb3GEPvjHXgEGA/Ov+SaeEItnXp62AzB3m7vRcFWeBtIH TTmQHS2pQQCgFOUdmgxMVIOnB+4sFyJ+zYqJj+0XULGTwkbk1bgsX2btCBHVru/EfeCMb5 y+h2Od5nZZgSXMegQSDn9fnmGOoiN01cei5Jh+Xnj+tf6GYBtIuQPLzN7jws7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725197283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3BYlo+siynmO72SyI4HQVkLcx/RCxox/TahQIPa2SDY=; b=uJ2QtJaB2Ab4rMJXFugvZY0SphqRdM0M0corCL/hT7Bc5L1KqhhwZBRX1CpvLmIG6yY9Lr W/TrRbJeOA3BNGB2+trBQs3bL6eA68UV9eWHgV77GMKT/SNUODcaoeO4gpjVWUVzIdmI+N Fj5KKk5WRZ5RYK/Rd+dOecQcTv48/LGGnd+OoPimUQWoGJIpTOwCJHuDD9MLzhCyn1XBrC rtAayp34TQaUbcaN4SaOgEsUwEIuAPd/Ec/IJmOdNW60pQBvj+9hKOYYyUXT5RLD6JQd9/ QgjfPVmC4NIkWMWeDkr1r/x8eAfManN3k4kpWlPs2/Etzg6WZLk+mPCl4fQeGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WxXkq0W7ZzW4j; Sun, 1 Sep 2024 13:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 481DS3gp030789; Sun, 1 Sep 2024 13:28:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 481DS3CR030786; Sun, 1 Sep 2024 13:28:03 GMT (envelope-from git) Date: Sun, 1 Sep 2024 13:28:03 GMT Message-Id: <202409011328.481DS3CR030786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 273cf7d36336 - main - LinuxKPI: add eth_hdr() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 273cf7d36336eeed5fc2ad42e5e12a36e36650a0 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=273cf7d36336eeed5fc2ad42e5e12a36e36650a0 commit 273cf7d36336eeed5fc2ad42e5e12a36e36650a0 Author: Bjoern A. Zeeb AuthorDate: 2024-08-27 21:07:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-08-31 21:35:02 +0000 LinuxKPI: add eth_hdr() Add an implementation of eth_hdr() needed by a wireless driver. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46462 --- sys/compat/linuxkpi/common/include/linux/if_ether.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/if_ether.h b/sys/compat/linuxkpi/common/include/linux/if_ether.h index 3735ad2f5527..6676e8fc142f 100644 --- a/sys/compat/linuxkpi/common/include/linux/if_ether.h +++ b/sys/compat/linuxkpi/common/include/linux/if_ether.h @@ -34,6 +34,7 @@ #define _LINUXKPI_LINUX_IF_ETHER_H_ #include +#include #include @@ -69,4 +70,13 @@ struct ethhdr { uint16_t h_proto; } __packed; +static inline struct ethhdr * +eth_hdr(const struct sk_buff *skb) +{ + struct ethhdr *hdr; + + hdr = (struct ethhdr *)skb_mac_header(skb); + return (hdr); +} + #endif /* _LINUXKPI_LINUX_IF_ETHER_H_ */