aboutsummaryrefslogtreecommitdiff
path: root/sys/modules
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2026-01-13 21:09:51 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2026-01-14 18:08:39 +0000
commitf5a77dc8f8df09a907c2a2bdf86802513b1ebb15 (patch)
tree6a5bdbd41f3fd80fc7488f65e13549774ea72bdf /sys/modules
parent4162a419a475089c8a3d2350de40c58b023e9288 (diff)
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/iwlwifi/Makefile7
-rw-r--r--sys/modules/rtw89/Makefile13
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}