Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266740
b: refs/heads/master
c: 984ecb9
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Oct 14, 2011
1 parent 8edb7b2 commit bd2512d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b319d3eb964a602dd1f77bd04b033c40f896e06f
refs/heads/master: 984ecb9293b77901947f3ade5f7e1a70bfc7d940
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ static void iwl_tx_queue_unmap(struct iwl_trans *trans, int txq_id)
struct iwl_tx_queue *txq = &trans_pcie->txq[txq_id];
struct iwl_queue *q = &txq->q;
enum dma_data_direction dma_dir;
unsigned long flags;

if (!q->n_bd)
return;
Expand All @@ -418,12 +419,14 @@ static void iwl_tx_queue_unmap(struct iwl_trans *trans, int txq_id)
else
dma_dir = DMA_TO_DEVICE;

spin_lock_irqsave(&trans->shrd->sta_lock, flags);
while (q->write_ptr != q->read_ptr) {
/* The read_ptr needs to bound by q->n_window */
iwlagn_txq_free_tfd(trans, txq, get_cmd_index(q, q->read_ptr),
dma_dir);
q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd);
}
spin_unlock_irqrestore(&trans->shrd->sta_lock, flags);
}

/**
Expand Down

0 comments on commit bd2512d

Please sign in to comment.