]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: rtw88: usb: Upload the firmware in bigger chunks
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Sat, 10 May 2025 12:22:24 +0000 (15:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:11:15 +0000 (11:11 +0100)
commit09f7616cb5fe3a5407ce224622c5c57fa49b386b
tree7470c76c53e77c10733ed5800cb89545dae49c4b
parent314053de3a917144807e95eb779c1c2c61835ffe
wifi: rtw88: usb: Upload the firmware in bigger chunks

commit 80fe0bc1659c0ccc79d082e426fa376be5df9c04 upstream.

RTL8811AU stops responding during the firmware download on some systems:

[  809.256440] rtw_8821au 5-2.1:1.0: Firmware version 42.4.0, H2C version 0
[  812.759142] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: renamed from wlan0
[  837.315388] rtw_8821au 1-4:1.0: write register 0x1ef4 failed with -110
[  867.524259] rtw_8821au 1-4:1.0: write register 0x1ef8 failed with -110
[  868.930976] rtw_8821au 5-2.1:1.0 wlp48s0f4u2u1: entered promiscuous mode
[  897.730952] rtw_8821au 1-4:1.0: write register 0x1efc failed with -110

Maybe it takes too long when writing the firmware 4 bytes at a time.

Write 196 bytes at a time for RTL8821AU, RTL8811AU, and RTL8812AU,
and 254 bytes at a time for RTL8723DU. These are the sizes used in
their official drivers. Tested with all these chips.

Cc: stable@vger.kernel.org
Link: https://github.com/lwfinger/rtw88/issues/344
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/43f1daad-3ec0-4a3b-a50c-9cd9eb2c2f52@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/realtek/rtw88/hci.h
drivers/net/wireless/realtek/rtw88/mac.c
drivers/net/wireless/realtek/rtw88/mac.h
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/sdio.c
drivers/net/wireless/realtek/rtw88/usb.c