git: f5a77dc8f8df - main - iwlwifi/rtw89: improve module Makefile dependency on ACPI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Jan 2026 18:09:56 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=f5a77dc8f8df09a907c2a2bdf86802513b1ebb15
commit f5a77dc8f8df09a907c2a2bdf86802513b1ebb15
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-01-13 21:09:51 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-01-14 18:08:39 +0000
iwlwifi/rtw89: improve module Makefile dependency on ACPI
In order to compile iwlwifi(4) and rtw89(4) on RISC-V [1] make the
currently manually tracked ACPI support option automatic based on
DEV_ACPI.
rtw89(4) is missing proper CONFIG_ACPI checks in the driver (or the
mandatory dependency on ACPI) even upstream it seems. We just added
that check to the modules/Makefile until this is fixed.
[1] https://mail-archive.freebsd.org/cgi/getmsg.cgi?fetch=5947+0+archive/2026/freebsd-wireless/20260112.freebsd-wireless
Sponosred by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D54694
---
sys/modules/iwlwifi/Makefile | 7 +++++--
sys/modules/rtw89/Makefile | 13 +++++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile
index 6fe64a611900..39b4a48497b4 100644
--- a/sys/modules/iwlwifi/Makefile
+++ b/sys/modules/iwlwifi/Makefile
@@ -4,7 +4,9 @@ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi
WITH_CONFIG_PM= 0
WITH_DEBUGFS= 0
+.if ${KERN_OPTS:MDEV_ACPI}
WITH_CONFIG_ACPI= 1
+.endif
KMOD= if_iwlwifi
@@ -60,10 +62,11 @@ CFLAGS+= -DCONFIG_PM_SLEEP
.endif
.if defined(WITH_CONFIG_ACPI) && ${WITH_CONFIG_ACPI} > 0
-SRCS+= fw/acpi.c
+SRCS.DEV_ACPI+= fw/acpi.c
CFLAGS+= -DCONFIG_ACPI
-CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
.endif
+# This needs to always stay on for the LinuxKPI header file.
+CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
# Other
SRCS+= ${LINUXKPI_GENSRCS}
diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile
index 1307abf3d9b4..98174fff2a1b 100644
--- a/sys/modules/rtw89/Makefile
+++ b/sys/modules/rtw89/Makefile
@@ -4,13 +4,16 @@ DEVRTW89DIR= ${SRCTOP}/sys/contrib/dev/rtw89
WITH_CONFIG_PM= 0
WITH_DEBUGFS= 0
+.if ${KERN_OPTS:MDEV_ACPI}
+WITH_CONFIG_ACPI= 1
+.endif
KMOD= if_rtw89
SRCS= core.c
SRCS+= pci.c pci_be.c
SRCS+= chan.c mac80211.c mac.c mac_be.c phy.c phy_be.c fw.c
-SRCS+= acpi.c cam.c efuse.c efuse_be.c regd.c sar.c coex.c ps.c ser.c
+SRCS+= cam.c efuse.c efuse_be.c regd.c sar.c coex.c ps.c ser.c
SRCS+= util.c
SRCS+= rtw8852a.c rtw8852a_rfk.c rtw8852a_rfk_table.c rtw8852a_table.c
SRCS+= rtw8852ae.c
@@ -26,6 +29,13 @@ SRCS+= rtw8852bte.c
SRCS+= rtw8922a.c rtw8922a_rfk.c
SRCS+= rtw8922ae.c
+.if defined(WITH_CONFIG_ACPI) && ${WITH_CONFIG_ACPI} > 0
+SRCS.DEV_ACPI+= acpi.c
+CFLAGS+= -DCONFIG_ACPI
+.endif
+# This needs to always stay on for the LinuxKPI header file.
+CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
+
# USB parts
#SRCS+= rtw8851bu.c rtw8852bu.c
#SRCS+= usb.c
@@ -44,7 +54,6 @@ SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h
CFLAGS+= -DKBUILD_MODNAME='"rtw89"'
CFLAGS+= -DLINUXKPI_VERSION=61700
-CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI
CFLAGS+= -I${DEVRTW89DIR}
CFLAGS+= ${LINUXKPI_INCLUDES}