git: 3c6c9a9f043b - stable/15 - ath10k: modules Makefile bus attachments

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 27 Feb 2026 02:29:58 UTC
The branch stable/15 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=3c6c9a9f043b30523329c06bf9e1ec1954ff6831

commit 3c6c9a9f043b30523329c06bf9e1ec1954ff6831
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2026-02-07 22:31:59 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-02-26 23:05:59 +0000

    ath10k: modules Makefile bus attachments
    
    Given USB in theory compiles add it to the Makefile.  The upstream
    support was never finished and I see little chances it ever will be
    so keep USB disabled by default.
    
    (cherry picked from commit 32efafda38288848ec71e97eddf085ee0c108109)
---
 sys/modules/ath10k/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile
index 93518c66f89f..16f481116357 100644
--- a/sys/modules/ath10k/Makefile
+++ b/sys/modules/ath10k/Makefile
@@ -2,6 +2,10 @@ DEVATH10KDIR=	${SRCTOP}/sys/contrib/dev/athk/ath10k
 
 .PATH: ${DEVATH10KDIR}
 
+# Bus attachments.
+WITH_PCI=		1
+WITH_USB=		0	# Never finished upstream, not working.
+
 WITH_CONFIG_FWLOG=	1
 WITH_LEDS=		0
 
@@ -12,7 +16,15 @@ SRCS+=	htc.c htt.c htt_rx.c htt_tx.c
 SRCS+=	txrx.c wmi.c wmi-tlv.c
 SRCS+=	p2p.c swap.c
 
+# 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
+.endif
+
+# USB parts; USB can be loaded and is unconditional on any kernel config.
+.if defined(WITH_USB) && ${WITH_USB} > 0
+SRCS+=	usb.c
+.endif
 
 # Other
 SRCS+=	${LINUXKPI_GENSRCS}