Marcin Ślusarz <marcin.slusarz@xxxxxxxxx> wrote: > wt., 4 cze 2024 o 02:57 Ping-Ke Shih <pkshih@xxxxxxxxxxx> napisał(a): > > > > Marcin Ślusarz <marcin.slusarz@xxxxxxxxx> wrote: > > > --- a/drivers/net/wireless/realtek/rtw88/main.c > > > +++ b/drivers/net/wireless/realtek/rtw88/main.c > > > @@ -1357,7 +1357,7 @@ static int rtw_power_on(struct rtw_dev *rtwdev) > > > int ret; > > > > > > if (rtwdev->always_power_on && test_bit(RTW_FLAG_POWERON, rtwdev->flags)) > > > - return 0; > > > + goto success; > > > > rtw_hci_start_rx(rtwdev) is only needed by this case, so > > > > if (rtwdev->always_power_on && test_bit(RTW_FLAG_POWERON, rtwdev->flags)) { > > rtw_hci_start_rx(rtwdev); > > return 0; > > } > > Yes, strictly speaking, it's needed only in the always_power_on case, > but doing that in the common code path ensures that it's tested and > still works. For the non- always_power_on case, it calls rtw_hci_start()/rtw_hci_stop() already so I don't think we should call these duplicates.