On Mon, 2022-06-20 at 12:34 +0000, Ping-Ke Shih wrote: > On Mon, 2022-06-20 at 13:09 +0300, Kalle Valo wrote: > > Ping-Ke Shih <pkshih@xxxxxxxxxxx> writes: > > > > > From: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx> > > > > > > If a chip is configured to support mac80211 chanctx ops, we avoid > > > using older FW that does not support HW scan to make mac80211 stack > > > handle scanning as expected. > > > > > > Signed-off-by: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx> > > > Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx> > > > --- > > > drivers/net/wireless/realtek/rtw89/fw.c | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c > > > index 0e12629f789c3..a47451dc9d81d 100644 > > > --- a/drivers/net/wireless/realtek/rtw89/fw.c > > > +++ b/drivers/net/wireless/realtek/rtw89/fw.c > > > @@ -250,6 +250,7 @@ static void rtw89_fw_recognize_features(struct rtw89_dev *rtwdev) > > > > > > int rtw89_fw_recognize(struct rtw89_dev *rtwdev) > > > { > > > + const struct rtw89_chip_info *chip = rtwdev->chip; > > > int ret; > > > > > > ret = __rtw89_fw_recognize(rtwdev, RTW89_FW_NORMAL); > > > @@ -261,6 +262,13 @@ int rtw89_fw_recognize(struct rtw89_dev *rtwdev) > > > > > > rtw89_fw_recognize_features(rtwdev); > > > > > > + if (chip->support_chanctx_num != 0 && > > > + !RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD, &rtwdev->fw)) { > > > + rtw89_err(rtwdev, > > > + "require newer FW to support HW scan for chanctx\n"); > > > + return -ENOENT; > > > + } > > > > So if the user has not update the firmware a kernel upgrade will break > > their internet? That's not good, we should not break existing setups. So > > what firmware version is required? > > > > Firmware version 0.13.35.0 is required. The firmware has been in > linux-firmware repository on 2022-02-18. I think people being able > to update kernel can update firmware as well. > > The alternative ways could be > 1. add a module parameter, like no_channel_context. We can add a > prompt to note people can set it to 1 for old firmware. > > 2. wait version of request_firmware() as first step of pci probe. > The probe could cost longer time, because currently we use > request_firmware_nowait() and continue to initialize in parallel. > More, hw->priv isn't allocated at that moment, so it could be not > so straightforward. > To prevent break users' existing setups, modified approach 1 is adopted by patchset v2. We add a module parameter rtw89_use_chanctx, and disable it by default. So, users' setups with old firmware can still work. If a user wants channel context to support concurrency, he can set rtw89_use_chanctx=1 and upgrade firmware. I think this could be a better user experience of kernel. Ping-Ke