diff options
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 6820fce4016b..a3707fd4ef62 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -1548,7 +1548,7 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) | |||
1548 | if (!priv->pending_tx_pkts) | 1548 | if (!priv->pending_tx_pkts) |
1549 | return 0; | 1549 | return 0; |
1550 | 1550 | ||
1551 | retry = 0; | 1551 | retry = 1; |
1552 | rc = 0; | 1552 | rc = 0; |
1553 | 1553 | ||
1554 | spin_lock_bh(&priv->tx_lock); | 1554 | spin_lock_bh(&priv->tx_lock); |
@@ -1572,13 +1572,19 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) | |||
1572 | 1572 | ||
1573 | spin_lock_bh(&priv->tx_lock); | 1573 | spin_lock_bh(&priv->tx_lock); |
1574 | 1574 | ||
1575 | if (timeout) { | 1575 | if (timeout || !priv->pending_tx_pkts) { |
1576 | WARN_ON(priv->pending_tx_pkts); | 1576 | WARN_ON(priv->pending_tx_pkts); |
1577 | if (retry) | 1577 | if (retry) |
1578 | wiphy_notice(hw->wiphy, "tx rings drained\n"); | 1578 | wiphy_notice(hw->wiphy, "tx rings drained\n"); |
1579 | break; | 1579 | break; |
1580 | } | 1580 | } |
1581 | 1581 | ||
1582 | if (retry) { | ||
1583 | mwl8k_tx_start(priv); | ||
1584 | retry = 0; | ||
1585 | continue; | ||
1586 | } | ||
1587 | |||
1582 | if (priv->pending_tx_pkts < oldcount) { | 1588 | if (priv->pending_tx_pkts < oldcount) { |
1583 | wiphy_notice(hw->wiphy, | 1589 | wiphy_notice(hw->wiphy, |
1584 | "waiting for tx rings to drain (%d -> %d pkts)\n", | 1590 | "waiting for tx rings to drain (%d -> %d pkts)\n", |
@@ -2055,6 +2061,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, | |||
2055 | mwl8k_remove_stream(hw, stream); | 2061 | mwl8k_remove_stream(hw, stream); |
2056 | spin_unlock(&priv->stream_lock); | 2062 | spin_unlock(&priv->stream_lock); |
2057 | } | 2063 | } |
2064 | mwl8k_tx_start(priv); | ||
2058 | spin_unlock_bh(&priv->tx_lock); | 2065 | spin_unlock_bh(&priv->tx_lock); |
2059 | pci_unmap_single(priv->pdev, dma, skb->len, | 2066 | pci_unmap_single(priv->pdev, dma, skb->len, |
2060 | PCI_DMA_TODEVICE); | 2067 | PCI_DMA_TODEVICE); |