From nobody Thu Oct 31 14:34:50 2024 X-Original-To: dev-commits-src-branches@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 4XfRNB1k7fz5bpK8; Thu, 31 Oct 2024 14:34:50 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfRNB1FR5z47f0; Thu, 31 Oct 2024 14:34:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730385290; 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=UB/L6CLB7QW6OOhg9EUsc8TnVA+pSzQf4B/dwP1taU4=; b=xiqjvgYhfMdL/woPanFtMYmjzjNRfxjr68m4NdgMRqr1Jedad1BMcurkLFXZqaqqRM23wn 4zEE2pwWJA19uU3tD+mbvzh5N/8h1kkFUBxu7aHO10OYA6eCwYsBAKGuDsE81u/3upoDIF +ZSXQeLi/iQz3EQ0tSXsJ2OYZ/xwIGqJx+wnb02Vpy5tTvcAxiDM5B0vHe66W4m94fSuXM 0Z7WMx5wVi+8ZjiVu2vBBgjqopWlx0uFuqE753hkc8djILqQx9PhQ79WM6/DiIyr+LJ2bq DdcZ19JJwLclL+14y8rDB9Vd+SzpERv13uCnVCLU96aVi+IrZUt2X+LufX0+Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730385290; 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=UB/L6CLB7QW6OOhg9EUsc8TnVA+pSzQf4B/dwP1taU4=; b=tnPq28uXqwqPjAJmSIMNCdbVUz9qxzip8qY6QhzNbxiaCzbNVQIRXk09Ru5CigDiA/lVkw /vgmAR9DwwRNziSTC3tWbXf7Cte4MbtvT4QmS3rBJwYIsZclqaj8rc6CaeRNJJYUmdGXl2 SILIt80iBGJ5WbmODUSg8+x4YHUjB4t1ZaP5MSOg+KubGlfA1Bd/IFnYujXobBTzYwNn4i paxX9kLRvW/gOolLzH7wIf+jW17fgHmQJ/OqxAIvE6cDSV6e+QYKQfrsSogxS/7qEbIxNW eWvG9zQTaGaMZJsC+cvzcFvzRMGxxlVR/XANv/qZG+ncVRJUxLxPgU4+NfHcYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730385290; a=rsa-sha256; cv=none; b=TgsnQsbkhZJJGPyRZsTxcv3sZZCcUCuRxWi0XJmkO/Fv+32Ww7LjzI6LHKNmDEfQy8OxBo BjXHoyxVsalUu4w/360xZqoXobZBiD/hJtuLam4jLcXlpAAZlQo6GlBDhaeDxXIZgPh663 skR+01kXGs3zGGdafv+EPE8cTdcra23uTV34EBacvVAWWyZlThhQTUI415vZACuNvWsF0D Yr7iLFkGbn1tj1Pbvuqk3Trx+pGYR1He2pOapGrQf6/kTSM6+X1DfCjHG3bTgzbxmgkJz0 1Ss/KLoNqrd0lLskRRODPVrOraNY6E8/DUqnAKKtoWjfdWnD6tYq0AC/RCFyfA== 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 4XfRNB0sfPzgMx; Thu, 31 Oct 2024 14:34:50 +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 49VEYoLn004966; Thu, 31 Oct 2024 14:34:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VEYoeC004963; Thu, 31 Oct 2024 14:34:50 GMT (envelope-from git) Date: Thu, 31 Oct 2024 14:34:50 GMT Message-Id: <202410311434.49VEYoeC004963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0dee359c0942 - stable/14 - LinuxKPI: netdevice: add alloc_netdev_dummy() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0dee359c094209a56ae96546c1c4b03551e3b305 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0dee359c094209a56ae96546c1c4b03551e3b305 commit 0dee359c094209a56ae96546c1c4b03551e3b305 Author: Bjoern A. Zeeb AuthorDate: 2024-09-26 21:06:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-31 14:33:56 +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 Differential Revision: https://reviews.freebsd.org/D46802 (cherry picked from commit 105331f658e2f14fb4daa64dcd076c7369505295) --- 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 61342395f03c..2ca1784896de 100644 --- a/sys/compat/linuxkpi/common/src/linux_netdev.c +++ b/sys/compat/linuxkpi/common/src/linux_netdev.c @@ -410,7 +410,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); }