Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149213782
D55022.id171635.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D55022.id171635.diff
View Options
diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile
--- a/sys/modules/rtw88/Makefile
+++ b/sys/modules/rtw88/Makefile
@@ -1,7 +1,15 @@
+.include <kmod.opts.mk>
+
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 @@
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 24, 1:24 AM (15 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28646376
Default Alt Text
D55022.id171635.diff (2 KB)
Attached To
Mode
D55022: rtw88: Add bus attachments to the module Makefile
Attached
Detach File
Event Timeline
Log In to Comment