On 13/05/2025 06:12, Ping-Ke Shih wrote: > Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote: >> Add hfc_param_ini_usb to struct rtw89_chip_info. For now initialise it >> only for RTL8851B. >> >> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> >> --- > > [...] > > >> + >> +static const struct rtw89_hfc_param_ini rtw8851b_hfc_param_ini_usb[] = { >> + [RTW89_QTA_SCC] = {rtw8851b_hfc_chcfg_usb, &rtw8851b_hfc_pubcfg_usb, >> + &rtw8851b_hfc_preccfg_usb, RTW89_HCIFC_STF}, > > [RTW89_QTA_WOW] is missing. I'm not sure if current can handle this correctly. > Could you try to do WoWLAN with USB? At least, it shouldn't crash. > RTW89_QTA_WOW is missing because I didn't find an equivalent in enum mac_ax_qta_mode in the vendor driver. I enabled WOWLAN with this command: iw phy0 wowlan enable disconnect Then I put the computer to sleep (suspend to RAM). There was no crash, just some error messages. The computer went to sleep and woke up without any other problems. Of course it didn't stay connected to the access point during sleep. May 23 20:19:46 ideapad2 kernel: rtw89_8851bu 1-2:1.2: qta mode unmatch! May 23 20:19:47 ideapad2 kernel: rtw89_8851bu 1-2:1.2: [ERR]get_dle_mem_cfg May 23 20:19:47 ideapad2 kernel: rtw89_8851bu 1-2:1.2: [ERR]patch rx qta -22 May 23 20:19:47 ideapad2 kernel: rtw89_8851bu 1-2:1.2: failed to config mac May 23 20:19:47 ideapad2 kernel: rtw89_8851bu 1-2:1.2: wow: failed to enable trx_post May 23 20:19:47 ideapad2 kernel: rtw89_8851bu 1-2:1.2: failed to enable wow May 23 20:19:47 ideapad2 kernel: rtw89_8851bu 1-2:1.2: failed to suspend for wow -22 That was without RTW89_QTA_WOW. Then I tried to copy RTW89_QTA_SCC in rtw8851b_hfc_param_ini_usb and rtw8851b_dle_mem_usb2. With that I think it was able to upload the WOW firmware and it stayed connected to the access point, but something didn't let the computer go to sleep. It sat there for several minutes with a black screen, the power LED on, and connected to the access point (but without an IP address), until I clicked the "Disconnect" button in the access point's web interface to disconnect this station. That's when the computer finally went to sleep. So WOWLAN with RTL8851BU needs more work. > >> + [RTW89_QTA_DLFW] = {NULL, NULL, >> + &rtw8851b_hfc_preccfg_usb, RTW89_HCIFC_STF}, >> + [RTW89_QTA_INVALID] = {NULL}, >> +}; >> + >> static const struct rtw89_dle_mem rtw8851b_dle_mem_pcie[] = { >> [RTW89_QTA_SCC] = {RTW89_QTA_SCC, &rtw89_mac_size.wde_size6, >> &rtw89_mac_size.ple_size6, &rtw89_mac_size.wde_qt6, > > [...] >