* [PATCH] brcmfmac: allocate msgbuf pktid from 1 to pktids array size
@ 2019-04-25 8:04 Wright Feng
2019-04-25 11:22 ` Arend Van Spriel
0 siblings, 1 reply; 3+ messages in thread
From: Wright Feng @ 2019-04-25 8:04 UTC (permalink / raw)
To: arend.vanspriel, franky.lin, hante.meuleman, kvalo, Chi-Hsien Lin
Cc: Wright Feng, linux-wireless, brcm80211-dev-list.pdl
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.
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;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] brcmfmac: allocate msgbuf pktid from 1 to pktids array size
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
0 siblings, 1 reply; 3+ messages in thread
From: Arend Van Spriel @ 2019-04-25 11:22 UTC (permalink / raw)
To: Wright Feng, franky.lin, hante.meuleman, kvalo, Chi-Hsien Lin
Cc: linux-wireless, brcm80211-dev-list.pdl
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
> 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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] brcmfmac: allocate msgbuf pktid from 1 to pktids array size
2019-04-25 11:22 ` Arend Van Spriel
@ 2019-04-29 4:50 ` Wright Feng
0 siblings, 0 replies; 3+ messages in thread
From: Wright Feng @ 2019-04-29 4:50 UTC (permalink / raw)
To: Arend Van Spriel, franky.lin, hante.meuleman, kvalo, Chi-Hsien Lin
Cc: linux-wireless, brcm80211-dev-list.pdl
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;
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-29 4:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.