All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: "kvalo@kernel.org" <kvalo@kernel.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Kevin Yang" <kevin_yang@realtek.com>
Subject: Re: [PATCH 13/13] rtw89: prohibit mac80211 chanctx ops without HW scan
Date: Mon, 20 Jun 2022 12:34:25 +0000	[thread overview]
Message-ID: <027f1de5f6ed0da21754c17154cc09411f2c5aa5.camel@realtek.com> (raw)
In-Reply-To: <877d5bprxn.fsf@kernel.org>

On Mon, 2022-06-20 at 13:09 +0300, Kalle Valo wrote:
> Ping-Ke Shih <pkshih@realtek.com> writes:
> 
> > From: Zong-Zhe Yang <kevin_yang@realtek.com>
> > 
> > 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@realtek.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> > ---
> >  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.


Ping-Ke


  reply	other threads:[~2022-06-20 12:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  8:49 [PATCH 00/13] rtw89: support channel context Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 01/13] rtw89: rewrite decision on channel by entity state Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 02/13] rtw89: introduce rtw89_chan for channel stuffs Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 03/13] rtw89: re-arrange channel related stuffs under HAL Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 04/13] rtw89: create rtw89_chan centrally to avoid breakage Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 05/13] rtw89: txpwr: concentrate channel related control to top Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 06/13] rtw89: rfk: concentrate parameter control while set_channel() Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 07/13] rtw89: concentrate parameter control for setting channel callback Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 08/13] rtw89: concentrate chandef setting to stack callback Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 09/13] rtw89: initialize entity and configure default chandef Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 10/13] rtw89: introduce entity mode and its recalculated prototype Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 11/13] rtw89: add skeleton of mac80211 chanctx ops support Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 12/13] rtw89: support mac80211 chanctx ops by chip Ping-Ke Shih
2022-06-17  8:49 ` [PATCH 13/13] rtw89: prohibit mac80211 chanctx ops without HW scan Ping-Ke Shih
2022-06-20 10:09   ` Kalle Valo
2022-06-20 12:34     ` Ping-Ke Shih [this message]
2022-06-23  3:51       ` Ping-Ke Shih
2022-08-09 11:00         ` Ping-Ke Shih
2022-09-02  8:28           ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=027f1de5f6ed0da21754c17154cc09411f2c5aa5.camel@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kevin_yang@realtek.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.