From nobody Thu Oct 17 13:27:28 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 4XTpXw2pDkz5Z13j; Thu, 17 Oct 2024 13:27:28 +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 4XTpXw2MKGz4j9V; Thu, 17 Oct 2024 13:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729171648; 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=NUfqti+sDezzp4gpGJ7eekUKSZuS9KRSHzIM9U0WI1g=; b=iNJx4i37PWZDd3RwX9CGf+5f51TDEI3XbGAALcRomzprOY9uXO3nLRYIJtDHaP+BDpecI3 AN6j89eZnpmzZMhd6VOX+RE40b7RkTghNGt5ICqguQhPglc+C2L+KOmTntl1X5Ge0iEXNQ Cuje27TdzfCBqlOYeQUVu3gm4umseB3Gl8rIX6DS8IqOlEDWGGgaqijn1mShAXrrLSAeAN 36FkmdEHa0VAEWgzomQKT8A7KOoOGBoZTKa1YCQyQjL7jVd5syTquQL26DbMucku6iDt4E laBAc6Q39dNMX0E8C2n9oiOpcS9mrrIVrrCoITAS3sJftG93HR9qNyRxUXSOEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729171648; 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=NUfqti+sDezzp4gpGJ7eekUKSZuS9KRSHzIM9U0WI1g=; b=KRDwxgjRhcwgFUeffahXasdVEWem0rum/0TZEkmK3CyCjnn6yVPKiGjS/omso9eNEGa0yk lxBqdubRJgs1nCjhLamojmT8T31r5FVVMaSYf3KX/1DPDzT8HencU57hvoVPy04W8c1i+f Edr0A1s6jZX9fehw5ED0+mlVIMytrvh8iRNM+l+FjAPYvr3k64z/Bf3GYcsQ54jQIloeYv dtl62fqml8Jtrfr507W0X//WjIkPiFd3TnKbXko29NeH7YK0plAEGckdc3UKnxkpvzOEng YlWFL8Ogr2auXrrz9v7sMukPmRVGzVg+vdU3R3Je+92jGuXMaQtmz0UpttA+qA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729171648; a=rsa-sha256; cv=none; b=aPhVrx/Hqhh5rdnNAIL33ibDhWt4sxdZtEMqkojkDfZQzuQwgwLy+s7x1XprLjrS1p2QNR lxCu1B7KD2qEn0KCI0NWoxXy2qTV5+YXmoi0+g4o0whAOyFvUbAW8hLU+Dv63rTuTgrp+s D6MbdfOKaksTFAM6TNY6xoymHDo8Ra0+9gDa9o2jdPUikP6nJALcO/34MDFJBQwiz62lrF 9YHJG/aUezd9XRd4133kxyzsFPrDJrVGYOyRKzElsogsZ0kc3MyWK0tLiCS68AZrxrsPc+ wBym2EkcGh7St4slx3TWVCuoggHsB51E67AWYb4c5UWBhYpv9L9Gbi2HijC/ug== 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 4XTpXw1yXGzqsK; Thu, 17 Oct 2024 13:27:28 +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 49HDRSG6011486; Thu, 17 Oct 2024 13:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HDRSe5011483; Thu, 17 Oct 2024 13:27:28 GMT (envelope-from git) Date: Thu, 17 Oct 2024 13:27:28 GMT Message-Id: <202410171327.49HDRSe5011483@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: 105331f658e2 - main - LinuxKPI: netdevice: add alloc_netdev_dummy() 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: 105331f658e2f14fb4daa64dcd076c7369505295 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=105331f658e2f14fb4daa64dcd076c7369505295 commit 105331f658e2f14fb4daa64dcd076c7369505295 Author: Bjoern A. Zeeb AuthorDate: 2024-09-26 21:06:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-17 13:27:05 +0000 LinuxKPI: netdevice: add alloc_netdev_dummy() Add alloc_netdev_dummy() which is needed by an updated rtw88 driver. Given we already call linuxkpi_init_dummy_netdev() ourselves allow the setup function to be NULL to not initialize and start a tasq td twice. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46802 --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 2 ++ sys/compat/linuxkpi/common/src/linux_netdev.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index dde3ad07dec2..cd7d23077a62 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -466,6 +466,8 @@ void linuxkpi_free_netdev(struct net_device *); #define alloc_netdev(_l, _n, _f, _func) \ linuxkpi_alloc_netdev(_l, _n, _f, _func) +#define alloc_netdev_dummy(_l) \ + linuxkpi_alloc_netdev(_l, "dummy", NET_NAME_UNKNOWN, NULL) #define free_netdev(_n) \ linuxkpi_free_netdev(_n) diff --git a/sys/compat/linuxkpi/common/src/linux_netdev.c b/sys/compat/linuxkpi/common/src/linux_netdev.c index fe00e929c168..c36684f9fd97 100644 --- a/sys/compat/linuxkpi/common/src/linux_netdev.c +++ b/sys/compat/linuxkpi/common/src/linux_netdev.c @@ -409,7 +409,8 @@ linuxkpi_alloc_netdev(size_t len, const char *name, uint32_t flags, /* This needs extending as we support more. */ - setup_func(ndev); + if (setup_func != NULL) + setup_func(ndev); return (ndev); }