mwifiex: fix invalid access of PCIe RxBD ring buffer descriptor
authorAvinash Patil <patila@marvell.com>
Wed, 23 Jan 2013 00:29:03 +0000 (16:29 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jan 2013 20:06:39 +0000 (15:06 -0500)
This patch fixes invalid access of RxBD ring buffer descriptor's
length and flag inside PCIe send_data_complete() routine. We are
supposed to modify TxBD buffer descriptor's length and flag here.

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>
drivers/net/wireless/mwifiex/pcie.c

index 237949c070ccb43478dddee1cead95ca02a908cc..7415ac8c3ad71006718a5a104746886173389aba 100644 (file)
@@ -846,8 +846,8 @@ static int mwifiex_pcie_send_data_complete(struct mwifiex_adapter *adapter)
 
                card->tx_buf_list[wrdoneidx] = NULL;
                card->txbd_ring[wrdoneidx]->paddr = 0;
-               card->rxbd_ring[wrdoneidx]->len = 0;
-               card->rxbd_ring[wrdoneidx]->flags = 0;
+               card->txbd_ring[wrdoneidx]->len = 0;
+               card->txbd_ring[wrdoneidx]->flags = 0;
                card->txbd_rdptr++;
 
                if ((card->txbd_rdptr & MWIFIEX_TXBD_MASK) == num_tx_buffs)