]> www.infradead.org Git - users/jedix/linux-maple.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)
committerPing-Ke Shih <pkshih@realtek.com>
Fri, 16 May 2025 00:34:51 +0000 (08:34 +0800)
commit80fe0bc1659c0ccc79d082e426fa376be5df9c04
tree350671e6aa4219507c43afe2036c3fdf7cfbc332
parent490340faddea461319652ce36dbc7c1b4482c35e
wifi: rtw88: usb: Upload the firmware in bigger chunks

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