diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-4965-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-4965-tx.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c index 8f18d36f08ad..a6fa1c2296ac 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c | |||
@@ -183,7 +183,7 @@ static void il4965_tx_cmd_build_rate(struct il_priv *il, | |||
183 | /* DATA packets will use the uCode station table for rate/antenna | 183 | /* DATA packets will use the uCode station table for rate/antenna |
184 | * selection */ | 184 | * selection */ |
185 | if (ieee80211_is_data(fc)) { | 185 | if (ieee80211_is_data(fc)) { |
186 | tx_cmd->initial_rate_index = 0; | 186 | tx_cmd->initial_rate_idx = 0; |
187 | tx_cmd->tx_flags |= TX_CMD_FLG_STA_RATE_MSK; | 187 | tx_cmd->tx_flags |= TX_CMD_FLG_STA_RATE_MSK; |
188 | return; | 188 | return; |
189 | } | 189 | } |
@@ -192,7 +192,7 @@ static void il4965_tx_cmd_build_rate(struct il_priv *il, | |||
192 | * If the current TX rate stored in mac80211 has the MCS bit set, it's | 192 | * If the current TX rate stored in mac80211 has the MCS bit set, it's |
193 | * not really a TX rate. Thus, we use the lowest supported rate for | 193 | * not really a TX rate. Thus, we use the lowest supported rate for |
194 | * this band. Also use the lowest supported rate if the stored rate | 194 | * this band. Also use the lowest supported rate if the stored rate |
195 | * index is invalid. | 195 | * idx is invalid. |
196 | */ | 196 | */ |
197 | rate_idx = info->control.rates[0].idx; | 197 | rate_idx = info->control.rates[0].idx; |
198 | if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || | 198 | if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || |
@@ -319,7 +319,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
319 | if (!ieee80211_is_data(fc)) | 319 | if (!ieee80211_is_data(fc)) |
320 | sta_id = ctx->bcast_sta_id; | 320 | sta_id = ctx->bcast_sta_id; |
321 | else { | 321 | else { |
322 | /* Find index into station table for destination station */ | 322 | /* Find idx into station table for destination station */ |
323 | sta_id = il_sta_id_or_broadcast(il, ctx, info->control.sta); | 323 | sta_id = il_sta_id_or_broadcast(il, ctx, info->control.sta); |
324 | 324 | ||
325 | if (sta_id == IL_INVALID_STATION) { | 325 | if (sta_id == IL_INVALID_STATION) { |
@@ -417,7 +417,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
417 | 417 | ||
418 | /* | 418 | /* |
419 | * Set up the Tx-command (not MAC!) header. | 419 | * Set up the Tx-command (not MAC!) header. |
420 | * Store the chosen Tx queue and TFD index within the sequence field; | 420 | * Store the chosen Tx queue and TFD idx within the sequence field; |
421 | * after Tx, uCode's Tx response will return this value so driver can | 421 | * after Tx, uCode's Tx response will return this value so driver can |
422 | * locate the frame within the tx queue and do post-tx processing. | 422 | * locate the frame within the tx queue and do post-tx processing. |
423 | */ | 423 | */ |
@@ -513,7 +513,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
513 | pci_dma_sync_single_for_device(il->pci_dev, txcmd_phys, | 513 | pci_dma_sync_single_for_device(il->pci_dev, txcmd_phys, |
514 | firstlen, PCI_DMA_BIDIRECTIONAL); | 514 | firstlen, PCI_DMA_BIDIRECTIONAL); |
515 | 515 | ||
516 | /* Tell device the write index *just past* this latest filled TFD */ | 516 | /* Tell device the write idx *just past* this latest filled TFD */ |
517 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); | 517 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); |
518 | il_txq_update_write_ptr(il, txq); | 518 | il_txq_update_write_ptr(il, txq); |
519 | spin_unlock_irqrestore(&il->lock, flags); | 519 | spin_unlock_irqrestore(&il->lock, flags); |
@@ -828,7 +828,7 @@ static int il4965_txq_agg_enable(struct il_priv *il, int txq_id, | |||
828 | /* Set this queue as a chain-building queue */ | 828 | /* Set this queue as a chain-building queue */ |
829 | il_set_bits_prph(il, IL49_SCD_QUEUECHAIN_SEL, (1 << txq_id)); | 829 | il_set_bits_prph(il, IL49_SCD_QUEUECHAIN_SEL, (1 << txq_id)); |
830 | 830 | ||
831 | /* Place first TFD at index corresponding to start sequence number. | 831 | /* Place first TFD at idx corresponding to start sequence number. |
832 | * Assumes that ssn_idx is valid (!= 0xFFF) */ | 832 | * Assumes that ssn_idx is valid (!= 0xFFF) */ |
833 | il->txq[txq_id].q.read_ptr = (ssn_idx & 0xff); | 833 | il->txq[txq_id].q.read_ptr = (ssn_idx & 0xff); |
834 | il->txq[txq_id].q.write_ptr = (ssn_idx & 0xff); | 834 | il->txq[txq_id].q.write_ptr = (ssn_idx & 0xff); |
@@ -1105,7 +1105,7 @@ il4965_tx_status(struct il_priv *il, struct il_tx_info *tx_info, | |||
1105 | ieee80211_tx_status_irqsafe(il->hw, tx_info->skb); | 1105 | ieee80211_tx_status_irqsafe(il->hw, tx_info->skb); |
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | int il4965_tx_queue_reclaim(struct il_priv *il, int txq_id, int index) | 1108 | int il4965_tx_queue_reclaim(struct il_priv *il, int txq_id, int idx) |
1109 | { | 1109 | { |
1110 | struct il_tx_queue *txq = &il->txq[txq_id]; | 1110 | struct il_tx_queue *txq = &il->txq[txq_id]; |
1111 | struct il_queue *q = &txq->q; | 1111 | struct il_queue *q = &txq->q; |
@@ -1113,15 +1113,15 @@ int il4965_tx_queue_reclaim(struct il_priv *il, int txq_id, int index) | |||
1113 | int nfreed = 0; | 1113 | int nfreed = 0; |
1114 | struct ieee80211_hdr *hdr; | 1114 | struct ieee80211_hdr *hdr; |
1115 | 1115 | ||
1116 | if (index >= q->n_bd || il_queue_used(q, index) == 0) { | 1116 | if (idx >= q->n_bd || il_queue_used(q, idx) == 0) { |
1117 | IL_ERR("Read index for DMA queue txq id (%d), index %d, " | 1117 | IL_ERR("Read idx for DMA queue txq id (%d), idx %d, " |
1118 | "is out of range [0-%d] %d %d.\n", txq_id, | 1118 | "is out of range [0-%d] %d %d.\n", txq_id, |
1119 | index, q->n_bd, q->write_ptr, q->read_ptr); | 1119 | idx, q->n_bd, q->write_ptr, q->read_ptr); |
1120 | return 0; | 1120 | return 0; |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | for (index = il_queue_inc_wrap(index, q->n_bd); | 1123 | for (idx = il_queue_inc_wrap(idx, q->n_bd); |
1124 | q->read_ptr != index; | 1124 | q->read_ptr != idx; |
1125 | q->read_ptr = il_queue_inc_wrap(q->read_ptr, q->n_bd)) { | 1125 | q->read_ptr = il_queue_inc_wrap(q->read_ptr, q->n_bd)) { |
1126 | 1126 | ||
1127 | tx_info = &txq->txb[txq->q.read_ptr]; | 1127 | tx_info = &txq->txb[txq->q.read_ptr]; |
@@ -1252,7 +1252,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1252 | struct il_compressed_ba_resp *ba_resp = &pkt->u.compressed_ba; | 1252 | struct il_compressed_ba_resp *ba_resp = &pkt->u.compressed_ba; |
1253 | struct il_tx_queue *txq = NULL; | 1253 | struct il_tx_queue *txq = NULL; |
1254 | struct il_ht_agg *agg; | 1254 | struct il_ht_agg *agg; |
1255 | int index; | 1255 | int idx; |
1256 | int sta_id; | 1256 | int sta_id; |
1257 | int tid; | 1257 | int tid; |
1258 | unsigned long flags; | 1258 | unsigned long flags; |
@@ -1260,7 +1260,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1260 | /* "flow" corresponds to Tx queue */ | 1260 | /* "flow" corresponds to Tx queue */ |
1261 | u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); | 1261 | u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); |
1262 | 1262 | ||
1263 | /* "ssn" is start of block-ack Tx win, corresponds to index | 1263 | /* "ssn" is start of block-ack Tx win, corresponds to idx |
1264 | * (in Tx queue's circular buffer) of first TFD/frame in win */ | 1264 | * (in Tx queue's circular buffer) of first TFD/frame in win */ |
1265 | u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); | 1265 | u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); |
1266 | 1266 | ||
@@ -1287,8 +1287,8 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1287 | return; | 1287 | return; |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | /* Find index just before block-ack win */ | 1290 | /* Find idx just before block-ack win */ |
1291 | index = il_queue_dec_wrap(ba_resp_scd_ssn & 0xff, txq->q.n_bd); | 1291 | idx = il_queue_dec_wrap(ba_resp_scd_ssn & 0xff, txq->q.n_bd); |
1292 | 1292 | ||
1293 | spin_lock_irqsave(&il->sta_lock, flags); | 1293 | spin_lock_irqsave(&il->sta_lock, flags); |
1294 | 1294 | ||
@@ -1317,7 +1317,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1317 | * transmitted ... if not, it's too late anyway). */ | 1317 | * transmitted ... if not, it's too late anyway). */ |
1318 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { | 1318 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { |
1319 | /* calculate mac80211 ampdu sw queue to wake */ | 1319 | /* calculate mac80211 ampdu sw queue to wake */ |
1320 | int freed = il4965_tx_queue_reclaim(il, scd_flow, index); | 1320 | int freed = il4965_tx_queue_reclaim(il, scd_flow, idx); |
1321 | il4965_free_tfds_in_queue(il, sta_id, tid, freed); | 1321 | il4965_free_tfds_in_queue(il, sta_id, tid, freed); |
1322 | 1322 | ||
1323 | if (il_queue_space(&txq->q) > txq->q.low_mark && | 1323 | if (il_queue_space(&txq->q) > txq->q.low_mark && |