From nobody Fri Jul 01 13:11:45 2022 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 57B2A875200; Fri, 1 Jul 2022 13:11:45 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LZFw1231gz4Sf2; Fri, 1 Jul 2022 13:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656681105; 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=IrzA58tOsQc7vWJRKTJSNvxFcdRqVOG9EV49UFg2Cy8=; b=wWtwp6f0lJ4Wt0Kto/HSqCf+PeULUsWQfw62nyePKQ4T5lL8d6c9EGtGWCr1cNexfFlim5 d6t2SQnSkJ2Zw8q3ILc721tM3tfnBLpQ4tasZZF+sADtd4n4vcb8mwm+7xnH8DBfzfIPDd m+9+MIYKKz3hdH1o39H3QtiPsvKWXPnmVJCFHqu13C6+PlHl4iXZ/rPcYBF5sKtCeAG2bc kZ5DPgsLaVhw5zD+t/OoXX/xLwK+T4nsEz1P2UIPpcGWp2Tnd0piB5j7I+5aVkfqk0OPDR fA798DHnhJWRRuRNcB8IY0EV4QXCqn05lI4wDp20Sracz8F+OdA0vFk1adzLrQ== 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 270111BCE3; Fri, 1 Jul 2022 13:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 261DBjxC020723; Fri, 1 Jul 2022 13:11:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 261DBjig020722; Fri, 1 Jul 2022 13:11:45 GMT (envelope-from git) Date: Fri, 1 Jul 2022 13:11:45 GMT Message-Id: <202207011311.261DBjig020722@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: 17732dd8f01b - main - Revert "rtw88: split driver up into a core and pci part" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 17732dd8f01bae62177a55309c77b4b4f404096d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656681105; 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=IrzA58tOsQc7vWJRKTJSNvxFcdRqVOG9EV49UFg2Cy8=; b=Tmm0Ip0LTiOPtHqWoLwMEIJP1AC3bdt8aSGBs/0PJfTLHWk97YsB2z0pTlrrZAxVK8YEGP /D87nOz4CZ2etoTInp9+MtVzwoyHnuUZvkQSoaiOIGuwrRp+UZmWDR5ruY7RflxxpRtduz BfX9PKiQmcl6wUaB+KJXlMqMlHZAN4b2gZ9VqCYwOof0f/LhxPvGyUz3EDt3flk/r6iFYc dtayVTaNYFJYNTE0dz4d82zEXXHBmlc+hIKKFwYQfKCh18Mt7/B8plWUpsxYOxBZP6xEy8 1Pp/FNvxrAqo/t5nbrCq/twdhUTS4r1ab5+uK2u1ivVlKgJMbc7Q8GPXZtiZKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656681105; a=rsa-sha256; cv=none; b=i6gw9K4ofG3NIKwXZtf6WlL59M5nXiswm9h37fDW8c1zNizOBff4nnsKRDlFvmyNWLxhY5 6N/l5aDSVxGeioktsLlLhIGD2nwWSsmkZxbSDAtgZI0dAixtopQo62pvH4lsLt2mj/Dz8o GQJ6A3BA3nLY6YV9to1gbJCdpT16frY5/4lwZd3rpHx+PElQvIk7jciN40vfImwyb/aHxt N2ApTdvn0BFPlVXe9n17zsXLXb6RLMMYukjFWL3v9GFmfFwFbUOLMr1/5Ndv6pDucNRihz JWpX5mh8PfVJ9tGtKxPuXRI2SIVjfvo+z+uvl5Y2ydOwBGKurwQVbThe5yZH1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=17732dd8f01bae62177a55309c77b4b4f404096d commit 17732dd8f01bae62177a55309c77b4b4f404096d Author: Bjoern A. Zeeb AuthorDate: 2022-07-01 13:06:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-07-01 13:06:31 +0000 Revert "rtw88: split driver up into a core and pci part" After some discussion, for now, simply revert the change to split the driver up into if_rtw88_core.ko and if_rtw88_pci.ko as we do not have an if_rtw88.ko anymore. We do have code trying to auto-load modules, e.g. ifconfig, based on if_xxx.ko. We could, based on Makefile magic or further code, generate a if_rtw88.ko module with proper dependencies and keep this but for simplicity stay with the one slightly larger module for now. Should code appear to do this "properly" we can revisit this once USB support has landed. Slightly update the module Makefile to keep the separation of files between core and pci bits visible and maintainable for the future. This reverts commit 0f7b9777f8f39fbc230b3e1de2f844d9f839adea. --- share/man/man4/rtw88.4 | 4 ++-- sys/contrib/dev/rtw88/main.c | 8 -------- sys/contrib/dev/rtw88/pci.c | 10 ++++++---- sys/modules/rtw88/Makefile | 44 +++++++++++++++++++++++++++++++++++++---- sys/modules/rtw88/Makefile.inc | 23 --------------------- sys/modules/rtw88/core/Makefile | 17 ---------------- sys/modules/rtw88/pci/Makefile | 13 ------------ 7 files changed, 48 insertions(+), 71 deletions(-) diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 43a51405d1d5..0ace002e4bde 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 2022 +.Dd May 5, 2022 .Dt rtw88 4 .Os .Sh NAME @@ -41,7 +41,7 @@ lines in .Xr rc.conf 5 to manually load the driver as a module at boot time: .Bd -literal -offset indent -kld_list="${kld_list} if_rtw88_pci" +kld_list="${kld_list} if_rtw88" .Ed .Pp The driver should automatically load any diff --git a/sys/contrib/dev/rtw88/main.c b/sys/contrib/dev/rtw88/main.c index 8c720ab1a10f..35381a35f5d9 100644 --- a/sys/contrib/dev/rtw88/main.c +++ b/sys/contrib/dev/rtw88/main.c @@ -2203,11 +2203,3 @@ EXPORT_SYMBOL(rtw_unregister_hw); MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek 802.11ac wireless core module"); MODULE_LICENSE("Dual BSD/GPL"); -#if defined(__FreeBSD__) -MODULE_VERSION(rtw88_core, 1); -MODULE_DEPEND(rtw88_core, linuxkpi, 1, 1, 1); -MODULE_DEPEND(rtw88_core, linuxkpi_wlan, 1, 1, 1); -#ifdef CONFIG_RTW88_DEBUGFS -MODULE_DEPEND(rtw88_core, debugfs, 1, 1, 1); -#endif -#endif diff --git a/sys/contrib/dev/rtw88/pci.c b/sys/contrib/dev/rtw88/pci.c index dd553c87ea59..6c836be771bc 100644 --- a/sys/contrib/dev/rtw88/pci.c +++ b/sys/contrib/dev/rtw88/pci.c @@ -1951,8 +1951,10 @@ MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek 802.11ac wireless PCI driver"); MODULE_LICENSE("Dual BSD/GPL"); #if defined(__FreeBSD__) -MODULE_VERSION(rtw88_pci, 1); -MODULE_DEPEND(rtw88_pci, rtw88_core, 1, 1, 1); -MODULE_DEPEND(rtw88_pci, linuxkpi, 1, 1, 1); -MODULE_DEPEND(rtw88_pci, linuxkpi_wlan, 1, 1, 1); +MODULE_VERSION(rtw_pci, 1); +MODULE_DEPEND(rtw_pci, linuxkpi, 1, 1, 1); +MODULE_DEPEND(rtw_pci, linuxkpi_wlan, 1, 1, 1); +#ifdef CONFIG_RTW88_DEBUGFS +MODULE_DEPEND(rtw_pci, debugfs, 1, 1, 1); +#endif #endif diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 972065e7f208..aaaadfdca2d7 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -1,7 +1,43 @@ # $FreeBSD$ -SUBDIR= core -SUBDIR+= pci -#SUBDIR+= usb +DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 -.include +.PATH: ${DEVRTW88DIR} + +WITH_CONFIG_PM= 0 + +KMOD= if_rtw88 + +# Core parts. +SRCS= main.c +SRCS+= bf.c coex.c debug.c efuse.c fw.c mac.c mac80211.c +SRCS+= phy.c ps.c regd.c +SRCS+= rx.c sar.c sec.c tx.c util.c + +.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 +SRCR+= wow.c +CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} +.endif + +# PCI parts. +SRCS+= pci.c +SRCS+= rtw8723d.c rtw8723d_table.c rtw8723de.c # 11n +SRCS+= rtw8821c.c rtw8821c_table.c rtw8821ce.c # 11ac +SRCS+= rtw8822b.c rtw8822b_table.c rtw8822be.c # 11ac +SRCS+= rtw8822c.c rtw8822c_table.c rtw8822ce.c # 11ac + +# Other +SRCS+= ${LINUXKPI_GENSRCS} +SRCS+= opt_wlan.h opt_inet6.h opt_inet.h + +# Helpful after fresh imports. +#CFLAGS+= -ferror-limit=0 + +CFLAGS+= -DKBUILD_MODNAME='"rtw88"' + +CFLAGS+= -I${DEVRTW88DIR} +CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= -DCONFIG_RTW88_DEBUG +#CFLAGS+= -DCONFIG_RTW88_DEBUGFS + +.include diff --git a/sys/modules/rtw88/Makefile.inc b/sys/modules/rtw88/Makefile.inc deleted file mode 100644 index b4a682a35519..000000000000 --- a/sys/modules/rtw88/Makefile.inc +++ /dev/null @@ -1,23 +0,0 @@ -# $FreeBSD$ - -# Common information shared by all submodule builds. - -DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 - -.PATH: ${DEVRTW88DIR} - -WITH_CONFIG_PM= 0 - -# Other -SRCS+= ${LINUXKPI_GENSRCS} -SRCS+= opt_wlan.h opt_inet6.h opt_inet.h - -# Helpful after fresh imports. -CFLAGS+= -ferror-limit=0 - -CFLAGS+= -I${DEVRTW88DIR} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include -CFLAGS+= -DCONFIG_RTW88_DEBUG -#CFLAGS+= -DCONFIG_RTW88_DEBUGFS - -# end diff --git a/sys/modules/rtw88/core/Makefile b/sys/modules/rtw88/core/Makefile deleted file mode 100644 index e19103ce8417..000000000000 --- a/sys/modules/rtw88/core/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $FreeBSD$ - -KMOD= rtw88_core - -SRCS= main.c -SRCS+= bf.c coex.c debug.c efuse.c fw.c mac.c mac80211.c -SRCS+= phy.c ps.c regd.c -SRCS+= rx.c sar.c sec.c tx.c util.c - -.if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 -SRCR+= wow.c -CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} -.endif - -CFLAGS+= -DKBUILD_MODNAME='"rtw88_core"' - -.include diff --git a/sys/modules/rtw88/pci/Makefile b/sys/modules/rtw88/pci/Makefile deleted file mode 100644 index 070e6c8e2bc0..000000000000 --- a/sys/modules/rtw88/pci/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $FreeBSD$ - -KMOD= if_rtw88_pci - -SRCS+= pci.c -SRCS+= rtw8723d.c rtw8723d_table.c rtw8723de.c # 11n -SRCS+= rtw8821c.c rtw8821c_table.c rtw8821ce.c # 11ac -SRCS+= rtw8822b.c rtw8822b_table.c rtw8822be.c # 11ac -SRCS+= rtw8822c.c rtw8822c_table.c rtw8822ce.c # 11ac - -CFLAGS+= -DKBUILD_MODNAME='"rtw88"' - -.include