This is a fork of lwfinger/rtl8188gu with four additional fixes needed to get the driver building and loading cleanly on Linux 6.12 (Debian 13 "trixie"), on top of the kernel-6.7/6.8 fixes already merged upstream.
What's fixed here (see individual commits for full details):
rtw_dev_shutdown/ kernel 6.8+ —struct usb_driverdropped.drvwrap; the existing version guard excluded 6.8+ from the right branch but fell through to the wrong one instead of the new direct.shutdownfield.fortify_paniconregd_name[0]— a zero-length array (pre-C99 idiom) trips modern GCC's_FORTIFY_SOURCEas a real (false-positive) buffer overflow the moment a regulatory domain name is copied into it, causing a genuine kernel panic on load. Fixed by switching to a proper C99 flexible array member (regd_name[]).cfg80211_ops.set_monitor_channelsignature — the driver assumed newer kernels dropped thestruct net_device *parameter; this kernel still wants it.wiphy_register()silently failing — none of the 15 entries inrtw_vendor_cmds[]set.policy, which modern kernels require (WARN_ON(!policy)insidewiphy_register()). Without it,wiphy_register()returns-EINVALand no wlan interface ever appears — no crash, no obvious error, just silence. This was the hardest one to track down (needed disassemblingcfg80211.koto find the exact validation, since it doesn't show up in dmesg by file/line the way a WARN_ON usually does).
All four are verified fixed by testing on a real RTL8188GU dongle (0bda:b711) on
Debian 13, kernel 6.12.105+deb13-amd64: after these commits, the module builds
cleanly, loads without warnings, and wiphy_register() succeeds — the wlx...
interface appears correctly via iw dev.
What's not fixed here, honestly: bringing the interface up
(ip link set wlx... up) still fails on my setup with a USB transport-level error
(rtw_is_surprise_removed() triggers during the firmware upload / power-on sequence).
That failure only reproduces when the device is reached through nested virtualization
(USB passthrough via QEMU, itself running as a guest — physical hardware → OpenBSD host
→ QEMU → Debian VM). It's very likely a timing/latency artifact of that specific stack,
not a driver bug — the four fixes above are unrelated to it and stand on their own.
If you hit this on bare metal (no passthrough), please open an issue; I'd genuinely
like to know if it's real on real hardware too.
License: GPL-2.0, same as upstream (see LICENSE).
IMPORTANT - PLEASE READ:
Beginning on November 4, 2019, I will NO LONGER support people that have downloaded the source as a zip file. Using git has much more flexibility. In addition, there is much less liklihood that a user will contact me with a problem that is ALREADY fixed.
If your system says that /lib/modules/...../build does not exist, you have not installed the kernel headers, you have done it incorrectly, or you are not running the kernel for which the headers have been installed. The necessary steps are dependent on which distro you are using. Creating a new issue and asking at GitHub will not be productive.
Unsolicited E-mail sent to my private address will be ignored!!
If a build fails that previously worked, perform a 'git pull' and retry before reporting a problem. As noted, if you had downloaded the source in zip form, then you would need to get an entirely new source file. That is why using git, which downloads only the changed lines, is required.
Repository for the stand-alone RTL8188GU driver.
To compile the driver, you need to have make and a compiler installed. In addition, you must have the kernel headers installed. If you do not understand what this means, consult your distro.
make all
sudo make install