Skip to content
simplestringdevPublic

About

Fork of lwfinger/rtl8188gu with fixes for Linux 6.12 (Debian 13): fortify_panic on regd_name, missing wiphy_register() vendor .policy, and two cfg80211/usb_driver kernel-6.8+ API fixes

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

Fork notes (this repo)

build

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):

  1. rtw_dev_shutdown / kernel 6.8+ — struct usb_driver dropped .drvwrap; the existing version guard excluded 6.8+ from the right branch but fell through to the wrong one instead of the new direct .shutdown field.
  2. fortify_panic on regd_name[0] — a zero-length array (pre-C99 idiom) trips modern GCC's _FORTIFY_SOURCE as 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[]).
  3. cfg80211_ops.set_monitor_channel signature — the driver assumed newer kernels dropped the struct net_device * parameter; this kernel still wants it.
  4. wiphy_register() silently failing — none of the 15 entries in rtw_vendor_cmds[] set .policy, which modern kernels require (WARN_ON(!policy) inside wiphy_register()). Without it, wiphy_register() returns -EINVAL and no wlan interface ever appears — no crash, no obvious error, just silence. This was the hardest one to track down (needed disassembling cfg80211.ko to 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.

rtl8188gu

Repository for the stand-alone RTL8188GU driver.

Compiling & Building

Dependencies

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.

Compiling

make all

Installing

sudo make install

Submitting Issues

Frequently asked Questions

About

Fork of lwfinger/rtl8188gu with fixes for Linux 6.12 (Debian 13): fortify_panic on regd_name, missing wiphy_register() vendor .policy, and two cfg80211/usb_driver kernel-6.8+ API fixes

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages