From 6ccea75e701d5d452b674dd5550c0caceccb5d56 Mon Sep 17 00:00:00 2001 From: Avinash Patil Date: Tue, 22 Jan 2013 16:29:03 -0800 Subject: [PATCH] mwifiex: fix invalid access of PCIe RxBD ring buffer descriptor 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 Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- drivers/net/wireless/mwifiex/pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 237949c070cc..7415ac8c3ad7 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c @@ -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) -- 2.39.5