All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Benjamin Li <benl@squareup.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Loic Poulain <loic.poulain@linaro.org>,
	linux-arm-msm@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] wcn36xx: fix RX BD rate mapping for 5GHz legacy rates
Date: Mon, 01 Nov 2021 15:00:30 +0200	[thread overview]
Message-ID: <8735og2fpt.fsf@codeaurora.org> (raw)
In-Reply-To: <631a3ab4-56d9-5c1d-be53-c885747e3f7b@squareup.com> (Benjamin Li's message of "Thu, 28 Oct 2021 17:39:58 -0700")

Benjamin Li <benl@squareup.com> writes:

> On 10/28/21 5:30 PM, Bryan O'Donoghue wrote:
>> On 28/10/2021 23:31, Benjamin Li wrote:
>>> -            status.rate_idx >= sband->n_bitrates) {
>> This fix was applied because we were getting a negative index
>> 
>> If you want to remove that, you'll need to do something about this
>> 
>> status.rate_idx -= 4;
>
> Hmm... so you're saying there's a FW bug where sometimes we get
> bd->rate_id = 0-7 (leading to status.rate_idx = 0-3) on a 5GHz
> channel?
>
> static const struct wcn36xx_rate wcn36xx_rate_table[] = {
>     /* 11b rates */
>     {  10, 0, RX_ENC_LEGACY, 0, RATE_INFO_BW_20 },
>     {  20, 1, RX_ENC_LEGACY, 0, RATE_INFO_BW_20 },
>     {  55, 2, RX_ENC_LEGACY, 0, RATE_INFO_BW_20 },
>     { 110, 3, RX_ENC_LEGACY, 0, RATE_INFO_BW_20 },
>
>     /* 11b SP (short preamble) */
>     {  10, 0, RX_ENC_LEGACY, RX_ENC_FLAG_SHORTPRE, RATE_INFO_BW_20 },
>     {  20, 1, RX_ENC_LEGACY, RX_ENC_FLAG_SHORTPRE, RATE_INFO_BW_20 },
>     {  55, 2, RX_ENC_LEGACY, RX_ENC_FLAG_SHORTPRE, RATE_INFO_BW_20 },
>     { 110, 3, RX_ENC_LEGACY, RX_ENC_FLAG_SHORTPRE, RATE_INFO_BW_20 },
>
> It sounds like we should WARN and drop the frame in that case. If
> you agree I'll send a v2.

BTW, please avoid using WARN() family of functions in the data path as
that can cause host crashes due to too much spamming in the logs. A some
kind of ratelimited version of an error message is much safer. For
example ath11k_warn() is ratelimited, maybe wcn36xx_warn() should be as
well?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  parent reply	other threads:[~2021-11-01 13:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 22:31 [PATCH 1/2] wcn36xx: populate band before determining rate on RX Benjamin Li
2021-10-28 22:31 ` [PATCH 2/2] wcn36xx: fix RX BD rate mapping for 5GHz legacy rates Benjamin Li
2021-10-29  0:30   ` Bryan O'Donoghue
2021-10-29  0:39     ` Benjamin Li
2021-10-29  1:11       ` Bryan O'Donoghue
2021-11-01 13:00       ` Kalle Valo [this message]
2021-10-29 18:30   ` kernel test robot
2021-10-29 18:30     ` kernel test robot

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=8735og2fpt.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=benl@squareup.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=wcn36xx@lists.infradead.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.