Ping-Ke Shih <pkshih@xxxxxxxxxxx> wrote: > Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote: > > 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. > > Yes, vendor driver doesn't have that. As I know, it does some modifications > from original normal operation quota, such as RTW89_QTA_SCC, because we want > constant definition in upstream driver. I will check internally and get back > to you how it should be for USB devices. The main function to get QTA_WOW is redu_wowlan_rx_qta(). Take RTL8851BE as an example, Based on RTW89_QTA_SCC: cfg->ple_size->pge_size =>rtw89_mac_size.ple_size6 =>.ple_size6 = {RTW89_PLE_PG_128, 496, 16,}, rdu_pg_num = PLE_QTA_PG128B_12KB = 96 QTA6: .ple_qt18 = {147, 0, 16, 20, 17, 13, 89, 0, 32, 14, 8, 0,}, //min .ple_qt58 = {147, 0, 16, 20, 157, 13, 229, 0, 172, 14, 24, 0,}, //max ^^^^ qta_min = 89 qta_max = 229 new_qta = (qta_max - qta_min) < rdu_pg_num ? qta_min : (qta_max - rdu_pg_num); = 229 - 96 = 133 QTA7: .ple_qt18 = {147, 0, 16, 20, 17, 13, 89, 0, 32, 14, 8, 0,}, //min .ple_qt58 = {147, 0, 16, 20, 157, 13, 229, 0, 172, 14, 24, 0,}, //max ^^^^ qta_min = 0 qta_max = 0 new_qta = (qta_max - qta_min) < rdu_pg_num ? qta_min : (qta_max - rdu_pg_num); = 0 Finally: .ple_qt_51b_wow = {147, 0, 16, 20, 157, 13, 133, 0, 172, 14, 24, 0,}, ^^^^^^ A way is to induce the quota by eyes. Another way is to add debug message in vendor driver to show these quota -- this would be much simpler.