Thread (1 message) 1 message, 1 author, 2021-11-01

Re: [PATCH 2/2] wcn36xx: fix RX BD rate mapping for 5GHz legacy rates

From: Kalle Valo <hidden>
Date: 2021-11-01 13:00:58
Also in: linux-arm-msm, lkml, netdev

Benjamin Li [off-list ref] writes:
On 10/28/21 5:30 PM, Bryan O'Donoghue wrote:
quoted
On 28/10/2021 23:31, Benjamin Li wrote:
quoted
-            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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help