Thread (261 messages) 261 messages, 2 authors, 2014-08-09
STALE4367d REVIEWED: 1 (0M)

[PATCH 3.13 109/259] mwifiex: fix Tx timeout issue

From: Kamal Mostafa <hidden>
Date: 2014-08-08 20:58:11
Also in: lkml
Subsystem: networking drivers (wireless), the rest · Maintainers: Johannes Berg, Linus Torvalds

3.13.11.6 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Amitkumar Karwar <redacted>

commit d76744a93246eccdca1106037e8ee29debf48277 upstream.

https://bugzilla.kernel.org/show_bug.cgi?id=70191
https://bugzilla.kernel.org/show_bug.cgi?id=77581

It is observed that sometimes Tx packet is downloaded without
adding driver's txpd header. This results in firmware parsing
garbage data as packet length. Sometimes firmware is unable
to read the packet if length comes out as invalid. This stops
further traffic and timeout occurs.

The root cause is uninitialized fields in tx_info(skb->cb) of
packet used to get garbage values. In this case if
MWIFIEX_BUF_FLAG_REQUEUED_PKT flag is mistakenly set, txpd
header was skipped. This patch makes sure that tx_info is
correctly initialized to fix the problem.

Reported-by: Andrew Wiley <redacted>
Reported-by: Linus Gasser <redacted>
Reported-by: Michael Hirsch <redacted>
Tested-by: Xinming Hu <redacted>
Signed-off-by: Amitkumar Karwar <redacted>
Signed-off-by: Maithili Hinge <redacted>
Signed-off-by: Avinash Patil <redacted>
Signed-off-by: Bing Zhao <redacted>
Signed-off-by: John W. Linville <redacted>
Signed-off-by: Kamal Mostafa <redacted>
---
 drivers/net/wireless/mwifiex/main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index 8bb8988..a5c00cc 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -646,6 +646,7 @@ mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	}
 
 	tx_info = MWIFIEX_SKB_TXCB(skb);
+	memset(tx_info, 0, sizeof(*tx_info));
 	tx_info->bss_num = priv->bss_num;
 	tx_info->bss_type = priv->bss_type;
 
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help