aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sdio.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-09-12 10:38:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-15 15:00:51 -0400
commitc7346c3231e9b8e530ab7b73796066f7bf60b240 (patch)
treed4df8023b17b1928e874ae3afd6b296f55e0872c /drivers/net/wireless/mwifiex/sdio.c
parenta659c4306b3d8de0be218ad47ee92eae31d5b0dd (diff)
mwifiex: fix a bug in Tx multiport aggregation
When aggregation port limit is reached, we stop aggregation and the data is sent to firmware. It is observed that one less packet than the port limit is aggregated in this case. ex. 15 instead of 16. The reason is we have redundant port limit checks before current packet is added to aggregation buffer. The issue is fixed by removing these checks. We already have necessary check in precopy current buffer handling. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sdio.c')
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 1770fa3fc1e6..993841ec007b 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -1527,8 +1527,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
1527 __func__); 1527 __func__);
1528 1528
1529 if (MP_TX_AGGR_IN_PROGRESS(card)) { 1529 if (MP_TX_AGGR_IN_PROGRESS(card)) {
1530 if (!mp_tx_aggr_port_limit_reached(card) && 1530 if (MP_TX_AGGR_BUF_HAS_ROOM(card, pkt_len)) {
1531 MP_TX_AGGR_BUF_HAS_ROOM(card, pkt_len)) {
1532 f_precopy_cur_buf = 1; 1531 f_precopy_cur_buf = 1;
1533 1532
1534 if (!(card->mp_wr_bitmap & 1533 if (!(card->mp_wr_bitmap &
@@ -1540,8 +1539,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
1540 /* No room in Aggr buf, send it */ 1539 /* No room in Aggr buf, send it */
1541 f_send_aggr_buf = 1; 1540 f_send_aggr_buf = 1;
1542 1541
1543 if (mp_tx_aggr_port_limit_reached(card) || 1542 if (!(card->mp_wr_bitmap &
1544 !(card->mp_wr_bitmap &
1545 (1 << card->curr_wr_port))) 1543 (1 << card->curr_wr_port)))
1546 f_send_cur_buf = 1; 1544 f_send_cur_buf = 1;
1547 else 1545 else