aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 7ff8f72d482d..d7e181f9ce80 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -1749,14 +1749,14 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv)
1749} 1749}
1750 1750
1751/** 1751/**
1752 * iwl_hw_txq_free_tfd - Free one TFD, those at index [txq->q.last_used] 1752 * iwl_hw_txq_free_tfd - Free one TFD, those at index [txq->q.read_ptr]
1753 * 1753 *
1754 * Does NOT advance any indexes 1754 * Does NOT advance any indexes
1755 */ 1755 */
1756int iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq) 1756int iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
1757{ 1757{
1758 struct iwl_tfd_frame *bd_tmp = (struct iwl_tfd_frame *)&txq->bd[0]; 1758 struct iwl_tfd_frame *bd_tmp = (struct iwl_tfd_frame *)&txq->bd[0];
1759 struct iwl_tfd_frame *bd = &bd_tmp[txq->q.last_used]; 1759 struct iwl_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];
1760 struct pci_dev *dev = priv->pci_dev; 1760 struct pci_dev *dev = priv->pci_dev;
1761 int i; 1761 int i;
1762 int counter = 0; 1762 int counter = 0;
@@ -1796,11 +1796,11 @@ int iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
1796 IWL_GET_BITS(bd->pa[index], tb1_len), 1796 IWL_GET_BITS(bd->pa[index], tb1_len),
1797 PCI_DMA_TODEVICE); 1797 PCI_DMA_TODEVICE);
1798 1798
1799 if (txq->txb[txq->q.last_used].skb[i]) { 1799 if (txq->txb[txq->q.read_ptr].skb[i]) {
1800 struct sk_buff *skb = txq->txb[txq->q.last_used].skb[i]; 1800 struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[i];
1801 1801
1802 dev_kfree_skb(skb); 1802 dev_kfree_skb(skb);
1803 txq->txb[txq->q.last_used].skb[i] = NULL; 1803 txq->txb[txq->q.read_ptr].skb[i] = NULL;
1804 } 1804 }
1805 } 1805 }
1806 return 0; 1806 return 0;
@@ -2776,11 +2776,11 @@ int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
2776 len = byte_cnt + IWL_TX_CRC_SIZE + IWL_TX_DELIMITER_SIZE; 2776 len = byte_cnt + IWL_TX_CRC_SIZE + IWL_TX_DELIMITER_SIZE;
2777 2777
2778 IWL_SET_BITS16(shared_data->queues_byte_cnt_tbls[txq_id]. 2778 IWL_SET_BITS16(shared_data->queues_byte_cnt_tbls[txq_id].
2779 tfd_offset[txq->q.first_empty], byte_cnt, len); 2779 tfd_offset[txq->q.write_ptr], byte_cnt, len);
2780 2780
2781 if (txq->q.first_empty < IWL4965_MAX_WIN_SIZE) 2781 if (txq->q.write_ptr < IWL4965_MAX_WIN_SIZE)
2782 IWL_SET_BITS16(shared_data->queues_byte_cnt_tbls[txq_id]. 2782 IWL_SET_BITS16(shared_data->queues_byte_cnt_tbls[txq_id].
2783 tfd_offset[IWL4965_QUEUE_SIZE + txq->q.first_empty], 2783 tfd_offset[IWL4965_QUEUE_SIZE + txq->q.write_ptr],
2784 byte_cnt, len); 2784 byte_cnt, len);
2785 2785
2786 return 0; 2786 return 0;
@@ -4134,7 +4134,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4134*/ 4134*/
4135 iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp); 4135 iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp);
4136 /* releases all the TFDs until the SSN */ 4136 /* releases all the TFDs until the SSN */
4137 if (txq->q.last_used != (ba_resp_scd_ssn & 0xff)) 4137 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff))
4138 iwl_tx_queue_reclaim(priv, ba_resp_scd_flow, index); 4138 iwl_tx_queue_reclaim(priv, ba_resp_scd_flow, index);
4139 4139
4140} 4140}
@@ -4205,8 +4205,8 @@ static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,
4205 4205
4206 iwl_set_bits_restricted_reg(priv, SCD_QUEUECHAIN_SEL, (1<<txq_id)); 4206 iwl_set_bits_restricted_reg(priv, SCD_QUEUECHAIN_SEL, (1<<txq_id));
4207 4207
4208 priv->txq[txq_id].q.last_used = (ssn_idx & 0xff); 4208 priv->txq[txq_id].q.read_ptr = (ssn_idx & 0xff);
4209 priv->txq[txq_id].q.first_empty = (ssn_idx & 0xff); 4209 priv->txq[txq_id].q.write_ptr = (ssn_idx & 0xff);
4210 4210
4211 /* supposes that ssn_idx is valid (!= 0xFFF) */ 4211 /* supposes that ssn_idx is valid (!= 0xFFF) */
4212 iwl4965_set_wr_ptrs(priv, txq_id, ssn_idx); 4212 iwl4965_set_wr_ptrs(priv, txq_id, ssn_idx);
@@ -4257,8 +4257,8 @@ static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,
4257 4257
4258 iwl_clear_bits_restricted_reg(priv, SCD_QUEUECHAIN_SEL, (1 << txq_id)); 4258 iwl_clear_bits_restricted_reg(priv, SCD_QUEUECHAIN_SEL, (1 << txq_id));
4259 4259
4260 priv->txq[txq_id].q.last_used = (ssn_idx & 0xff); 4260 priv->txq[txq_id].q.read_ptr = (ssn_idx & 0xff);
4261 priv->txq[txq_id].q.first_empty = (ssn_idx & 0xff); 4261 priv->txq[txq_id].q.write_ptr = (ssn_idx & 0xff);
4262 /* supposes that ssn_idx is valid (!= 0xFFF) */ 4262 /* supposes that ssn_idx is valid (!= 0xFFF) */
4263 iwl4965_set_wr_ptrs(priv, txq_id, ssn_idx); 4263 iwl4965_set_wr_ptrs(priv, txq_id, ssn_idx);
4264 4264