From nobody Tue Feb 10 10:16:54 2026 X-Original-To: dev-commits-src-all@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 4f9HY26gjgz6RpcR for ; Tue, 10 Feb 2026 10:16:54 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f9HY24JcBz3L17 for ; Tue, 10 Feb 2026 10:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770718614; 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=tYOvYqxYSsF1UWKOCLYANWaxljExD6qxj4n7Jvkln7c=; b=gb4pNT4ULKU76bUhSzKhPb3mFjXubdTACkzX/wvri7KGtQQhhM/4gYZ91n2xPnFN+9V9o2 93lAa/Ypu6uvz5TuHQuF1rx90Vi4tPcfcQEEWJDrBBqKzysFoufiOqfixBnkFIAALBXe2T w+TfRG/srSV3bjPvZrsgHZIxRlONuoiHE14UC5AxK1eLP1/fd2V9PLKFOc0VtKaG9pkyvv Rh/F4lJxDjVXnD+LMlbJqz75aZ49HtVNSC1cS69VdUFqOgNwYrII3HWukNLnPC5WoLfABb ttcTgMgmOF4YRjgHCJWfPaTkqrv5nJhM/iTlklyo5G7DoPGdN75Ek3cRFSil5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770718614; a=rsa-sha256; cv=none; b=l8EV7YgTI+vS6/BgKaYqjm8R1zXzWToZ3JVTpWS8wZolQaRPH++R9zbwvw1Yrhbs/2GULg YR/YUxrEAXgm6k0Ue5Fmug3Ua0/6hYK2EK/GzD5UxLPEn3me8+2CsvOp8qrE5xdAqHa7Sy bvUOpqAicNXPewQtOtZ7n2zbBuu4373dp/D8R5kgxg5+1nEf+F4Ys+G0aKy8Mkj/8CzPI4 NPfC+s1MFC3WOPBjUWAHVciT1tJQLUN6quGQemE8BD3EyN6ciORzhs6hPh6pazEQk9ZZzn 7IfoTFp5E0Mtw9xI3MEUt4/F6LBpMlwdSdKNrV1EfNA3Sp9b3FRCeUME87RvqA== 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=1770718614; 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=tYOvYqxYSsF1UWKOCLYANWaxljExD6qxj4n7Jvkln7c=; b=UrBRebk8w09HxTPRywx0tMKvuR1Wt/vELPc5ScFaJwZnpNnXsH+tnt61TcEVIZtmoQvObc goIZESrFN1QI7H3BmrXjeKQE4DaW06QKIIG1S7u8lXExF+t+SkmomPjHMb9Fwj6A2Dj/IW hBadEd2FiiwLkYnf29FFd6zDPDT/PMTYLTQOAs5nGNr5VA89m63TBfevt/iL/Lr8pKkeBg EgrP2+8du3PyPRIG/uewHqz+BFjEM643FZW6bm6i8r6UbWtsmb7diq1LTmkXtr9ZQ5/Luj 34AsebKFb3L6kAxl5ZwdlkQtycupN7ojxOMwKwuUtuQMH61hzhQvmA9hSnsIOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f9HY23rXdz1DF4 for ; Tue, 10 Feb 2026 10:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d0ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Feb 2026 10:16:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 9e1755611960 - main - rtw88: Add bus attachments to the module Makefile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9e175561196066a09c1a89202fd60e0433b87868 Auto-Submitted: auto-generated Date: Tue, 10 Feb 2026 10:16:54 +0000 Message-Id: <698b0596.1d0ac.29a3b02d@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e175561196066a09c1a89202fd60e0433b87868 commit 9e175561196066a09c1a89202fd60e0433b87868 Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 13:19:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-10 10:16:34 +0000 rtw88: Add bus attachments to the module Makefile In addition to PCIe we will support USB and also prepare for SDIO (still disabled locally). The module SRCS are split up into a common part, which we always add. All three bus parts are guarded by a local variable in the Makefile. In addition the PCI parts require PCI to be compiled into the kernel. We add that check in case of, e.g., SoCs with SDIO but no PCI, which may not have PCI in the kernel config and thus the module would fail to attach. USB has no additional check as it is fully loadable and does not have to be in a kernel config. SDIO depends on an MMCCAM-enabled kernel but is otherwise loadable. While we could, we are not splitting the various bus attachments into individual modules as we generally do not do that in FreeBSD. [1] Sponsored by: The FreeBSD Foundation MFC after: 3 days Discussed with: imp and jhb (2022, 2024), see also 17732dd8f01b [1] OKed by: imp (KERN_OPTS checks initially suggested by jhb) Differential Revision: https://reviews.freebsd.org/D55022 --- sys/modules/rtw88/Makefile | 82 +++++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 0ce6ad3f99bb..2347093db1a5 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -1,7 +1,15 @@ +.include + DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} +# Bus attachments. +WITH_PCI= 1 +WITH_USB= 0 +WITH_SDIO= 0 + +# Options. WITH_CONFIG_PM= 0 WITH_DEBUGFS= 1 WITH_LEDS= 0 @@ -19,41 +27,69 @@ SRCS+= wow.c CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} .endif -# PCI parts. +# Common +SRCS+= rtw8723x.c # 87x3 common +SRCS+= rtw8703b.c rtw8703b_tables.c # 11n +SRCS+= rtw8723d.c rtw8723d_table.c # 11n +SRCS+= rtw8814a.c rtw8814a_table.c # 11ac +SRCS+= rtw8821c.c rtw8821c_table.c # 11ac +SRCS+= rtw8822b.c rtw8822b_table.c # 11ac +SRCS+= rtw8822c.c rtw8822c_table.c # 11ac + +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c -SRCS+= rtw8723x.c # 87x3 common -SRCS+= rtw8703b.c rtw8703b_tables.c # 11n -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 -SRCS+= rtw8814a.c rtw8814a_table.c rtw8814ae.c # 11ac - -# USB parts -#SRCS+= rtw88xxa.c # 88xxa common -#SRCS+= rtw8812a.c rtw8812a_table.c rtw8812au.c -#SRCS+= rtw8814au.c -#SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c -#CFLAGS+= -DCONFIG_RTW88_USB +SRCS+= rtw8723de.c +SRCS+= rtw8814ae.c +SRCS+= rtw8821ce.c +SRCS+= rtw8822be.c +SRCS+= rtw8822ce.c +.endif + +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +SRCS+= rtw8723du.c +SRCS+= rtw88xxa.c # 88xxa common +SRCS+= rtw8812a.c rtw8812a_table.c rtw8812au.c +SRCS+= rtw8814au.c +SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c +SRCS+= rtw8821cu.c +SRCS+= rtw8822bu.c +SRCS+= rtw8822cu.c + +CFLAGS+= -DCONFIG_RTW88_USB +.endif + +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +SRCS+= rtw8723cs.c +SRCS+= rtw8723ds.c +SRCS+= rtw8821cs.c +SRCS+= rtw8822bs.c +SRCS+= rtw8822cs.c +.endif .if defined(WITH_LEDS) && ${WITH_LEDS} > 0 CFLAGS+= -DCONFIG_RTW88_LEDS SRCS+= led.c .endif +.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +CFLAGS+= -DCONFIG_RTW88_DEBUGFS +.endif + # Other -SRCS+= ${LINUXKPI_GENSRCS} -SRCS+= opt_wlan.h opt_inet6.h opt_inet.h +SRCS+= opt_wlan.h opt_inet6.h opt_inet.h +SRCS+= ${LINUXKPI_GENSRCS} -CFLAGS+= -DKBUILD_MODNAME='"rtw88"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -I${DEVRTW88DIR} -CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW88_DEBUG -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 -CFLAGS+= -DCONFIG_RTW88_DEBUGFS -.endif + +CFLAGS+= -DKBUILD_MODNAME='"rtw88"' +CFLAGS+= -DLINUXKPI_VERSION=61900 # Helpful after fresh imports. #CFLAGS+= -ferror-limit=0