]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: rtl8xxxu: Use correct power off sequence for RTL8192CU
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Thu, 9 Oct 2025 11:55:08 +0000 (14:55 +0300)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 21 Oct 2025 06:44:44 +0000 (14:44 +0800)
commit9b567039e540705c5cf0f39a3344086b6f51b3dd
tree4d8daf22f7d0c8bdc779a09b5a484a79c39947c6
parentfb5183aa65f6af7bc63869ad7f7d0e6505a80a58
wifi: rtl8xxxu: Use correct power off sequence for RTL8192CU

RTL8192CU disappears and reappears when rtl8xxxu is unloaded:

usbcore: deregistering interface driver rtl8xxxu
wlp3s0f3u2: deauthenticating from ... by local choice (Reason: 3=DEAUTH_LEAVING)
usb 1-2: rtl8xxxu_active_to_emu: Disabling MAC timed out
usb 1-2: USB disconnect, device number 7
usb 1-2: disconnecting
usb 1-2: new high-speed USB device number 8 using xhci_hcd
usb 1-2: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: 802.11n WLAN Adapter
usb 1-2: Manufacturer: Realtek
usb 1-2: SerialNumber: 00e04c000001

This is because rtl8xxxu is using the power off sequence for RTL8723AU.
Add the correct power off sequence for RTL8192CU.

rtl8xxxu_power_off(), rtl8xxxu_active_to_emu(), and
rtl8xxxu_emu_to_disabled() are now only used for RTL8723AU, so move
them to 8723a.c and rename them to have the "rtl8723au" prefix.

Tested only with RTL8192CU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/b9d3f137-12ce-4bd9-8ada-3b8874bc3615@gmail.com
drivers/net/wireless/realtek/rtl8xxxu/8192c.c
drivers/net/wireless/realtek/rtl8xxxu/8723a.c
drivers/net/wireless/realtek/rtl8xxxu/core.c
drivers/net/wireless/realtek/rtl8xxxu/regs.h
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h