Page MenuHomeFreeBSD

rtw88: Add bus attachments to the module Makefile
Needs ReviewPublic

Authored by bz on Sat, Jan 31, 8:05 PM.
Tags
None
Referenced Files
F144371357: D55022.diff
Sun, Feb 8, 2:35 AM
Unknown Object (File)
Sun, Feb 1, 7:10 PM
Unknown Object (File)
Sun, Feb 1, 4:52 PM
Unknown Object (File)
Sun, Feb 1, 3:41 PM
Unknown Object (File)
Sun, Feb 1, 1:20 PM
Unknown Object (File)
Sun, Feb 1, 10:35 AM
Subscribers
None

Details

Reviewers
jhb
imp
Summary

In addition to PCIe we now 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 "WITH"
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 laodable.

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
MFC after: 3 days
Discussed with: imp and jhb (2022, 2024), see also 17732dd8f01b [1]

Test Plan

review just for the build time checks for the bus parts.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70302
Build 67185: arc lint + arc unit

Event Timeline

bz requested review of this revision.Sat, Jan 31, 8:05 PM
bz created this revision.

@jhb @imp Are the two bus attachment .if checks here with ${KERN_OPTS:..} as you were thinking/expect? If that is all right I am good wit this. You can just leave a comment. No need to accept.

I didn't notice before, but all the variables starting with WITH could collide with future options. Why'd you use those named?

In D55022#1261005, @imp wrote:

I didn't notice before, but all the variables starting with WITH could collide with future options. Why'd you use those named?

Felt natural. Were local only.

I'll change them to RTW88_FOO . Or WITH_RTW88_FOO ? Likely should do the same for iwlwifi and rtw89 (and mt76) too. I'll make that a separate pass.

The question remains about the compile time magic got KERN_OPTS as expected?