diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0003-mwifiex-fix-11n-rx-packet-drop-issue.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0003-mwifiex-fix-11n-rx-packet-drop-issue.patch | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0003-mwifiex-fix-11n-rx-packet-drop-issue.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0003-mwifiex-fix-11n-rx-packet-drop-issue.patch new file mode 100644 index 00000000..eef5de77 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0003-mwifiex-fix-11n-rx-packet-drop-issue.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 8c92af27a522bcec5dc2ced7b49b8f3f57492b21 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stone Piao <piaoyun@marvell.com> | ||
3 | Date: Wed, 20 Jun 2012 20:21:10 -0700 | ||
4 | Subject: [PATCH 03/49] mwifiex: fix 11n rx packet drop issue | ||
5 | |||
6 | commit 925839243dc9aa4ef25305f5afd10ed18258a4ac upstream. | ||
7 | |||
8 | Currently we check the sequence number of last packet received | ||
9 | against start_win. If a sequence hole is detected, start_win is | ||
10 | updated to next sequence number. | ||
11 | |||
12 | Since the rx sequence number is initialized to 0, a corner case | ||
13 | exists when BA setup happens immediately after association. As | ||
14 | 0 is a valid sequence number, start_win gets increased to 1 | ||
15 | incorrectly. This causes the first packet with sequence number 0 | ||
16 | being dropped. | ||
17 | |||
18 | Initialize rx sequence number as 0xffff and skip adjusting | ||
19 | start_win if the sequence number remains 0xffff. The sequence | ||
20 | number will be updated once the first packet is received. | ||
21 | |||
22 | Signed-off-by: Stone Piao <piaoyun@marvell.com> | ||
23 | Signed-off-by: Avinash Patil <patila@marvell.com> | ||
24 | Signed-off-by: Kiran Divekar <dkiran@marvell.com> | ||
25 | Signed-off-by: Bing Zhao <bzhao@marvell.com> | ||
26 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
27 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
28 | --- | ||
29 | drivers/net/wireless/mwifiex/11n_rxreorder.c | 5 +++-- | ||
30 | drivers/net/wireless/mwifiex/11n_rxreorder.h | 7 +++++++ | ||
31 | drivers/net/wireless/mwifiex/wmm.c | 2 ++ | ||
32 | 3 files changed, 12 insertions(+), 2 deletions(-) | ||
33 | |||
34 | diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c | ||
35 | index 7aa9aa0..39fd4d5 100644 | ||
36 | --- a/drivers/net/wireless/mwifiex/11n_rxreorder.c | ||
37 | +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c | ||
38 | @@ -267,7 +267,8 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta, | ||
39 | else | ||
40 | last_seq = priv->rx_seq[tid]; | ||
41 | |||
42 | - if (last_seq >= new_node->start_win) | ||
43 | + if (last_seq != MWIFIEX_DEF_11N_RX_SEQ_NUM && | ||
44 | + last_seq >= new_node->start_win) | ||
45 | new_node->start_win = last_seq + 1; | ||
46 | |||
47 | new_node->win_size = win_size; | ||
48 | @@ -611,5 +612,5 @@ void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv) | ||
49 | spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, flags); | ||
50 | |||
51 | INIT_LIST_HEAD(&priv->rx_reorder_tbl_ptr); | ||
52 | - memset(priv->rx_seq, 0, sizeof(priv->rx_seq)); | ||
53 | + mwifiex_reset_11n_rx_seq_num(priv); | ||
54 | } | ||
55 | diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.h b/drivers/net/wireless/mwifiex/11n_rxreorder.h | ||
56 | index 033c8ad..7128baa 100644 | ||
57 | --- a/drivers/net/wireless/mwifiex/11n_rxreorder.h | ||
58 | +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.h | ||
59 | @@ -37,6 +37,13 @@ | ||
60 | |||
61 | #define ADDBA_RSP_STATUS_ACCEPT 0 | ||
62 | |||
63 | +#define MWIFIEX_DEF_11N_RX_SEQ_NUM 0xffff | ||
64 | + | ||
65 | +static inline void mwifiex_reset_11n_rx_seq_num(struct mwifiex_private *priv) | ||
66 | +{ | ||
67 | + memset(priv->rx_seq, 0xff, sizeof(priv->rx_seq)); | ||
68 | +} | ||
69 | + | ||
70 | int mwifiex_11n_rx_reorder_pkt(struct mwifiex_private *, | ||
71 | u16 seqNum, | ||
72 | u16 tid, u8 *ta, | ||
73 | diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c | ||
74 | index 6c239c3..b94a349 100644 | ||
75 | --- a/drivers/net/wireless/mwifiex/wmm.c | ||
76 | +++ b/drivers/net/wireless/mwifiex/wmm.c | ||
77 | @@ -406,6 +406,8 @@ mwifiex_wmm_init(struct mwifiex_adapter *adapter) | ||
78 | priv->add_ba_param.tx_win_size = MWIFIEX_AMPDU_DEF_TXWINSIZE; | ||
79 | priv->add_ba_param.rx_win_size = MWIFIEX_AMPDU_DEF_RXWINSIZE; | ||
80 | |||
81 | + mwifiex_reset_11n_rx_seq_num(priv); | ||
82 | + | ||
83 | atomic_set(&priv->wmm.tx_pkts_queued, 0); | ||
84 | atomic_set(&priv->wmm.highest_queued_prio, HIGH_PRIO_TID); | ||
85 | } | ||
86 | -- | ||
87 | 1.7.10 | ||
88 | |||