Skip to content

Commit

Permalink
mwifiex: fix empty TX ring check for PCIe8897 while unloading driver
Browse files Browse the repository at this point in the history
While unloading driver, we free all pending TX packets by flushing
TX ring. There is unhandled case for PCIE8897 while checking for
ring empty condition.

This patch adds the handling by calling mwifiex_pcie_txbd_empty().

Signed-off-by: Avinash Patil <patila@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>
  • Loading branch information
Avinash Patil authored and John W. Linville committed Feb 18, 2013
1 parent a9908eb commit 3d48203
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/wireless/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,7 @@ static int mwifiex_pcie_send_data_complete(struct mwifiex_adapter *adapter)
adapter->data_sent = false;

if (card->txbd_flush) {
if (((card->txbd_wrptr & reg->tx_mask) ==
(card->txbd_rdptr & reg->tx_mask)) &&
((card->txbd_wrptr & reg->tx_rollover_ind) !=
(card->txbd_rdptr & reg->tx_rollover_ind)))
if (mwifiex_pcie_txbd_empty(card, card->txbd_rdptr))
card->txbd_flush = 0;
else
mwifiex_clean_pcie_ring_buf(adapter);
Expand Down

0 comments on commit 3d48203

Please sign in to comment.