From nobody Fri Feb 27 02:30:01 2026 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 4fMXNV30Zvz6T85r for ; Fri, 27 Feb 2026 02:30:02 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNV0QLgz41W7 for ; Fri, 27 Feb 2026 02:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159402; 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=G3clL0NIrPQGBjdxeVKu6wLF8XqKH0u5C3GTwrFs020=; b=ekkI/DvkHOB3HwU31AvhMkj8U+bl17QVS28w/OcJisFQG1ZILzEd1NsE36Y1agwHN8T90H z7T84twJMDlhwi+dFnnoV1hJOrw7QgUlsE5GH7y0DHAtfTnVSsEfjp/b+OZ7xqxY9pGtrm ahPpM+mbYpaFJwYmnc9ODLjuimE0qp5ByAhQjUsKcwqGNu8WYneUU8WvqcmRoCYjPSO+bt YrjHNBuCWfgR4xqSDBVv+Xm+1gB8iV07PCl1U6PgXbtu+C86R3YF3hERHJPCXl16FSNhUe H9BzsYuh/JkeZjezjC9+O6tayQayMTfW968cE7G1d5jIsAtKfInvNuvfFOAcdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159402; a=rsa-sha256; cv=none; b=KiNQLmUaI/Hskg1S05kWiOBC4QBjqBQXSrcYkLbBr3q71f8OxLipsm0dwlbzo6It0T7Gyf zTG1D3/9qkj3D2a5dkzwTqL8sUia8/bWGZ+1O3TXPMfwQKCqYv+GsRH644kJsmRPJrAMlZ 4LyuWMJjl6bDlojT+3QNlbO7WEhZ90yx1m7LxodUT4hCAgK9iaNex5/w72Guce/BuISagf 8QWOiCwDA+kyMN555tj5rjDZxFDrOm/a3MXw27hrE1B3aP8pfYjNLN4jASGVfCwL2Eu4lD qidNQoTy5mPunsNXHzdV//SBlNWcnNHZ4RoU4o8puFkB9QcFjot4+zmYcTL4cQ== 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=1772159402; 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=G3clL0NIrPQGBjdxeVKu6wLF8XqKH0u5C3GTwrFs020=; b=MEMHfMxFGPuZLMumEZ9PIg/wrAgNZCqVWU6cVTYHg0TuvIIUVhaBxj+A6NJSwt7WIeZcZZ 1qJ6X5PIAm5UQZsMzKNAlHlYvgndvZuSY/ewvBtnvLxRcRa3TVAzZbfaqAWt4FUAQsRLFz sQ3Dtd7I6TYRWNpYXjHggknR+6kEYSgnunSdjiPnv7iOgbW/75k2nGuLCHWUkwZJOWPrj0 j51DAm/QZHw2EswuXx1kEf6cYZygXycUcsX+GcESgdzlUsS7EciqleLwGEZhPD4qMdLsiS blIeF/zJUKqBr5FobxOBfTvmj78JmbcVH8LQfgfJkRtmjnxdvusIaHl4FU4/zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNT6rGczyg9 for ; Fri, 27 Feb 2026 02:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22380 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: db3daf95e05f - stable/15 - rtw88: Add bus attachments to the module Makefile 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/15 X-Git-Reftype: branch X-Git-Commit: db3daf95e05fae9149d2779379c4642c12d3968c Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:01 +0000 Message-Id: <69a101a9.22380.5414d9c1@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=db3daf95e05fae9149d2779379c4642c12d3968c commit db3daf95e05fae9149d2779379c4642c12d3968c Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 13:19:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:20 +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 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 (cherry picked from commit 9e175561196066a09c1a89202fd60e0433b87868) --- 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