aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2009-01-27 17:27:56 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:34 -0500
commite1623446bb1de1834ff1c57b3e8ed341d5d4a927 (patch)
treeece3595deda6d6bad747961be257d5f2cbb507b1 /drivers/net/wireless/iwlwifi/iwl-5000.c
parent450154e4f471248e188d18e45c2409b37a133765 (diff)
iwlwifi: don't use implicit priv in IWL_DEBUG
Call IWL_DEBUG macro with explicit priv argument. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 89d92a8ca157..c5e9a66e2f88 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -84,7 +84,7 @@ static int iwl5000_apm_stop_master(struct iwl_priv *priv)
84 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); 84 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
85 85
86 spin_unlock_irqrestore(&priv->lock, flags); 86 spin_unlock_irqrestore(&priv->lock, flags);
87 IWL_DEBUG_INFO("stop master\n"); 87 IWL_DEBUG_INFO(priv, "stop master\n");
88 88
89 return 0; 89 return 0;
90} 90}
@@ -118,7 +118,7 @@ static int iwl5000_apm_init(struct iwl_priv *priv)
118 ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL, 118 ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
119 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); 119 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
120 if (ret < 0) { 120 if (ret < 0) {
121 IWL_DEBUG_INFO("Failed to init the card\n"); 121 IWL_DEBUG_INFO(priv, "Failed to init the card\n");
122 return ret; 122 return ret;
123 } 123 }
124 124
@@ -186,7 +186,7 @@ static int iwl5000_apm_reset(struct iwl_priv *priv)
186 ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL, 186 ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
187 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); 187 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
188 if (ret < 0) { 188 if (ret < 0) {
189 IWL_DEBUG_INFO("Failed to init the card\n"); 189 IWL_DEBUG_INFO(priv, "Failed to init the card\n");
190 goto out; 190 goto out;
191 } 191 }
192 192
@@ -338,7 +338,7 @@ static void iwl5000_gain_computation(struct iwl_priv *priv,
338 data->delta_gain_code[i] |= (1 << 2); 338 data->delta_gain_code[i] |= (1 << 2);
339 } 339 }
340 340
341 IWL_DEBUG_CALIB("Delta gains: ANT_B = %d ANT_C = %d\n", 341 IWL_DEBUG_CALIB(priv, "Delta gains: ANT_B = %d ANT_C = %d\n",
342 data->delta_gain_code[1], data->delta_gain_code[2]); 342 data->delta_gain_code[1], data->delta_gain_code[2]);
343 343
344 if (!data->radio_write) { 344 if (!data->radio_write) {
@@ -387,7 +387,7 @@ static void iwl5000_chain_noise_reset(struct iwl_priv *priv)
387 IWL_ERR(priv, 387 IWL_ERR(priv,
388 "Could not send REPLY_PHY_CALIBRATION_CMD\n"); 388 "Could not send REPLY_PHY_CALIBRATION_CMD\n");
389 data->state = IWL_CHAIN_NOISE_ACCUMULATE; 389 data->state = IWL_CHAIN_NOISE_ACCUMULATE;
390 IWL_DEBUG_CALIB("Run chain_noise_calibrate\n"); 390 IWL_DEBUG_CALIB(priv, "Run chain_noise_calibrate\n");
391 } 391 }
392} 392}
393 393
@@ -518,7 +518,7 @@ static void iwl5000_rx_calib_result(struct iwl_priv *priv,
518static void iwl5000_rx_calib_complete(struct iwl_priv *priv, 518static void iwl5000_rx_calib_complete(struct iwl_priv *priv,
519 struct iwl_rx_mem_buffer *rxb) 519 struct iwl_rx_mem_buffer *rxb)
520{ 520{
521 IWL_DEBUG_INFO("Init. calibration is completed, restarting fw.\n"); 521 IWL_DEBUG_INFO(priv, "Init. calibration is completed, restarting fw.\n");
522 queue_work(priv->workqueue, &priv->restart); 522 queue_work(priv->workqueue, &priv->restart);
523} 523}
524 524
@@ -586,7 +586,7 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
586 if (ret) 586 if (ret)
587 return ret; 587 return ret;
588 588
589 IWL_DEBUG_INFO("INST uCode section being loaded...\n"); 589 IWL_DEBUG_INFO(priv, "INST uCode section being loaded...\n");
590 ret = wait_event_interruptible_timeout(priv->wait_command_queue, 590 ret = wait_event_interruptible_timeout(priv->wait_command_queue,
591 priv->ucode_write_complete, 5 * HZ); 591 priv->ucode_write_complete, 5 * HZ);
592 if (ret == -ERESTARTSYS) { 592 if (ret == -ERESTARTSYS) {
@@ -606,7 +606,7 @@ static int iwl5000_load_given_ucode(struct iwl_priv *priv,
606 if (ret) 606 if (ret)
607 return ret; 607 return ret;
608 608
609 IWL_DEBUG_INFO("DATA uCode section being loaded...\n"); 609 IWL_DEBUG_INFO(priv, "DATA uCode section being loaded...\n");
610 610
611 ret = wait_event_interruptible_timeout(priv->wait_command_queue, 611 ret = wait_event_interruptible_timeout(priv->wait_command_queue,
612 priv->ucode_write_complete, 5 * HZ); 612 priv->ucode_write_complete, 5 * HZ);
@@ -631,20 +631,20 @@ static int iwl5000_load_ucode(struct iwl_priv *priv)
631 631
632 /* check whether init ucode should be loaded, or rather runtime ucode */ 632 /* check whether init ucode should be loaded, or rather runtime ucode */
633 if (priv->ucode_init.len && (priv->ucode_type == UCODE_NONE)) { 633 if (priv->ucode_init.len && (priv->ucode_type == UCODE_NONE)) {
634 IWL_DEBUG_INFO("Init ucode found. Loading init ucode...\n"); 634 IWL_DEBUG_INFO(priv, "Init ucode found. Loading init ucode...\n");
635 ret = iwl5000_load_given_ucode(priv, 635 ret = iwl5000_load_given_ucode(priv,
636 &priv->ucode_init, &priv->ucode_init_data); 636 &priv->ucode_init, &priv->ucode_init_data);
637 if (!ret) { 637 if (!ret) {
638 IWL_DEBUG_INFO("Init ucode load complete.\n"); 638 IWL_DEBUG_INFO(priv, "Init ucode load complete.\n");
639 priv->ucode_type = UCODE_INIT; 639 priv->ucode_type = UCODE_INIT;
640 } 640 }
641 } else { 641 } else {
642 IWL_DEBUG_INFO("Init ucode not found, or already loaded. " 642 IWL_DEBUG_INFO(priv, "Init ucode not found, or already loaded. "
643 "Loading runtime ucode...\n"); 643 "Loading runtime ucode...\n");
644 ret = iwl5000_load_given_ucode(priv, 644 ret = iwl5000_load_given_ucode(priv,
645 &priv->ucode_code, &priv->ucode_data); 645 &priv->ucode_code, &priv->ucode_data);
646 if (!ret) { 646 if (!ret) {
647 IWL_DEBUG_INFO("Runtime ucode load complete.\n"); 647 IWL_DEBUG_INFO(priv, "Runtime ucode load complete.\n");
648 priv->ucode_type = UCODE_RT; 648 priv->ucode_type = UCODE_RT;
649 } 649 }
650 } 650 }
@@ -660,7 +660,7 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv)
660 if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { 660 if (priv->card_alive_init.is_valid != UCODE_VALID_OK) {
661 /* We had an error bringing up the hardware, so take it 661 /* We had an error bringing up the hardware, so take it
662 * all the way back down so we can try again */ 662 * all the way back down so we can try again */
663 IWL_DEBUG_INFO("Initialize Alive failed.\n"); 663 IWL_DEBUG_INFO(priv, "Initialize Alive failed.\n");
664 goto restart; 664 goto restart;
665 } 665 }
666 666
@@ -670,7 +670,7 @@ static void iwl5000_init_alive_start(struct iwl_priv *priv)
670 if (iwl_verify_ucode(priv)) { 670 if (iwl_verify_ucode(priv)) {
671 /* Runtime instruction load was bad; 671 /* Runtime instruction load was bad;
672 * take it all the way back down so we can try again */ 672 * take it all the way back down so we can try again */
673 IWL_DEBUG_INFO("Bad \"initialize\" uCode load.\n"); 673 IWL_DEBUG_INFO(priv, "Bad \"initialize\" uCode load.\n");
674 goto restart; 674 goto restart;
675 } 675 }
676 676
@@ -713,7 +713,7 @@ static void iwl5000_tx_queue_set_status(struct iwl_priv *priv,
713 713
714 txq->sched_retry = scd_retry; 714 txq->sched_retry = scd_retry;
715 715
716 IWL_DEBUG_INFO("%s %s Queue %d on AC %d\n", 716 IWL_DEBUG_INFO(priv, "%s %s Queue %d on AC %d\n",
717 active ? "Activate" : "Deactivate", 717 active ? "Activate" : "Deactivate",
718 scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); 718 scd_retry ? "BA" : "AC", txq_id, tx_fifo_id);
719} 719}
@@ -1151,7 +1151,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
1151 u16 seq; 1151 u16 seq;
1152 1152
1153 if (agg->wait_for_ba) 1153 if (agg->wait_for_ba)
1154 IWL_DEBUG_TX_REPLY("got tx response w/o block-ack\n"); 1154 IWL_DEBUG_TX_REPLY(priv, "got tx response w/o block-ack\n");
1155 1155
1156 agg->frame_count = tx_resp->frame_count; 1156 agg->frame_count = tx_resp->frame_count;
1157 agg->start_idx = start_idx; 1157 agg->start_idx = start_idx;
@@ -1165,7 +1165,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
1165 idx = start_idx; 1165 idx = start_idx;
1166 1166
1167 /* FIXME: code repetition */ 1167 /* FIXME: code repetition */
1168 IWL_DEBUG_TX_REPLY("FrameCnt = %d, StartIdx=%d idx=%d\n", 1168 IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n",
1169 agg->frame_count, agg->start_idx, idx); 1169 agg->frame_count, agg->start_idx, idx);
1170 1170
1171 info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); 1171 info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
@@ -1177,9 +1177,9 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
1177 1177
1178 /* FIXME: code repetition end */ 1178 /* FIXME: code repetition end */
1179 1179
1180 IWL_DEBUG_TX_REPLY("1 Frame 0x%x failure :%d\n", 1180 IWL_DEBUG_TX_REPLY(priv, "1 Frame 0x%x failure :%d\n",
1181 status & 0xff, tx_resp->failure_frame); 1181 status & 0xff, tx_resp->failure_frame);
1182 IWL_DEBUG_TX_REPLY("Rate Info rate_n_flags=%x\n", rate_n_flags); 1182 IWL_DEBUG_TX_REPLY(priv, "Rate Info rate_n_flags=%x\n", rate_n_flags);
1183 1183
1184 agg->wait_for_ba = 0; 1184 agg->wait_for_ba = 0;
1185 } else { 1185 } else {
@@ -1199,7 +1199,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
1199 AGG_TX_STATE_ABORT_MSK)) 1199 AGG_TX_STATE_ABORT_MSK))
1200 continue; 1200 continue;
1201 1201
1202 IWL_DEBUG_TX_REPLY("FrameCnt = %d, txq_id=%d idx=%d\n", 1202 IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n",
1203 agg->frame_count, txq_id, idx); 1203 agg->frame_count, txq_id, idx);
1204 1204
1205 hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx); 1205 hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx);
@@ -1214,7 +1214,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
1214 return -1; 1214 return -1;
1215 } 1215 }
1216 1216
1217 IWL_DEBUG_TX_REPLY("AGG Frame i=%d idx %d seq=%d\n", 1217 IWL_DEBUG_TX_REPLY(priv, "AGG Frame i=%d idx %d seq=%d\n",
1218 i, idx, SEQ_TO_SN(sc)); 1218 i, idx, SEQ_TO_SN(sc));
1219 1219
1220 sh = idx - start; 1220 sh = idx - start;
@@ -1232,13 +1232,13 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
1232 sh = 0; 1232 sh = 0;
1233 } 1233 }
1234 bitmap |= 1ULL << sh; 1234 bitmap |= 1ULL << sh;
1235 IWL_DEBUG_TX_REPLY("start=%d bitmap=0x%llx\n", 1235 IWL_DEBUG_TX_REPLY(priv, "start=%d bitmap=0x%llx\n",
1236 start, (unsigned long long)bitmap); 1236 start, (unsigned long long)bitmap);
1237 } 1237 }
1238 1238
1239 agg->bitmap = bitmap; 1239 agg->bitmap = bitmap;
1240 agg->start_idx = start; 1240 agg->start_idx = start;
1241 IWL_DEBUG_TX_REPLY("Frames %d start_idx=%d bitmap=0x%llx\n", 1241 IWL_DEBUG_TX_REPLY(priv, "Frames %d start_idx=%d bitmap=0x%llx\n",
1242 agg->frame_count, agg->start_idx, 1242 agg->frame_count, agg->start_idx,
1243 (unsigned long long)agg->bitmap); 1243 (unsigned long long)agg->bitmap);
1244 1244
@@ -1291,7 +1291,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1291 1291
1292 if (txq->q.read_ptr != (scd_ssn & 0xff)) { 1292 if (txq->q.read_ptr != (scd_ssn & 0xff)) {
1293 index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd); 1293 index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd);
1294 IWL_DEBUG_TX_REPLY("Retry scheduler reclaim " 1294 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim "
1295 "scd_ssn=%d idx=%d txq=%d swq=%d\n", 1295 "scd_ssn=%d idx=%d txq=%d swq=%d\n",
1296 scd_ssn , index, txq_id, txq->swq_id); 1296 scd_ssn , index, txq_id, txq->swq_id);
1297 1297
@@ -1318,7 +1318,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1318 le32_to_cpu(tx_resp->rate_n_flags), 1318 le32_to_cpu(tx_resp->rate_n_flags),
1319 info); 1319 info);
1320 1320
1321 IWL_DEBUG_TX_REPLY("TXQ %d status %s (0x%08x) rate_n_flags " 1321 IWL_DEBUG_TX_REPLY(priv, "TXQ %d status %s (0x%08x) rate_n_flags "
1322 "0x%x retries %d\n", 1322 "0x%x retries %d\n",
1323 txq_id, 1323 txq_id,
1324 iwl_get_tx_fail_reason(status), status, 1324 iwl_get_tx_fail_reason(status), status,
@@ -1389,7 +1389,7 @@ static int iwl5000_send_rxon_assoc(struct iwl_priv *priv)
1389 (rxon1->acquisition_data == rxon2->acquisition_data) && 1389 (rxon1->acquisition_data == rxon2->acquisition_data) &&
1390 (rxon1->rx_chain == rxon2->rx_chain) && 1390 (rxon1->rx_chain == rxon2->rx_chain) &&
1391 (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { 1391 (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) {
1392 IWL_DEBUG_INFO("Using current RXON_ASSOC. Not resending.\n"); 1392 IWL_DEBUG_INFO(priv, "Using current RXON_ASSOC. Not resending.\n");
1393 return 0; 1393 return 0;
1394 } 1394 }
1395 1395
@@ -1465,7 +1465,7 @@ static int iwl5000_calc_rssi(struct iwl_priv *priv,
1465 max_rssi = max_t(u32, rssi_a, rssi_b); 1465 max_rssi = max_t(u32, rssi_a, rssi_b);
1466 max_rssi = max_t(u32, max_rssi, rssi_c); 1466 max_rssi = max_t(u32, max_rssi, rssi_c);
1467 1467
1468 IWL_DEBUG_STATS("Rssi In A %d B %d C %d Max %d AGC dB %d\n", 1468 IWL_DEBUG_STATS(priv, "Rssi In A %d B %d C %d Max %d AGC dB %d\n",
1469 rssi_a, rssi_b, rssi_c, max_rssi, agc); 1469 rssi_a, rssi_b, rssi_c, max_rssi, agc);
1470 1470
1471 /* dBm = max_rssi dB - agc dB - constant. 1471 /* dBm = max_rssi dB - agc dB - constant.