QCA6174 802.11ac on FreeBSD 13.1-STABLE

From: Jonathan Vasquez <jon_at_xyinn.org>
Date: Fri, 17 Jun 2022 01:08:55 UTC
Hey all,

I recently purchased/received an Atheros QCA6174 (Marketed as: Qualcomm Atheros QCNFA344A NGFF M.2 2230 802.11a/b/g/n/ac WLAN Bluetooth 4.1 WiFi Card T77H644.88) in the mail, and I've installed it on my frame.work laptop (which I've been documenting here: https://xyinn.org/md/freebsd/framework_laptop). I primarily got it to attempt and replace the Intel AX210 with a more stable chip. Since I read in the FreeBSD 13.1 release notes that most atheros chips were supported (and I also know traditionally FreeBSD and Linux both have had a good reputation with Atheros chips, I bought this one). Unfortunately this chip isn't even supported at all (Not even mentioned in dmesg. Only pciconf mentioned it:

none9@pci0:170:0:0: class=0x028000 rev=0x32 hdr=0x00 vendor=0x168c device=0x003e subvendor=0x1a56 subdevice=0x1435
vendor = 'Qualcomm Atheros'
device = 'QCA6174 802.11ac Wireless Network Adapter' class = network

)

After researching, I found that there has been an ath10k port under way for about 7 years now. I decided to try to build and get this running.. at the end I was able to resolve any issues preventing the compilation phase, but I was unable to load any of the bins or even the built if_athp module. I even attempted to load the linux-firmware bins as well but they also failed (I did try Fedora 36 on the laptop and the wireless was immediately picked up and worked).

I left my notes here: https://github.com/erikarn/athp/issues/11#issuecomment-1158331986

root@leslie:/home/jon # uname -a
FreeBSD leslie 13.1-STABLE FreeBSD 13.1-STABLE #0 stable/13-n251124-026e19496cc: Thu Jun 16 19:22:47 EDT 2022 root@leslie:/usr/obj/usr/src/amd64.amd64/sys/DEBUG amd64

I'm also using a GENERIC kernel with the following options (since the if_athp modules need the MA_OWNED flag which is ifdef- around INVARIANTS / INVARIANT_SUPPORT:

include GENERIC
ident DEBUG

options INVARIANTSoptions INVARIANT_SUPPORT

Jonathan Vasquez
PGP: 34DA 858C 1447 509E C77A D49F FB85 90B7 C4CA 5279
Sent with ProtonMail Secure Email