* [RFC PATCH] mwifiex: handle command response in aggregation
@ 2015-01-23 7:16 James Cameron
2015-02-03 8:59 ` Amitkumar Karwar
0 siblings, 1 reply; 2+ messages in thread
From: James Cameron @ 2015-01-23 7:16 UTC (permalink / raw)
To: Amitkumar Karwar, Avinash Patil; +Cc: linux-wireless
Firmware does occasionally pass a command response to the host on the
data port. Ensure it is processed.
http://dev.laptop.org/ticket/12749
---
Seen on device firmwares:
14.66.9.p96
14.66.35.p52
Others not tested.
drivers/net/wireless/mwifiex/sdio.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 933dae1..8fe6147 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -1240,8 +1240,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
/* copy pkt to deaggr buf */
skb_deaggr = card->mpa_rx.skb_arr[pind];
- if ((pkt_type == MWIFIEX_TYPE_DATA) && (pkt_len <=
- card->mpa_rx.len_arr[pind])) {
+ if (pkt_len <= card->mpa_rx.len_arr[pind]) {
memcpy(skb_deaggr->data, curr_ptr, pkt_len);
@@ -1251,7 +1250,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
mwifiex_decode_rx_packet(adapter, skb_deaggr,
pkt_type);
} else {
- dev_err(adapter->dev, "wrong aggr pkt:"
+ dev_err(adapter->dev, "bad aggr pkt:"
" type=%d len=%d max_len=%d\n",
pkt_type, pkt_len,
card->mpa_rx.len_arr[pind]);
--
1.9.1
--
James Cameron
http://quozl.linux.org.au/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [RFC PATCH] mwifiex: handle command response in aggregation
2015-01-23 7:16 [RFC PATCH] mwifiex: handle command response in aggregation James Cameron
@ 2015-02-03 8:59 ` Amitkumar Karwar
0 siblings, 0 replies; 2+ messages in thread
From: Amitkumar Karwar @ 2015-02-03 8:59 UTC (permalink / raw)
To: quozl, Avinash Patil; +Cc: linux-wireless
Hi James,
>From: quozl@laptop.org [mailto:quozl@laptop.org]
>Sent: 23 January 2015 12:46
>To: Amitkumar Karwar; Avinash Patil
>Cc: linux-wireless@vger.kernel.org
>Subject: [RFC PATCH] mwifiex: handle command response in aggregation
>
>Firmware does occasionally pass a command response to the host on the
>data port. Ensure it is processed.
>
>http://dev.laptop.org/ticket/12749
>---
>Seen on device firmwares:
>
> 14.66.9.p96
> 14.66.35.p52
>
>Others not tested.
>
> drivers/net/wireless/mwifiex/sdio.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/net/wireless/mwifiex/sdio.c
>b/drivers/net/wireless/mwifiex/sdio.c
>index 933dae1..8fe6147 100644
>--- a/drivers/net/wireless/mwifiex/sdio.c
>+++ b/drivers/net/wireless/mwifiex/sdio.c
>@@ -1240,8 +1240,7 @@ static int
>mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
> /* copy pkt to deaggr buf */
> skb_deaggr = card->mpa_rx.skb_arr[pind];
>
>- if ((pkt_type == MWIFIEX_TYPE_DATA) && (pkt_len <=
>- card->mpa_rx.len_arr[pind])) {
>+ if (pkt_len <= card->mpa_rx.len_arr[pind]) {
>
> memcpy(skb_deaggr->data, curr_ptr, pkt_len);
>
>@@ -1251,7 +1250,7 @@ static int
>mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
> mwifiex_decode_rx_packet(adapter, skb_deaggr,
> pkt_type);
> } else {
>- dev_err(adapter->dev, "wrong aggr pkt:"
>+ dev_err(adapter->dev, "bad aggr pkt:"
> " type=%d len=%d max_len=%d\n",
> pkt_type, pkt_len,
> card->mpa_rx.len_arr[pind]);
>--
>1.9.1
>
>
We checked with our firmware engineer. There is no possibility of receiving command response on data port. Probably this is a corrupted data received on SDIO. If possible, could you print this data and share log?
Regards,
Amit
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-03 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 7:16 [RFC PATCH] mwifiex: handle command response in aggregation James Cameron
2015-02-03 8:59 ` Amitkumar Karwar
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.