Skip to content

Commit bd1c614

Browse files
Amitkumar Karwarlinvjw
authored andcommitted
mwifiex: fix hang issue for USB chipsets
Bug 60815 - Interface hangs in mwifiex_usb https://bugzilla.kernel.org/show_bug.cgi?id=60815 We have 4 bytes of interface header for packets delivered to SDIO and PCIe, but not for USB interface. In Tx AMSDU case, currently 4 bytes of garbage data is unnecessarily appended for USB packets. This sometimes leads to a firmware hang, because it may not interpret the data packet correctly. Problem is fixed by removing this redundant headroom for USB. Cc: <stable@vger.kernel.org> # 3.5+ Tested-by: Dmitry Khromov <icechrome@gmail.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 1e43692 commit bd1c614

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/net/wireless/mwifiex/11n_aggr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv,
150150
*/
151151
int
152152
mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
153-
struct mwifiex_ra_list_tbl *pra_list, int headroom,
153+
struct mwifiex_ra_list_tbl *pra_list,
154154
int ptrindex, unsigned long ra_list_flags)
155155
__releases(&priv->wmm.ra_list_spinlock)
156156
{
@@ -160,6 +160,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
160160
int pad = 0, ret;
161161
struct mwifiex_tx_param tx_param;
162162
struct txpd *ptx_pd = NULL;
163+
int headroom = adapter->iface_type == MWIFIEX_USB ? 0 : INTF_HEADER_LEN;
163164

164165
skb_src = skb_peek(&pra_list->skb_head);
165166
if (!skb_src) {

drivers/net/wireless/mwifiex/11n_aggr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
int mwifiex_11n_deaggregate_pkt(struct mwifiex_private *priv,
2727
struct sk_buff *skb);
2828
int mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
29-
struct mwifiex_ra_list_tbl *ptr, int headroom,
29+
struct mwifiex_ra_list_tbl *ptr,
3030
int ptr_index, unsigned long flags)
3131
__releases(&priv->wmm.ra_list_spinlock);
3232

drivers/net/wireless/mwifiex/wmm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,8 +1239,7 @@ mwifiex_dequeue_tx_packet(struct mwifiex_adapter *adapter)
12391239
if (enable_tx_amsdu && mwifiex_is_amsdu_allowed(priv, tid) &&
12401240
mwifiex_is_11n_aggragation_possible(priv, ptr,
12411241
adapter->tx_buf_size))
1242-
mwifiex_11n_aggregate_pkt(priv, ptr, INTF_HEADER_LEN,
1243-
ptr_index, flags);
1242+
mwifiex_11n_aggregate_pkt(priv, ptr, ptr_index, flags);
12441243
/* ra_list_spinlock has been freed in
12451244
mwifiex_11n_aggregate_pkt() */
12461245
else

0 commit comments

Comments
 (0)