mwifiex: check SDIO multi-port aggregation buffer room correctly
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 14 Jul 2011 03:51:58 +0000 (20:51 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 21 Jul 2011 18:52:03 +0000 (14:52 -0400)
We should consider current packet length also while checking
Tx aggregation buffer room.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/sdio.c

index 711fa68..f7105a9 100644 (file)
@@ -1319,7 +1319,7 @@ static int mwifiex_host_to_card_mp_aggr(struct mwifiex_adapter *adapter,
                                if (!(card->mp_wr_bitmap &
                                                (1 << card->curr_wr_port))
                                                || !MP_TX_AGGR_BUF_HAS_ROOM(
-                                                       card, next_pkt_len))
+                                               card, pkt_len + next_pkt_len))
                                        f_send_aggr_buf = 1;
                        } else {
                                /* No room in Aggr buf, send it */