From: Mikhail Pchelin Subject: [temp abandoned wip] rtw88 and wifi usb dongle overheating To: tech@openbsd.org Date: Sat, 26 Apr 2025 21:26:12 +0300 Due to circumstances outside of my control I must drop my (very small actually) BSD activity. Despite having @freebsd.org email I've always considered myself as openbsd person, mostly because of the people who build and surround this operating system, who as I feel share my understanding of how work has to be done, thank you for keeping the bar high. For the last several months I've been working on a port for rtw88 driver for OpenBSD from Linux with glue from FreeBSD. Primary motivation for this is having small and powerful nano-usb dongle should improve UX and easy access for frequent snapshot testing for laptops which are not able to use iwx but must use USB wifi, for example because of BIOS blacklisting (roughly a decade ago I ported and fixed speed issue in urtwn for 8188eu, and was using it for several years). I have no access to dmesg@openbsd.org, but I think there are laptops with only usb-dongle wifi and having small and fast 802.11ac device would benefit their users. Also rtw88 porting could open the door for other chips in this driver, including PCI, but they are not my use case, I cared only about nano-usb for myself. The patch is in very early state and I submit it to the list primary for archive purpose, there is very little chance someone to come up to continue of course. In the current state the patch can load firmware, read the MAC, it can send probes (plural). The main problem - for unknown reason it can receive only one frame (first probe resp), after that the chip simply keeps silence. I did compare all the writes by this port and linux driver (around 5k in total) - they were the same, so it's not because I missed something in setting some obscure register. Second problem - the chip is very hot even after a couple minutes of scanning. In March I bought USB analyzer to compare Linux (temp is OK there) and OpenBSD, I was able to spot only this difference: after I setup RX Linux sends 5 IN transactions every 25ms each, OpenBSD - 6 IN transactions, 21ms each (before SOF). Basically OpenBSD querying device more often. My USB knowledge is not enough to understand what does it mean, or even if it's the cause, it's just immediate difference I was able to see. The dongle: https://www.amazon.com/TP-Link-Nano-Archer-T3U-Wireless/dp/B09KTDXPY3?th=1 lsusb for this dongle: https://people.freebsd.org/~misha/lsusb.txt Screenshots of the dump: https://people.freebsd.org/~misha/linux.png https://people.freebsd.org/~misha/openbsd.png Maybe someone with better USB knowledge will have a clue. The rtw88 patch against today master: https://people.freebsd.org/~misha/urtwm_20250426_2.patch The code is dirty, my goal was to make rx/tx as quickly as possible, also it contains GPL (marked with "GPL FUNCTION" comment), because FreeBSD version of this function gives a panic. Last thing, the original driver has no license text attached to it, its files have only SPDX headers: /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ This is legal question whether such license is OK for OpenBSD or not, I had a plan to ask Theo about this after I would be able to make first successful ping, since no talk is serious without a diff, but it happened the way it is. Maybe things will work out and I'll come back to finish this, special thanks to Stefan (stsp@) for his attempt to bring me to the community years ago, sorry for not delivering.