From: Wright Feng <Wright.Feng@cypress.com>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>,
"franky.lin@broadcom.com" <franky.lin@broadcom.com>,
"hante.meuleman@broadcom.com" <hante.meuleman@broadcom.com>,
"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"brcm80211-dev-list.pdl@broadcom.com"
<brcm80211-dev-list.pdl@broadcom.com>
Subject: Re: [PATCH] brcmfmac: allocate msgbuf pktid from 1 to pktids array size
Date: Mon, 29 Apr 2019 04:50:19 +0000 [thread overview]
Message-ID: <0f72eace-be93-a6bd-c752-814efe93727c@cypress.com> (raw)
In-Reply-To: <66165629-aa4d-afbe-5b09-3a592ff44a82@broadcom.com>
On 2019/4/25 下午 07:22, Arend Van Spriel wrote:
> On 4/25/2019 10:04 AM, Wright Feng wrote:
>> Some PCIE firmwares drop txstatus if pktid is 0 and make packet held in
>> host side and not be released. If that packet type is 802.1x, the
>> pend_8021x_cnt value will be always greater than 0 and show "Timed out
>> waiting for no pending 802.1x packets" error message when sending key to
>> dongle.
>>
>> To be compatible with all firmwares, host should allocate msgbuf pktid
>> from 1 instead of from 0.
>
> looking at it we are wasting entry 0 with this patch. Could we avoid that?
>
> Regards,
> Arend
>
Hi Arend,
Thanks for the suggestion.
To avoid wasting index zero entry, I just increase request ID in TXflow
and decrease request ID when handling txstatus. I've posted patch v2.
Regards,
Wright
>> Signed-off-by: Wright Feng <wright.feng@cypress.com>
>> ---
>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
>> index d3780ea..b2fab3c 100644
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
>> @@ -348,7 +348,7 @@ brcmf_msgbuf_alloc_pktid(struct device *dev,
>> do {
>> (*idx)++;
>> if (*idx == pktids->array_size)
>> - *idx = 0;
>> + *idx = 1;
>> if (array[*idx].allocated.counter == 0)
>> if (atomic_cmpxchg(&array[*idx].allocated, 0, 1) == 0)
>> break;
>>
prev parent reply other threads:[~2019-04-29 4:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 8:04 [PATCH] brcmfmac: allocate msgbuf pktid from 1 to pktids array size Wright Feng
2019-04-25 11:22 ` Arend Van Spriel
2019-04-29 4:50 ` Wright Feng [this message]
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=0f72eace-be93-a6bd-c752-814efe93727c@cypress.com \
--to=wright.feng@cypress.com \
--cc=Chi-Hsien.Lin@cypress.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=kvalo@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox