diff options
author | Avinash Patil <patila@marvell.com> | 2013-02-16 06:37:54 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-18 21:30:39 +0100 |
commit | 3d48203847c096afaddb2ba3c0623cfe49e91fa3 (patch) | |
tree | ab81431f3f06ced7230883604e3608b6938224fb /drivers | |
parent | Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jber... (diff) | |
download | linux-3d48203847c096afaddb2ba3c0623cfe49e91fa3.tar.xz linux-3d48203847c096afaddb2ba3c0623cfe49e91fa3.zip |
mwifiex: fix empty TX ring check for PCIe8897 while unloading driver
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 492655c048d1..4b54bcf382f3 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c @@ -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); |