aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 7d2b6e11f73e..7c74b259873f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -96,7 +96,7 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
96 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); 96 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
97 97
98 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 98 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
99 IWL_DEBUG_INFO("Requesting wakeup, GP1 = 0x%x\n", reg); 99 IWL_DEBUG_INFO(priv, "Requesting wakeup, GP1 = 0x%x\n", reg);
100 iwl_set_bit(priv, CSR_GP_CNTRL, 100 iwl_set_bit(priv, CSR_GP_CNTRL,
101 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 101 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
102 return ret; 102 return ret;
@@ -638,14 +638,14 @@ static void iwl_tx_cmd_build_hwcrypto(struct iwl_priv *priv,
638 memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); 638 memcpy(tx_cmd->key, keyconf->key, keyconf->keylen);
639 if (info->flags & IEEE80211_TX_CTL_AMPDU) 639 if (info->flags & IEEE80211_TX_CTL_AMPDU)
640 tx_cmd->tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK; 640 tx_cmd->tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK;
641 IWL_DEBUG_TX("tx_cmd with AES hwcrypto\n"); 641 IWL_DEBUG_TX(priv, "tx_cmd with AES hwcrypto\n");
642 break; 642 break;
643 643
644 case ALG_TKIP: 644 case ALG_TKIP:
645 tx_cmd->sec_ctl = TX_CMD_SEC_TKIP; 645 tx_cmd->sec_ctl = TX_CMD_SEC_TKIP;
646 ieee80211_get_tkip_key(keyconf, skb_frag, 646 ieee80211_get_tkip_key(keyconf, skb_frag,
647 IEEE80211_TKIP_P2_KEY, tx_cmd->key); 647 IEEE80211_TKIP_P2_KEY, tx_cmd->key);
648 IWL_DEBUG_TX("tx_cmd with tkip hwcrypto\n"); 648 IWL_DEBUG_TX(priv, "tx_cmd with tkip hwcrypto\n");
649 break; 649 break;
650 650
651 case ALG_WEP: 651 case ALG_WEP:
@@ -657,7 +657,7 @@ static void iwl_tx_cmd_build_hwcrypto(struct iwl_priv *priv,
657 657
658 memcpy(&tx_cmd->key[3], keyconf->key, keyconf->keylen); 658 memcpy(&tx_cmd->key[3], keyconf->key, keyconf->keylen);
659 659
660 IWL_DEBUG_TX("Configuring packet for WEP encryption " 660 IWL_DEBUG_TX(priv, "Configuring packet for WEP encryption "
661 "with key %d\n", keyconf->keyidx); 661 "with key %d\n", keyconf->keyidx);
662 break; 662 break;
663 663
@@ -703,7 +703,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
703 703
704 spin_lock_irqsave(&priv->lock, flags); 704 spin_lock_irqsave(&priv->lock, flags);
705 if (iwl_is_rfkill(priv)) { 705 if (iwl_is_rfkill(priv)) {
706 IWL_DEBUG_DROP("Dropping - RF KILL\n"); 706 IWL_DEBUG_DROP(priv, "Dropping - RF KILL\n");
707 goto drop_unlock; 707 goto drop_unlock;
708 } 708 }
709 709
@@ -717,11 +717,11 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
717 717
718#ifdef CONFIG_IWLWIFI_DEBUG 718#ifdef CONFIG_IWLWIFI_DEBUG
719 if (ieee80211_is_auth(fc)) 719 if (ieee80211_is_auth(fc))
720 IWL_DEBUG_TX("Sending AUTH frame\n"); 720 IWL_DEBUG_TX(priv, "Sending AUTH frame\n");
721 else if (ieee80211_is_assoc_req(fc)) 721 else if (ieee80211_is_assoc_req(fc))
722 IWL_DEBUG_TX("Sending ASSOC frame\n"); 722 IWL_DEBUG_TX(priv, "Sending ASSOC frame\n");
723 else if (ieee80211_is_reassoc_req(fc)) 723 else if (ieee80211_is_reassoc_req(fc))
724 IWL_DEBUG_TX("Sending REASSOC frame\n"); 724 IWL_DEBUG_TX(priv, "Sending REASSOC frame\n");
725#endif 725#endif
726 726
727 /* drop all data frame if we are not associated */ 727 /* drop all data frame if we are not associated */
@@ -731,7 +731,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
731 (!iwl_is_associated(priv) || 731 (!iwl_is_associated(priv) ||
732 ((priv->iw_mode == NL80211_IFTYPE_STATION) && !priv->assoc_id) || 732 ((priv->iw_mode == NL80211_IFTYPE_STATION) && !priv->assoc_id) ||
733 !priv->assoc_station_added)) { 733 !priv->assoc_station_added)) {
734 IWL_DEBUG_DROP("Dropping - !iwl_is_associated\n"); 734 IWL_DEBUG_DROP(priv, "Dropping - !iwl_is_associated\n");
735 goto drop_unlock; 735 goto drop_unlock;
736 } 736 }
737 737
@@ -742,12 +742,12 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
742 /* Find (or create) index into station table for destination station */ 742 /* Find (or create) index into station table for destination station */
743 sta_id = iwl_get_sta_id(priv, hdr); 743 sta_id = iwl_get_sta_id(priv, hdr);
744 if (sta_id == IWL_INVALID_STATION) { 744 if (sta_id == IWL_INVALID_STATION) {
745 IWL_DEBUG_DROP("Dropping - INVALID STATION: %pM\n", 745 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
746 hdr->addr1); 746 hdr->addr1);
747 goto drop; 747 goto drop;
748 } 748 }
749 749
750 IWL_DEBUG_TX("station Id %d\n", sta_id); 750 IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
751 751
752 swq_id = skb_get_queue_mapping(skb); 752 swq_id = skb_get_queue_mapping(skb);
753 txq_id = swq_id; 753 txq_id = swq_id;
@@ -938,7 +938,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
938 !(cmd->meta.flags & CMD_SIZE_HUGE)); 938 !(cmd->meta.flags & CMD_SIZE_HUGE));
939 939
940 if (iwl_is_rfkill(priv)) { 940 if (iwl_is_rfkill(priv)) {
941 IWL_DEBUG_INFO("Not sending command - RF KILL"); 941 IWL_DEBUG_INFO(priv, "Not sending command - RF KILL");
942 return -EIO; 942 return -EIO;
943 } 943 }
944 944
@@ -981,7 +981,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
981 switch (out_cmd->hdr.cmd) { 981 switch (out_cmd->hdr.cmd) {
982 case REPLY_TX_LINK_QUALITY_CMD: 982 case REPLY_TX_LINK_QUALITY_CMD:
983 case SENSITIVITY_CMD: 983 case SENSITIVITY_CMD:
984 IWL_DEBUG_HC_DUMP("Sending command %s (#%x), seq: 0x%04X, " 984 IWL_DEBUG_HC_DUMP(priv, "Sending command %s (#%x), seq: 0x%04X, "
985 "%d bytes at %d[%d]:%d\n", 985 "%d bytes at %d[%d]:%d\n",
986 get_cmd_string(out_cmd->hdr.cmd), 986 get_cmd_string(out_cmd->hdr.cmd),
987 out_cmd->hdr.cmd, 987 out_cmd->hdr.cmd,
@@ -989,7 +989,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
989 q->write_ptr, idx, IWL_CMD_QUEUE_NUM); 989 q->write_ptr, idx, IWL_CMD_QUEUE_NUM);
990 break; 990 break;
991 default: 991 default:
992 IWL_DEBUG_HC("Sending command %s (#%x), seq: 0x%04X, " 992 IWL_DEBUG_HC(priv, "Sending command %s (#%x), seq: 0x%04X, "
993 "%d bytes at %d[%d]:%d\n", 993 "%d bytes at %d[%d]:%d\n",
994 get_cmd_string(out_cmd->hdr.cmd), 994 get_cmd_string(out_cmd->hdr.cmd),
995 out_cmd->hdr.cmd, 995 out_cmd->hdr.cmd,
@@ -1194,7 +1194,7 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
1194 tid_data->agg.state = IWL_AGG_ON; 1194 tid_data->agg.state = IWL_AGG_ON;
1195 ieee80211_start_tx_ba_cb_irqsafe(priv->hw, ra, tid); 1195 ieee80211_start_tx_ba_cb_irqsafe(priv->hw, ra, tid);
1196 } else { 1196 } else {
1197 IWL_DEBUG_HT("HW queue is NOT empty: %d packets in HW queue\n", 1197 IWL_DEBUG_HT(priv, "HW queue is NOT empty: %d packets in HW queue\n",
1198 tid_data->tfds_in_queue); 1198 tid_data->tfds_in_queue);
1199 tid_data->agg.state = IWL_EMPTYING_HW_QUEUE_ADDBA; 1199 tid_data->agg.state = IWL_EMPTYING_HW_QUEUE_ADDBA;
1200 } 1200 }
@@ -1235,13 +1235,13 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid)
1235 1235
1236 /* The queue is not empty */ 1236 /* The queue is not empty */
1237 if (write_ptr != read_ptr) { 1237 if (write_ptr != read_ptr) {
1238 IWL_DEBUG_HT("Stopping a non empty AGG HW QUEUE\n"); 1238 IWL_DEBUG_HT(priv, "Stopping a non empty AGG HW QUEUE\n");
1239 priv->stations[sta_id].tid[tid].agg.state = 1239 priv->stations[sta_id].tid[tid].agg.state =
1240 IWL_EMPTYING_HW_QUEUE_DELBA; 1240 IWL_EMPTYING_HW_QUEUE_DELBA;
1241 return 0; 1241 return 0;
1242 } 1242 }
1243 1243
1244 IWL_DEBUG_HT("HW queue is empty\n"); 1244 IWL_DEBUG_HT(priv, "HW queue is empty\n");
1245 priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF; 1245 priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF;
1246 1246
1247 spin_lock_irqsave(&priv->lock, flags); 1247 spin_lock_irqsave(&priv->lock, flags);
@@ -1272,7 +1272,7 @@ int iwl_txq_check_empty(struct iwl_priv *priv, int sta_id, u8 tid, int txq_id)
1272 (q->read_ptr == q->write_ptr)) { 1272 (q->read_ptr == q->write_ptr)) {
1273 u16 ssn = SEQ_TO_SN(tid_data->seq_number); 1273 u16 ssn = SEQ_TO_SN(tid_data->seq_number);
1274 int tx_fifo = default_tid_to_tx_fifo[tid]; 1274 int tx_fifo = default_tid_to_tx_fifo[tid];
1275 IWL_DEBUG_HT("HW queue empty: continue DELBA flow\n"); 1275 IWL_DEBUG_HT(priv, "HW queue empty: continue DELBA flow\n");
1276 priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, 1276 priv->cfg->ops->lib->txq_agg_disable(priv, txq_id,
1277 ssn, tx_fifo); 1277 ssn, tx_fifo);
1278 tid_data->agg.state = IWL_AGG_OFF; 1278 tid_data->agg.state = IWL_AGG_OFF;
@@ -1282,7 +1282,7 @@ int iwl_txq_check_empty(struct iwl_priv *priv, int sta_id, u8 tid, int txq_id)
1282 case IWL_EMPTYING_HW_QUEUE_ADDBA: 1282 case IWL_EMPTYING_HW_QUEUE_ADDBA:
1283 /* We are reclaiming the last packet of the queue */ 1283 /* We are reclaiming the last packet of the queue */
1284 if (tid_data->tfds_in_queue == 0) { 1284 if (tid_data->tfds_in_queue == 0) {
1285 IWL_DEBUG_HT("HW queue empty: continue ADDBA flow\n"); 1285 IWL_DEBUG_HT(priv, "HW queue empty: continue ADDBA flow\n");
1286 tid_data->agg.state = IWL_AGG_ON; 1286 tid_data->agg.state = IWL_AGG_ON;
1287 ieee80211_start_tx_ba_cb_irqsafe(priv->hw, addr, tid); 1287 ieee80211_start_tx_ba_cb_irqsafe(priv->hw, addr, tid);
1288 } 1288 }
@@ -1317,7 +1317,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1317 1317
1318 /* Mark that the expected block-ack response arrived */ 1318 /* Mark that the expected block-ack response arrived */
1319 agg->wait_for_ba = 0; 1319 agg->wait_for_ba = 0;
1320 IWL_DEBUG_TX_REPLY("BA %d %d\n", agg->start_idx, ba_resp->seq_ctl); 1320 IWL_DEBUG_TX_REPLY(priv, "BA %d %d\n", agg->start_idx, ba_resp->seq_ctl);
1321 1321
1322 /* Calculate shift to align block-ack bits with our Tx window bits */ 1322 /* Calculate shift to align block-ack bits with our Tx window bits */
1323 sh = agg->start_idx - SEQ_TO_INDEX(seq_ctl >> 4); 1323 sh = agg->start_idx - SEQ_TO_INDEX(seq_ctl >> 4);
@@ -1328,7 +1328,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1328 bitmap = le64_to_cpu(ba_resp->bitmap) >> sh; 1328 bitmap = le64_to_cpu(ba_resp->bitmap) >> sh;
1329 1329
1330 if (agg->frame_count > (64 - sh)) { 1330 if (agg->frame_count > (64 - sh)) {
1331 IWL_DEBUG_TX_REPLY("more frames than bitmap size"); 1331 IWL_DEBUG_TX_REPLY(priv, "more frames than bitmap size");
1332 return -1; 1332 return -1;
1333 } 1333 }
1334 1334
@@ -1341,7 +1341,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1341 for (i = 0; i < agg->frame_count ; i++) { 1341 for (i = 0; i < agg->frame_count ; i++) {
1342 ack = bitmap & (1ULL << i); 1342 ack = bitmap & (1ULL << i);
1343 successes += !!ack; 1343 successes += !!ack;
1344 IWL_DEBUG_TX_REPLY("%s ON i=%d idx=%d raw=%d\n", 1344 IWL_DEBUG_TX_REPLY(priv, "%s ON i=%d idx=%d raw=%d\n",
1345 ack ? "ACK" : "NACK", i, (agg->start_idx + i) & 0xff, 1345 ack ? "ACK" : "NACK", i, (agg->start_idx + i) & 0xff,
1346 agg->start_idx + i); 1346 agg->start_idx + i);
1347 } 1347 }
@@ -1354,7 +1354,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1354 info->status.ampdu_ack_len = agg->frame_count; 1354 info->status.ampdu_ack_len = agg->frame_count;
1355 iwl_hwrate_to_tx_control(priv, agg->rate_n_flags, info); 1355 iwl_hwrate_to_tx_control(priv, agg->rate_n_flags, info);
1356 1356
1357 IWL_DEBUG_TX_REPLY("Bitmap %llx\n", (unsigned long long)bitmap); 1357 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap);
1358 1358
1359 return 0; 1359 return 0;
1360} 1360}
@@ -1399,19 +1399,19 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
1399 1399
1400 /* TODO: Need to get this copy more safely - now good for debug */ 1400 /* TODO: Need to get this copy more safely - now good for debug */
1401 1401
1402 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d] Received from %pM, " 1402 IWL_DEBUG_TX_REPLY(priv, "REPLY_COMPRESSED_BA [%d] Received from %pM, "
1403 "sta_id = %d\n", 1403 "sta_id = %d\n",
1404 agg->wait_for_ba, 1404 agg->wait_for_ba,
1405 (u8 *) &ba_resp->sta_addr_lo32, 1405 (u8 *) &ba_resp->sta_addr_lo32,
1406 ba_resp->sta_id); 1406 ba_resp->sta_id);
1407 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx, scd_flow = " 1407 IWL_DEBUG_TX_REPLY(priv, "TID = %d, SeqCtl = %d, bitmap = 0x%llx, scd_flow = "
1408 "%d, scd_ssn = %d\n", 1408 "%d, scd_ssn = %d\n",
1409 ba_resp->tid, 1409 ba_resp->tid,
1410 ba_resp->seq_ctl, 1410 ba_resp->seq_ctl,
1411 (unsigned long long)le64_to_cpu(ba_resp->bitmap), 1411 (unsigned long long)le64_to_cpu(ba_resp->bitmap),
1412 ba_resp->scd_flow, 1412 ba_resp->scd_flow,
1413 ba_resp->scd_ssn); 1413 ba_resp->scd_ssn);
1414 IWL_DEBUG_TX_REPLY("DAT start_idx = %d, bitmap = 0x%llx \n", 1414 IWL_DEBUG_TX_REPLY(priv, "DAT start_idx = %d, bitmap = 0x%llx \n",
1415 agg->start_idx, 1415 agg->start_idx,
1416 (unsigned long long)agg->bitmap); 1416 (unsigned long long)agg->bitmap);
1417 1417