aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-scan.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-09-13 08:46:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-14 16:14:25 -0400
commit7cf24421292d92556d53630e6973b34324c94103 (patch)
tree8902505c3c24eece30715714b0e625cb5be0f143 /drivers/net/wireless/iwlwifi/iwl-scan.c
parent74d81b259d6c8493f066e34c939cb6fb7d3129e5 (diff)
iwlwifi: use IWL_DEBUG_SCAN for debug scanning
Replace IWL_DEBUG_{INFO,HC,RC} to IWL_DEBUG_SCAN in iwl-scan.c file. Add some more IWL_DEBUG_SCAN messages. This will allow to fully debug scanning using only IWL_DL_SCAN flag. Also start one message sentence with capital letter, since that convention in iwl-scan.c file. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 26dd8f3228c0..65b7cb4290cb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -85,7 +85,7 @@ static int iwl_send_scan_abort(struct iwl_priv *priv)
85 * can occur if we send the scan abort before we 85 * can occur if we send the scan abort before we
86 * the microcode has notified us that a scan is 86 * the microcode has notified us that a scan is
87 * completed. */ 87 * completed. */
88 IWL_DEBUG_INFO(priv, "SCAN_ABORT ret %d.\n", pkt->u.status); 88 IWL_DEBUG_SCAN(priv, "SCAN_ABORT ret %d.\n", pkt->u.status);
89 ret = -EIO; 89 ret = -EIO;
90 } 90 }
91 91
@@ -192,7 +192,7 @@ static void iwl_rx_reply_scan(struct iwl_priv *priv,
192 struct iwl_scanreq_notification *notif = 192 struct iwl_scanreq_notification *notif =
193 (struct iwl_scanreq_notification *)pkt->u.raw; 193 (struct iwl_scanreq_notification *)pkt->u.raw;
194 194
195 IWL_DEBUG_RX(priv, "Scan request status = 0x%x\n", notif->status); 195 IWL_DEBUG_SCAN(priv, "Scan request status = 0x%x\n", notif->status);
196#endif 196#endif
197} 197}
198 198
@@ -251,7 +251,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
251 /* The HW is no longer scanning */ 251 /* The HW is no longer scanning */
252 clear_bit(STATUS_SCAN_HW, &priv->status); 252 clear_bit(STATUS_SCAN_HW, &priv->status);
253 253
254 IWL_DEBUG_INFO(priv, "Scan on %sGHz took %dms\n", 254 IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n",
255 (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", 255 (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2",
256 jiffies_to_msecs(elapsed_jiffies 256 jiffies_to_msecs(elapsed_jiffies
257 (priv->scan_start, jiffies))); 257 (priv->scan_start, jiffies)));
@@ -362,22 +362,22 @@ static int __must_check iwl_scan_initiate(struct iwl_priv *priv,
362 cancel_delayed_work(&priv->scan_check); 362 cancel_delayed_work(&priv->scan_check);
363 363
364 if (!iwl_is_ready_rf(priv)) { 364 if (!iwl_is_ready_rf(priv)) {
365 IWL_WARN(priv, "request scan called when driver not ready.\n"); 365 IWL_WARN(priv, "Request scan called when driver not ready.\n");
366 return -EIO; 366 return -EIO;
367 } 367 }
368 368
369 if (test_bit(STATUS_SCAN_HW, &priv->status)) { 369 if (test_bit(STATUS_SCAN_HW, &priv->status)) {
370 IWL_DEBUG_INFO(priv, 370 IWL_DEBUG_SCAN(priv,
371 "Multiple concurrent scan requests in parallel.\n"); 371 "Multiple concurrent scan requests in parallel.\n");
372 return -EBUSY; 372 return -EBUSY;
373 } 373 }
374 374
375 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { 375 if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) {
376 IWL_DEBUG_HC(priv, "Scan request while abort pending.\n"); 376 IWL_DEBUG_SCAN(priv, "Scan request while abort pending.\n");
377 return -EBUSY; 377 return -EBUSY;
378 } 378 }
379 379
380 IWL_DEBUG_INFO(priv, "Starting %sscan...\n", 380 IWL_DEBUG_SCAN(priv, "Starting %sscan...\n",
381 internal ? "internal short " : ""); 381 internal ? "internal short " : "");
382 382
383 set_bit(STATUS_SCANNING, &priv->status); 383 set_bit(STATUS_SCANNING, &priv->status);
@@ -427,9 +427,10 @@ int iwl_mac_hw_scan(struct ieee80211_hw *hw,
427 * If an internal scan is in progress, just set 427 * If an internal scan is in progress, just set
428 * up the scan_request as per above. 428 * up the scan_request as per above.
429 */ 429 */
430 if (priv->is_internal_short_scan) 430 if (priv->is_internal_short_scan) {
431 IWL_DEBUG_SCAN(priv, "SCAN request during internal scan\n");
431 ret = 0; 432 ret = 0;
432 else 433 } else
433 ret = iwl_scan_initiate(priv, vif, false, 434 ret = iwl_scan_initiate(priv, vif, false,
434 req->channels[0]->band); 435 req->channels[0]->band);
435 436
@@ -456,6 +457,8 @@ static void iwl_bg_start_internal_scan(struct work_struct *work)
456 struct iwl_priv *priv = 457 struct iwl_priv *priv =
457 container_of(work, struct iwl_priv, start_internal_scan); 458 container_of(work, struct iwl_priv, start_internal_scan);
458 459
460 IWL_DEBUG_SCAN(priv, "Start internal scan\n");
461
459 mutex_lock(&priv->mutex); 462 mutex_lock(&priv->mutex);
460 463
461 if (priv->is_internal_short_scan == true) { 464 if (priv->is_internal_short_scan == true) {
@@ -479,6 +482,8 @@ static void iwl_bg_scan_check(struct work_struct *data)
479 struct iwl_priv *priv = 482 struct iwl_priv *priv =
480 container_of(data, struct iwl_priv, scan_check.work); 483 container_of(data, struct iwl_priv, scan_check.work);
481 484
485 IWL_DEBUG_SCAN(priv, "Scan check work\n");
486
482 /* Since we are here firmware does not finish scan and 487 /* Since we are here firmware does not finish scan and
483 * most likely is in bad shape, so we don't bother to 488 * most likely is in bad shape, so we don't bother to
484 * send abort command, just force scan complete to mac80211 */ 489 * send abort command, just force scan complete to mac80211 */
@@ -539,6 +544,8 @@ static void iwl_bg_abort_scan(struct work_struct *work)
539{ 544{
540 struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); 545 struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan);
541 546
547 IWL_DEBUG_SCAN(priv, "Abort scan work\n");
548
542 /* We keep scan_check work queued in case when firmware will not 549 /* We keep scan_check work queued in case when firmware will not
543 * report back scan completed notification */ 550 * report back scan completed notification */
544 mutex_lock(&priv->mutex); 551 mutex_lock(&priv->mutex);
@@ -553,7 +560,7 @@ static void iwl_bg_scan_completed(struct work_struct *work)
553 bool aborted; 560 bool aborted;
554 struct iwl_rxon_context *ctx; 561 struct iwl_rxon_context *ctx;
555 562
556 IWL_DEBUG_INFO(priv, "Completed %sscan.\n", 563 IWL_DEBUG_SCAN(priv, "Completed %sscan.\n",
557 priv->is_internal_short_scan ? "internal short " : ""); 564 priv->is_internal_short_scan ? "internal short " : "");
558 565
559 cancel_delayed_work(&priv->scan_check); 566 cancel_delayed_work(&priv->scan_check);
@@ -562,10 +569,10 @@ static void iwl_bg_scan_completed(struct work_struct *work)
562 569
563 aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &priv->status); 570 aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &priv->status);
564 if (aborted) 571 if (aborted)
565 IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); 572 IWL_DEBUG_SCAN(priv, "Aborted scan completed.\n");
566 573
567 if (!test_and_clear_bit(STATUS_SCANNING, &priv->status)) { 574 if (!test_and_clear_bit(STATUS_SCANNING, &priv->status)) {
568 IWL_DEBUG_INFO(priv, "Scan already completed.\n"); 575 IWL_DEBUG_SCAN(priv, "Scan already completed.\n");
569 goto out; 576 goto out;
570 } 577 }
571 578