From: Avinash Patil Date: Wed, 23 Jan 2013 00:29:03 +0000 (-0800) Subject: mwifiex: fix invalid access of PCIe RxBD ring buffer descriptor X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6ccea75e701d5d452b674dd5550c0caceccb5d56;p=linux-beck.git 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 --- 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)