diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 05:21:01 -0500 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 05:21:01 -0500 |
commit | 58de00a464f1e7cf0b108341dc6cc49276d19d7a (patch) | |
tree | 9d9d56256f22f2bd5e87aa673eeadbae375293d5 /drivers/net/wireless/iwlegacy | |
parent | 2d27c5dbd696e7e3a162bba7b948486a9856abca (diff) |
iwlegacy: rename IL_DEBUG_ to D_
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
23 files changed, 685 insertions, 685 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c index 38f1b825af1..d05da7a46c4 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c | |||
@@ -167,7 +167,7 @@ static int il3945_rate_scale_flush_windows(struct il3945_rs_sta *rs_sta) | |||
167 | spin_lock_irqsave(&rs_sta->lock, flags); | 167 | spin_lock_irqsave(&rs_sta->lock, flags); |
168 | if (time_after(jiffies, rs_sta->win[i].stamp + | 168 | if (time_after(jiffies, rs_sta->win[i].stamp + |
169 | IL_RATE_WIN_FLUSH)) { | 169 | IL_RATE_WIN_FLUSH)) { |
170 | IL_DEBUG_RATE(il, "flushing %d samples of rate " | 170 | D_RATE("flushing %d samples of rate " |
171 | "index %d\n", | 171 | "index %d\n", |
172 | rs_sta->win[i].counter, i); | 172 | rs_sta->win[i].counter, i); |
173 | il3945_clear_window(&rs_sta->win[i]); | 173 | il3945_clear_window(&rs_sta->win[i]); |
@@ -191,7 +191,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data) | |||
191 | unsigned long flags; | 191 | unsigned long flags; |
192 | u32 packet_count, duration, pps; | 192 | u32 packet_count, duration, pps; |
193 | 193 | ||
194 | IL_DEBUG_RATE(il, "enter\n"); | 194 | D_RATE("enter\n"); |
195 | 195 | ||
196 | unflushed = il3945_rate_scale_flush_windows(rs_sta); | 196 | unflushed = il3945_rate_scale_flush_windows(rs_sta); |
197 | 197 | ||
@@ -206,7 +206,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data) | |||
206 | duration = | 206 | duration = |
207 | jiffies_to_msecs(jiffies - rs_sta->last_partial_flush); | 207 | jiffies_to_msecs(jiffies - rs_sta->last_partial_flush); |
208 | 208 | ||
209 | IL_DEBUG_RATE(il, "Tx'd %d packets in %dms\n", | 209 | D_RATE("Tx'd %d packets in %dms\n", |
210 | packet_count, duration); | 210 | packet_count, duration); |
211 | 211 | ||
212 | /* Determine packets per second */ | 212 | /* Determine packets per second */ |
@@ -226,7 +226,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data) | |||
226 | 226 | ||
227 | rs_sta->flush_time = msecs_to_jiffies(duration); | 227 | rs_sta->flush_time = msecs_to_jiffies(duration); |
228 | 228 | ||
229 | IL_DEBUG_RATE(il, "new flush period: %d msec ave %d\n", | 229 | D_RATE("new flush period: %d msec ave %d\n", |
230 | duration, packet_count); | 230 | duration, packet_count); |
231 | 231 | ||
232 | mod_timer(&rs_sta->rate_scale_flush, jiffies + | 232 | mod_timer(&rs_sta->rate_scale_flush, jiffies + |
@@ -244,7 +244,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data) | |||
244 | 244 | ||
245 | spin_unlock_irqrestore(&rs_sta->lock, flags); | 245 | spin_unlock_irqrestore(&rs_sta->lock, flags); |
246 | 246 | ||
247 | IL_DEBUG_RATE(il, "leave\n"); | 247 | D_RATE("leave\n"); |
248 | } | 248 | } |
249 | 249 | ||
250 | /** | 250 | /** |
@@ -263,7 +263,7 @@ static void il3945_collect_tx_data(struct il3945_rs_sta *rs_sta, | |||
263 | struct il_priv *il __maybe_unused = rs_sta->il; | 263 | struct il_priv *il __maybe_unused = rs_sta->il; |
264 | 264 | ||
265 | if (!retries) { | 265 | if (!retries) { |
266 | IL_DEBUG_RATE(il, "leave: retries == 0 -- should be at least 1\n"); | 266 | D_RATE("leave: retries == 0 -- should be at least 1\n"); |
267 | return; | 267 | return; |
268 | } | 268 | } |
269 | 269 | ||
@@ -341,7 +341,7 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i | |||
341 | struct ieee80211_supported_band *sband; | 341 | struct ieee80211_supported_band *sband; |
342 | int i; | 342 | int i; |
343 | 343 | ||
344 | IL_DEBUG_INFO(il, "enter\n"); | 344 | D_INFO("enter\n"); |
345 | if (sta_id == il->contexts[IL_RXON_CTX_BSS].bcast_sta_id) | 345 | if (sta_id == il->contexts[IL_RXON_CTX_BSS].bcast_sta_id) |
346 | goto out; | 346 | goto out; |
347 | 347 | ||
@@ -390,7 +390,7 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i | |||
390 | out: | 390 | out: |
391 | il->stations[sta_id].used &= ~IL_STA_UCODE_INPROGRESS; | 391 | il->stations[sta_id].used &= ~IL_STA_UCODE_INPROGRESS; |
392 | 392 | ||
393 | IL_DEBUG_INFO(il, "leave\n"); | 393 | D_INFO("leave\n"); |
394 | } | 394 | } |
395 | 395 | ||
396 | static void *il3945_rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) | 396 | static void *il3945_rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) |
@@ -410,14 +410,14 @@ static void *il3945_rs_alloc_sta(void *il_priv, struct ieee80211_sta *sta, gfp_t | |||
410 | struct il3945_sta_priv *psta = (void *) sta->drv_priv; | 410 | struct il3945_sta_priv *psta = (void *) sta->drv_priv; |
411 | struct il_priv *il __maybe_unused = il_priv; | 411 | struct il_priv *il __maybe_unused = il_priv; |
412 | 412 | ||
413 | IL_DEBUG_RATE(il, "enter\n"); | 413 | D_RATE("enter\n"); |
414 | 414 | ||
415 | rs_sta = &psta->rs_sta; | 415 | rs_sta = &psta->rs_sta; |
416 | 416 | ||
417 | spin_lock_init(&rs_sta->lock); | 417 | spin_lock_init(&rs_sta->lock); |
418 | init_timer(&rs_sta->rate_scale_flush); | 418 | init_timer(&rs_sta->rate_scale_flush); |
419 | 419 | ||
420 | IL_DEBUG_RATE(il, "leave\n"); | 420 | D_RATE("leave\n"); |
421 | 421 | ||
422 | return rs_sta; | 422 | return rs_sta; |
423 | } | 423 | } |
@@ -453,7 +453,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band * | |||
453 | struct il3945_rs_sta *rs_sta = il_sta; | 453 | struct il3945_rs_sta *rs_sta = il_sta; |
454 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 454 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
455 | 455 | ||
456 | IL_DEBUG_RATE(il, "enter\n"); | 456 | D_RATE("enter\n"); |
457 | 457 | ||
458 | retries = info->status.rates[0].count; | 458 | retries = info->status.rates[0].count; |
459 | /* Sanity Check for retries */ | 459 | /* Sanity Check for retries */ |
@@ -462,18 +462,18 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band * | |||
462 | 462 | ||
463 | first_index = sband->bitrates[info->status.rates[0].idx].hw_value; | 463 | first_index = sband->bitrates[info->status.rates[0].idx].hw_value; |
464 | if ((first_index < 0) || (first_index >= IL_RATE_COUNT_3945)) { | 464 | if ((first_index < 0) || (first_index >= IL_RATE_COUNT_3945)) { |
465 | IL_DEBUG_RATE(il, "leave: Rate out of bounds: %d\n", first_index); | 465 | D_RATE("leave: Rate out of bounds: %d\n", first_index); |
466 | return; | 466 | return; |
467 | } | 467 | } |
468 | 468 | ||
469 | if (!il_sta) { | 469 | if (!il_sta) { |
470 | IL_DEBUG_RATE(il, "leave: No STA il data to update!\n"); | 470 | D_RATE("leave: No STA il data to update!\n"); |
471 | return; | 471 | return; |
472 | } | 472 | } |
473 | 473 | ||
474 | /* Treat uninitialized rate scaling data same as non-existing. */ | 474 | /* Treat uninitialized rate scaling data same as non-existing. */ |
475 | if (!rs_sta->il) { | 475 | if (!rs_sta->il) { |
476 | IL_DEBUG_RATE(il, "leave: STA il data uninitialized!\n"); | 476 | D_RATE("leave: STA il data uninitialized!\n"); |
477 | return; | 477 | return; |
478 | } | 478 | } |
479 | 479 | ||
@@ -508,7 +508,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band * | |||
508 | il3945_collect_tx_data(rs_sta, | 508 | il3945_collect_tx_data(rs_sta, |
509 | &rs_sta->win[scale_rate_index], | 509 | &rs_sta->win[scale_rate_index], |
510 | 0, current_count, scale_rate_index); | 510 | 0, current_count, scale_rate_index); |
511 | IL_DEBUG_RATE(il, "Update rate %d for %d retries.\n", | 511 | D_RATE("Update rate %d for %d retries.\n", |
512 | scale_rate_index, current_count); | 512 | scale_rate_index, current_count); |
513 | 513 | ||
514 | retries -= current_count; | 514 | retries -= current_count; |
@@ -518,7 +518,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band * | |||
518 | 518 | ||
519 | 519 | ||
520 | /* Update the last index window with success/failure based on ACK */ | 520 | /* Update the last index window with success/failure based on ACK */ |
521 | IL_DEBUG_RATE(il, "Update rate %d with %s.\n", | 521 | D_RATE("Update rate %d with %s.\n", |
522 | last_index, | 522 | last_index, |
523 | (info->flags & IEEE80211_TX_STAT_ACK) ? | 523 | (info->flags & IEEE80211_TX_STAT_ACK) ? |
524 | "success" : "failure"); | 524 | "success" : "failure"); |
@@ -543,7 +543,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band * | |||
543 | 543 | ||
544 | spin_unlock_irqrestore(&rs_sta->lock, flags); | 544 | spin_unlock_irqrestore(&rs_sta->lock, flags); |
545 | 545 | ||
546 | IL_DEBUG_RATE(il, "leave\n"); | 546 | D_RATE("leave\n"); |
547 | } | 547 | } |
548 | 548 | ||
549 | static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, | 549 | static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, |
@@ -591,7 +591,7 @@ static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, | |||
591 | break; | 591 | break; |
592 | if (rate_mask & (1 << low)) | 592 | if (rate_mask & (1 << low)) |
593 | break; | 593 | break; |
594 | IL_DEBUG_RATE(il, "Skipping masked lower rate: %d\n", low); | 594 | D_RATE("Skipping masked lower rate: %d\n", low); |
595 | } | 595 | } |
596 | 596 | ||
597 | high = index; | 597 | high = index; |
@@ -604,7 +604,7 @@ static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, | |||
604 | break; | 604 | break; |
605 | if (rate_mask & (1 << high)) | 605 | if (rate_mask & (1 << high)) |
606 | break; | 606 | break; |
607 | IL_DEBUG_RATE(il, "Skipping masked higher rate: %d\n", high); | 607 | D_RATE("Skipping masked higher rate: %d\n", high); |
608 | } | 608 | } |
609 | 609 | ||
610 | return (high << 8) | low; | 610 | return (high << 8) | low; |
@@ -648,11 +648,11 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
648 | struct il_priv *il __maybe_unused = (struct il_priv *)il_r; | 648 | struct il_priv *il __maybe_unused = (struct il_priv *)il_r; |
649 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 649 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
650 | 650 | ||
651 | IL_DEBUG_RATE(il, "enter\n"); | 651 | D_RATE("enter\n"); |
652 | 652 | ||
653 | /* Treat uninitialized rate scaling data same as non-existing. */ | 653 | /* Treat uninitialized rate scaling data same as non-existing. */ |
654 | if (rs_sta && !rs_sta->il) { | 654 | if (rs_sta && !rs_sta->il) { |
655 | IL_DEBUG_RATE(il, "Rate scaling information not initialized yet.\n"); | 655 | D_RATE("Rate scaling information not initialized yet.\n"); |
656 | il_sta = NULL; | 656 | il_sta = NULL; |
657 | } | 657 | } |
658 | 658 | ||
@@ -699,7 +699,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
699 | (window->success_counter < IL_RATE_MIN_SUCCESS_TH))) { | 699 | (window->success_counter < IL_RATE_MIN_SUCCESS_TH))) { |
700 | spin_unlock_irqrestore(&rs_sta->lock, flags); | 700 | spin_unlock_irqrestore(&rs_sta->lock, flags); |
701 | 701 | ||
702 | IL_DEBUG_RATE(il, "Invalid average_tpt on rate %d: " | 702 | D_RATE("Invalid average_tpt on rate %d: " |
703 | "counter: %d, success_counter: %d, " | 703 | "counter: %d, success_counter: %d, " |
704 | "expected_tpt is %sNULL\n", | 704 | "expected_tpt is %sNULL\n", |
705 | index, | 705 | index, |
@@ -737,7 +737,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
737 | 737 | ||
738 | /* Low success ratio , need to drop the rate */ | 738 | /* Low success ratio , need to drop the rate */ |
739 | if ((window->success_ratio < IL_RATE_DECREASE_TH) || !current_tpt) { | 739 | if ((window->success_ratio < IL_RATE_DECREASE_TH) || !current_tpt) { |
740 | IL_DEBUG_RATE(il, "decrease rate because of low success_ratio\n"); | 740 | D_RATE("decrease rate because of low success_ratio\n"); |
741 | scale_action = -1; | 741 | scale_action = -1; |
742 | /* No throughput measured yet for adjacent rates, | 742 | /* No throughput measured yet for adjacent rates, |
743 | * try increase */ | 743 | * try increase */ |
@@ -756,7 +756,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
756 | (high_tpt != IL_INVALID_VALUE) && | 756 | (high_tpt != IL_INVALID_VALUE) && |
757 | (low_tpt < current_tpt) && (high_tpt < current_tpt)) { | 757 | (low_tpt < current_tpt) && (high_tpt < current_tpt)) { |
758 | 758 | ||
759 | IL_DEBUG_RATE(il, "No action -- low [%d] & high [%d] < " | 759 | D_RATE("No action -- low [%d] & high [%d] < " |
760 | "current_tpt [%d]\n", | 760 | "current_tpt [%d]\n", |
761 | low_tpt, high_tpt, current_tpt); | 761 | low_tpt, high_tpt, current_tpt); |
762 | scale_action = 0; | 762 | scale_action = 0; |
@@ -771,13 +771,13 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
771 | window->success_ratio >= IL_RATE_INCREASE_TH) | 771 | window->success_ratio >= IL_RATE_INCREASE_TH) |
772 | scale_action = 1; | 772 | scale_action = 1; |
773 | else { | 773 | else { |
774 | IL_DEBUG_RATE(il, | 774 | D_RATE( |
775 | "decrease rate because of high tpt\n"); | 775 | "decrease rate because of high tpt\n"); |
776 | scale_action = 0; | 776 | scale_action = 0; |
777 | } | 777 | } |
778 | } else if (low_tpt != IL_INVALID_VALUE) { | 778 | } else if (low_tpt != IL_INVALID_VALUE) { |
779 | if (low_tpt > current_tpt) { | 779 | if (low_tpt > current_tpt) { |
780 | IL_DEBUG_RATE(il, | 780 | D_RATE( |
781 | "decrease rate because of low tpt\n"); | 781 | "decrease rate because of low tpt\n"); |
782 | scale_action = -1; | 782 | scale_action = -1; |
783 | } else if (window->success_ratio >= IL_RATE_INCREASE_TH) { | 783 | } else if (window->success_ratio >= IL_RATE_INCREASE_TH) { |
@@ -816,7 +816,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
816 | break; | 816 | break; |
817 | } | 817 | } |
818 | 818 | ||
819 | IL_DEBUG_RATE(il, "Selected %d (action %d) - low %d high %d\n", | 819 | D_RATE("Selected %d (action %d) - low %d high %d\n", |
820 | index, scale_action, low, high); | 820 | index, scale_action, low, high); |
821 | 821 | ||
822 | out: | 822 | out: |
@@ -831,7 +831,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, | |||
831 | info->control.rates[0].idx = rs_sta->last_txrate_idx; | 831 | info->control.rates[0].idx = rs_sta->last_txrate_idx; |
832 | } | 832 | } |
833 | 833 | ||
834 | IL_DEBUG_RATE(il, "leave: %d\n", index); | 834 | D_RATE("leave: %d\n", index); |
835 | } | 835 | } |
836 | 836 | ||
837 | #ifdef CONFIG_MAC80211_DEBUGFS | 837 | #ifdef CONFIG_MAC80211_DEBUGFS |
@@ -932,14 +932,14 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
932 | struct ieee80211_sta *sta; | 932 | struct ieee80211_sta *sta; |
933 | struct il3945_sta_priv *psta; | 933 | struct il3945_sta_priv *psta; |
934 | 934 | ||
935 | IL_DEBUG_RATE(il, "enter\n"); | 935 | D_RATE("enter\n"); |
936 | 936 | ||
937 | rcu_read_lock(); | 937 | rcu_read_lock(); |
938 | 938 | ||
939 | sta = ieee80211_find_sta(il->contexts[IL_RXON_CTX_BSS].vif, | 939 | sta = ieee80211_find_sta(il->contexts[IL_RXON_CTX_BSS].vif, |
940 | il->stations[sta_id].sta.sta.addr); | 940 | il->stations[sta_id].sta.sta.addr); |
941 | if (!sta) { | 941 | if (!sta) { |
942 | IL_DEBUG_RATE(il, "Unable to find station to initialize rate scaling.\n"); | 942 | D_RATE("Unable to find station to initialize rate scaling.\n"); |
943 | rcu_read_unlock(); | 943 | rcu_read_unlock(); |
944 | return; | 944 | return; |
945 | } | 945 | } |
@@ -975,11 +975,11 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
975 | if (rssi == 0) | 975 | if (rssi == 0) |
976 | rssi = IL_MIN_RSSI_VAL; | 976 | rssi = IL_MIN_RSSI_VAL; |
977 | 977 | ||
978 | IL_DEBUG_RATE(il, "Network RSSI: %d\n", rssi); | 978 | D_RATE("Network RSSI: %d\n", rssi); |
979 | 979 | ||
980 | rs_sta->start_rate = il3945_get_rate_index_by_rssi(rssi, il->band); | 980 | rs_sta->start_rate = il3945_get_rate_index_by_rssi(rssi, il->band); |
981 | 981 | ||
982 | IL_DEBUG_RATE(il, "leave: rssi %d assign rate index: " | 982 | D_RATE("leave: rssi %d assign rate index: " |
983 | "%d (plcp 0x%x)\n", rssi, rs_sta->start_rate, | 983 | "%d (plcp 0x%x)\n", rssi, rs_sta->start_rate, |
984 | il3945_rates[rs_sta->start_rate].plcp); | 984 | il3945_rates[rs_sta->start_rate].plcp); |
985 | rcu_read_unlock(); | 985 | rcu_read_unlock(); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.c b/drivers/net/wireless/iwlegacy/iwl-3945.c index 628adf59ce7..a1e2a421896 100644 --- a/drivers/net/wireless/iwlegacy/iwl-3945.c +++ b/drivers/net/wireless/iwlegacy/iwl-3945.c | |||
@@ -174,7 +174,7 @@ void il3945_disable_events(struct il_priv *il) | |||
174 | array_size = il_read_targ_mem(il, base + (5 * sizeof(u32))); | 174 | array_size = il_read_targ_mem(il, base + (5 * sizeof(u32))); |
175 | 175 | ||
176 | if (IL_EVT_DISABLE && (array_size == IL_EVT_DISABLE_SIZE)) { | 176 | if (IL_EVT_DISABLE && (array_size == IL_EVT_DISABLE_SIZE)) { |
177 | IL_DEBUG_INFO(il, "Disabling selected uCode log events at 0x%x\n", | 177 | D_INFO("Disabling selected uCode log events at 0x%x\n", |
178 | disable_ptr); | 178 | disable_ptr); |
179 | for (i = 0; i < IL_EVT_DISABLE_SIZE; i++) | 179 | for (i = 0; i < IL_EVT_DISABLE_SIZE; i++) |
180 | il_write_targ_mem(il, | 180 | il_write_targ_mem(il, |
@@ -182,9 +182,9 @@ void il3945_disable_events(struct il_priv *il) | |||
182 | evt_disable[i]); | 182 | evt_disable[i]); |
183 | 183 | ||
184 | } else { | 184 | } else { |
185 | IL_DEBUG_INFO(il, "Selected uCode log events may be disabled\n"); | 185 | D_INFO("Selected uCode log events may be disabled\n"); |
186 | IL_DEBUG_INFO(il, " by writing \"1\"s into disable bitmap\n"); | 186 | D_INFO(" by writing \"1\"s into disable bitmap\n"); |
187 | IL_DEBUG_INFO(il, " in SRAM at 0x%x, size %d u32s\n", | 187 | D_INFO(" in SRAM at 0x%x, size %d u32s\n", |
188 | disable_ptr, array_size); | 188 | disable_ptr, array_size); |
189 | } | 189 | } |
190 | 190 | ||
@@ -342,11 +342,11 @@ static void il3945_rx_reply_tx(struct il_priv *il, | |||
342 | info->flags |= ((status & TX_STATUS_MSK) == TX_STATUS_SUCCESS) ? | 342 | info->flags |= ((status & TX_STATUS_MSK) == TX_STATUS_SUCCESS) ? |
343 | IEEE80211_TX_STAT_ACK : 0; | 343 | IEEE80211_TX_STAT_ACK : 0; |
344 | 344 | ||
345 | IL_DEBUG_TX(il, "Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n", | 345 | D_TX("Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n", |
346 | txq_id, il3945_get_tx_fail_reason(status), status, | 346 | txq_id, il3945_get_tx_fail_reason(status), status, |
347 | tx_resp->rate, tx_resp->failure_frame); | 347 | tx_resp->rate, tx_resp->failure_frame); |
348 | 348 | ||
349 | IL_DEBUG_TX_REPLY(il, "Tx queue reclaim %d\n", index); | 349 | D_TX_REPLY("Tx queue reclaim %d\n", index); |
350 | il3945_tx_queue_reclaim(il, txq_id, index); | 350 | il3945_tx_queue_reclaim(il, txq_id, index); |
351 | 351 | ||
352 | if (status & TX_ABORT_REQUIRED_MSK) | 352 | if (status & TX_ABORT_REQUIRED_MSK) |
@@ -401,7 +401,7 @@ void il3945_hw_rx_statistics(struct il_priv *il, | |||
401 | { | 401 | { |
402 | struct il_rx_packet *pkt = rxb_addr(rxb); | 402 | struct il_rx_packet *pkt = rxb_addr(rxb); |
403 | 403 | ||
404 | IL_DEBUG_RX(il, "Statistics notification received (%d vs %d).\n", | 404 | D_RX("Statistics notification received (%d vs %d).\n", |
405 | (int)sizeof(struct il3945_notif_statistics), | 405 | (int)sizeof(struct il3945_notif_statistics), |
406 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); | 406 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); |
407 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS | 407 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS |
@@ -426,7 +426,7 @@ void il3945_reply_statistics(struct il_priv *il, | |||
426 | memset(&il->_3945.max_delta, 0, | 426 | memset(&il->_3945.max_delta, 0, |
427 | sizeof(struct il3945_notif_statistics)); | 427 | sizeof(struct il3945_notif_statistics)); |
428 | #endif | 428 | #endif |
429 | IL_DEBUG_RX(il, "Statistics have been cleared\n"); | 429 | D_RX("Statistics have been cleared\n"); |
430 | } | 430 | } |
431 | il3945_hw_rx_statistics(il, rxb); | 431 | il3945_hw_rx_statistics(il, rxb); |
432 | } | 432 | } |
@@ -471,13 +471,13 @@ static void il3945_pass_packet_to_mac80211(struct il_priv *il, | |||
471 | /* We received data from the HW, so stop the watchdog */ | 471 | /* We received data from the HW, so stop the watchdog */ |
472 | if (unlikely(len + IWL39_RX_FRAME_SIZE > | 472 | if (unlikely(len + IWL39_RX_FRAME_SIZE > |
473 | PAGE_SIZE << il->hw_params.rx_page_order)) { | 473 | PAGE_SIZE << il->hw_params.rx_page_order)) { |
474 | IL_DEBUG_DROP(il, "Corruption detected!\n"); | 474 | D_DROP("Corruption detected!\n"); |
475 | return; | 475 | return; |
476 | } | 476 | } |
477 | 477 | ||
478 | /* We only process data packets if the interface is open */ | 478 | /* We only process data packets if the interface is open */ |
479 | if (unlikely(!il->is_open)) { | 479 | if (unlikely(!il->is_open)) { |
480 | IL_DEBUG_DROP(il, | 480 | D_DROP( |
481 | "Dropping packet while interface is not open.\n"); | 481 | "Dropping packet while interface is not open.\n"); |
482 | return; | 482 | return; |
483 | } | 483 | } |
@@ -539,14 +539,14 @@ static void il3945_rx_reply_rx(struct il_priv *il, | |||
539 | rx_status.flag |= RX_FLAG_SHORTPRE; | 539 | rx_status.flag |= RX_FLAG_SHORTPRE; |
540 | 540 | ||
541 | if ((unlikely(rx_stats->phy_count > 20))) { | 541 | if ((unlikely(rx_stats->phy_count > 20))) { |
542 | IL_DEBUG_DROP(il, "dsp size out of range [0,20]: %d/n", | 542 | D_DROP("dsp size out of range [0,20]: %d/n", |
543 | rx_stats->phy_count); | 543 | rx_stats->phy_count); |
544 | return; | 544 | return; |
545 | } | 545 | } |
546 | 546 | ||
547 | if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) | 547 | if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) |
548 | || !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { | 548 | || !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { |
549 | IL_DEBUG_RX(il, "Bad CRC or FIFO: 0x%08X.\n", rx_end->status); | 549 | D_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status); |
550 | return; | 550 | return; |
551 | } | 551 | } |
552 | 552 | ||
@@ -555,7 +555,7 @@ static void il3945_rx_reply_rx(struct il_priv *il, | |||
555 | /* Convert 3945's rssi indicator to dBm */ | 555 | /* Convert 3945's rssi indicator to dBm */ |
556 | rx_status.signal = rx_stats->rssi - IWL39_RSSI_OFFSET; | 556 | rx_status.signal = rx_stats->rssi - IWL39_RSSI_OFFSET; |
557 | 557 | ||
558 | IL_DEBUG_STATS(il, "Rssi %d sig_avg %d noise_diff %d\n", | 558 | D_STATS("Rssi %d sig_avg %d noise_diff %d\n", |
559 | rx_status.signal, rx_stats_sig_avg, | 559 | rx_status.signal, rx_stats_sig_avg, |
560 | rx_stats_noise_diff); | 560 | rx_stats_noise_diff); |
561 | 561 | ||
@@ -563,7 +563,7 @@ static void il3945_rx_reply_rx(struct il_priv *il, | |||
563 | 563 | ||
564 | network_packet = il3945_is_network_packet(il, header); | 564 | network_packet = il3945_is_network_packet(il, header); |
565 | 565 | ||
566 | IL_DEBUG_STATS(il, "[%c] %d RSSI:%d Signal:%u, Rate:%u\n", | 566 | D_STATS("[%c] %d RSSI:%d Signal:%u, Rate:%u\n", |
567 | network_packet ? '*' : ' ', | 567 | network_packet ? '*' : ' ', |
568 | le16_to_cpu(rx_hdr->channel), | 568 | le16_to_cpu(rx_hdr->channel), |
569 | rx_status.signal, rx_status.signal, | 569 | rx_status.signal, rx_status.signal, |
@@ -718,7 +718,7 @@ void il3945_hw_build_tx_cmd_rate(struct il_priv *il, | |||
718 | /* CCK */ | 718 | /* CCK */ |
719 | tx_cmd->supp_rates[1] = (rate_mask & 0xF); | 719 | tx_cmd->supp_rates[1] = (rate_mask & 0xF); |
720 | 720 | ||
721 | IL_DEBUG_RATE(il, "Tx sta id: %d, rate: %d (plcp), flags: 0x%4X " | 721 | D_RATE("Tx sta id: %d, rate: %d (plcp), flags: 0x%4X " |
722 | "cck/ofdm mask: 0x%x/0x%x\n", sta_id, | 722 | "cck/ofdm mask: 0x%x/0x%x\n", sta_id, |
723 | tx_cmd->rate, le32_to_cpu(tx_cmd->tx_flags), | 723 | tx_cmd->rate, le32_to_cpu(tx_cmd->tx_flags), |
724 | tx_cmd->supp_rates[1], tx_cmd->supp_rates[0]); | 724 | tx_cmd->supp_rates[1], tx_cmd->supp_rates[0]); |
@@ -741,7 +741,7 @@ static u8 il3945_sync_sta(struct il_priv *il, int sta_id, u16 tx_rate) | |||
741 | il_send_add_sta(il, &station->sta, CMD_ASYNC); | 741 | il_send_add_sta(il, &station->sta, CMD_ASYNC); |
742 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); | 742 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); |
743 | 743 | ||
744 | IL_DEBUG_RATE(il, "SCALE sync station %d to rate %d\n", | 744 | D_RATE("SCALE sync station %d to rate %d\n", |
745 | sta_id, tx_rate); | 745 | sta_id, tx_rate); |
746 | return sta_id; | 746 | return sta_id; |
747 | } | 747 | } |
@@ -900,34 +900,34 @@ static void il3945_nic_config(struct il_priv *il) | |||
900 | spin_lock_irqsave(&il->lock, flags); | 900 | spin_lock_irqsave(&il->lock, flags); |
901 | 901 | ||
902 | /* Determine HW type */ | 902 | /* Determine HW type */ |
903 | IL_DEBUG_INFO(il, "HW Revision ID = 0x%X\n", rev_id); | 903 | D_INFO("HW Revision ID = 0x%X\n", rev_id); |
904 | 904 | ||
905 | if (rev_id & PCI_CFG_REV_ID_BIT_RTP) | 905 | if (rev_id & PCI_CFG_REV_ID_BIT_RTP) |
906 | IL_DEBUG_INFO(il, "RTP type\n"); | 906 | D_INFO("RTP type\n"); |
907 | else if (rev_id & PCI_CFG_REV_ID_BIT_BASIC_SKU) { | 907 | else if (rev_id & PCI_CFG_REV_ID_BIT_BASIC_SKU) { |
908 | IL_DEBUG_INFO(il, "3945 RADIO-MB type\n"); | 908 | D_INFO("3945 RADIO-MB type\n"); |
909 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, | 909 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, |
910 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MB); | 910 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MB); |
911 | } else { | 911 | } else { |
912 | IL_DEBUG_INFO(il, "3945 RADIO-MM type\n"); | 912 | D_INFO("3945 RADIO-MM type\n"); |
913 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, | 913 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, |
914 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MM); | 914 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MM); |
915 | } | 915 | } |
916 | 916 | ||
917 | if (EEPROM_SKU_CAP_OP_MODE_MRC == eeprom->sku_cap) { | 917 | if (EEPROM_SKU_CAP_OP_MODE_MRC == eeprom->sku_cap) { |
918 | IL_DEBUG_INFO(il, "SKU OP mode is mrc\n"); | 918 | D_INFO("SKU OP mode is mrc\n"); |
919 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, | 919 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, |
920 | CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC); | 920 | CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC); |
921 | } else | 921 | } else |
922 | IL_DEBUG_INFO(il, "SKU OP mode is basic\n"); | 922 | D_INFO("SKU OP mode is basic\n"); |
923 | 923 | ||
924 | if ((eeprom->board_revision & 0xF0) == 0xD0) { | 924 | if ((eeprom->board_revision & 0xF0) == 0xD0) { |
925 | IL_DEBUG_INFO(il, "3945ABG revision is 0x%X\n", | 925 | D_INFO("3945ABG revision is 0x%X\n", |
926 | eeprom->board_revision); | 926 | eeprom->board_revision); |
927 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, | 927 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, |
928 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); | 928 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); |
929 | } else { | 929 | } else { |
930 | IL_DEBUG_INFO(il, "3945ABG revision is 0x%X\n", | 930 | D_INFO("3945ABG revision is 0x%X\n", |
931 | eeprom->board_revision); | 931 | eeprom->board_revision); |
932 | il_clear_bit(il, CSR_HW_IF_CONFIG_REG, | 932 | il_clear_bit(il, CSR_HW_IF_CONFIG_REG, |
933 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); | 933 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); |
@@ -936,10 +936,10 @@ static void il3945_nic_config(struct il_priv *il) | |||
936 | if (eeprom->almgor_m_version <= 1) { | 936 | if (eeprom->almgor_m_version <= 1) { |
937 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, | 937 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, |
938 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A); | 938 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A); |
939 | IL_DEBUG_INFO(il, "Card M type A version is 0x%X\n", | 939 | D_INFO("Card M type A version is 0x%X\n", |
940 | eeprom->almgor_m_version); | 940 | eeprom->almgor_m_version); |
941 | } else { | 941 | } else { |
942 | IL_DEBUG_INFO(il, "Card M type B version is 0x%X\n", | 942 | D_INFO("Card M type B version is 0x%X\n", |
943 | eeprom->almgor_m_version); | 943 | eeprom->almgor_m_version); |
944 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, | 944 | il_set_bit(il, CSR_HW_IF_CONFIG_REG, |
945 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B); | 945 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B); |
@@ -947,10 +947,10 @@ static void il3945_nic_config(struct il_priv *il) | |||
947 | spin_unlock_irqrestore(&il->lock, flags); | 947 | spin_unlock_irqrestore(&il->lock, flags); |
948 | 948 | ||
949 | if (eeprom->sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE) | 949 | if (eeprom->sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE) |
950 | IL_DEBUG_RF_KILL(il, "SW RF KILL supported in EEPROM.\n"); | 950 | D_RF_KILL("SW RF KILL supported in EEPROM.\n"); |
951 | 951 | ||
952 | if (eeprom->sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE) | 952 | if (eeprom->sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE) |
953 | IL_DEBUG_RF_KILL(il, "HW RF KILL supported in EEPROM.\n"); | 953 | D_RF_KILL("HW RF KILL supported in EEPROM.\n"); |
954 | } | 954 | } |
955 | 955 | ||
956 | int il3945_hw_nic_init(struct il_priv *il) | 956 | int il3945_hw_nic_init(struct il_priv *il) |
@@ -1074,7 +1074,7 @@ static int il3945_hw_reg_txpower_get_temperature(struct il_priv *il) | |||
1074 | 1074 | ||
1075 | /* driver's okay range is -260 to +25. | 1075 | /* driver's okay range is -260 to +25. |
1076 | * human readable okay range is 0 to +285 */ | 1076 | * human readable okay range is 0 to +285 */ |
1077 | IL_DEBUG_INFO(il, "Temperature: %d\n", temperature + IL_TEMP_CONVERT); | 1077 | D_INFO("Temperature: %d\n", temperature + IL_TEMP_CONVERT); |
1078 | 1078 | ||
1079 | /* handle insane temp reading */ | 1079 | /* handle insane temp reading */ |
1080 | if (il3945_hw_reg_temp_out_of_range(temperature)) { | 1080 | if (il3945_hw_reg_temp_out_of_range(temperature)) { |
@@ -1111,20 +1111,20 @@ static int il3945_is_temp_calib_needed(struct il_priv *il) | |||
1111 | 1111 | ||
1112 | /* get absolute value */ | 1112 | /* get absolute value */ |
1113 | if (temp_diff < 0) { | 1113 | if (temp_diff < 0) { |
1114 | IL_DEBUG_POWER(il, "Getting cooler, delta %d,\n", temp_diff); | 1114 | D_POWER("Getting cooler, delta %d,\n", temp_diff); |
1115 | temp_diff = -temp_diff; | 1115 | temp_diff = -temp_diff; |
1116 | } else if (temp_diff == 0) | 1116 | } else if (temp_diff == 0) |
1117 | IL_DEBUG_POWER(il, "Same temp,\n"); | 1117 | D_POWER("Same temp,\n"); |
1118 | else | 1118 | else |
1119 | IL_DEBUG_POWER(il, "Getting warmer, delta %d,\n", temp_diff); | 1119 | D_POWER("Getting warmer, delta %d,\n", temp_diff); |
1120 | 1120 | ||
1121 | /* if we don't need calibration, *don't* update last_temperature */ | 1121 | /* if we don't need calibration, *don't* update last_temperature */ |
1122 | if (temp_diff < IL_TEMPERATURE_LIMIT_TIMER) { | 1122 | if (temp_diff < IL_TEMPERATURE_LIMIT_TIMER) { |
1123 | IL_DEBUG_POWER(il, "Timed thermal calib not needed\n"); | 1123 | D_POWER("Timed thermal calib not needed\n"); |
1124 | return 0; | 1124 | return 0; |
1125 | } | 1125 | } |
1126 | 1126 | ||
1127 | IL_DEBUG_POWER(il, "Timed thermal calib needed\n"); | 1127 | D_POWER("Timed thermal calib needed\n"); |
1128 | 1128 | ||
1129 | /* assume that caller will actually do calib ... | 1129 | /* assume that caller will actually do calib ... |
1130 | * update the "last temperature" value */ | 1130 | * update the "last temperature" value */ |
@@ -1395,7 +1395,7 @@ static int il3945_send_tx_power(struct il_priv *il) | |||
1395 | } | 1395 | } |
1396 | 1396 | ||
1397 | if (!il_is_channel_valid(ch_info)) { | 1397 | if (!il_is_channel_valid(ch_info)) { |
1398 | IL_DEBUG_POWER(il, "Not calling TX_PWR_TABLE_CMD on " | 1398 | D_POWER("Not calling TX_PWR_TABLE_CMD on " |
1399 | "non-Tx channel.\n"); | 1399 | "non-Tx channel.\n"); |
1400 | return 0; | 1400 | return 0; |
1401 | } | 1401 | } |
@@ -1408,7 +1408,7 @@ static int il3945_send_tx_power(struct il_priv *il) | |||
1408 | txpower.power[i].tpc = ch_info->power_info[i].tpc; | 1408 | txpower.power[i].tpc = ch_info->power_info[i].tpc; |
1409 | txpower.power[i].rate = il3945_rates[rate_idx].plcp; | 1409 | txpower.power[i].rate = il3945_rates[rate_idx].plcp; |
1410 | 1410 | ||
1411 | IL_DEBUG_POWER(il, "ch %d:%d rf %d dsp %3d rate code 0x%02x\n", | 1411 | D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", |
1412 | le16_to_cpu(txpower.channel), | 1412 | le16_to_cpu(txpower.channel), |
1413 | txpower.band, | 1413 | txpower.band, |
1414 | txpower.power[i].tpc.tx_gain, | 1414 | txpower.power[i].tpc.tx_gain, |
@@ -1421,7 +1421,7 @@ static int il3945_send_tx_power(struct il_priv *il) | |||
1421 | txpower.power[i].tpc = ch_info->power_info[i].tpc; | 1421 | txpower.power[i].tpc = ch_info->power_info[i].tpc; |
1422 | txpower.power[i].rate = il3945_rates[rate_idx].plcp; | 1422 | txpower.power[i].rate = il3945_rates[rate_idx].plcp; |
1423 | 1423 | ||
1424 | IL_DEBUG_POWER(il, "ch %d:%d rf %d dsp %3d rate code 0x%02x\n", | 1424 | D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", |
1425 | le16_to_cpu(txpower.channel), | 1425 | le16_to_cpu(txpower.channel), |
1426 | txpower.band, | 1426 | txpower.band, |
1427 | txpower.power[i].tpc.tx_gain, | 1427 | txpower.power[i].tpc.tx_gain, |
@@ -1617,12 +1617,12 @@ int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power) | |||
1617 | u8 i; | 1617 | u8 i; |
1618 | 1618 | ||
1619 | if (il->tx_power_user_lmt == power) { | 1619 | if (il->tx_power_user_lmt == power) { |
1620 | IL_DEBUG_POWER(il, "Requested Tx power same as current " | 1620 | D_POWER("Requested Tx power same as current " |
1621 | "limit: %ddBm.\n", power); | 1621 | "limit: %ddBm.\n", power); |
1622 | return 0; | 1622 | return 0; |
1623 | } | 1623 | } |
1624 | 1624 | ||
1625 | IL_DEBUG_POWER(il, "Setting upper limit clamp to %ddBm.\n", power); | 1625 | D_POWER("Setting upper limit clamp to %ddBm.\n", power); |
1626 | il->tx_power_user_lmt = power; | 1626 | il->tx_power_user_lmt = power; |
1627 | 1627 | ||
1628 | /* set up new Tx powers for each and every channel, 2.4 and 5.x */ | 1628 | /* set up new Tx powers for each and every channel, 2.4 and 5.x */ |
@@ -1670,7 +1670,7 @@ static int il3945_send_rxon_assoc(struct il_priv *il, | |||
1670 | (rxon1->filter_flags == rxon2->filter_flags) && | 1670 | (rxon1->filter_flags == rxon2->filter_flags) && |
1671 | (rxon1->cck_basic_rates == rxon2->cck_basic_rates) && | 1671 | (rxon1->cck_basic_rates == rxon2->cck_basic_rates) && |
1672 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { | 1672 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { |
1673 | IL_DEBUG_INFO(il, "Using current RXON_ASSOC. Not resending.\n"); | 1673 | D_INFO("Using current RXON_ASSOC. Not resending.\n"); |
1674 | return 0; | 1674 | return 0; |
1675 | } | 1675 | } |
1676 | 1676 | ||
@@ -1758,7 +1758,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1758 | * we must clear the associated from the active configuration | 1758 | * we must clear the associated from the active configuration |
1759 | * before we apply the new config */ | 1759 | * before we apply the new config */ |
1760 | if (il_is_associated(il, IL_RXON_CTX_BSS) && new_assoc) { | 1760 | if (il_is_associated(il, IL_RXON_CTX_BSS) && new_assoc) { |
1761 | IL_DEBUG_INFO(il, "Toggling associated bit on current RXON\n"); | 1761 | D_INFO("Toggling associated bit on current RXON\n"); |
1762 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 1762 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
1763 | 1763 | ||
1764 | /* | 1764 | /* |
@@ -1785,7 +1785,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1785 | &il->contexts[IL_RXON_CTX_BSS]); | 1785 | &il->contexts[IL_RXON_CTX_BSS]); |
1786 | } | 1786 | } |
1787 | 1787 | ||
1788 | IL_DEBUG_INFO(il, "Sending RXON\n" | 1788 | D_INFO("Sending RXON\n" |
1789 | "* with%s RXON_FILTER_ASSOC_MSK\n" | 1789 | "* with%s RXON_FILTER_ASSOC_MSK\n" |
1790 | "* channel = %d\n" | 1790 | "* channel = %d\n" |
1791 | "* bssid = %pM\n", | 1791 | "* bssid = %pM\n", |
@@ -1913,7 +1913,7 @@ static u16 il3945_hw_reg_get_ch_grp_index(struct il_priv *il, | |||
1913 | } else | 1913 | } else |
1914 | group_index = 0; /* 2.4 GHz, group 0 */ | 1914 | group_index = 0; /* 2.4 GHz, group 0 */ |
1915 | 1915 | ||
1916 | IL_DEBUG_POWER(il, "Chnl %d mapped to grp %d\n", ch_info->channel, | 1916 | D_POWER("Chnl %d mapped to grp %d\n", ch_info->channel, |
1917 | group_index); | 1917 | group_index); |
1918 | return group_index; | 1918 | return group_index; |
1919 | } | 1919 | } |
@@ -1980,7 +1980,7 @@ static void il3945_hw_reg_init_channel_groups(struct il_priv *il) | |||
1980 | struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; | 1980 | struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; |
1981 | const struct il3945_eeprom_txpower_group *group; | 1981 | const struct il3945_eeprom_txpower_group *group; |
1982 | 1982 | ||
1983 | IL_DEBUG_POWER(il, "Initializing factory calib info from EEPROM\n"); | 1983 | D_POWER("Initializing factory calib info from EEPROM\n"); |
1984 | 1984 | ||
1985 | for (i = 0; i < IL_NUM_TX_CALIB_GROUPS; i++) { | 1985 | for (i = 0; i < IL_NUM_TX_CALIB_GROUPS; i++) { |
1986 | s8 *clip_pwrs; /* table of power levels for each rate */ | 1986 | s8 *clip_pwrs; /* table of power levels for each rate */ |
@@ -2096,7 +2096,7 @@ int il3945_txpower_set_from_eeprom(struct il_priv *il) | |||
2096 | eeprom->groups[ch_info->group_index]. | 2096 | eeprom->groups[ch_info->group_index]. |
2097 | temperature); | 2097 | temperature); |
2098 | 2098 | ||
2099 | IL_DEBUG_POWER(il, "Delta index for channel %d: %d [%d]\n", | 2099 | D_POWER("Delta index for channel %d: %d [%d]\n", |
2100 | ch_info->channel, delta_index, temperature + | 2100 | ch_info->channel, delta_index, temperature + |
2101 | IL_TEMP_CONVERT); | 2101 | IL_TEMP_CONVERT); |
2102 | 2102 | ||
@@ -2324,7 +2324,7 @@ int il3945_init_hw_rate_table(struct il_priv *il) | |||
2324 | 2324 | ||
2325 | switch (il->band) { | 2325 | switch (il->band) { |
2326 | case IEEE80211_BAND_5GHZ: | 2326 | case IEEE80211_BAND_5GHZ: |
2327 | IL_DEBUG_RATE(il, "Select A mode rate scale\n"); | 2327 | D_RATE("Select A mode rate scale\n"); |
2328 | /* If one of the following CCK rates is used, | 2328 | /* If one of the following CCK rates is used, |
2329 | * have it fall back to the 6M OFDM rate */ | 2329 | * have it fall back to the 6M OFDM rate */ |
2330 | for (i = IL_RATE_1M_INDEX_TABLE; | 2330 | for (i = IL_RATE_1M_INDEX_TABLE; |
@@ -2342,7 +2342,7 @@ int il3945_init_hw_rate_table(struct il_priv *il) | |||
2342 | break; | 2342 | break; |
2343 | 2343 | ||
2344 | case IEEE80211_BAND_2GHZ: | 2344 | case IEEE80211_BAND_2GHZ: |
2345 | IL_DEBUG_RATE(il, "Select B/G mode rate scale\n"); | 2345 | D_RATE("Select B/G mode rate scale\n"); |
2346 | /* If an OFDM rate is used, have it fall back to the | 2346 | /* If an OFDM rate is used, have it fall back to the |
2347 | * 1M CCK rates */ | 2347 | * 1M CCK rates */ |
2348 | 2348 | ||
@@ -2472,7 +2472,7 @@ static int il3945_verify_bsm(struct il_priv *il) | |||
2472 | u32 reg; | 2472 | u32 reg; |
2473 | u32 val; | 2473 | u32 val; |
2474 | 2474 | ||
2475 | IL_DEBUG_INFO(il, "Begin verify bsm\n"); | 2475 | D_INFO("Begin verify bsm\n"); |
2476 | 2476 | ||
2477 | /* verify BSM SRAM contents */ | 2477 | /* verify BSM SRAM contents */ |
2478 | val = il_read_prph(il, BSM_WR_DWCOUNT_REG); | 2478 | val = il_read_prph(il, BSM_WR_DWCOUNT_REG); |
@@ -2490,7 +2490,7 @@ static int il3945_verify_bsm(struct il_priv *il) | |||
2490 | } | 2490 | } |
2491 | } | 2491 | } |
2492 | 2492 | ||
2493 | IL_DEBUG_INFO(il, "BSM bootstrap uCode image OK\n"); | 2493 | D_INFO("BSM bootstrap uCode image OK\n"); |
2494 | 2494 | ||
2495 | return 0; | 2495 | return 0; |
2496 | } | 2496 | } |
@@ -2567,7 +2567,7 @@ static int il3945_load_bsm(struct il_priv *il) | |||
2567 | u32 done; | 2567 | u32 done; |
2568 | u32 reg_offset; | 2568 | u32 reg_offset; |
2569 | 2569 | ||
2570 | IL_DEBUG_INFO(il, "Begin load bsm\n"); | 2570 | D_INFO("Begin load bsm\n"); |
2571 | 2571 | ||
2572 | /* make sure bootstrap program is no larger than BSM's SRAM size */ | 2572 | /* make sure bootstrap program is no larger than BSM's SRAM size */ |
2573 | if (len > IWL39_MAX_BSM_SIZE) | 2573 | if (len > IWL39_MAX_BSM_SIZE) |
@@ -2618,7 +2618,7 @@ static int il3945_load_bsm(struct il_priv *il) | |||
2618 | udelay(10); | 2618 | udelay(10); |
2619 | } | 2619 | } |
2620 | if (i < 100) | 2620 | if (i < 100) |
2621 | IL_DEBUG_INFO(il, "BSM write complete, poll %d iterations\n", i); | 2621 | D_INFO("BSM write complete, poll %d iterations\n", i); |
2622 | else { | 2622 | else { |
2623 | IL_ERR(il, "BSM write did not complete!\n"); | 2623 | IL_ERR(il, "BSM write did not complete!\n"); |
2624 | return -EIO; | 2624 | return -EIO; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-calib.c b/drivers/net/wireless/iwlegacy/iwl-4965-calib.c index 7807dc59e9c..7f858344b92 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-calib.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-calib.c | |||
@@ -160,7 +160,7 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
160 | val = data->nrg_silence_rssi[i]; | 160 | val = data->nrg_silence_rssi[i]; |
161 | silence_ref = max(silence_ref, val); | 161 | silence_ref = max(silence_ref, val); |
162 | } | 162 | } |
163 | IL_DEBUG_CALIB(il, "silence a %u, b %u, c %u, 20-bcn max %u\n", | 163 | D_CALIB("silence a %u, b %u, c %u, 20-bcn max %u\n", |
164 | silence_rssi_a, silence_rssi_b, silence_rssi_c, | 164 | silence_rssi_a, silence_rssi_b, silence_rssi_c, |
165 | silence_ref); | 165 | silence_ref); |
166 | 166 | ||
@@ -184,7 +184,7 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
184 | max_nrg_cck = (u32) max(max_nrg_cck, (data->nrg_value[i])); | 184 | max_nrg_cck = (u32) max(max_nrg_cck, (data->nrg_value[i])); |
185 | max_nrg_cck += 6; | 185 | max_nrg_cck += 6; |
186 | 186 | ||
187 | IL_DEBUG_CALIB(il, "rx energy a %u, b %u, c %u, 10-bcn max/min %u\n", | 187 | D_CALIB("rx energy a %u, b %u, c %u, 10-bcn max/min %u\n", |
188 | rx_info->beacon_energy_a, rx_info->beacon_energy_b, | 188 | rx_info->beacon_energy_a, rx_info->beacon_energy_b, |
189 | rx_info->beacon_energy_c, max_nrg_cck - 6); | 189 | rx_info->beacon_energy_c, max_nrg_cck - 6); |
190 | 190 | ||
@@ -194,15 +194,15 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
194 | data->num_in_cck_no_fa++; | 194 | data->num_in_cck_no_fa++; |
195 | else | 195 | else |
196 | data->num_in_cck_no_fa = 0; | 196 | data->num_in_cck_no_fa = 0; |
197 | IL_DEBUG_CALIB(il, "consecutive bcns with few false alarms = %u\n", | 197 | D_CALIB("consecutive bcns with few false alarms = %u\n", |
198 | data->num_in_cck_no_fa); | 198 | data->num_in_cck_no_fa); |
199 | 199 | ||
200 | /* If we got too many false alarms this time, reduce sensitivity */ | 200 | /* If we got too many false alarms this time, reduce sensitivity */ |
201 | if ((false_alarms > max_false_alarms) && | 201 | if ((false_alarms > max_false_alarms) && |
202 | (data->auto_corr_cck > AUTO_CORR_MAX_TH_CCK)) { | 202 | (data->auto_corr_cck > AUTO_CORR_MAX_TH_CCK)) { |
203 | IL_DEBUG_CALIB(il, "norm FA %u > max FA %u\n", | 203 | D_CALIB("norm FA %u > max FA %u\n", |
204 | false_alarms, max_false_alarms); | 204 | false_alarms, max_false_alarms); |
205 | IL_DEBUG_CALIB(il, "... reducing sensitivity\n"); | 205 | D_CALIB("... reducing sensitivity\n"); |
206 | data->nrg_curr_state = IL_FA_TOO_MANY; | 206 | data->nrg_curr_state = IL_FA_TOO_MANY; |
207 | /* Store for "fewer than desired" on later beacon */ | 207 | /* Store for "fewer than desired" on later beacon */ |
208 | data->nrg_silence_ref = silence_ref; | 208 | data->nrg_silence_ref = silence_ref; |
@@ -219,7 +219,7 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
219 | data->nrg_auto_corr_silence_diff = (s32)data->nrg_silence_ref - | 219 | data->nrg_auto_corr_silence_diff = (s32)data->nrg_silence_ref - |
220 | (s32)silence_ref; | 220 | (s32)silence_ref; |
221 | 221 | ||
222 | IL_DEBUG_CALIB(il, | 222 | D_CALIB( |
223 | "norm FA %u < min FA %u, silence diff %d\n", | 223 | "norm FA %u < min FA %u, silence diff %d\n", |
224 | false_alarms, min_false_alarms, | 224 | false_alarms, min_false_alarms, |
225 | data->nrg_auto_corr_silence_diff); | 225 | data->nrg_auto_corr_silence_diff); |
@@ -234,18 +234,18 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
234 | ((data->nrg_auto_corr_silence_diff > NRG_DIFF) || | 234 | ((data->nrg_auto_corr_silence_diff > NRG_DIFF) || |
235 | (data->num_in_cck_no_fa > MAX_NUMBER_CCK_NO_FA))) { | 235 | (data->num_in_cck_no_fa > MAX_NUMBER_CCK_NO_FA))) { |
236 | 236 | ||
237 | IL_DEBUG_CALIB(il, "... increasing sensitivity\n"); | 237 | D_CALIB("... increasing sensitivity\n"); |
238 | /* Increase nrg value to increase sensitivity */ | 238 | /* Increase nrg value to increase sensitivity */ |
239 | val = data->nrg_th_cck + NRG_STEP_CCK; | 239 | val = data->nrg_th_cck + NRG_STEP_CCK; |
240 | data->nrg_th_cck = min((u32)ranges->min_nrg_cck, val); | 240 | data->nrg_th_cck = min((u32)ranges->min_nrg_cck, val); |
241 | } else { | 241 | } else { |
242 | IL_DEBUG_CALIB(il, | 242 | D_CALIB( |
243 | "... but not changing sensitivity\n"); | 243 | "... but not changing sensitivity\n"); |
244 | } | 244 | } |
245 | 245 | ||
246 | /* Else we got a healthy number of false alarms, keep status quo */ | 246 | /* Else we got a healthy number of false alarms, keep status quo */ |
247 | } else { | 247 | } else { |
248 | IL_DEBUG_CALIB(il, " FA in safe zone\n"); | 248 | D_CALIB(" FA in safe zone\n"); |
249 | data->nrg_curr_state = IL_FA_GOOD_RANGE; | 249 | data->nrg_curr_state = IL_FA_GOOD_RANGE; |
250 | 250 | ||
251 | /* Store for use in "fewer than desired" with later beacon */ | 251 | /* Store for use in "fewer than desired" with later beacon */ |
@@ -255,7 +255,7 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
255 | * give it some extra margin by reducing sensitivity again | 255 | * give it some extra margin by reducing sensitivity again |
256 | * (but don't go below measured energy of desired Rx) */ | 256 | * (but don't go below measured energy of desired Rx) */ |
257 | if (IL_FA_TOO_MANY == data->nrg_prev_state) { | 257 | if (IL_FA_TOO_MANY == data->nrg_prev_state) { |
258 | IL_DEBUG_CALIB(il, "... increasing margin\n"); | 258 | D_CALIB("... increasing margin\n"); |
259 | if (data->nrg_th_cck > (max_nrg_cck + NRG_MARGIN)) | 259 | if (data->nrg_th_cck > (max_nrg_cck + NRG_MARGIN)) |
260 | data->nrg_th_cck -= NRG_MARGIN; | 260 | data->nrg_th_cck -= NRG_MARGIN; |
261 | else | 261 | else |
@@ -269,7 +269,7 @@ static int il4965_sens_energy_cck(struct il_priv *il, | |||
269 | * Lower value is higher energy, so we use max()! | 269 | * Lower value is higher energy, so we use max()! |
270 | */ | 270 | */ |
271 | data->nrg_th_cck = max(max_nrg_cck, data->nrg_th_cck); | 271 | data->nrg_th_cck = max(max_nrg_cck, data->nrg_th_cck); |
272 | IL_DEBUG_CALIB(il, "new nrg_th_cck %u\n", data->nrg_th_cck); | 272 | D_CALIB("new nrg_th_cck %u\n", data->nrg_th_cck); |
273 | 273 | ||
274 | data->nrg_prev_state = data->nrg_curr_state; | 274 | data->nrg_prev_state = data->nrg_curr_state; |
275 | 275 | ||
@@ -322,7 +322,7 @@ static int il4965_sens_auto_corr_ofdm(struct il_priv *il, | |||
322 | /* If we got too many false alarms this time, reduce sensitivity */ | 322 | /* If we got too many false alarms this time, reduce sensitivity */ |
323 | if (false_alarms > max_false_alarms) { | 323 | if (false_alarms > max_false_alarms) { |
324 | 324 | ||
325 | IL_DEBUG_CALIB(il, "norm FA %u > max FA %u)\n", | 325 | D_CALIB("norm FA %u > max FA %u)\n", |
326 | false_alarms, max_false_alarms); | 326 | false_alarms, max_false_alarms); |
327 | 327 | ||
328 | val = data->auto_corr_ofdm + AUTO_CORR_STEP_OFDM; | 328 | val = data->auto_corr_ofdm + AUTO_CORR_STEP_OFDM; |
@@ -345,7 +345,7 @@ static int il4965_sens_auto_corr_ofdm(struct il_priv *il, | |||
345 | /* Else if we got fewer than desired, increase sensitivity */ | 345 | /* Else if we got fewer than desired, increase sensitivity */ |
346 | else if (false_alarms < min_false_alarms) { | 346 | else if (false_alarms < min_false_alarms) { |
347 | 347 | ||
348 | IL_DEBUG_CALIB(il, "norm FA %u < min FA %u\n", | 348 | D_CALIB("norm FA %u < min FA %u\n", |
349 | false_alarms, min_false_alarms); | 349 | false_alarms, min_false_alarms); |
350 | 350 | ||
351 | val = data->auto_corr_ofdm - AUTO_CORR_STEP_OFDM; | 351 | val = data->auto_corr_ofdm - AUTO_CORR_STEP_OFDM; |
@@ -364,7 +364,7 @@ static int il4965_sens_auto_corr_ofdm(struct il_priv *il, | |||
364 | data->auto_corr_ofdm_mrc_x1 = | 364 | data->auto_corr_ofdm_mrc_x1 = |
365 | max((u32)ranges->auto_corr_min_ofdm_mrc_x1, val); | 365 | max((u32)ranges->auto_corr_min_ofdm_mrc_x1, val); |
366 | } else { | 366 | } else { |
367 | IL_DEBUG_CALIB(il, "min FA %u < norm FA %u < max FA %u OK\n", | 367 | D_CALIB("min FA %u < norm FA %u < max FA %u OK\n", |
368 | min_false_alarms, false_alarms, max_false_alarms); | 368 | min_false_alarms, false_alarms, max_false_alarms); |
369 | } | 369 | } |
370 | return 0; | 370 | return 0; |
@@ -400,12 +400,12 @@ static void il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il, | |||
400 | tbl[HD_OFDM_ENERGY_TH_IN_INDEX] = | 400 | tbl[HD_OFDM_ENERGY_TH_IN_INDEX] = |
401 | cpu_to_le16(data->nrg_th_cca); | 401 | cpu_to_le16(data->nrg_th_cca); |
402 | 402 | ||
403 | IL_DEBUG_CALIB(il, "ofdm: ac %u mrc %u x1 %u mrc_x1 %u thresh %u\n", | 403 | D_CALIB("ofdm: ac %u mrc %u x1 %u mrc_x1 %u thresh %u\n", |
404 | data->auto_corr_ofdm, data->auto_corr_ofdm_mrc, | 404 | data->auto_corr_ofdm, data->auto_corr_ofdm_mrc, |
405 | data->auto_corr_ofdm_x1, data->auto_corr_ofdm_mrc_x1, | 405 | data->auto_corr_ofdm_x1, data->auto_corr_ofdm_mrc_x1, |
406 | data->nrg_th_ofdm); | 406 | data->nrg_th_ofdm); |
407 | 407 | ||
408 | IL_DEBUG_CALIB(il, "cck: ac %u mrc %u thresh %u\n", | 408 | D_CALIB("cck: ac %u mrc %u thresh %u\n", |
409 | data->auto_corr_cck, data->auto_corr_cck_mrc, | 409 | data->auto_corr_cck, data->auto_corr_cck_mrc, |
410 | data->nrg_th_cck); | 410 | data->nrg_th_cck); |
411 | } | 411 | } |
@@ -434,7 +434,7 @@ static int il4965_sensitivity_write(struct il_priv *il) | |||
434 | /* Don't send command to uCode if nothing has changed */ | 434 | /* Don't send command to uCode if nothing has changed */ |
435 | if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]), | 435 | if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]), |
436 | sizeof(u16)*HD_TABLE_SIZE)) { | 436 | sizeof(u16)*HD_TABLE_SIZE)) { |
437 | IL_DEBUG_CALIB(il, "No change in SENSITIVITY_CMD\n"); | 437 | D_CALIB("No change in SENSITIVITY_CMD\n"); |
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
440 | 440 | ||
@@ -455,7 +455,7 @@ void il4965_init_sensitivity(struct il_priv *il) | |||
455 | if (il->disable_sens_cal) | 455 | if (il->disable_sens_cal) |
456 | return; | 456 | return; |
457 | 457 | ||
458 | IL_DEBUG_CALIB(il, "Start il4965_init_sensitivity\n"); | 458 | D_CALIB("Start il4965_init_sensitivity\n"); |
459 | 459 | ||
460 | /* Clear driver's sensitivity algo data */ | 460 | /* Clear driver's sensitivity algo data */ |
461 | data = &(il->sensitivity_data); | 461 | data = &(il->sensitivity_data); |
@@ -496,7 +496,7 @@ void il4965_init_sensitivity(struct il_priv *il) | |||
496 | data->last_fa_cnt_cck = 0; | 496 | data->last_fa_cnt_cck = 0; |
497 | 497 | ||
498 | ret |= il4965_sensitivity_write(il); | 498 | ret |= il4965_sensitivity_write(il); |
499 | IL_DEBUG_CALIB(il, "<<return 0x%X\n", ret); | 499 | D_CALIB("<<return 0x%X\n", ret); |
500 | } | 500 | } |
501 | 501 | ||
502 | void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | 502 | void il4965_sensitivity_calibration(struct il_priv *il, void *resp) |
@@ -520,7 +520,7 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
520 | data = &(il->sensitivity_data); | 520 | data = &(il->sensitivity_data); |
521 | 521 | ||
522 | if (!il_is_any_associated(il)) { | 522 | if (!il_is_any_associated(il)) { |
523 | IL_DEBUG_CALIB(il, "<< - not associated\n"); | 523 | D_CALIB("<< - not associated\n"); |
524 | return; | 524 | return; |
525 | } | 525 | } |
526 | 526 | ||
@@ -531,7 +531,7 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
531 | cck = &(((struct il_notif_statistics *)resp)->rx.cck); | 531 | cck = &(((struct il_notif_statistics *)resp)->rx.cck); |
532 | 532 | ||
533 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { | 533 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { |
534 | IL_DEBUG_CALIB(il, "<< invalid data.\n"); | 534 | D_CALIB("<< invalid data.\n"); |
535 | spin_unlock_irqrestore(&il->lock, flags); | 535 | spin_unlock_irqrestore(&il->lock, flags); |
536 | return; | 536 | return; |
537 | } | 537 | } |
@@ -558,10 +558,10 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
558 | 558 | ||
559 | spin_unlock_irqrestore(&il->lock, flags); | 559 | spin_unlock_irqrestore(&il->lock, flags); |
560 | 560 | ||
561 | IL_DEBUG_CALIB(il, "rx_enable_time = %u usecs\n", rx_enable_time); | 561 | D_CALIB("rx_enable_time = %u usecs\n", rx_enable_time); |
562 | 562 | ||
563 | if (!rx_enable_time) { | 563 | if (!rx_enable_time) { |
564 | IL_DEBUG_CALIB(il, "<< RX Enable Time == 0!\n"); | 564 | D_CALIB("<< RX Enable Time == 0!\n"); |
565 | return; | 565 | return; |
566 | } | 566 | } |
567 | 567 | ||
@@ -600,7 +600,7 @@ void il4965_sensitivity_calibration(struct il_priv *il, void *resp) | |||
600 | norm_fa_ofdm = fa_ofdm + bad_plcp_ofdm; | 600 | norm_fa_ofdm = fa_ofdm + bad_plcp_ofdm; |
601 | norm_fa_cck = fa_cck + bad_plcp_cck; | 601 | norm_fa_cck = fa_cck + bad_plcp_cck; |
602 | 602 | ||
603 | IL_DEBUG_CALIB(il, | 603 | D_CALIB( |
604 | "cck: fa %u badp %u ofdm: fa %u badp %u\n", fa_cck, | 604 | "cck: fa %u badp %u ofdm: fa %u badp %u\n", fa_cck, |
605 | bad_plcp_cck, fa_ofdm, bad_plcp_ofdm); | 605 | bad_plcp_cck, fa_ofdm, bad_plcp_ofdm); |
606 | 606 | ||
@@ -657,9 +657,9 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig, | |||
657 | active_chains = (1 << max_average_sig_antenna_i); | 657 | active_chains = (1 << max_average_sig_antenna_i); |
658 | } | 658 | } |
659 | 659 | ||
660 | IL_DEBUG_CALIB(il, "average_sig: a %d b %d c %d\n", | 660 | D_CALIB("average_sig: a %d b %d c %d\n", |
661 | average_sig[0], average_sig[1], average_sig[2]); | 661 | average_sig[0], average_sig[1], average_sig[2]); |
662 | IL_DEBUG_CALIB(il, "max_average_sig = %d, antenna %d\n", | 662 | D_CALIB("max_average_sig = %d, antenna %d\n", |
663 | max_average_sig, max_average_sig_antenna_i); | 663 | max_average_sig, max_average_sig_antenna_i); |
664 | 664 | ||
665 | /* Compare signal strengths for all 3 receivers. */ | 665 | /* Compare signal strengths for all 3 receivers. */ |
@@ -673,7 +673,7 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig, | |||
673 | data->disconn_array[i] = 1; | 673 | data->disconn_array[i] = 1; |
674 | else | 674 | else |
675 | active_chains |= (1 << i); | 675 | active_chains |= (1 << i); |
676 | IL_DEBUG_CALIB(il, "i = %d rssiDelta = %d " | 676 | D_CALIB("i = %d rssiDelta = %d " |
677 | "disconn_array[i] = %d\n", | 677 | "disconn_array[i] = %d\n", |
678 | i, rssi_delta, data->disconn_array[i]); | 678 | i, rssi_delta, data->disconn_array[i]); |
679 | } | 679 | } |
@@ -713,7 +713,7 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig, | |||
713 | il4965_find_first_chain(il->cfg->valid_tx_ant); | 713 | il4965_find_first_chain(il->cfg->valid_tx_ant); |
714 | data->disconn_array[first_chain] = 0; | 714 | data->disconn_array[first_chain] = 0; |
715 | active_chains |= BIT(first_chain); | 715 | active_chains |= BIT(first_chain); |
716 | IL_DEBUG_CALIB(il, | 716 | D_CALIB( |
717 | "All Tx chains are disconnected W/A - declare %d as connected\n", | 717 | "All Tx chains are disconnected W/A - declare %d as connected\n", |
718 | first_chain); | 718 | first_chain); |
719 | break; | 719 | break; |
@@ -722,14 +722,14 @@ il4965_find_disconn_antenna(struct il_priv *il, u32* average_sig, | |||
722 | 722 | ||
723 | if (active_chains != il->hw_params.valid_rx_ant && | 723 | if (active_chains != il->hw_params.valid_rx_ant && |
724 | active_chains != il->chain_noise_data.active_chains) | 724 | active_chains != il->chain_noise_data.active_chains) |
725 | IL_DEBUG_CALIB(il, | 725 | D_CALIB( |
726 | "Detected that not all antennas are connected! " | 726 | "Detected that not all antennas are connected! " |
727 | "Connected: %#x, valid: %#x.\n", | 727 | "Connected: %#x, valid: %#x.\n", |
728 | active_chains, il->hw_params.valid_rx_ant); | 728 | active_chains, il->hw_params.valid_rx_ant); |
729 | 729 | ||
730 | /* Save for use within RXON, TX, SCAN commands, etc. */ | 730 | /* Save for use within RXON, TX, SCAN commands, etc. */ |
731 | data->active_chains = active_chains; | 731 | data->active_chains = active_chains; |
732 | IL_DEBUG_CALIB(il, "active_chains (bitwise) = 0x%x\n", | 732 | D_CALIB("active_chains (bitwise) = 0x%x\n", |
733 | active_chains); | 733 | active_chains); |
734 | } | 734 | } |
735 | 735 | ||
@@ -762,7 +762,7 @@ static void il4965_gain_computation(struct il_priv *il, | |||
762 | data->delta_gain_code[i] = 0; | 762 | data->delta_gain_code[i] = 0; |
763 | } | 763 | } |
764 | } | 764 | } |
765 | IL_DEBUG_CALIB(il, "delta_gain_codes: a %d b %d c %d\n", | 765 | D_CALIB("delta_gain_codes: a %d b %d c %d\n", |
766 | data->delta_gain_code[0], | 766 | data->delta_gain_code[0], |
767 | data->delta_gain_code[1], | 767 | data->delta_gain_code[1], |
768 | data->delta_gain_code[2]); | 768 | data->delta_gain_code[2]); |
@@ -780,7 +780,7 @@ static void il4965_gain_computation(struct il_priv *il, | |||
780 | ret = il_send_cmd_pdu(il, REPLY_PHY_CALIBRATION_CMD, | 780 | ret = il_send_cmd_pdu(il, REPLY_PHY_CALIBRATION_CMD, |
781 | sizeof(cmd), &cmd); | 781 | sizeof(cmd), &cmd); |
782 | if (ret) | 782 | if (ret) |
783 | IL_DEBUG_CALIB(il, "fail sending cmd " | 783 | D_CALIB("fail sending cmd " |
784 | "REPLY_PHY_CALIBRATION_CMD\n"); | 784 | "REPLY_PHY_CALIBRATION_CMD\n"); |
785 | 785 | ||
786 | /* TODO we might want recalculate | 786 | /* TODO we might want recalculate |
@@ -834,7 +834,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
834 | */ | 834 | */ |
835 | if (data->state != IL_CHAIN_NOISE_ACCUMULATE) { | 835 | if (data->state != IL_CHAIN_NOISE_ACCUMULATE) { |
836 | if (data->state == IL_CHAIN_NOISE_ALIVE) | 836 | if (data->state == IL_CHAIN_NOISE_ALIVE) |
837 | IL_DEBUG_CALIB(il, "Wait for noise calib reset\n"); | 837 | D_CALIB("Wait for noise calib reset\n"); |
838 | return; | 838 | return; |
839 | } | 839 | } |
840 | 840 | ||
@@ -844,7 +844,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
844 | rx.general); | 844 | rx.general); |
845 | 845 | ||
846 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { | 846 | if (rx_info->interference_data_flag != INTERFERENCE_DATA_AVAILABLE) { |
847 | IL_DEBUG_CALIB(il, " << Interference data unavailable\n"); | 847 | D_CALIB(" << Interference data unavailable\n"); |
848 | spin_unlock_irqrestore(&il->lock, flags); | 848 | spin_unlock_irqrestore(&il->lock, flags); |
849 | return; | 849 | return; |
850 | } | 850 | } |
@@ -861,7 +861,7 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
861 | /* Make sure we accumulate data for just the associated channel | 861 | /* Make sure we accumulate data for just the associated channel |
862 | * (even if scanning). */ | 862 | * (even if scanning). */ |
863 | if ((rxon_chnum != stat_chnum) || (rxon_band24 != stat_band24)) { | 863 | if ((rxon_chnum != stat_chnum) || (rxon_band24 != stat_band24)) { |
864 | IL_DEBUG_CALIB(il, "Stats not from chan=%d, band24=%d\n", | 864 | D_CALIB("Stats not from chan=%d, band24=%d\n", |
865 | rxon_chnum, rxon_band24); | 865 | rxon_chnum, rxon_band24); |
866 | spin_unlock_irqrestore(&il->lock, flags); | 866 | spin_unlock_irqrestore(&il->lock, flags); |
867 | return; | 867 | return; |
@@ -894,11 +894,11 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
894 | data->chain_signal_b = (chain_sig_b + data->chain_signal_b); | 894 | data->chain_signal_b = (chain_sig_b + data->chain_signal_b); |
895 | data->chain_signal_c = (chain_sig_c + data->chain_signal_c); | 895 | data->chain_signal_c = (chain_sig_c + data->chain_signal_c); |
896 | 896 | ||
897 | IL_DEBUG_CALIB(il, "chan=%d, band24=%d, beacon=%d\n", | 897 | D_CALIB("chan=%d, band24=%d, beacon=%d\n", |
898 | rxon_chnum, rxon_band24, data->beacon_count); | 898 | rxon_chnum, rxon_band24, data->beacon_count); |
899 | IL_DEBUG_CALIB(il, "chain_sig: a %d b %d c %d\n", | 899 | D_CALIB("chain_sig: a %d b %d c %d\n", |
900 | chain_sig_a, chain_sig_b, chain_sig_c); | 900 | chain_sig_a, chain_sig_b, chain_sig_c); |
901 | IL_DEBUG_CALIB(il, "chain_noise: a %d b %d c %d\n", | 901 | D_CALIB("chain_noise: a %d b %d c %d\n", |
902 | chain_noise_a, chain_noise_b, chain_noise_c); | 902 | chain_noise_a, chain_noise_b, chain_noise_c); |
903 | 903 | ||
904 | /* If this is the "chain_noise_num_beacons", determine: | 904 | /* If this is the "chain_noise_num_beacons", determine: |
@@ -929,11 +929,11 @@ void il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp) | |||
929 | } | 929 | } |
930 | } | 930 | } |
931 | 931 | ||
932 | IL_DEBUG_CALIB(il, "average_noise: a %d b %d c %d\n", | 932 | D_CALIB("average_noise: a %d b %d c %d\n", |
933 | average_noise[0], average_noise[1], | 933 | average_noise[0], average_noise[1], |
934 | average_noise[2]); | 934 | average_noise[2]); |
935 | 935 | ||
936 | IL_DEBUG_CALIB(il, "min_average_noise = %d, antenna %d\n", | 936 | D_CALIB("min_average_noise = %d, antenna %d\n", |
937 | min_average_noise, min_average_noise_antenna_i); | 937 | min_average_noise, min_average_noise_antenna_i); |
938 | 938 | ||
939 | il4965_gain_computation(il, average_noise, | 939 | il4965_gain_computation(il, average_noise, |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-lib.c b/drivers/net/wireless/iwlegacy/iwl-4965-lib.c index 156462973e6..b51ae3d63b7 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-lib.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-lib.c | |||
@@ -303,7 +303,7 @@ static void il4965_rx_allocate(struct il_priv *il, gfp_t priority) | |||
303 | page = alloc_pages(gfp_mask, il->hw_params.rx_page_order); | 303 | page = alloc_pages(gfp_mask, il->hw_params.rx_page_order); |
304 | if (!page) { | 304 | if (!page) { |
305 | if (net_ratelimit()) | 305 | if (net_ratelimit()) |
306 | IL_DEBUG_INFO(il, "alloc_pages failed, " | 306 | D_INFO("alloc_pages failed, " |
307 | "order: %d\n", | 307 | "order: %d\n", |
308 | il->hw_params.rx_page_order); | 308 | il->hw_params.rx_page_order); |
309 | 309 | ||
@@ -456,7 +456,7 @@ static int il4965_calc_rssi(struct il_priv *il, | |||
456 | if (valid_antennae & (1 << i)) | 456 | if (valid_antennae & (1 << i)) |
457 | max_rssi = max(ncphy->rssi_info[i << 1], max_rssi); | 457 | max_rssi = max(ncphy->rssi_info[i << 1], max_rssi); |
458 | 458 | ||
459 | IL_DEBUG_STATS(il, "Rssi In A %d B %d C %d Max %d AGC dB %d\n", | 459 | D_STATS("Rssi In A %d B %d C %d Max %d AGC dB %d\n", |
460 | ncphy->rssi_info[0], ncphy->rssi_info[2], ncphy->rssi_info[4], | 460 | ncphy->rssi_info[0], ncphy->rssi_info[2], ncphy->rssi_info[4], |
461 | max_rssi, agc); | 461 | max_rssi, agc); |
462 | 462 | ||
@@ -519,7 +519,7 @@ static u32 il4965_translate_rx_status(struct il_priv *il, u32 decrypt_in) | |||
519 | break; | 519 | break; |
520 | } | 520 | } |
521 | 521 | ||
522 | IL_DEBUG_RX(il, "decrypt_in:0x%x decrypt_out = 0x%x\n", | 522 | D_RX("decrypt_in:0x%x decrypt_out = 0x%x\n", |
523 | decrypt_in, decrypt_out); | 523 | decrypt_in, decrypt_out); |
524 | 524 | ||
525 | return decrypt_out; | 525 | return decrypt_out; |
@@ -537,7 +537,7 @@ static void il4965_pass_packet_to_mac80211(struct il_priv *il, | |||
537 | 537 | ||
538 | /* We only process data packets if the interface is open */ | 538 | /* We only process data packets if the interface is open */ |
539 | if (unlikely(!il->is_open)) { | 539 | if (unlikely(!il->is_open)) { |
540 | IL_DEBUG_DROP(il, | 540 | D_DROP( |
541 | "Dropping packet while interface is not open.\n"); | 541 | "Dropping packet while interface is not open.\n"); |
542 | return; | 542 | return; |
543 | } | 543 | } |
@@ -611,14 +611,14 @@ void il4965_rx_reply_rx(struct il_priv *il, | |||
611 | } | 611 | } |
612 | 612 | ||
613 | if ((unlikely(phy_res->cfg_phy_cnt > 20))) { | 613 | if ((unlikely(phy_res->cfg_phy_cnt > 20))) { |
614 | IL_DEBUG_DROP(il, "dsp size out of range [0,20]: %d/n", | 614 | D_DROP("dsp size out of range [0,20]: %d/n", |
615 | phy_res->cfg_phy_cnt); | 615 | phy_res->cfg_phy_cnt); |
616 | return; | 616 | return; |
617 | } | 617 | } |
618 | 618 | ||
619 | if (!(rx_pkt_status & RX_RES_STATUS_NO_CRC32_ERROR) || | 619 | if (!(rx_pkt_status & RX_RES_STATUS_NO_CRC32_ERROR) || |
620 | !(rx_pkt_status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { | 620 | !(rx_pkt_status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { |
621 | IL_DEBUG_RX(il, "Bad CRC or FIFO: 0x%08X.\n", | 621 | D_RX("Bad CRC or FIFO: 0x%08X.\n", |
622 | le32_to_cpu(rx_pkt_status)); | 622 | le32_to_cpu(rx_pkt_status)); |
623 | return; | 623 | return; |
624 | } | 624 | } |
@@ -647,7 +647,7 @@ void il4965_rx_reply_rx(struct il_priv *il, | |||
647 | rx_status.signal = il4965_calc_rssi(il, phy_res); | 647 | rx_status.signal = il4965_calc_rssi(il, phy_res); |
648 | 648 | ||
649 | il_dbg_log_rx_data_frame(il, len, header); | 649 | il_dbg_log_rx_data_frame(il, len, header); |
650 | IL_DEBUG_STATS(il, "Rssi %d, TSF %llu\n", | 650 | D_STATS("Rssi %d, TSF %llu\n", |
651 | rx_status.signal, (unsigned long long)rx_status.mactime); | 651 | rx_status.signal, (unsigned long long)rx_status.mactime); |
652 | 652 | ||
653 | /* | 653 | /* |
@@ -729,7 +729,7 @@ static int il4965_get_channels_for_scan(struct il_priv *il, | |||
729 | 729 | ||
730 | ch_info = il_get_channel_info(il, band, channel); | 730 | ch_info = il_get_channel_info(il, band, channel); |
731 | if (!il_is_channel_valid(ch_info)) { | 731 | if (!il_is_channel_valid(ch_info)) { |
732 | IL_DEBUG_SCAN(il, | 732 | D_SCAN( |
733 | "Channel %d is INVALID for this band.\n", | 733 | "Channel %d is INVALID for this band.\n", |
734 | channel); | 734 | channel); |
735 | continue; | 735 | continue; |
@@ -759,7 +759,7 @@ static int il4965_get_channels_for_scan(struct il_priv *il, | |||
759 | else | 759 | else |
760 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); | 760 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); |
761 | 761 | ||
762 | IL_DEBUG_SCAN(il, "Scanning ch=%d prob=0x%X [%s %d]\n", | 762 | D_SCAN("Scanning ch=%d prob=0x%X [%s %d]\n", |
763 | channel, le32_to_cpu(scan_ch->type), | 763 | channel, le32_to_cpu(scan_ch->type), |
764 | (scan_ch->type & SCAN_CHANNEL_TYPE_ACTIVE) ? | 764 | (scan_ch->type & SCAN_CHANNEL_TYPE_ACTIVE) ? |
765 | "ACTIVE" : "PASSIVE", | 765 | "ACTIVE" : "PASSIVE", |
@@ -770,7 +770,7 @@ static int il4965_get_channels_for_scan(struct il_priv *il, | |||
770 | added++; | 770 | added++; |
771 | } | 771 | } |
772 | 772 | ||
773 | IL_DEBUG_SCAN(il, "total channels to scan %d\n", added); | 773 | D_SCAN("total channels to scan %d\n", added); |
774 | return added; | 774 | return added; |
775 | } | 775 | } |
776 | 776 | ||
@@ -805,7 +805,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
805 | il->scan_cmd = kmalloc(sizeof(struct il_scan_cmd) + | 805 | il->scan_cmd = kmalloc(sizeof(struct il_scan_cmd) + |
806 | IL_MAX_SCAN_SIZE, GFP_KERNEL); | 806 | IL_MAX_SCAN_SIZE, GFP_KERNEL); |
807 | if (!il->scan_cmd) { | 807 | if (!il->scan_cmd) { |
808 | IL_DEBUG_SCAN(il, | 808 | D_SCAN( |
809 | "fail to allocate memory for scan\n"); | 809 | "fail to allocate memory for scan\n"); |
810 | return -ENOMEM; | 810 | return -ENOMEM; |
811 | } | 811 | } |
@@ -822,7 +822,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
822 | u32 suspend_time = 100; | 822 | u32 suspend_time = 100; |
823 | u32 scan_suspend_time = 100; | 823 | u32 scan_suspend_time = 100; |
824 | 824 | ||
825 | IL_DEBUG_INFO(il, "Scanning while associated...\n"); | 825 | D_INFO("Scanning while associated...\n"); |
826 | interval = vif->bss_conf.beacon_int; | 826 | interval = vif->bss_conf.beacon_int; |
827 | 827 | ||
828 | scan->suspend_time = 0; | 828 | scan->suspend_time = 0; |
@@ -834,13 +834,13 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
834 | scan_suspend_time = (extra | | 834 | scan_suspend_time = (extra | |
835 | ((suspend_time % interval) * 1024)); | 835 | ((suspend_time % interval) * 1024)); |
836 | scan->suspend_time = cpu_to_le32(scan_suspend_time); | 836 | scan->suspend_time = cpu_to_le32(scan_suspend_time); |
837 | IL_DEBUG_SCAN(il, "suspend_time 0x%X beacon interval %d\n", | 837 | D_SCAN("suspend_time 0x%X beacon interval %d\n", |
838 | scan_suspend_time, interval); | 838 | scan_suspend_time, interval); |
839 | } | 839 | } |
840 | 840 | ||
841 | if (il->scan_request->n_ssids) { | 841 | if (il->scan_request->n_ssids) { |
842 | int i, p = 0; | 842 | int i, p = 0; |
843 | IL_DEBUG_SCAN(il, "Kicking off active scan\n"); | 843 | D_SCAN("Kicking off active scan\n"); |
844 | for (i = 0; i < il->scan_request->n_ssids; i++) { | 844 | for (i = 0; i < il->scan_request->n_ssids; i++) { |
845 | /* always does wildcard anyway */ | 845 | /* always does wildcard anyway */ |
846 | if (!il->scan_request->ssids[i].ssid_len) | 846 | if (!il->scan_request->ssids[i].ssid_len) |
@@ -856,7 +856,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
856 | } | 856 | } |
857 | is_active = true; | 857 | is_active = true; |
858 | } else | 858 | } else |
859 | IL_DEBUG_SCAN(il, "Start passive scan.\n"); | 859 | D_SCAN("Start passive scan.\n"); |
860 | 860 | ||
861 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; | 861 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; |
862 | scan->tx_cmd.sta_id = ctx->bcast_sta_id; | 862 | scan->tx_cmd.sta_id = ctx->bcast_sta_id; |
@@ -923,7 +923,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
923 | if (!active_chains) | 923 | if (!active_chains) |
924 | active_chains = rx_ant; | 924 | active_chains = rx_ant; |
925 | 925 | ||
926 | IL_DEBUG_SCAN(il, "chain_noise_data.active_chains: %u\n", | 926 | D_SCAN("chain_noise_data.active_chains: %u\n", |
927 | il->chain_noise_data.active_chains); | 927 | il->chain_noise_data.active_chains); |
928 | 928 | ||
929 | rx_ant = il4965_first_antenna(active_chains); | 929 | rx_ant = il4965_first_antenna(active_chains); |
@@ -951,7 +951,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
951 | is_active, n_probes, | 951 | is_active, n_probes, |
952 | (void *)&scan->data[cmd_len]); | 952 | (void *)&scan->data[cmd_len]); |
953 | if (scan->channel_count == 0) { | 953 | if (scan->channel_count == 0) { |
954 | IL_DEBUG_SCAN(il, "channel count %d\n", scan->channel_count); | 954 | D_SCAN("channel count %d\n", scan->channel_count); |
955 | return -EIO; | 955 | return -EIO; |
956 | } | 956 | } |
957 | 957 | ||
@@ -990,7 +990,7 @@ void il4965_free_tfds_in_queue(struct il_priv *il, | |||
990 | if (il->stations[sta_id].tid[tid].tfds_in_queue >= freed) | 990 | if (il->stations[sta_id].tid[tid].tfds_in_queue >= freed) |
991 | il->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 991 | il->stations[sta_id].tid[tid].tfds_in_queue -= freed; |
992 | else { | 992 | else { |
993 | IL_DEBUG_TX(il, "free more than tfds_in_queue (%u:%d)\n", | 993 | D_TX("free more than tfds_in_queue (%u:%d)\n", |
994 | il->stations[sta_id].tid[tid].tfds_in_queue, | 994 | il->stations[sta_id].tid[tid].tfds_in_queue, |
995 | freed); | 995 | freed); |
996 | il->stations[sta_id].tid[tid].tfds_in_queue = 0; | 996 | il->stations[sta_id].tid[tid].tfds_in_queue = 0; |
@@ -1111,7 +1111,7 @@ void il4965_set_rxon_chain(struct il_priv *il, struct il_rxon_context *ctx) | |||
1111 | else | 1111 | else |
1112 | ctx->staging.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; | 1112 | ctx->staging.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; |
1113 | 1113 | ||
1114 | IL_DEBUG_ASSOC(il, "rx_chain=0x%X active=%d idle=%d\n", | 1114 | D_ASSOC("rx_chain=0x%X active=%d idle=%d\n", |
1115 | ctx->staging.rx_chain, | 1115 | ctx->staging.rx_chain, |
1116 | active_rx_cnt, idle_rx_cnt); | 1116 | active_rx_cnt, idle_rx_cnt); |
1117 | 1117 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c index 782ec77715f..b53cf1b70c3 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c | |||
@@ -358,7 +358,7 @@ static int il4965_rs_tl_turn_on_agg_for_tid(struct il_priv *il, | |||
358 | load = il4965_rs_tl_get_load(lq_data, tid); | 358 | load = il4965_rs_tl_get_load(lq_data, tid); |
359 | 359 | ||
360 | if (load > IL_AGG_LOAD_THRESHOLD) { | 360 | if (load > IL_AGG_LOAD_THRESHOLD) { |
361 | IL_DEBUG_HT(il, "Starting Tx agg: STA: %pM tid: %d\n", | 361 | D_HT("Starting Tx agg: STA: %pM tid: %d\n", |
362 | sta->addr, tid); | 362 | sta->addr, tid); |
363 | ret = ieee80211_start_tx_ba_session(sta, tid, 5000); | 363 | ret = ieee80211_start_tx_ba_session(sta, tid, 5000); |
364 | if (ret == -EAGAIN) { | 364 | if (ret == -EAGAIN) { |
@@ -707,7 +707,7 @@ il4965_rs_get_adjacent_rate(struct il_priv *il, u8 index, u16 rate_mask, | |||
707 | break; | 707 | break; |
708 | if (rate_mask & (1 << low)) | 708 | if (rate_mask & (1 << low)) |
709 | break; | 709 | break; |
710 | IL_DEBUG_RATE(il, "Skipping masked lower rate: %d\n", low); | 710 | D_RATE("Skipping masked lower rate: %d\n", low); |
711 | } | 711 | } |
712 | 712 | ||
713 | high = index; | 713 | high = index; |
@@ -717,7 +717,7 @@ il4965_rs_get_adjacent_rate(struct il_priv *il, u8 index, u16 rate_mask, | |||
717 | break; | 717 | break; |
718 | if (rate_mask & (1 << high)) | 718 | if (rate_mask & (1 << high)) |
719 | break; | 719 | break; |
720 | IL_DEBUG_RATE(il, "Skipping masked higher rate: %d\n", high); | 720 | D_RATE("Skipping masked higher rate: %d\n", high); |
721 | } | 721 | } |
722 | 722 | ||
723 | return (high << 8) | low; | 723 | return (high << 8) | low; |
@@ -817,15 +817,15 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
817 | struct il_station_priv *sta_priv = (void *)sta->drv_priv; | 817 | struct il_station_priv *sta_priv = (void *)sta->drv_priv; |
818 | struct il_rxon_context *ctx = sta_priv->common.ctx; | 818 | struct il_rxon_context *ctx = sta_priv->common.ctx; |
819 | 819 | ||
820 | IL_DEBUG_RATE(il, | 820 | D_RATE( |
821 | "get frame ack response, update rate scale window\n"); | 821 | "get frame ack response, update rate scale window\n"); |
822 | 822 | ||
823 | /* Treat uninitialized rate scaling data same as non-existing. */ | 823 | /* Treat uninitialized rate scaling data same as non-existing. */ |
824 | if (!lq_sta) { | 824 | if (!lq_sta) { |
825 | IL_DEBUG_RATE(il, "Station rate scaling not created yet.\n"); | 825 | D_RATE("Station rate scaling not created yet.\n"); |
826 | return; | 826 | return; |
827 | } else if (!lq_sta->drv) { | 827 | } else if (!lq_sta->drv) { |
828 | IL_DEBUG_RATE(il, "Rate scaling not initialized yet.\n"); | 828 | D_RATE("Rate scaling not initialized yet.\n"); |
829 | return; | 829 | return; |
830 | } | 830 | } |
831 | 831 | ||
@@ -880,7 +880,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
880 | (!!(tx_rate & RATE_MCS_GF_MSK) != | 880 | (!!(tx_rate & RATE_MCS_GF_MSK) != |
881 | !!(mac_flags & IEEE80211_TX_RC_GREEN_FIELD)) || | 881 | !!(mac_flags & IEEE80211_TX_RC_GREEN_FIELD)) || |
882 | (rs_index != mac_index)) { | 882 | (rs_index != mac_index)) { |
883 | IL_DEBUG_RATE(il, | 883 | D_RATE( |
884 | "initial rate %d does not match %d (0x%x)\n", | 884 | "initial rate %d does not match %d (0x%x)\n", |
885 | mac_index, rs_index, tx_rate); | 885 | mac_index, rs_index, tx_rate); |
886 | /* | 886 | /* |
@@ -910,15 +910,15 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
910 | curr_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); | 910 | curr_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); |
911 | other_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | 911 | other_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); |
912 | } else { | 912 | } else { |
913 | IL_DEBUG_RATE(il, | 913 | D_RATE( |
914 | "Neither active nor search matches tx rate\n"); | 914 | "Neither active nor search matches tx rate\n"); |
915 | tmp_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | 915 | tmp_tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); |
916 | IL_DEBUG_RATE(il, "active- lq:%x, ant:%x, SGI:%d\n", | 916 | D_RATE("active- lq:%x, ant:%x, SGI:%d\n", |
917 | tmp_tbl->lq_type, tmp_tbl->ant_type, tmp_tbl->is_SGI); | 917 | tmp_tbl->lq_type, tmp_tbl->ant_type, tmp_tbl->is_SGI); |
918 | tmp_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); | 918 | tmp_tbl = &(lq_sta->lq_info[1 - lq_sta->active_tbl]); |
919 | IL_DEBUG_RATE(il, "search- lq:%x, ant:%x, SGI:%d\n", | 919 | D_RATE("search- lq:%x, ant:%x, SGI:%d\n", |
920 | tmp_tbl->lq_type, tmp_tbl->ant_type, tmp_tbl->is_SGI); | 920 | tmp_tbl->lq_type, tmp_tbl->ant_type, tmp_tbl->is_SGI); |
921 | IL_DEBUG_RATE(il, "actual- lq:%x, ant:%x, SGI:%d\n", | 921 | D_RATE("actual- lq:%x, ant:%x, SGI:%d\n", |
922 | tbl_type.lq_type, tbl_type.ant_type, tbl_type.is_SGI); | 922 | tbl_type.lq_type, tbl_type.ant_type, tbl_type.is_SGI); |
923 | /* | 923 | /* |
924 | * no matching table found, let's by-pass the data collection | 924 | * no matching table found, let's by-pass the data collection |
@@ -1004,7 +1004,7 @@ done: | |||
1004 | static void il4965_rs_set_stay_in_table(struct il_priv *il, u8 is_legacy, | 1004 | static void il4965_rs_set_stay_in_table(struct il_priv *il, u8 is_legacy, |
1005 | struct il_lq_sta *lq_sta) | 1005 | struct il_lq_sta *lq_sta) |
1006 | { | 1006 | { |
1007 | IL_DEBUG_RATE(il, "we are staying in the same table\n"); | 1007 | D_RATE("we are staying in the same table\n"); |
1008 | lq_sta->stay_in_tbl = 1; /* only place this gets set */ | 1008 | lq_sta->stay_in_tbl = 1; /* only place this gets set */ |
1009 | if (is_legacy) { | 1009 | if (is_legacy) { |
1010 | lq_sta->table_count_limit = IL_LEGACY_TABLE_COUNT; | 1010 | lq_sta->table_count_limit = IL_LEGACY_TABLE_COUNT; |
@@ -1194,7 +1194,7 @@ static int il4965_rs_switch_to_mimo2(struct il_priv *il, | |||
1194 | if (il->hw_params.tx_chains_num < 2) | 1194 | if (il->hw_params.tx_chains_num < 2) |
1195 | return -1; | 1195 | return -1; |
1196 | 1196 | ||
1197 | IL_DEBUG_RATE(il, "LQ: try to switch to MIMO2\n"); | 1197 | D_RATE("LQ: try to switch to MIMO2\n"); |
1198 | 1198 | ||
1199 | tbl->lq_type = LQ_MIMO2; | 1199 | tbl->lq_type = LQ_MIMO2; |
1200 | tbl->is_dup = lq_sta->is_dup; | 1200 | tbl->is_dup = lq_sta->is_dup; |
@@ -1211,10 +1211,10 @@ static int il4965_rs_switch_to_mimo2(struct il_priv *il, | |||
1211 | 1211 | ||
1212 | rate = il4965_rs_get_best_rate(il, lq_sta, tbl, rate_mask, index); | 1212 | rate = il4965_rs_get_best_rate(il, lq_sta, tbl, rate_mask, index); |
1213 | 1213 | ||
1214 | IL_DEBUG_RATE(il, "LQ: MIMO2 best rate %d mask %X\n", | 1214 | D_RATE("LQ: MIMO2 best rate %d mask %X\n", |
1215 | rate, rate_mask); | 1215 | rate, rate_mask); |
1216 | if ((rate == IL_RATE_INVALID) || !((1 << rate) & rate_mask)) { | 1216 | if ((rate == IL_RATE_INVALID) || !((1 << rate) & rate_mask)) { |
1217 | IL_DEBUG_RATE(il, | 1217 | D_RATE( |
1218 | "Can't switch with index %d rate mask %x\n", | 1218 | "Can't switch with index %d rate mask %x\n", |
1219 | rate, rate_mask); | 1219 | rate, rate_mask); |
1220 | return -1; | 1220 | return -1; |
@@ -1222,7 +1222,7 @@ static int il4965_rs_switch_to_mimo2(struct il_priv *il, | |||
1222 | tbl->current_rate = il4965_rate_n_flags_from_tbl(il, | 1222 | tbl->current_rate = il4965_rate_n_flags_from_tbl(il, |
1223 | tbl, rate, is_green); | 1223 | tbl, rate, is_green); |
1224 | 1224 | ||
1225 | IL_DEBUG_RATE(il, "LQ: Switch to new mcs %X index is green %X\n", | 1225 | D_RATE("LQ: Switch to new mcs %X index is green %X\n", |
1226 | tbl->current_rate, is_green); | 1226 | tbl->current_rate, is_green); |
1227 | return 0; | 1227 | return 0; |
1228 | } | 1228 | } |
@@ -1245,7 +1245,7 @@ static int il4965_rs_switch_to_siso(struct il_priv *il, | |||
1245 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) | 1245 | if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported) |
1246 | return -1; | 1246 | return -1; |
1247 | 1247 | ||
1248 | IL_DEBUG_RATE(il, "LQ: try to switch to SISO\n"); | 1248 | D_RATE("LQ: try to switch to SISO\n"); |
1249 | 1249 | ||
1250 | tbl->is_dup = lq_sta->is_dup; | 1250 | tbl->is_dup = lq_sta->is_dup; |
1251 | tbl->lq_type = LQ_SISO; | 1251 | tbl->lq_type = LQ_SISO; |
@@ -1264,16 +1264,16 @@ static int il4965_rs_switch_to_siso(struct il_priv *il, | |||
1264 | il4965_rs_set_expected_tpt_table(lq_sta, tbl); | 1264 | il4965_rs_set_expected_tpt_table(lq_sta, tbl); |
1265 | rate = il4965_rs_get_best_rate(il, lq_sta, tbl, rate_mask, index); | 1265 | rate = il4965_rs_get_best_rate(il, lq_sta, tbl, rate_mask, index); |
1266 | 1266 | ||
1267 | IL_DEBUG_RATE(il, "LQ: get best rate %d mask %X\n", rate, rate_mask); | 1267 | D_RATE("LQ: get best rate %d mask %X\n", rate, rate_mask); |
1268 | if ((rate == IL_RATE_INVALID) || !((1 << rate) & rate_mask)) { | 1268 | if ((rate == IL_RATE_INVALID) || !((1 << rate) & rate_mask)) { |
1269 | IL_DEBUG_RATE(il, | 1269 | D_RATE( |
1270 | "can not switch with index %d rate mask %x\n", | 1270 | "can not switch with index %d rate mask %x\n", |
1271 | rate, rate_mask); | 1271 | rate, rate_mask); |
1272 | return -1; | 1272 | return -1; |
1273 | } | 1273 | } |
1274 | tbl->current_rate = il4965_rate_n_flags_from_tbl(il, | 1274 | tbl->current_rate = il4965_rate_n_flags_from_tbl(il, |
1275 | tbl, rate, is_green); | 1275 | tbl, rate, is_green); |
1276 | IL_DEBUG_RATE(il, "LQ: Switch to new mcs %X index is green %X\n", | 1276 | D_RATE("LQ: Switch to new mcs %X index is green %X\n", |
1277 | tbl->current_rate, is_green); | 1277 | tbl->current_rate, is_green); |
1278 | return 0; | 1278 | return 0; |
1279 | } | 1279 | } |
@@ -1307,7 +1307,7 @@ static int il4965_rs_move_legacy_other(struct il_priv *il, | |||
1307 | switch (tbl->action) { | 1307 | switch (tbl->action) { |
1308 | case IL_LEGACY_SWITCH_ANTENNA1: | 1308 | case IL_LEGACY_SWITCH_ANTENNA1: |
1309 | case IL_LEGACY_SWITCH_ANTENNA2: | 1309 | case IL_LEGACY_SWITCH_ANTENNA2: |
1310 | IL_DEBUG_RATE(il, "LQ: Legacy toggle Antenna\n"); | 1310 | D_RATE("LQ: Legacy toggle Antenna\n"); |
1311 | 1311 | ||
1312 | if ((tbl->action == IL_LEGACY_SWITCH_ANTENNA1 && | 1312 | if ((tbl->action == IL_LEGACY_SWITCH_ANTENNA1 && |
1313 | tx_chains_num <= 1) || | 1313 | tx_chains_num <= 1) || |
@@ -1331,7 +1331,7 @@ static int il4965_rs_move_legacy_other(struct il_priv *il, | |||
1331 | } | 1331 | } |
1332 | break; | 1332 | break; |
1333 | case IL_LEGACY_SWITCH_SISO: | 1333 | case IL_LEGACY_SWITCH_SISO: |
1334 | IL_DEBUG_RATE(il, "LQ: Legacy switch to SISO\n"); | 1334 | D_RATE("LQ: Legacy switch to SISO\n"); |
1335 | 1335 | ||
1336 | /* Set up search table to try SISO */ | 1336 | /* Set up search table to try SISO */ |
1337 | memcpy(search_tbl, tbl, sz); | 1337 | memcpy(search_tbl, tbl, sz); |
@@ -1347,7 +1347,7 @@ static int il4965_rs_move_legacy_other(struct il_priv *il, | |||
1347 | case IL_LEGACY_SWITCH_MIMO2_AB: | 1347 | case IL_LEGACY_SWITCH_MIMO2_AB: |
1348 | case IL_LEGACY_SWITCH_MIMO2_AC: | 1348 | case IL_LEGACY_SWITCH_MIMO2_AC: |
1349 | case IL_LEGACY_SWITCH_MIMO2_BC: | 1349 | case IL_LEGACY_SWITCH_MIMO2_BC: |
1350 | IL_DEBUG_RATE(il, "LQ: Legacy switch to MIMO2\n"); | 1350 | D_RATE("LQ: Legacy switch to MIMO2\n"); |
1351 | 1351 | ||
1352 | /* Set up search table to try MIMO */ | 1352 | /* Set up search table to try MIMO */ |
1353 | memcpy(search_tbl, tbl, sz); | 1353 | memcpy(search_tbl, tbl, sz); |
@@ -1424,7 +1424,7 @@ static int il4965_rs_move_siso_to_other(struct il_priv *il, | |||
1424 | switch (tbl->action) { | 1424 | switch (tbl->action) { |
1425 | case IL_SISO_SWITCH_ANTENNA1: | 1425 | case IL_SISO_SWITCH_ANTENNA1: |
1426 | case IL_SISO_SWITCH_ANTENNA2: | 1426 | case IL_SISO_SWITCH_ANTENNA2: |
1427 | IL_DEBUG_RATE(il, "LQ: SISO toggle Antenna\n"); | 1427 | D_RATE("LQ: SISO toggle Antenna\n"); |
1428 | if ((tbl->action == IL_SISO_SWITCH_ANTENNA1 && | 1428 | if ((tbl->action == IL_SISO_SWITCH_ANTENNA1 && |
1429 | tx_chains_num <= 1) || | 1429 | tx_chains_num <= 1) || |
1430 | (tbl->action == IL_SISO_SWITCH_ANTENNA2 && | 1430 | (tbl->action == IL_SISO_SWITCH_ANTENNA2 && |
@@ -1444,7 +1444,7 @@ static int il4965_rs_move_siso_to_other(struct il_priv *il, | |||
1444 | case IL_SISO_SWITCH_MIMO2_AB: | 1444 | case IL_SISO_SWITCH_MIMO2_AB: |
1445 | case IL_SISO_SWITCH_MIMO2_AC: | 1445 | case IL_SISO_SWITCH_MIMO2_AC: |
1446 | case IL_SISO_SWITCH_MIMO2_BC: | 1446 | case IL_SISO_SWITCH_MIMO2_BC: |
1447 | IL_DEBUG_RATE(il, "LQ: SISO switch to MIMO2\n"); | 1447 | D_RATE("LQ: SISO switch to MIMO2\n"); |
1448 | memcpy(search_tbl, tbl, sz); | 1448 | memcpy(search_tbl, tbl, sz); |
1449 | search_tbl->is_SGI = 0; | 1449 | search_tbl->is_SGI = 0; |
1450 | 1450 | ||
@@ -1473,7 +1473,7 @@ static int il4965_rs_move_siso_to_other(struct il_priv *il, | |||
1473 | IEEE80211_HT_CAP_SGI_40)) | 1473 | IEEE80211_HT_CAP_SGI_40)) |
1474 | break; | 1474 | break; |
1475 | 1475 | ||
1476 | IL_DEBUG_RATE(il, "LQ: SISO toggle SGI/NGI\n"); | 1476 | D_RATE("LQ: SISO toggle SGI/NGI\n"); |
1477 | 1477 | ||
1478 | memcpy(search_tbl, tbl, sz); | 1478 | memcpy(search_tbl, tbl, sz); |
1479 | if (is_green) { | 1479 | if (is_green) { |
@@ -1545,7 +1545,7 @@ static int il4965_rs_move_mimo2_to_other(struct il_priv *il, | |||
1545 | switch (tbl->action) { | 1545 | switch (tbl->action) { |
1546 | case IL_MIMO2_SWITCH_ANTENNA1: | 1546 | case IL_MIMO2_SWITCH_ANTENNA1: |
1547 | case IL_MIMO2_SWITCH_ANTENNA2: | 1547 | case IL_MIMO2_SWITCH_ANTENNA2: |
1548 | IL_DEBUG_RATE(il, "LQ: MIMO2 toggle Antennas\n"); | 1548 | D_RATE("LQ: MIMO2 toggle Antennas\n"); |
1549 | 1549 | ||
1550 | if (tx_chains_num <= 2) | 1550 | if (tx_chains_num <= 2) |
1551 | break; | 1551 | break; |
@@ -1563,7 +1563,7 @@ static int il4965_rs_move_mimo2_to_other(struct il_priv *il, | |||
1563 | case IL_MIMO2_SWITCH_SISO_A: | 1563 | case IL_MIMO2_SWITCH_SISO_A: |
1564 | case IL_MIMO2_SWITCH_SISO_B: | 1564 | case IL_MIMO2_SWITCH_SISO_B: |
1565 | case IL_MIMO2_SWITCH_SISO_C: | 1565 | case IL_MIMO2_SWITCH_SISO_C: |
1566 | IL_DEBUG_RATE(il, "LQ: MIMO2 switch to SISO\n"); | 1566 | D_RATE("LQ: MIMO2 switch to SISO\n"); |
1567 | 1567 | ||
1568 | /* Set up new search table for SISO */ | 1568 | /* Set up new search table for SISO */ |
1569 | memcpy(search_tbl, tbl, sz); | 1569 | memcpy(search_tbl, tbl, sz); |
@@ -1595,7 +1595,7 @@ static int il4965_rs_move_mimo2_to_other(struct il_priv *il, | |||
1595 | IEEE80211_HT_CAP_SGI_40)) | 1595 | IEEE80211_HT_CAP_SGI_40)) |
1596 | break; | 1596 | break; |
1597 | 1597 | ||
1598 | IL_DEBUG_RATE(il, "LQ: MIMO2 toggle SGI/NGI\n"); | 1598 | D_RATE("LQ: MIMO2 toggle SGI/NGI\n"); |
1599 | 1599 | ||
1600 | /* Set up new search table for MIMO2 */ | 1600 | /* Set up new search table for MIMO2 */ |
1601 | memcpy(search_tbl, tbl, sz); | 1601 | memcpy(search_tbl, tbl, sz); |
@@ -1684,7 +1684,7 @@ il4965_rs_stay_in_table(struct il_lq_sta *lq_sta, bool force_search) | |||
1684 | (lq_sta->total_success > lq_sta->max_success_limit) || | 1684 | (lq_sta->total_success > lq_sta->max_success_limit) || |
1685 | ((!lq_sta->search_better_tbl) && (lq_sta->flush_timer) | 1685 | ((!lq_sta->search_better_tbl) && (lq_sta->flush_timer) |
1686 | && (flush_interval_passed))) { | 1686 | && (flush_interval_passed))) { |
1687 | IL_DEBUG_RATE(il, "LQ: stay is expired %d %d %d\n:", | 1687 | D_RATE("LQ: stay is expired %d %d %d\n:", |
1688 | lq_sta->total_failed, | 1688 | lq_sta->total_failed, |
1689 | lq_sta->total_success, | 1689 | lq_sta->total_success, |
1690 | flush_interval_passed); | 1690 | flush_interval_passed); |
@@ -1707,7 +1707,7 @@ il4965_rs_stay_in_table(struct il_lq_sta *lq_sta, bool force_search) | |||
1707 | lq_sta->table_count_limit) { | 1707 | lq_sta->table_count_limit) { |
1708 | lq_sta->table_count = 0; | 1708 | lq_sta->table_count = 0; |
1709 | 1709 | ||
1710 | IL_DEBUG_RATE(il, | 1710 | D_RATE( |
1711 | "LQ: stay in table clear win\n"); | 1711 | "LQ: stay in table clear win\n"); |
1712 | for (i = 0; i < IL_RATE_COUNT; i++) | 1712 | for (i = 0; i < IL_RATE_COUNT; i++) |
1713 | il4965_rs_rate_scale_clear_window( | 1713 | il4965_rs_rate_scale_clear_window( |
@@ -1783,7 +1783,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
1783 | struct il_station_priv *sta_priv = (void *)sta->drv_priv; | 1783 | struct il_station_priv *sta_priv = (void *)sta->drv_priv; |
1784 | struct il_rxon_context *ctx = sta_priv->common.ctx; | 1784 | struct il_rxon_context *ctx = sta_priv->common.ctx; |
1785 | 1785 | ||
1786 | IL_DEBUG_RATE(il, "rate scale calculate new rate for skb\n"); | 1786 | D_RATE("rate scale calculate new rate for skb\n"); |
1787 | 1787 | ||
1788 | /* Send management frames and NO_ACK data using lowest rate. */ | 1788 | /* Send management frames and NO_ACK data using lowest rate. */ |
1789 | /* TODO: this could probably be improved.. */ | 1789 | /* TODO: this could probably be improved.. */ |
@@ -1826,13 +1826,13 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
1826 | /* current tx rate */ | 1826 | /* current tx rate */ |
1827 | index = lq_sta->last_txrate_idx; | 1827 | index = lq_sta->last_txrate_idx; |
1828 | 1828 | ||
1829 | IL_DEBUG_RATE(il, "Rate scale index %d for type %d\n", index, | 1829 | D_RATE("Rate scale index %d for type %d\n", index, |
1830 | tbl->lq_type); | 1830 | tbl->lq_type); |
1831 | 1831 | ||
1832 | /* rates available for this association, and for modulation mode */ | 1832 | /* rates available for this association, and for modulation mode */ |
1833 | rate_mask = il4965_rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); | 1833 | rate_mask = il4965_rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); |
1834 | 1834 | ||
1835 | IL_DEBUG_RATE(il, "mask 0x%04X\n", rate_mask); | 1835 | D_RATE("mask 0x%04X\n", rate_mask); |
1836 | 1836 | ||
1837 | /* mask with station rate restriction */ | 1837 | /* mask with station rate restriction */ |
1838 | if (is_legacy(tbl->lq_type)) { | 1838 | if (is_legacy(tbl->lq_type)) { |
@@ -1892,7 +1892,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
1892 | fail_count = window->counter - window->success_counter; | 1892 | fail_count = window->counter - window->success_counter; |
1893 | if ((fail_count < IL_RATE_MIN_FAILURE_TH) && | 1893 | if ((fail_count < IL_RATE_MIN_FAILURE_TH) && |
1894 | (window->success_counter < IL_RATE_MIN_SUCCESS_TH)) { | 1894 | (window->success_counter < IL_RATE_MIN_SUCCESS_TH)) { |
1895 | IL_DEBUG_RATE(il, "LQ: still below TH. succ=%d total=%d " | 1895 | D_RATE("LQ: still below TH. succ=%d total=%d " |
1896 | "for index %d\n", | 1896 | "for index %d\n", |
1897 | window->success_counter, window->counter, index); | 1897 | window->success_counter, window->counter, index); |
1898 | 1898 | ||
@@ -1922,7 +1922,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
1922 | * continuing to use the setup that we've been trying. */ | 1922 | * continuing to use the setup that we've been trying. */ |
1923 | if (window->average_tpt > lq_sta->last_tpt) { | 1923 | if (window->average_tpt > lq_sta->last_tpt) { |
1924 | 1924 | ||
1925 | IL_DEBUG_RATE(il, "LQ: SWITCHING TO NEW TABLE " | 1925 | D_RATE("LQ: SWITCHING TO NEW TABLE " |
1926 | "suc=%d cur-tpt=%d old-tpt=%d\n", | 1926 | "suc=%d cur-tpt=%d old-tpt=%d\n", |
1927 | window->success_ratio, | 1927 | window->success_ratio, |
1928 | window->average_tpt, | 1928 | window->average_tpt, |
@@ -1938,7 +1938,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
1938 | /* Else poor success; go back to mode in "active" table */ | 1938 | /* Else poor success; go back to mode in "active" table */ |
1939 | } else { | 1939 | } else { |
1940 | 1940 | ||
1941 | IL_DEBUG_RATE(il, "LQ: GOING BACK TO THE OLD TABLE " | 1941 | D_RATE("LQ: GOING BACK TO THE OLD TABLE " |
1942 | "suc=%d cur-tpt=%d old-tpt=%d\n", | 1942 | "suc=%d cur-tpt=%d old-tpt=%d\n", |
1943 | window->success_ratio, | 1943 | window->success_ratio, |
1944 | window->average_tpt, | 1944 | window->average_tpt, |
@@ -1992,7 +1992,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
1992 | 1992 | ||
1993 | /* Too many failures, decrease rate */ | 1993 | /* Too many failures, decrease rate */ |
1994 | if ((sr <= IL_RATE_DECREASE_TH) || (current_tpt == 0)) { | 1994 | if ((sr <= IL_RATE_DECREASE_TH) || (current_tpt == 0)) { |
1995 | IL_DEBUG_RATE(il, | 1995 | D_RATE( |
1996 | "decrease rate because of low success_ratio\n"); | 1996 | "decrease rate because of low success_ratio\n"); |
1997 | scale_action = -1; | 1997 | scale_action = -1; |
1998 | 1998 | ||
@@ -2031,7 +2031,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
2031 | } else if (low_tpt != IL_INVALID_VALUE) { | 2031 | } else if (low_tpt != IL_INVALID_VALUE) { |
2032 | /* Lower rate has better throughput */ | 2032 | /* Lower rate has better throughput */ |
2033 | if (low_tpt > current_tpt) { | 2033 | if (low_tpt > current_tpt) { |
2034 | IL_DEBUG_RATE(il, | 2034 | D_RATE( |
2035 | "decrease rate because of low tpt\n"); | 2035 | "decrease rate because of low tpt\n"); |
2036 | scale_action = -1; | 2036 | scale_action = -1; |
2037 | } else if (sr >= IL_RATE_INCREASE_TH) { | 2037 | } else if (sr >= IL_RATE_INCREASE_TH) { |
@@ -2070,7 +2070,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il, | |||
2070 | break; | 2070 | break; |
2071 | } | 2071 | } |
2072 | 2072 | ||
2073 | IL_DEBUG_RATE(il, "choose rate scale index %d action %d low %d " | 2073 | D_RATE("choose rate scale index %d action %d low %d " |
2074 | "high %d type %d\n", | 2074 | "high %d type %d\n", |
2075 | index, scale_action, low, high, tbl->lq_type); | 2075 | index, scale_action, low, high, tbl->lq_type); |
2076 | 2076 | ||
@@ -2118,7 +2118,7 @@ lq_update: | |||
2118 | /* Use new "search" start rate */ | 2118 | /* Use new "search" start rate */ |
2119 | index = il4965_hwrate_to_plcp_idx(tbl->current_rate); | 2119 | index = il4965_hwrate_to_plcp_idx(tbl->current_rate); |
2120 | 2120 | ||
2121 | IL_DEBUG_RATE(il, | 2121 | D_RATE( |
2122 | "Switch current mcs: %X index: %d\n", | 2122 | "Switch current mcs: %X index: %d\n", |
2123 | tbl->current_rate, index); | 2123 | tbl->current_rate, index); |
2124 | il4965_rs_fill_link_cmd(il, lq_sta, | 2124 | il4965_rs_fill_link_cmd(il, lq_sta, |
@@ -2138,7 +2138,7 @@ lq_update: | |||
2138 | tbl1 = &(lq_sta->lq_info[lq_sta->active_tbl]); | 2138 | tbl1 = &(lq_sta->lq_info[lq_sta->active_tbl]); |
2139 | if (is_legacy(tbl1->lq_type) && !conf_is_ht(conf) && | 2139 | if (is_legacy(tbl1->lq_type) && !conf_is_ht(conf) && |
2140 | lq_sta->action_counter > tbl1->max_search) { | 2140 | lq_sta->action_counter > tbl1->max_search) { |
2141 | IL_DEBUG_RATE(il, "LQ: STAY in legacy table\n"); | 2141 | D_RATE("LQ: STAY in legacy table\n"); |
2142 | il4965_rs_set_stay_in_table(il, 1, lq_sta); | 2142 | il4965_rs_set_stay_in_table(il, 1, lq_sta); |
2143 | } | 2143 | } |
2144 | 2144 | ||
@@ -2153,7 +2153,7 @@ lq_update: | |||
2153 | tid_data = | 2153 | tid_data = |
2154 | &il->stations[lq_sta->lq.sta_id].tid[tid]; | 2154 | &il->stations[lq_sta->lq.sta_id].tid[tid]; |
2155 | if (tid_data->agg.state == IL_AGG_OFF) { | 2155 | if (tid_data->agg.state == IL_AGG_OFF) { |
2156 | IL_DEBUG_RATE(il, | 2156 | D_RATE( |
2157 | "try to aggregate tid %d\n", | 2157 | "try to aggregate tid %d\n", |
2158 | tid); | 2158 | tid); |
2159 | il4965_rs_tl_turn_on_agg(il, tid, | 2159 | il4965_rs_tl_turn_on_agg(il, tid, |
@@ -2251,7 +2251,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
2251 | struct il_lq_sta *lq_sta = il_sta; | 2251 | struct il_lq_sta *lq_sta = il_sta; |
2252 | int rate_idx; | 2252 | int rate_idx; |
2253 | 2253 | ||
2254 | IL_DEBUG_RATE(il, "rate scale calculate new rate for skb\n"); | 2254 | D_RATE("rate scale calculate new rate for skb\n"); |
2255 | 2255 | ||
2256 | /* Get max rate if user set max rate */ | 2256 | /* Get max rate if user set max rate */ |
2257 | if (lq_sta) { | 2257 | if (lq_sta) { |
@@ -2266,7 +2266,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
2266 | 2266 | ||
2267 | /* Treat uninitialized rate scaling data same as non-existing. */ | 2267 | /* Treat uninitialized rate scaling data same as non-existing. */ |
2268 | if (lq_sta && !lq_sta->drv) { | 2268 | if (lq_sta && !lq_sta->drv) { |
2269 | IL_DEBUG_RATE(il, "Rate scaling not initialized yet.\n"); | 2269 | D_RATE("Rate scaling not initialized yet.\n"); |
2270 | il_sta = NULL; | 2270 | il_sta = NULL; |
2271 | } | 2271 | } |
2272 | 2272 | ||
@@ -2323,7 +2323,7 @@ static void *il4965_rs_alloc_sta(void *il_rate, struct ieee80211_sta *sta, | |||
2323 | struct il_priv *il; | 2323 | struct il_priv *il; |
2324 | 2324 | ||
2325 | il = (struct il_priv *)il_rate; | 2325 | il = (struct il_priv *)il_rate; |
2326 | IL_DEBUG_RATE(il, "create station rate scale window\n"); | 2326 | D_RATE("create station rate scale window\n"); |
2327 | 2327 | ||
2328 | lq_sta = &sta_priv->lq_sta; | 2328 | lq_sta = &sta_priv->lq_sta; |
2329 | 2329 | ||
@@ -2365,7 +2365,7 @@ il4965_rs_rate_init(struct il_priv *il, | |||
2365 | il4965_rs_rate_scale_clear_window( | 2365 | il4965_rs_rate_scale_clear_window( |
2366 | &lq_sta->lq_info[j].win[i]); | 2366 | &lq_sta->lq_info[j].win[i]); |
2367 | 2367 | ||
2368 | IL_DEBUG_RATE(il, "LQ:" | 2368 | D_RATE("LQ:" |
2369 | "*** rate scale station global init for station %d ***\n", | 2369 | "*** rate scale station global init for station %d ***\n", |
2370 | sta_id); | 2370 | sta_id); |
2371 | /* TODO: what is a good starting rate for STA? About middle? Maybe not | 2371 | /* TODO: what is a good starting rate for STA? About middle? Maybe not |
@@ -2561,8 +2561,8 @@ static void il4965_rs_free_sta(void *il_r, struct ieee80211_sta *sta, | |||
2561 | { | 2561 | { |
2562 | struct il_priv *il __maybe_unused = il_r; | 2562 | struct il_priv *il __maybe_unused = il_r; |
2563 | 2563 | ||
2564 | IL_DEBUG_RATE(il, "enter\n"); | 2564 | D_RATE("enter\n"); |
2565 | IL_DEBUG_RATE(il, "leave\n"); | 2565 | D_RATE("leave\n"); |
2566 | } | 2566 | } |
2567 | 2567 | ||
2568 | 2568 | ||
@@ -2587,16 +2587,16 @@ static void il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, | |||
2587 | >> RATE_MCS_ANT_POS); | 2587 | >> RATE_MCS_ANT_POS); |
2588 | if ((valid_tx_ant & ant_sel_tx) == ant_sel_tx) { | 2588 | if ((valid_tx_ant & ant_sel_tx) == ant_sel_tx) { |
2589 | *rate_n_flags = lq_sta->dbg_fixed_rate; | 2589 | *rate_n_flags = lq_sta->dbg_fixed_rate; |
2590 | IL_DEBUG_RATE(il, "Fixed rate ON\n"); | 2590 | D_RATE("Fixed rate ON\n"); |
2591 | } else { | 2591 | } else { |
2592 | lq_sta->dbg_fixed_rate = 0; | 2592 | lq_sta->dbg_fixed_rate = 0; |
2593 | IL_ERR(il, | 2593 | IL_ERR(il, |
2594 | "Invalid antenna selection 0x%X, Valid is 0x%X\n", | 2594 | "Invalid antenna selection 0x%X, Valid is 0x%X\n", |
2595 | ant_sel_tx, valid_tx_ant); | 2595 | ant_sel_tx, valid_tx_ant); |
2596 | IL_DEBUG_RATE(il, "Fixed rate OFF\n"); | 2596 | D_RATE("Fixed rate OFF\n"); |
2597 | } | 2597 | } |
2598 | } else { | 2598 | } else { |
2599 | IL_DEBUG_RATE(il, "Fixed rate OFF\n"); | 2599 | D_RATE("Fixed rate OFF\n"); |
2600 | } | 2600 | } |
2601 | } | 2601 | } |
2602 | 2602 | ||
@@ -2627,7 +2627,7 @@ static ssize_t il4965_rs_sta_dbgfs_scale_table_write(struct file *file, | |||
2627 | lq_sta->active_siso_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | 2627 | lq_sta->active_siso_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ |
2628 | lq_sta->active_mimo2_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ | 2628 | lq_sta->active_mimo2_rate = 0x1FD0; /* 6 - 60 MBits, no 9, no CCK */ |
2629 | 2629 | ||
2630 | IL_DEBUG_RATE(il, "sta_id %d rate 0x%X\n", | 2630 | D_RATE("sta_id %d rate 0x%X\n", |
2631 | lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate); | 2631 | lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate); |
2632 | 2632 | ||
2633 | if (lq_sta->dbg_fixed_rate) { | 2633 | if (lq_sta->dbg_fixed_rate) { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rx.c b/drivers/net/wireless/iwlegacy/iwl-4965-rx.c index c987c80a37c..45e8a24c938 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rx.c | |||
@@ -51,7 +51,7 @@ void il4965_rx_missed_beacon_notif(struct il_priv *il, | |||
51 | missed_beacon = &pkt->u.missed_beacon; | 51 | missed_beacon = &pkt->u.missed_beacon; |
52 | if (le32_to_cpu(missed_beacon->consecutive_missed_beacons) > | 52 | if (le32_to_cpu(missed_beacon->consecutive_missed_beacons) > |
53 | il->missed_beacon_threshold) { | 53 | il->missed_beacon_threshold) { |
54 | IL_DEBUG_CALIB(il, | 54 | D_CALIB( |
55 | "missed bcn cnsq %d totl %d rcd %d expctd %d\n", | 55 | "missed bcn cnsq %d totl %d rcd %d expctd %d\n", |
56 | le32_to_cpu(missed_beacon->consecutive_missed_beacons), | 56 | le32_to_cpu(missed_beacon->consecutive_missed_beacons), |
57 | le32_to_cpu(missed_beacon->total_missed_becons), | 57 | le32_to_cpu(missed_beacon->total_missed_becons), |
@@ -100,7 +100,7 @@ static void il4965_rx_calc_noise(struct il_priv *il) | |||
100 | else | 100 | else |
101 | last_rx_noise = IL_NOISE_MEAS_NOT_AVAILABLE; | 101 | last_rx_noise = IL_NOISE_MEAS_NOT_AVAILABLE; |
102 | 102 | ||
103 | IL_DEBUG_CALIB(il, "inband silence a %u, b %u, c %u, dBm %d\n", | 103 | D_CALIB("inband silence a %u, b %u, c %u, dBm %d\n", |
104 | bcn_silence_a, bcn_silence_b, bcn_silence_c, | 104 | bcn_silence_a, bcn_silence_b, bcn_silence_c, |
105 | last_rx_noise); | 105 | last_rx_noise); |
106 | } | 106 | } |
@@ -157,7 +157,7 @@ void il4965_rx_statistics(struct il_priv *il, | |||
157 | int change; | 157 | int change; |
158 | struct il_rx_packet *pkt = rxb_addr(rxb); | 158 | struct il_rx_packet *pkt = rxb_addr(rxb); |
159 | 159 | ||
160 | IL_DEBUG_RX(il, | 160 | D_RX( |
161 | "Statistics notification received (%d vs %d).\n", | 161 | "Statistics notification received (%d vs %d).\n", |
162 | (int)sizeof(struct il_notif_statistics), | 162 | (int)sizeof(struct il_notif_statistics), |
163 | le32_to_cpu(pkt->len_n_flags) & | 163 | le32_to_cpu(pkt->len_n_flags) & |
@@ -209,7 +209,7 @@ void il4965_reply_statistics(struct il_priv *il, | |||
209 | memset(&il->_4965.max_delta, 0, | 209 | memset(&il->_4965.max_delta, 0, |
210 | sizeof(struct il_notif_statistics)); | 210 | sizeof(struct il_notif_statistics)); |
211 | #endif | 211 | #endif |
212 | IL_DEBUG_RX(il, "Statistics have been cleared\n"); | 212 | D_RX("Statistics have been cleared\n"); |
213 | } | 213 | } |
214 | il4965_rx_statistics(il, rxb); | 214 | il4965_rx_statistics(il, rxb); |
215 | } | 215 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-sta.c b/drivers/net/wireless/iwlegacy/iwl-4965-sta.c index 0fbc991fe66..3019bafc235 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-sta.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-sta.c | |||
@@ -199,18 +199,18 @@ int il4965_remove_default_wep_key(struct il_priv *il, | |||
199 | 199 | ||
200 | lockdep_assert_held(&il->mutex); | 200 | lockdep_assert_held(&il->mutex); |
201 | 201 | ||
202 | IL_DEBUG_WEP(il, "Removing default WEP key: idx=%d\n", | 202 | D_WEP("Removing default WEP key: idx=%d\n", |
203 | keyconf->keyidx); | 203 | keyconf->keyidx); |
204 | 204 | ||
205 | memset(&ctx->wep_keys[keyconf->keyidx], 0, sizeof(ctx->wep_keys[0])); | 205 | memset(&ctx->wep_keys[keyconf->keyidx], 0, sizeof(ctx->wep_keys[0])); |
206 | if (il_is_rfkill(il)) { | 206 | if (il_is_rfkill(il)) { |
207 | IL_DEBUG_WEP(il, | 207 | D_WEP( |
208 | "Not sending REPLY_WEPKEY command due to RFKILL.\n"); | 208 | "Not sending REPLY_WEPKEY command due to RFKILL.\n"); |
209 | /* but keys in device are clear anyway so return success */ | 209 | /* but keys in device are clear anyway so return success */ |
210 | return 0; | 210 | return 0; |
211 | } | 211 | } |
212 | ret = il4965_static_wepkey_cmd(il, ctx, 1); | 212 | ret = il4965_static_wepkey_cmd(il, ctx, 1); |
213 | IL_DEBUG_WEP(il, "Remove default WEP key: idx=%d ret=%d\n", | 213 | D_WEP("Remove default WEP key: idx=%d ret=%d\n", |
214 | keyconf->keyidx, ret); | 214 | keyconf->keyidx, ret); |
215 | 215 | ||
216 | return ret; | 216 | return ret; |
@@ -226,7 +226,7 @@ int il4965_set_default_wep_key(struct il_priv *il, | |||
226 | 226 | ||
227 | if (keyconf->keylen != WEP_KEY_LEN_128 && | 227 | if (keyconf->keylen != WEP_KEY_LEN_128 && |
228 | keyconf->keylen != WEP_KEY_LEN_64) { | 228 | keyconf->keylen != WEP_KEY_LEN_64) { |
229 | IL_DEBUG_WEP(il, "Bad WEP key length %d\n", keyconf->keylen); | 229 | D_WEP("Bad WEP key length %d\n", keyconf->keylen); |
230 | return -EINVAL; | 230 | return -EINVAL; |
231 | } | 231 | } |
232 | 232 | ||
@@ -239,7 +239,7 @@ int il4965_set_default_wep_key(struct il_priv *il, | |||
239 | keyconf->keylen); | 239 | keyconf->keylen); |
240 | 240 | ||
241 | ret = il4965_static_wepkey_cmd(il, ctx, false); | 241 | ret = il4965_static_wepkey_cmd(il, ctx, false); |
242 | IL_DEBUG_WEP(il, "Set default WEP key: len=%d idx=%d ret=%d\n", | 242 | D_WEP("Set default WEP key: len=%d idx=%d ret=%d\n", |
243 | keyconf->keylen, keyconf->keyidx, ret); | 243 | keyconf->keylen, keyconf->keyidx, ret); |
244 | 244 | ||
245 | return ret; | 245 | return ret; |
@@ -453,7 +453,7 @@ int il4965_remove_dynamic_key(struct il_priv *il, | |||
453 | key_flags = le16_to_cpu(il->stations[sta_id].sta.key.key_flags); | 453 | key_flags = le16_to_cpu(il->stations[sta_id].sta.key.key_flags); |
454 | keyidx = (key_flags >> STA_KEY_FLG_KEYID_POS) & 0x3; | 454 | keyidx = (key_flags >> STA_KEY_FLG_KEYID_POS) & 0x3; |
455 | 455 | ||
456 | IL_DEBUG_WEP(il, "Remove dynamic key: idx=%d sta=%d\n", | 456 | D_WEP("Remove dynamic key: idx=%d sta=%d\n", |
457 | keyconf->keyidx, sta_id); | 457 | keyconf->keyidx, sta_id); |
458 | 458 | ||
459 | if (keyconf->keyidx != keyidx) { | 459 | if (keyconf->keyidx != keyidx) { |
@@ -488,7 +488,7 @@ int il4965_remove_dynamic_key(struct il_priv *il, | |||
488 | il->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | 488 | il->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; |
489 | 489 | ||
490 | if (il_is_rfkill(il)) { | 490 | if (il_is_rfkill(il)) { |
491 | IL_DEBUG_WEP(il, | 491 | D_WEP( |
492 | "Not sending REPLY_ADD_STA command because RFKILL enabled.\n"); | 492 | "Not sending REPLY_ADD_STA command because RFKILL enabled.\n"); |
493 | spin_unlock_irqrestore(&il->sta_lock, flags); | 493 | spin_unlock_irqrestore(&il->sta_lock, flags); |
494 | return 0; | 494 | return 0; |
@@ -531,7 +531,7 @@ int il4965_set_dynamic_key(struct il_priv *il, struct il_rxon_context *ctx, | |||
531 | ret = -EINVAL; | 531 | ret = -EINVAL; |
532 | } | 532 | } |
533 | 533 | ||
534 | IL_DEBUG_WEP(il, | 534 | D_WEP( |
535 | "Set dynamic key: cipher=%x len=%d idx=%d sta=%d ret=%d\n", | 535 | "Set dynamic key: cipher=%x len=%d idx=%d sta=%d ret=%d\n", |
536 | keyconf->cipher, keyconf->keylen, keyconf->keyidx, | 536 | keyconf->cipher, keyconf->keylen, keyconf->keyidx, |
537 | sta_id, ret); | 537 | sta_id, ret); |
@@ -605,7 +605,7 @@ static int il4965_update_bcast_station(struct il_priv *il, | |||
605 | if (il->stations[sta_id].lq) | 605 | if (il->stations[sta_id].lq) |
606 | kfree(il->stations[sta_id].lq); | 606 | kfree(il->stations[sta_id].lq); |
607 | else | 607 | else |
608 | IL_DEBUG_INFO(il, | 608 | D_INFO( |
609 | "Bcast station rate scaling has not been initialized yet.\n"); | 609 | "Bcast station rate scaling has not been initialized yet.\n"); |
610 | il->stations[sta_id].lq = link_cmd; | 610 | il->stations[sta_id].lq = link_cmd; |
611 | spin_unlock_irqrestore(&il->sta_lock, flags); | 611 | spin_unlock_irqrestore(&il->sta_lock, flags); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c index fcc938e1cf6..efc21be8a94 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-tx.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-tx.c | |||
@@ -235,13 +235,13 @@ static void il4965_tx_cmd_build_hwcrypto(struct il_priv *il, | |||
235 | memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); | 235 | memcpy(tx_cmd->key, keyconf->key, keyconf->keylen); |
236 | if (info->flags & IEEE80211_TX_CTL_AMPDU) | 236 | if (info->flags & IEEE80211_TX_CTL_AMPDU) |
237 | tx_cmd->tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK; | 237 | tx_cmd->tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK; |
238 | IL_DEBUG_TX(il, "tx_cmd with AES hwcrypto\n"); | 238 | D_TX("tx_cmd with AES hwcrypto\n"); |
239 | break; | 239 | break; |
240 | 240 | ||
241 | case WLAN_CIPHER_SUITE_TKIP: | 241 | case WLAN_CIPHER_SUITE_TKIP: |
242 | tx_cmd->sec_ctl = TX_CMD_SEC_TKIP; | 242 | tx_cmd->sec_ctl = TX_CMD_SEC_TKIP; |
243 | ieee80211_get_tkip_p2k(keyconf, skb_frag, tx_cmd->key); | 243 | ieee80211_get_tkip_p2k(keyconf, skb_frag, tx_cmd->key); |
244 | IL_DEBUG_TX(il, "tx_cmd with tkip hwcrypto\n"); | 244 | D_TX("tx_cmd with tkip hwcrypto\n"); |
245 | break; | 245 | break; |
246 | 246 | ||
247 | case WLAN_CIPHER_SUITE_WEP104: | 247 | case WLAN_CIPHER_SUITE_WEP104: |
@@ -253,7 +253,7 @@ static void il4965_tx_cmd_build_hwcrypto(struct il_priv *il, | |||
253 | 253 | ||
254 | memcpy(&tx_cmd->key[3], keyconf->key, keyconf->keylen); | 254 | memcpy(&tx_cmd->key[3], keyconf->key, keyconf->keylen); |
255 | 255 | ||
256 | IL_DEBUG_TX(il, "Configuring packet for WEP encryption " | 256 | D_TX("Configuring packet for WEP encryption " |
257 | "with key %d\n", keyconf->keyidx); | 257 | "with key %d\n", keyconf->keyidx); |
258 | break; | 258 | break; |
259 | 259 | ||
@@ -298,7 +298,7 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
298 | 298 | ||
299 | spin_lock_irqsave(&il->lock, flags); | 299 | spin_lock_irqsave(&il->lock, flags); |
300 | if (il_is_rfkill(il)) { | 300 | if (il_is_rfkill(il)) { |
301 | IL_DEBUG_DROP(il, "Dropping - RF KILL\n"); | 301 | D_DROP("Dropping - RF KILL\n"); |
302 | goto drop_unlock; | 302 | goto drop_unlock; |
303 | } | 303 | } |
304 | 304 | ||
@@ -306,11 +306,11 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
306 | 306 | ||
307 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 307 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
308 | if (ieee80211_is_auth(fc)) | 308 | if (ieee80211_is_auth(fc)) |
309 | IL_DEBUG_TX(il, "Sending AUTH frame\n"); | 309 | D_TX("Sending AUTH frame\n"); |
310 | else if (ieee80211_is_assoc_req(fc)) | 310 | else if (ieee80211_is_assoc_req(fc)) |
311 | IL_DEBUG_TX(il, "Sending ASSOC frame\n"); | 311 | D_TX("Sending ASSOC frame\n"); |
312 | else if (ieee80211_is_reassoc_req(fc)) | 312 | else if (ieee80211_is_reassoc_req(fc)) |
313 | IL_DEBUG_TX(il, "Sending REASSOC frame\n"); | 313 | D_TX("Sending REASSOC frame\n"); |
314 | #endif | 314 | #endif |
315 | 315 | ||
316 | hdr_len = ieee80211_hdrlen(fc); | 316 | hdr_len = ieee80211_hdrlen(fc); |
@@ -323,13 +323,13 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
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) { |
326 | IL_DEBUG_DROP(il, "Dropping - INVALID STATION: %pM\n", | 326 | D_DROP("Dropping - INVALID STATION: %pM\n", |
327 | hdr->addr1); | 327 | hdr->addr1); |
328 | goto drop_unlock; | 328 | goto drop_unlock; |
329 | } | 329 | } |
330 | } | 330 | } |
331 | 331 | ||
332 | IL_DEBUG_TX(il, "station Id %d\n", sta_id); | 332 | D_TX("station Id %d\n", sta_id); |
333 | 333 | ||
334 | if (sta) | 334 | if (sta) |
335 | sta_priv = (void *)sta->drv_priv; | 335 | sta_priv = (void *)sta->drv_priv; |
@@ -499,9 +499,9 @@ int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
499 | tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); | 499 | tx_cmd->dram_lsb_ptr = cpu_to_le32(scratch_phys); |
500 | tx_cmd->dram_msb_ptr = il_get_dma_hi_addr(scratch_phys); | 500 | tx_cmd->dram_msb_ptr = il_get_dma_hi_addr(scratch_phys); |
501 | 501 | ||
502 | IL_DEBUG_TX(il, "sequence nr = 0X%x\n", | 502 | D_TX("sequence nr = 0X%x\n", |
503 | le16_to_cpu(out_cmd->hdr.sequence)); | 503 | le16_to_cpu(out_cmd->hdr.sequence)); |
504 | IL_DEBUG_TX(il, "tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); | 504 | D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); |
505 | il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd, sizeof(*tx_cmd)); | 505 | il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd, sizeof(*tx_cmd)); |
506 | il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); | 506 | il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd->hdr, hdr_len); |
507 | 507 | ||
@@ -909,11 +909,11 @@ int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif, | |||
909 | spin_lock_irqsave(&il->sta_lock, flags); | 909 | spin_lock_irqsave(&il->sta_lock, flags); |
910 | tid_data = &il->stations[sta_id].tid[tid]; | 910 | tid_data = &il->stations[sta_id].tid[tid]; |
911 | if (tid_data->tfds_in_queue == 0) { | 911 | if (tid_data->tfds_in_queue == 0) { |
912 | IL_DEBUG_HT(il, "HW queue is empty\n"); | 912 | D_HT("HW queue is empty\n"); |
913 | tid_data->agg.state = IL_AGG_ON; | 913 | tid_data->agg.state = IL_AGG_ON; |
914 | ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); | 914 | ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
915 | } else { | 915 | } else { |
916 | IL_DEBUG_HT(il, | 916 | D_HT( |
917 | "HW queue is NOT empty: %d packets in HW queue\n", | 917 | "HW queue is NOT empty: %d packets in HW queue\n", |
918 | tid_data->tfds_in_queue); | 918 | tid_data->tfds_in_queue); |
919 | tid_data->agg.state = IL_EMPTYING_HW_QUEUE_ADDBA; | 919 | tid_data->agg.state = IL_EMPTYING_HW_QUEUE_ADDBA; |
@@ -991,7 +991,7 @@ int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif, | |||
991 | * queue we selected previously, i.e. before the | 991 | * queue we selected previously, i.e. before the |
992 | * session was really started completely. | 992 | * session was really started completely. |
993 | */ | 993 | */ |
994 | IL_DEBUG_HT(il, "AGG stop before setup done\n"); | 994 | D_HT("AGG stop before setup done\n"); |
995 | goto turn_off; | 995 | goto turn_off; |
996 | case IL_AGG_ON: | 996 | case IL_AGG_ON: |
997 | break; | 997 | break; |
@@ -1004,14 +1004,14 @@ int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif, | |||
1004 | 1004 | ||
1005 | /* The queue is not empty */ | 1005 | /* The queue is not empty */ |
1006 | if (write_ptr != read_ptr) { | 1006 | if (write_ptr != read_ptr) { |
1007 | IL_DEBUG_HT(il, "Stopping a non empty AGG HW QUEUE\n"); | 1007 | D_HT("Stopping a non empty AGG HW QUEUE\n"); |
1008 | il->stations[sta_id].tid[tid].agg.state = | 1008 | il->stations[sta_id].tid[tid].agg.state = |
1009 | IL_EMPTYING_HW_QUEUE_DELBA; | 1009 | IL_EMPTYING_HW_QUEUE_DELBA; |
1010 | spin_unlock_irqrestore(&il->sta_lock, flags); | 1010 | spin_unlock_irqrestore(&il->sta_lock, flags); |
1011 | return 0; | 1011 | return 0; |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | IL_DEBUG_HT(il, "HW queue is empty\n"); | 1014 | D_HT("HW queue is empty\n"); |
1015 | turn_off: | 1015 | turn_off: |
1016 | il->stations[sta_id].tid[tid].agg.state = IL_AGG_OFF; | 1016 | il->stations[sta_id].tid[tid].agg.state = IL_AGG_OFF; |
1017 | 1017 | ||
@@ -1054,7 +1054,7 @@ int il4965_txq_check_empty(struct il_priv *il, | |||
1054 | (q->read_ptr == q->write_ptr)) { | 1054 | (q->read_ptr == q->write_ptr)) { |
1055 | u16 ssn = SEQ_TO_SN(tid_data->seq_number); | 1055 | u16 ssn = SEQ_TO_SN(tid_data->seq_number); |
1056 | int tx_fifo = il4965_get_fifo_from_tid(ctx, tid); | 1056 | int tx_fifo = il4965_get_fifo_from_tid(ctx, tid); |
1057 | IL_DEBUG_HT(il, | 1057 | D_HT( |
1058 | "HW queue empty: continue DELBA flow\n"); | 1058 | "HW queue empty: continue DELBA flow\n"); |
1059 | il4965_txq_agg_disable(il, txq_id, ssn, tx_fifo); | 1059 | il4965_txq_agg_disable(il, txq_id, ssn, tx_fifo); |
1060 | tid_data->agg.state = IL_AGG_OFF; | 1060 | tid_data->agg.state = IL_AGG_OFF; |
@@ -1064,7 +1064,7 @@ int il4965_txq_check_empty(struct il_priv *il, | |||
1064 | case IL_EMPTYING_HW_QUEUE_ADDBA: | 1064 | case IL_EMPTYING_HW_QUEUE_ADDBA: |
1065 | /* We are reclaiming the last packet of the queue */ | 1065 | /* We are reclaiming the last packet of the queue */ |
1066 | if (tid_data->tfds_in_queue == 0) { | 1066 | if (tid_data->tfds_in_queue == 0) { |
1067 | IL_DEBUG_HT(il, | 1067 | D_HT( |
1068 | "HW queue empty: continue ADDBA flow\n"); | 1068 | "HW queue empty: continue ADDBA flow\n"); |
1069 | tid_data->agg.state = IL_AGG_ON; | 1069 | tid_data->agg.state = IL_AGG_ON; |
1070 | ieee80211_start_tx_ba_cb_irqsafe(ctx->vif, addr, tid); | 1070 | ieee80211_start_tx_ba_cb_irqsafe(ctx->vif, addr, tid); |
@@ -1169,7 +1169,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il, | |||
1169 | 1169 | ||
1170 | /* Mark that the expected block-ack response arrived */ | 1170 | /* Mark that the expected block-ack response arrived */ |
1171 | agg->wait_for_ba = 0; | 1171 | agg->wait_for_ba = 0; |
1172 | IL_DEBUG_TX_REPLY(il, "BA %d %d\n", agg->start_idx, | 1172 | D_TX_REPLY("BA %d %d\n", agg->start_idx, |
1173 | ba_resp->seq_ctl); | 1173 | ba_resp->seq_ctl); |
1174 | 1174 | ||
1175 | /* Calculate shift to align block-ack bits with our Tx window bits */ | 1175 | /* Calculate shift to align block-ack bits with our Tx window bits */ |
@@ -1178,7 +1178,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il, | |||
1178 | sh += 0x100; | 1178 | sh += 0x100; |
1179 | 1179 | ||
1180 | if (agg->frame_count > (64 - sh)) { | 1180 | if (agg->frame_count > (64 - sh)) { |
1181 | IL_DEBUG_TX_REPLY(il, "more frames than bitmap size"); | 1181 | D_TX_REPLY("more frames than bitmap size"); |
1182 | return -1; | 1182 | return -1; |
1183 | } | 1183 | } |
1184 | 1184 | ||
@@ -1195,7 +1195,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il, | |||
1195 | while (sent_bitmap) { | 1195 | while (sent_bitmap) { |
1196 | ack = sent_bitmap & 1ULL; | 1196 | ack = sent_bitmap & 1ULL; |
1197 | successes += ack; | 1197 | successes += ack; |
1198 | IL_DEBUG_TX_REPLY(il, "%s ON i=%d idx=%d raw=%d\n", | 1198 | D_TX_REPLY("%s ON i=%d idx=%d raw=%d\n", |
1199 | ack ? "ACK" : "NACK", i, | 1199 | ack ? "ACK" : "NACK", i, |
1200 | (agg->start_idx + i) & 0xff, | 1200 | (agg->start_idx + i) & 0xff, |
1201 | agg->start_idx + i); | 1201 | agg->start_idx + i); |
@@ -1203,7 +1203,7 @@ static int il4965_tx_status_reply_compressed_ba(struct il_priv *il, | |||
1203 | ++i; | 1203 | ++i; |
1204 | } | 1204 | } |
1205 | 1205 | ||
1206 | IL_DEBUG_TX_REPLY(il, "Bitmap %llx\n", | 1206 | D_TX_REPLY("Bitmap %llx\n", |
1207 | (unsigned long long)bitmap); | 1207 | (unsigned long long)bitmap); |
1208 | 1208 | ||
1209 | info = IEEE80211_SKB_CB(il->txq[scd_flow].txb[agg->start_idx].skb); | 1209 | info = IEEE80211_SKB_CB(il->txq[scd_flow].txb[agg->start_idx].skb); |
@@ -1282,7 +1282,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1282 | * since it is possible happen very often and in order | 1282 | * since it is possible happen very often and in order |
1283 | * not to fill the syslog, don't enable the logging by default | 1283 | * not to fill the syslog, don't enable the logging by default |
1284 | */ | 1284 | */ |
1285 | IL_DEBUG_TX_REPLY(il, | 1285 | D_TX_REPLY( |
1286 | "BA scd_flow %d does not match txq_id %d\n", | 1286 | "BA scd_flow %d does not match txq_id %d\n", |
1287 | scd_flow, agg->txq_id); | 1287 | scd_flow, agg->txq_id); |
1288 | return; | 1288 | return; |
@@ -1293,12 +1293,12 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1293 | 1293 | ||
1294 | spin_lock_irqsave(&il->sta_lock, flags); | 1294 | spin_lock_irqsave(&il->sta_lock, flags); |
1295 | 1295 | ||
1296 | IL_DEBUG_TX_REPLY(il, "REPLY_COMPRESSED_BA [%d] Received from %pM, " | 1296 | D_TX_REPLY("REPLY_COMPRESSED_BA [%d] Received from %pM, " |
1297 | "sta_id = %d\n", | 1297 | "sta_id = %d\n", |
1298 | agg->wait_for_ba, | 1298 | agg->wait_for_ba, |
1299 | (u8 *) &ba_resp->sta_addr_lo32, | 1299 | (u8 *) &ba_resp->sta_addr_lo32, |
1300 | ba_resp->sta_id); | 1300 | ba_resp->sta_id); |
1301 | IL_DEBUG_TX_REPLY(il, "TID = %d, SeqCtl = %d, bitmap = 0x%llx," | 1301 | D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx," |
1302 | "scd_flow = " | 1302 | "scd_flow = " |
1303 | "%d, scd_ssn = %d\n", | 1303 | "%d, scd_ssn = %d\n", |
1304 | ba_resp->tid, | 1304 | ba_resp->tid, |
@@ -1306,7 +1306,7 @@ void il4965_rx_reply_compressed_ba(struct il_priv *il, | |||
1306 | (unsigned long long)le64_to_cpu(ba_resp->bitmap), | 1306 | (unsigned long long)le64_to_cpu(ba_resp->bitmap), |
1307 | ba_resp->scd_flow, | 1307 | ba_resp->scd_flow, |
1308 | ba_resp->scd_ssn); | 1308 | ba_resp->scd_ssn); |
1309 | IL_DEBUG_TX_REPLY(il, "DAT start_idx = %d, bitmap = 0x%llx\n", | 1309 | D_TX_REPLY("DAT start_idx = %d, bitmap = 0x%llx\n", |
1310 | agg->start_idx, | 1310 | agg->start_idx, |
1311 | (unsigned long long)agg->bitmap); | 1311 | (unsigned long long)agg->bitmap); |
1312 | 1312 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c b/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c index d4dc597452e..d1e1775aa01 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-ucode.c | |||
@@ -55,7 +55,7 @@ il4965_verify_inst_sparse(struct il_priv *il, __le32 *image, u32 len) | |||
55 | u32 errcnt = 0; | 55 | u32 errcnt = 0; |
56 | u32 i; | 56 | u32 i; |
57 | 57 | ||
58 | IL_DEBUG_INFO(il, "ucode inst image size is %u\n", len); | 58 | D_INFO("ucode inst image size is %u\n", len); |
59 | 59 | ||
60 | for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) { | 60 | for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) { |
61 | /* read data comes through single port, auto-incr addr */ | 61 | /* read data comes through single port, auto-incr addr */ |
@@ -87,7 +87,7 @@ static int il4965_verify_inst_full(struct il_priv *il, __le32 *image, | |||
87 | int ret = 0; | 87 | int ret = 0; |
88 | u32 errcnt; | 88 | u32 errcnt; |
89 | 89 | ||
90 | IL_DEBUG_INFO(il, "ucode inst image size is %u\n", len); | 90 | D_INFO("ucode inst image size is %u\n", len); |
91 | 91 | ||
92 | il_write_direct32(il, HBUS_TARG_MEM_RADDR, | 92 | il_write_direct32(il, HBUS_TARG_MEM_RADDR, |
93 | IWL4965_RTC_INST_LOWER_BOUND); | 93 | IWL4965_RTC_INST_LOWER_BOUND); |
@@ -110,7 +110,7 @@ static int il4965_verify_inst_full(struct il_priv *il, __le32 *image, | |||
110 | } | 110 | } |
111 | 111 | ||
112 | if (!errcnt) | 112 | if (!errcnt) |
113 | IL_DEBUG_INFO(il, | 113 | D_INFO( |
114 | "ucode image in INSTRUCTION memory is good\n"); | 114 | "ucode image in INSTRUCTION memory is good\n"); |
115 | 115 | ||
116 | return ret; | 116 | return ret; |
@@ -131,7 +131,7 @@ int il4965_verify_ucode(struct il_priv *il) | |||
131 | len = il->ucode_boot.len; | 131 | len = il->ucode_boot.len; |
132 | ret = il4965_verify_inst_sparse(il, image, len); | 132 | ret = il4965_verify_inst_sparse(il, image, len); |
133 | if (!ret) { | 133 | if (!ret) { |
134 | IL_DEBUG_INFO(il, "Bootstrap uCode is good in inst SRAM\n"); | 134 | D_INFO("Bootstrap uCode is good in inst SRAM\n"); |
135 | return 0; | 135 | return 0; |
136 | } | 136 | } |
137 | 137 | ||
@@ -140,7 +140,7 @@ int il4965_verify_ucode(struct il_priv *il) | |||
140 | len = il->ucode_init.len; | 140 | len = il->ucode_init.len; |
141 | ret = il4965_verify_inst_sparse(il, image, len); | 141 | ret = il4965_verify_inst_sparse(il, image, len); |
142 | if (!ret) { | 142 | if (!ret) { |
143 | IL_DEBUG_INFO(il, "Initialize uCode is good in inst SRAM\n"); | 143 | D_INFO("Initialize uCode is good in inst SRAM\n"); |
144 | return 0; | 144 | return 0; |
145 | } | 145 | } |
146 | 146 | ||
@@ -149,7 +149,7 @@ int il4965_verify_ucode(struct il_priv *il) | |||
149 | len = il->ucode_code.len; | 149 | len = il->ucode_code.len; |
150 | ret = il4965_verify_inst_sparse(il, image, len); | 150 | ret = il4965_verify_inst_sparse(il, image, len); |
151 | if (!ret) { | 151 | if (!ret) { |
152 | IL_DEBUG_INFO(il, "Runtime uCode is good in inst SRAM\n"); | 152 | D_INFO("Runtime uCode is good in inst SRAM\n"); |
153 | return 0; | 153 | return 0; |
154 | } | 154 | } |
155 | 155 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965.c b/drivers/net/wireless/iwlegacy/iwl-4965.c index 01fa6c8d030..cc28e0e084e 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965.c | |||
@@ -69,7 +69,7 @@ static int il4965_verify_bsm(struct il_priv *il) | |||
69 | u32 reg; | 69 | u32 reg; |
70 | u32 val; | 70 | u32 val; |
71 | 71 | ||
72 | IL_DEBUG_INFO(il, "Begin verify bsm\n"); | 72 | D_INFO("Begin verify bsm\n"); |
73 | 73 | ||
74 | /* verify BSM SRAM contents */ | 74 | /* verify BSM SRAM contents */ |
75 | val = il_read_prph(il, BSM_WR_DWCOUNT_REG); | 75 | val = il_read_prph(il, BSM_WR_DWCOUNT_REG); |
@@ -87,7 +87,7 @@ static int il4965_verify_bsm(struct il_priv *il) | |||
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | IL_DEBUG_INFO(il, "BSM bootstrap uCode image OK\n"); | 90 | D_INFO("BSM bootstrap uCode image OK\n"); |
91 | 91 | ||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
@@ -137,7 +137,7 @@ static int il4965_load_bsm(struct il_priv *il) | |||
137 | u32 reg_offset; | 137 | u32 reg_offset; |
138 | int ret; | 138 | int ret; |
139 | 139 | ||
140 | IL_DEBUG_INFO(il, "Begin load bsm\n"); | 140 | D_INFO("Begin load bsm\n"); |
141 | 141 | ||
142 | il->ucode_type = UCODE_RT; | 142 | il->ucode_type = UCODE_RT; |
143 | 143 | ||
@@ -189,7 +189,7 @@ static int il4965_load_bsm(struct il_priv *il) | |||
189 | udelay(10); | 189 | udelay(10); |
190 | } | 190 | } |
191 | if (i < 100) | 191 | if (i < 100) |
192 | IL_DEBUG_INFO(il, "BSM write complete, poll %d iterations\n", i); | 192 | D_INFO("BSM write complete, poll %d iterations\n", i); |
193 | else { | 193 | else { |
194 | IL_ERR(il, "BSM write did not complete!\n"); | 194 | IL_ERR(il, "BSM write did not complete!\n"); |
195 | return -EIO; | 195 | return -EIO; |
@@ -233,7 +233,7 @@ static int il4965_set_ucode_ptrs(struct il_priv *il) | |||
233 | * that all new ptr/size info is in place */ | 233 | * that all new ptr/size info is in place */ |
234 | il_write_prph(il, BSM_DRAM_INST_BYTECOUNT_REG, | 234 | il_write_prph(il, BSM_DRAM_INST_BYTECOUNT_REG, |
235 | il->ucode_code.len | BSM_DRAM_INST_LOAD); | 235 | il->ucode_code.len | BSM_DRAM_INST_LOAD); |
236 | IL_DEBUG_INFO(il, "Runtime uCode pointers are set.\n"); | 236 | D_INFO("Runtime uCode pointers are set.\n"); |
237 | 237 | ||
238 | return ret; | 238 | return ret; |
239 | } | 239 | } |
@@ -257,7 +257,7 @@ static void il4965_init_alive_start(struct il_priv *il) | |||
257 | if (il4965_verify_ucode(il)) { | 257 | if (il4965_verify_ucode(il)) { |
258 | /* Runtime instruction load was bad; | 258 | /* Runtime instruction load was bad; |
259 | * take it all the way back down so we can try again */ | 259 | * take it all the way back down so we can try again */ |
260 | IL_DEBUG_INFO(il, "Bad \"initialize\" uCode load.\n"); | 260 | D_INFO("Bad \"initialize\" uCode load.\n"); |
261 | goto restart; | 261 | goto restart; |
262 | } | 262 | } |
263 | 263 | ||
@@ -267,11 +267,11 @@ static void il4965_init_alive_start(struct il_priv *il) | |||
267 | /* Send pointers to protocol/runtime uCode image ... init code will | 267 | /* Send pointers to protocol/runtime uCode image ... init code will |
268 | * load and launch runtime uCode, which will send us another "Alive" | 268 | * load and launch runtime uCode, which will send us another "Alive" |
269 | * notification. */ | 269 | * notification. */ |
270 | IL_DEBUG_INFO(il, "Initialization Alive received.\n"); | 270 | D_INFO("Initialization Alive received.\n"); |
271 | if (il4965_set_ucode_ptrs(il)) { | 271 | if (il4965_set_ucode_ptrs(il)) { |
272 | /* Runtime instruction load won't happen; | 272 | /* Runtime instruction load won't happen; |
273 | * take it all the way back down so we can try again */ | 273 | * take it all the way back down so we can try again */ |
274 | IL_DEBUG_INFO(il, "Couldn't set up uCode pointers.\n"); | 274 | D_INFO("Couldn't set up uCode pointers.\n"); |
275 | goto restart; | 275 | goto restart; |
276 | } | 276 | } |
277 | return; | 277 | return; |
@@ -346,7 +346,7 @@ static void il4965_chain_noise_reset(struct il_priv *il) | |||
346 | IL_ERR(il, | 346 | IL_ERR(il, |
347 | "Could not send REPLY_PHY_CALIBRATION_CMD\n"); | 347 | "Could not send REPLY_PHY_CALIBRATION_CMD\n"); |
348 | data->state = IL_CHAIN_NOISE_ACCUMULATE; | 348 | data->state = IL_CHAIN_NOISE_ACCUMULATE; |
349 | IL_DEBUG_CALIB(il, "Run chain_noise_calibrate\n"); | 349 | D_CALIB("Run chain_noise_calibrate\n"); |
350 | } | 350 | } |
351 | } | 351 | } |
352 | 352 | ||
@@ -556,7 +556,7 @@ static int il4965_interpolate_chan(struct il_priv *il, u32 channel, | |||
556 | ch_i2 = il->calib_info->band_info[s].ch2.ch_num; | 556 | ch_i2 = il->calib_info->band_info[s].ch2.ch_num; |
557 | chan_info->ch_num = (u8) channel; | 557 | chan_info->ch_num = (u8) channel; |
558 | 558 | ||
559 | IL_DEBUG_TXPOWER(il, "channel %d subband %d factory cal ch %d & %d\n", | 559 | D_TXPOWER("channel %d subband %d factory cal ch %d & %d\n", |
560 | channel, s, ch_i1, ch_i2); | 560 | channel, s, ch_i1, ch_i2); |
561 | 561 | ||
562 | for (c = 0; c < EEPROM_TX_POWER_TX_CHAINS; c++) { | 562 | for (c = 0; c < EEPROM_TX_POWER_TX_CHAINS; c++) { |
@@ -586,16 +586,16 @@ static int il4965_interpolate_chan(struct il_priv *il, u32 channel, | |||
586 | m1->pa_det, ch_i2, | 586 | m1->pa_det, ch_i2, |
587 | m2->pa_det); | 587 | m2->pa_det); |
588 | 588 | ||
589 | IL_DEBUG_TXPOWER(il, | 589 | D_TXPOWER( |
590 | "chain %d meas %d AP1=%d AP2=%d AP=%d\n", c, m, | 590 | "chain %d meas %d AP1=%d AP2=%d AP=%d\n", c, m, |
591 | m1->actual_pow, m2->actual_pow, omeas->actual_pow); | 591 | m1->actual_pow, m2->actual_pow, omeas->actual_pow); |
592 | IL_DEBUG_TXPOWER(il, | 592 | D_TXPOWER( |
593 | "chain %d meas %d NI1=%d NI2=%d NI=%d\n", c, m, | 593 | "chain %d meas %d NI1=%d NI2=%d NI=%d\n", c, m, |
594 | m1->gain_idx, m2->gain_idx, omeas->gain_idx); | 594 | m1->gain_idx, m2->gain_idx, omeas->gain_idx); |
595 | IL_DEBUG_TXPOWER(il, | 595 | D_TXPOWER( |
596 | "chain %d meas %d PA1=%d PA2=%d PA=%d\n", c, m, | 596 | "chain %d meas %d PA1=%d PA2=%d PA=%d\n", c, m, |
597 | m1->pa_det, m2->pa_det, omeas->pa_det); | 597 | m1->pa_det, m2->pa_det, omeas->pa_det); |
598 | IL_DEBUG_TXPOWER(il, | 598 | D_TXPOWER( |
599 | "chain %d meas %d T1=%d T2=%d T=%d\n", c, m, | 599 | "chain %d meas %d T1=%d T2=%d T=%d\n", c, m, |
600 | m1->temperature, m2->temperature, | 600 | m1->temperature, m2->temperature, |
601 | omeas->temperature); | 601 | omeas->temperature); |
@@ -900,7 +900,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
900 | user_target_power = 2 * il->tx_power_user_lmt; | 900 | user_target_power = 2 * il->tx_power_user_lmt; |
901 | 901 | ||
902 | /* Get current (RXON) channel, band, width */ | 902 | /* Get current (RXON) channel, band, width */ |
903 | IL_DEBUG_TXPOWER(il, "chan %d band %d is_ht40 %d\n", channel, band, | 903 | D_TXPOWER("chan %d band %d is_ht40 %d\n", channel, band, |
904 | is_ht40); | 904 | is_ht40); |
905 | 905 | ||
906 | ch_info = il_get_channel_info(il, il->band, channel); | 906 | ch_info = il_get_channel_info(il, il->band, channel); |
@@ -917,7 +917,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
917 | return txatten_grp; | 917 | return txatten_grp; |
918 | } | 918 | } |
919 | 919 | ||
920 | IL_DEBUG_TXPOWER(il, "channel %d belongs to txatten group %d\n", | 920 | D_TXPOWER("channel %d belongs to txatten group %d\n", |
921 | channel, txatten_grp); | 921 | channel, txatten_grp); |
922 | 922 | ||
923 | if (is_ht40) { | 923 | if (is_ht40) { |
@@ -967,7 +967,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
967 | voltage_compensation = | 967 | voltage_compensation = |
968 | il4965_get_voltage_compensation(voltage, init_voltage); | 968 | il4965_get_voltage_compensation(voltage, init_voltage); |
969 | 969 | ||
970 | IL_DEBUG_TXPOWER(il, "curr volt %d eeprom volt %d volt comp %d\n", | 970 | D_TXPOWER("curr volt %d eeprom volt %d volt comp %d\n", |
971 | init_voltage, | 971 | init_voltage, |
972 | voltage, voltage_compensation); | 972 | voltage, voltage_compensation); |
973 | 973 | ||
@@ -998,13 +998,13 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
998 | factory_gain_index[c] = measurement->gain_idx; | 998 | factory_gain_index[c] = measurement->gain_idx; |
999 | factory_actual_pwr[c] = measurement->actual_pow; | 999 | factory_actual_pwr[c] = measurement->actual_pow; |
1000 | 1000 | ||
1001 | IL_DEBUG_TXPOWER(il, "chain = %d\n", c); | 1001 | D_TXPOWER("chain = %d\n", c); |
1002 | IL_DEBUG_TXPOWER(il, "fctry tmp %d, " | 1002 | D_TXPOWER("fctry tmp %d, " |
1003 | "curr tmp %d, comp %d steps\n", | 1003 | "curr tmp %d, comp %d steps\n", |
1004 | factory_temp, current_temp, | 1004 | factory_temp, current_temp, |
1005 | temperature_comp[c]); | 1005 | temperature_comp[c]); |
1006 | 1006 | ||
1007 | IL_DEBUG_TXPOWER(il, "fctry idx %d, fctry pwr %d\n", | 1007 | D_TXPOWER("fctry idx %d, fctry pwr %d\n", |
1008 | factory_gain_index[c], | 1008 | factory_gain_index[c], |
1009 | factory_actual_pwr[c]); | 1009 | factory_actual_pwr[c]); |
1010 | } | 1010 | } |
@@ -1037,7 +1037,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
1037 | if (target_power > power_limit) | 1037 | if (target_power > power_limit) |
1038 | target_power = power_limit; | 1038 | target_power = power_limit; |
1039 | 1039 | ||
1040 | IL_DEBUG_TXPOWER(il, "rate %d sat %d reg %d usr %d tgt %d\n", | 1040 | D_TXPOWER("rate %d sat %d reg %d usr %d tgt %d\n", |
1041 | i, saturation_power - back_off_table[i], | 1041 | i, saturation_power - back_off_table[i], |
1042 | current_regulatory, user_target_power, | 1042 | current_regulatory, user_target_power, |
1043 | target_power); | 1043 | target_power); |
@@ -1061,7 +1061,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
1061 | voltage_compensation + | 1061 | voltage_compensation + |
1062 | atten_value); | 1062 | atten_value); |
1063 | 1063 | ||
1064 | /* IL_DEBUG_TXPOWER(il, "calculated txpower index %d\n", | 1064 | /* D_TXPOWER("calculated txpower index %d\n", |
1065 | power_index); */ | 1065 | power_index); */ |
1066 | 1066 | ||
1067 | if (power_index < get_min_power_index(i, band)) | 1067 | if (power_index < get_min_power_index(i, band)) |
@@ -1094,7 +1094,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel, | |||
1094 | tx_power.s.dsp_predis_atten[c] = | 1094 | tx_power.s.dsp_predis_atten[c] = |
1095 | gain_table[band][power_index].dsp; | 1095 | gain_table[band][power_index].dsp; |
1096 | 1096 | ||
1097 | IL_DEBUG_TXPOWER(il, "chain %d mimo %d index %d " | 1097 | D_TXPOWER("chain %d mimo %d index %d " |
1098 | "gain 0x%02x dsp %d\n", | 1098 | "gain 0x%02x dsp %d\n", |
1099 | c, atten_value, power_index, | 1099 | c, atten_value, power_index, |
1100 | tx_power.s.radio_tx_gain[c], | 1100 | tx_power.s.radio_tx_gain[c], |
@@ -1167,7 +1167,7 @@ static int il4965_send_rxon_assoc(struct il_priv *il, | |||
1167 | rxon2->ofdm_ht_dual_stream_basic_rates) && | 1167 | rxon2->ofdm_ht_dual_stream_basic_rates) && |
1168 | (rxon1->rx_chain == rxon2->rx_chain) && | 1168 | (rxon1->rx_chain == rxon2->rx_chain) && |
1169 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { | 1169 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { |
1170 | IL_DEBUG_INFO(il, "Using current RXON_ASSOC. Not resending.\n"); | 1170 | D_INFO("Using current RXON_ASSOC. Not resending.\n"); |
1171 | return 0; | 1171 | return 0; |
1172 | } | 1172 | } |
1173 | 1173 | ||
@@ -1217,7 +1217,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1217 | */ | 1217 | */ |
1218 | if (test_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status) && | 1218 | if (test_bit(STATUS_CHANNEL_SWITCH_PENDING, &il->status) && |
1219 | (il->switch_channel != ctx->staging.channel)) { | 1219 | (il->switch_channel != ctx->staging.channel)) { |
1220 | IL_DEBUG_11H(il, "abort channel switch on %d\n", | 1220 | D_11H("abort channel switch on %d\n", |
1221 | le16_to_cpu(il->switch_channel)); | 1221 | le16_to_cpu(il->switch_channel)); |
1222 | il_chswitch_done(il, false); | 1222 | il_chswitch_done(il, false); |
1223 | } | 1223 | } |
@@ -1247,7 +1247,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1247 | * we must clear the associated from the active configuration | 1247 | * we must clear the associated from the active configuration |
1248 | * before we apply the new config */ | 1248 | * before we apply the new config */ |
1249 | if (il_is_associated_ctx(ctx) && new_assoc) { | 1249 | if (il_is_associated_ctx(ctx) && new_assoc) { |
1250 | IL_DEBUG_INFO(il, "Toggling associated bit on current RXON\n"); | 1250 | D_INFO("Toggling associated bit on current RXON\n"); |
1251 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 1251 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
1252 | 1252 | ||
1253 | ret = il_send_cmd_pdu(il, ctx->rxon_cmd, | 1253 | ret = il_send_cmd_pdu(il, ctx->rxon_cmd, |
@@ -1270,7 +1270,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1270 | } | 1270 | } |
1271 | } | 1271 | } |
1272 | 1272 | ||
1273 | IL_DEBUG_INFO(il, "Sending RXON\n" | 1273 | D_INFO("Sending RXON\n" |
1274 | "* with%s RXON_FILTER_ASSOC_MSK\n" | 1274 | "* with%s RXON_FILTER_ASSOC_MSK\n" |
1275 | "* channel = %d\n" | 1275 | "* channel = %d\n" |
1276 | "* bssid = %pM\n", | 1276 | "* bssid = %pM\n", |
@@ -1292,7 +1292,7 @@ static int il4965_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) | |||
1292 | IL_ERR(il, "Error setting new RXON (%d)\n", ret); | 1292 | IL_ERR(il, "Error setting new RXON (%d)\n", ret); |
1293 | return ret; | 1293 | return ret; |
1294 | } | 1294 | } |
1295 | IL_DEBUG_INFO(il, "Return from !new_assoc RXON.\n"); | 1295 | D_INFO("Return from !new_assoc RXON.\n"); |
1296 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); | 1296 | memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon)); |
1297 | il_clear_ucode_stations(il, ctx); | 1297 | il_clear_ucode_stations(il, ctx); |
1298 | il_restore_stations(il, ctx); | 1298 | il_restore_stations(il, ctx); |
@@ -1387,7 +1387,7 @@ static int il4965_hw_channel_switch(struct il_priv *il, | |||
1387 | ucode_switch_time, | 1387 | ucode_switch_time, |
1388 | beacon_interval); | 1388 | beacon_interval); |
1389 | } | 1389 | } |
1390 | IL_DEBUG_11H(il, "uCode time for the switch is 0x%x\n", | 1390 | D_11H("uCode time for the switch is 0x%x\n", |
1391 | cmd.switch_time); | 1391 | cmd.switch_time); |
1392 | ch_info = il_get_channel_info(il, il->band, ch); | 1392 | ch_info = il_get_channel_info(il, il->band, ch); |
1393 | if (ch_info) | 1393 | if (ch_info) |
@@ -1401,7 +1401,7 @@ static int il4965_hw_channel_switch(struct il_priv *il, | |||
1401 | rc = il4965_fill_txpower_tbl(il, band, ch, is_ht40, | 1401 | rc = il4965_fill_txpower_tbl(il, band, ch, is_ht40, |
1402 | ctrl_chan_high, &cmd.tx_power); | 1402 | ctrl_chan_high, &cmd.tx_power); |
1403 | if (rc) { | 1403 | if (rc) { |
1404 | IL_DEBUG_11H(il, "error:%d fill txpower_tbl\n", rc); | 1404 | D_11H("error:%d fill txpower_tbl\n", rc); |
1405 | return rc; | 1405 | return rc; |
1406 | } | 1406 | } |
1407 | 1407 | ||
@@ -1450,13 +1450,13 @@ static int il4965_hw_get_temperature(struct il_priv *il) | |||
1450 | if (test_bit(STATUS_TEMPERATURE, &il->status) && | 1450 | if (test_bit(STATUS_TEMPERATURE, &il->status) && |
1451 | (il->_4965.statistics.flag & | 1451 | (il->_4965.statistics.flag & |
1452 | STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { | 1452 | STATISTICS_REPLY_FLG_HT40_MODE_MSK)) { |
1453 | IL_DEBUG_TEMP(il, "Running HT40 temperature calibration\n"); | 1453 | D_TEMP("Running HT40 temperature calibration\n"); |
1454 | R1 = (s32)le32_to_cpu(il->card_alive_init.therm_r1[1]); | 1454 | R1 = (s32)le32_to_cpu(il->card_alive_init.therm_r1[1]); |
1455 | R2 = (s32)le32_to_cpu(il->card_alive_init.therm_r2[1]); | 1455 | R2 = (s32)le32_to_cpu(il->card_alive_init.therm_r2[1]); |
1456 | R3 = (s32)le32_to_cpu(il->card_alive_init.therm_r3[1]); | 1456 | R3 = (s32)le32_to_cpu(il->card_alive_init.therm_r3[1]); |
1457 | R4 = le32_to_cpu(il->card_alive_init.therm_r4[1]); | 1457 | R4 = le32_to_cpu(il->card_alive_init.therm_r4[1]); |
1458 | } else { | 1458 | } else { |
1459 | IL_DEBUG_TEMP(il, "Running temperature calibration\n"); | 1459 | D_TEMP("Running temperature calibration\n"); |
1460 | R1 = (s32)le32_to_cpu(il->card_alive_init.therm_r1[0]); | 1460 | R1 = (s32)le32_to_cpu(il->card_alive_init.therm_r1[0]); |
1461 | R2 = (s32)le32_to_cpu(il->card_alive_init.therm_r2[0]); | 1461 | R2 = (s32)le32_to_cpu(il->card_alive_init.therm_r2[0]); |
1462 | R3 = (s32)le32_to_cpu(il->card_alive_init.therm_r3[0]); | 1462 | R3 = (s32)le32_to_cpu(il->card_alive_init.therm_r3[0]); |
@@ -1476,7 +1476,7 @@ static int il4965_hw_get_temperature(struct il_priv *il) | |||
1476 | vt = sign_extend32(le32_to_cpu(il->_4965.statistics. | 1476 | vt = sign_extend32(le32_to_cpu(il->_4965.statistics. |
1477 | general.common.temperature), 23); | 1477 | general.common.temperature), 23); |
1478 | 1478 | ||
1479 | IL_DEBUG_TEMP(il, "Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); | 1479 | D_TEMP("Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt); |
1480 | 1480 | ||
1481 | if (R3 == R1) { | 1481 | if (R3 == R1) { |
1482 | IL_ERR(il, "Calibration conflict R1 == R3\n"); | 1482 | IL_ERR(il, "Calibration conflict R1 == R3\n"); |
@@ -1489,7 +1489,7 @@ static int il4965_hw_get_temperature(struct il_priv *il) | |||
1489 | temperature /= (R3 - R1); | 1489 | temperature /= (R3 - R1); |
1490 | temperature = (temperature * 97) / 100 + TEMPERATURE_CALIB_KELVIN_OFFSET; | 1490 | temperature = (temperature * 97) / 100 + TEMPERATURE_CALIB_KELVIN_OFFSET; |
1491 | 1491 | ||
1492 | IL_DEBUG_TEMP(il, "Calibrated temperature: %dK, %dC\n", | 1492 | D_TEMP("Calibrated temperature: %dK, %dC\n", |
1493 | temperature, KELVIN_TO_CELSIUS(temperature)); | 1493 | temperature, KELVIN_TO_CELSIUS(temperature)); |
1494 | 1494 | ||
1495 | return temperature; | 1495 | return temperature; |
@@ -1512,7 +1512,7 @@ static int il4965_is_temp_calib_needed(struct il_priv *il) | |||
1512 | int temp_diff; | 1512 | int temp_diff; |
1513 | 1513 | ||
1514 | if (!test_bit(STATUS_STATISTICS, &il->status)) { | 1514 | if (!test_bit(STATUS_STATISTICS, &il->status)) { |
1515 | IL_DEBUG_TEMP(il, "Temperature not updated -- no statistics.\n"); | 1515 | D_TEMP("Temperature not updated -- no statistics.\n"); |
1516 | return 0; | 1516 | return 0; |
1517 | } | 1517 | } |
1518 | 1518 | ||
@@ -1520,19 +1520,19 @@ static int il4965_is_temp_calib_needed(struct il_priv *il) | |||
1520 | 1520 | ||
1521 | /* get absolute value */ | 1521 | /* get absolute value */ |
1522 | if (temp_diff < 0) { | 1522 | if (temp_diff < 0) { |
1523 | IL_DEBUG_POWER(il, "Getting cooler, delta %d\n", temp_diff); | 1523 | D_POWER("Getting cooler, delta %d\n", temp_diff); |
1524 | temp_diff = -temp_diff; | 1524 | temp_diff = -temp_diff; |
1525 | } else if (temp_diff == 0) | 1525 | } else if (temp_diff == 0) |
1526 | IL_DEBUG_POWER(il, "Temperature unchanged\n"); | 1526 | D_POWER("Temperature unchanged\n"); |
1527 | else | 1527 | else |
1528 | IL_DEBUG_POWER(il, "Getting warmer, delta %d\n", temp_diff); | 1528 | D_POWER("Getting warmer, delta %d\n", temp_diff); |
1529 | 1529 | ||
1530 | if (temp_diff < IL_TEMPERATURE_THRESHOLD) { | 1530 | if (temp_diff < IL_TEMPERATURE_THRESHOLD) { |
1531 | IL_DEBUG_POWER(il, " => thermal txpower calib not needed\n"); | 1531 | D_POWER(" => thermal txpower calib not needed\n"); |
1532 | return 0; | 1532 | return 0; |
1533 | } | 1533 | } |
1534 | 1534 | ||
1535 | IL_DEBUG_POWER(il, " => thermal txpower calib needed\n"); | 1535 | D_POWER(" => thermal txpower calib needed\n"); |
1536 | 1536 | ||
1537 | return 1; | 1537 | return 1; |
1538 | } | 1538 | } |
@@ -1547,12 +1547,12 @@ static void il4965_temperature_calib(struct il_priv *il) | |||
1547 | 1547 | ||
1548 | if (il->temperature != temp) { | 1548 | if (il->temperature != temp) { |
1549 | if (il->temperature) | 1549 | if (il->temperature) |
1550 | IL_DEBUG_TEMP(il, "Temperature changed " | 1550 | D_TEMP("Temperature changed " |
1551 | "from %dC to %dC\n", | 1551 | "from %dC to %dC\n", |
1552 | KELVIN_TO_CELSIUS(il->temperature), | 1552 | KELVIN_TO_CELSIUS(il->temperature), |
1553 | KELVIN_TO_CELSIUS(temp)); | 1553 | KELVIN_TO_CELSIUS(temp)); |
1554 | else | 1554 | else |
1555 | IL_DEBUG_TEMP(il, "Temperature " | 1555 | D_TEMP("Temperature " |
1556 | "initialized to %dC\n", | 1556 | "initialized to %dC\n", |
1557 | KELVIN_TO_CELSIUS(temp)); | 1557 | KELVIN_TO_CELSIUS(temp)); |
1558 | } | 1558 | } |
@@ -1617,7 +1617,7 @@ static int il4965_tx_status_reply_tx(struct il_priv *il, | |||
1617 | int i, sh, idx; | 1617 | int i, sh, idx; |
1618 | u16 seq; | 1618 | u16 seq; |
1619 | if (agg->wait_for_ba) | 1619 | if (agg->wait_for_ba) |
1620 | IL_DEBUG_TX_REPLY(il, "got tx response w/o block-ack\n"); | 1620 | D_TX_REPLY("got tx response w/o block-ack\n"); |
1621 | 1621 | ||
1622 | agg->frame_count = tx_resp->frame_count; | 1622 | agg->frame_count = tx_resp->frame_count; |
1623 | agg->start_idx = start_idx; | 1623 | agg->start_idx = start_idx; |
@@ -1630,7 +1630,7 @@ static int il4965_tx_status_reply_tx(struct il_priv *il, | |||
1630 | status = le16_to_cpu(frame_status[0].status); | 1630 | status = le16_to_cpu(frame_status[0].status); |
1631 | idx = start_idx; | 1631 | idx = start_idx; |
1632 | 1632 | ||
1633 | IL_DEBUG_TX_REPLY(il, "FrameCnt = %d, StartIdx=%d idx=%d\n", | 1633 | D_TX_REPLY("FrameCnt = %d, StartIdx=%d idx=%d\n", |
1634 | agg->frame_count, agg->start_idx, idx); | 1634 | agg->frame_count, agg->start_idx, idx); |
1635 | 1635 | ||
1636 | info = IEEE80211_SKB_CB(il->txq[txq_id].txb[idx].skb); | 1636 | info = IEEE80211_SKB_CB(il->txq[txq_id].txb[idx].skb); |
@@ -1639,9 +1639,9 @@ static int il4965_tx_status_reply_tx(struct il_priv *il, | |||
1639 | info->flags |= il4965_tx_status_to_mac80211(status); | 1639 | info->flags |= il4965_tx_status_to_mac80211(status); |
1640 | il4965_hwrate_to_tx_control(il, rate_n_flags, info); | 1640 | il4965_hwrate_to_tx_control(il, rate_n_flags, info); |
1641 | 1641 | ||
1642 | IL_DEBUG_TX_REPLY(il, "1 Frame 0x%x failure :%d\n", | 1642 | D_TX_REPLY("1 Frame 0x%x failure :%d\n", |
1643 | status & 0xff, tx_resp->failure_frame); | 1643 | status & 0xff, tx_resp->failure_frame); |
1644 | IL_DEBUG_TX_REPLY(il, "Rate Info rate_n_flags=%x\n", rate_n_flags); | 1644 | D_TX_REPLY("Rate Info rate_n_flags=%x\n", rate_n_flags); |
1645 | 1645 | ||
1646 | agg->wait_for_ba = 0; | 1646 | agg->wait_for_ba = 0; |
1647 | } else { | 1647 | } else { |
@@ -1661,7 +1661,7 @@ static int il4965_tx_status_reply_tx(struct il_priv *il, | |||
1661 | AGG_TX_STATE_ABORT_MSK)) | 1661 | AGG_TX_STATE_ABORT_MSK)) |
1662 | continue; | 1662 | continue; |
1663 | 1663 | ||
1664 | IL_DEBUG_TX_REPLY(il, "FrameCnt = %d, txq_id=%d idx=%d\n", | 1664 | D_TX_REPLY("FrameCnt = %d, txq_id=%d idx=%d\n", |
1665 | agg->frame_count, txq_id, idx); | 1665 | agg->frame_count, txq_id, idx); |
1666 | 1666 | ||
1667 | hdr = il_tx_queue_get_hdr(il, txq_id, idx); | 1667 | hdr = il_tx_queue_get_hdr(il, txq_id, idx); |
@@ -1681,7 +1681,7 @@ static int il4965_tx_status_reply_tx(struct il_priv *il, | |||
1681 | return -1; | 1681 | return -1; |
1682 | } | 1682 | } |
1683 | 1683 | ||
1684 | IL_DEBUG_TX_REPLY(il, "AGG Frame i=%d idx %d seq=%d\n", | 1684 | D_TX_REPLY("AGG Frame i=%d idx %d seq=%d\n", |
1685 | i, idx, SEQ_TO_SN(sc)); | 1685 | i, idx, SEQ_TO_SN(sc)); |
1686 | 1686 | ||
1687 | sh = idx - start; | 1687 | sh = idx - start; |
@@ -1699,13 +1699,13 @@ static int il4965_tx_status_reply_tx(struct il_priv *il, | |||
1699 | sh = 0; | 1699 | sh = 0; |
1700 | } | 1700 | } |
1701 | bitmap |= 1ULL << sh; | 1701 | bitmap |= 1ULL << sh; |
1702 | IL_DEBUG_TX_REPLY(il, "start=%d bitmap=0x%llx\n", | 1702 | D_TX_REPLY("start=%d bitmap=0x%llx\n", |
1703 | start, (unsigned long long)bitmap); | 1703 | start, (unsigned long long)bitmap); |
1704 | } | 1704 | } |
1705 | 1705 | ||
1706 | agg->bitmap = bitmap; | 1706 | agg->bitmap = bitmap; |
1707 | agg->start_idx = start; | 1707 | agg->start_idx = start; |
1708 | IL_DEBUG_TX_REPLY(il, "Frames %d start_idx=%d bitmap=0x%llx\n", | 1708 | D_TX_REPLY("Frames %d start_idx=%d bitmap=0x%llx\n", |
1709 | agg->frame_count, agg->start_idx, | 1709 | agg->frame_count, agg->start_idx, |
1710 | (unsigned long long)agg->bitmap); | 1710 | (unsigned long long)agg->bitmap); |
1711 | 1711 | ||
@@ -1737,7 +1737,7 @@ static u8 il4965_find_station(struct il_priv *il, const u8 *addr) | |||
1737 | goto out; | 1737 | goto out; |
1738 | } | 1738 | } |
1739 | 1739 | ||
1740 | IL_DEBUG_ASSOC(il, "can not find STA %pM total %d\n", | 1740 | D_ASSOC("can not find STA %pM total %d\n", |
1741 | addr, il->num_stations); | 1741 | addr, il->num_stations); |
1742 | 1742 | ||
1743 | out: | 1743 | out: |
@@ -1830,7 +1830,7 @@ static void il4965_rx_reply_tx(struct il_priv *il, | |||
1830 | if (txq->q.read_ptr != (scd_ssn & 0xff)) { | 1830 | if (txq->q.read_ptr != (scd_ssn & 0xff)) { |
1831 | index = il_queue_dec_wrap(scd_ssn & 0xff, | 1831 | index = il_queue_dec_wrap(scd_ssn & 0xff, |
1832 | txq->q.n_bd); | 1832 | txq->q.n_bd); |
1833 | IL_DEBUG_TX_REPLY(il, "Retry scheduler reclaim scd_ssn " | 1833 | D_TX_REPLY("Retry scheduler reclaim scd_ssn " |
1834 | "%d index %d\n", scd_ssn , index); | 1834 | "%d index %d\n", scd_ssn , index); |
1835 | freed = il4965_tx_queue_reclaim(il, txq_id, index); | 1835 | freed = il4965_tx_queue_reclaim(il, txq_id, index); |
1836 | if (qc) | 1836 | if (qc) |
@@ -1849,7 +1849,7 @@ static void il4965_rx_reply_tx(struct il_priv *il, | |||
1849 | le32_to_cpu(tx_resp->rate_n_flags), | 1849 | le32_to_cpu(tx_resp->rate_n_flags), |
1850 | info); | 1850 | info); |
1851 | 1851 | ||
1852 | IL_DEBUG_TX_REPLY(il, "TXQ %d status %s (0x%08x) " | 1852 | D_TX_REPLY("TXQ %d status %s (0x%08x) " |
1853 | "rate_n_flags 0x%x retries %d\n", | 1853 | "rate_n_flags 0x%x retries %d\n", |
1854 | txq_id, | 1854 | txq_id, |
1855 | il4965_get_tx_fail_reason(status), status, | 1855 | il4965_get_tx_fail_reason(status), status, |
@@ -1860,7 +1860,7 @@ static void il4965_rx_reply_tx(struct il_priv *il, | |||
1860 | if (qc && likely(sta_id != IL_INVALID_STATION)) | 1860 | if (qc && likely(sta_id != IL_INVALID_STATION)) |
1861 | il4965_free_tfds_in_queue(il, sta_id, tid, freed); | 1861 | il4965_free_tfds_in_queue(il, sta_id, tid, freed); |
1862 | else if (sta_id == IL_INVALID_STATION) | 1862 | else if (sta_id == IL_INVALID_STATION) |
1863 | IL_DEBUG_TX_REPLY(il, "Station not known\n"); | 1863 | D_TX_REPLY("Station not known\n"); |
1864 | 1864 | ||
1865 | if (il->mac80211_registered && | 1865 | if (il->mac80211_registered && |
1866 | (il_queue_space(&txq->q) > txq->q.low_mark)) | 1866 | (il_queue_space(&txq->q) > txq->q.low_mark)) |
@@ -1882,7 +1882,7 @@ static void il4965_rx_beacon_notif(struct il_priv *il, | |||
1882 | u8 rate __maybe_unused = | 1882 | u8 rate __maybe_unused = |
1883 | il4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); | 1883 | il4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); |
1884 | 1884 | ||
1885 | IL_DEBUG_RX(il, "beacon status %#x, retries:%d ibssmgr:%d " | 1885 | D_RX("beacon status %#x, retries:%d ibssmgr:%d " |
1886 | "tsf:0x%.8x%.8x rate:%d\n", | 1886 | "tsf:0x%.8x%.8x rate:%d\n", |
1887 | le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK, | 1887 | le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK, |
1888 | beacon->beacon_notify_hdr.failure_frame, | 1888 | beacon->beacon_notify_hdr.failure_frame, |
@@ -1955,7 +1955,7 @@ static void il4965_post_associate(struct il_priv *il) | |||
1955 | 1955 | ||
1956 | ctx->staging.assoc_id = cpu_to_le16(vif->bss_conf.aid); | 1956 | ctx->staging.assoc_id = cpu_to_le16(vif->bss_conf.aid); |
1957 | 1957 | ||
1958 | IL_DEBUG_ASSOC(il, "assoc id %d beacon interval %d\n", | 1958 | D_ASSOC("assoc id %d beacon interval %d\n", |
1959 | vif->bss_conf.aid, vif->bss_conf.beacon_int); | 1959 | vif->bss_conf.aid, vif->bss_conf.beacon_int); |
1960 | 1960 | ||
1961 | if (vif->bss_conf.use_short_preamble) | 1961 | if (vif->bss_conf.use_short_preamble) |
@@ -1972,7 +1972,7 @@ static void il4965_post_associate(struct il_priv *il) | |||
1972 | 1972 | ||
1973 | il_commit_rxon(il, ctx); | 1973 | il_commit_rxon(il, ctx); |
1974 | 1974 | ||
1975 | IL_DEBUG_ASSOC(il, "Associated as %d to: %pM\n", | 1975 | D_ASSOC("Associated as %d to: %pM\n", |
1976 | vif->bss_conf.aid, ctx->active.bssid_addr); | 1976 | vif->bss_conf.aid, ctx->active.bssid_addr); |
1977 | 1977 | ||
1978 | switch (vif->type) { | 1978 | switch (vif->type) { |
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index a768e78bf89..e6c7e9d87a6 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -164,7 +164,7 @@ int il_init_geos(struct il_priv *il) | |||
164 | 164 | ||
165 | if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates || | 165 | if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates || |
166 | il->bands[IEEE80211_BAND_5GHZ].n_bitrates) { | 166 | il->bands[IEEE80211_BAND_5GHZ].n_bitrates) { |
167 | IL_DEBUG_INFO(il, "Geography modes already initialized.\n"); | 167 | D_INFO("Geography modes already initialized.\n"); |
168 | set_bit(STATUS_GEO_CONFIGURED, &il->status); | 168 | set_bit(STATUS_GEO_CONFIGURED, &il->status); |
169 | return 0; | 169 | return 0; |
170 | } | 170 | } |
@@ -239,7 +239,7 @@ int il_init_geos(struct il_priv *il) | |||
239 | geo_ch->flags |= IEEE80211_CHAN_DISABLED; | 239 | geo_ch->flags |= IEEE80211_CHAN_DISABLED; |
240 | } | 240 | } |
241 | 241 | ||
242 | IL_DEBUG_INFO(il, "Channel %d Freq=%d[%sGHz] %s flag=0x%X\n", | 242 | D_INFO("Channel %d Freq=%d[%sGHz] %s flag=0x%X\n", |
243 | ch->channel, geo_ch->center_freq, | 243 | ch->channel, geo_ch->center_freq, |
244 | il_is_channel_a_band(ch) ? "5.2" : "2.4", | 244 | il_is_channel_a_band(ch) ? "5.2" : "2.4", |
245 | geo_ch->flags & IEEE80211_CHAN_DISABLED ? | 245 | geo_ch->flags & IEEE80211_CHAN_DISABLED ? |
@@ -396,7 +396,7 @@ il_send_rxon_timing(struct il_priv *il, struct il_rxon_context *ctx) | |||
396 | 396 | ||
397 | ctx->timing.dtim_period = vif ? (vif->bss_conf.dtim_period ?: 1) : 1; | 397 | ctx->timing.dtim_period = vif ? (vif->bss_conf.dtim_period ?: 1) : 1; |
398 | 398 | ||
399 | IL_DEBUG_ASSOC(il, | 399 | D_ASSOC( |
400 | "beacon interval %d beacon timer %d beacon tim %d\n", | 400 | "beacon interval %d beacon timer %d beacon tim %d\n", |
401 | le16_to_cpu(ctx->timing.beacon_interval), | 401 | le16_to_cpu(ctx->timing.beacon_interval), |
402 | le32_to_cpu(ctx->timing.beacon_init_val), | 402 | le32_to_cpu(ctx->timing.beacon_init_val), |
@@ -512,13 +512,13 @@ int il_full_rxon_required(struct il_priv *il, | |||
512 | 512 | ||
513 | #define CHK(cond) \ | 513 | #define CHK(cond) \ |
514 | if ((cond)) { \ | 514 | if ((cond)) { \ |
515 | IL_DEBUG_INFO(il, "need full RXON - " #cond "\n"); \ | 515 | D_INFO("need full RXON - " #cond "\n"); \ |
516 | return 1; \ | 516 | return 1; \ |
517 | } | 517 | } |
518 | 518 | ||
519 | #define CHK_NEQ(c1, c2) \ | 519 | #define CHK_NEQ(c1, c2) \ |
520 | if ((c1) != (c2)) { \ | 520 | if ((c1) != (c2)) { \ |
521 | IL_DEBUG_INFO(il, "need full RXON - " \ | 521 | D_INFO("need full RXON - " \ |
522 | #c1 " != " #c2 " - %d != %d\n", \ | 522 | #c1 " != " #c2 " - %d != %d\n", \ |
523 | (c1), (c2)); \ | 523 | (c1), (c2)); \ |
524 | return 1; \ | 524 | return 1; \ |
@@ -638,7 +638,7 @@ static void _il_set_rxon_ht(struct il_priv *il, | |||
638 | if (il->cfg->ops->hcmd->set_rxon_chain) | 638 | if (il->cfg->ops->hcmd->set_rxon_chain) |
639 | il->cfg->ops->hcmd->set_rxon_chain(il, ctx); | 639 | il->cfg->ops->hcmd->set_rxon_chain(il, ctx); |
640 | 640 | ||
641 | IL_DEBUG_ASSOC(il, "rxon flags 0x%X operation mode :0x%X " | 641 | D_ASSOC("rxon flags 0x%X operation mode :0x%X " |
642 | "extension channel offset 0x%x\n", | 642 | "extension channel offset 0x%x\n", |
643 | le32_to_cpu(rxon->flags), ctx->ht.protection, | 643 | le32_to_cpu(rxon->flags), ctx->ht.protection, |
644 | ctx->ht.extension_chan_offset); | 644 | ctx->ht.extension_chan_offset); |
@@ -720,7 +720,7 @@ il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch, | |||
720 | 720 | ||
721 | il->band = band; | 721 | il->band = band; |
722 | 722 | ||
723 | IL_DEBUG_INFO(il, "Staging channel set to %d [%d]\n", channel, band); | 723 | D_INFO("Staging channel set to %d [%d]\n", channel, band); |
724 | 724 | ||
725 | return 0; | 725 | return 0; |
726 | } | 726 | } |
@@ -840,7 +840,7 @@ void il_set_rate(struct il_priv *il) | |||
840 | il->active_rate |= (1 << rate->hw_value); | 840 | il->active_rate |= (1 << rate->hw_value); |
841 | } | 841 | } |
842 | 842 | ||
843 | IL_DEBUG_RATE(il, "Set active_rate = %0x\n", il->active_rate); | 843 | D_RATE("Set active_rate = %0x\n", il->active_rate); |
844 | 844 | ||
845 | for_each_context(il, ctx) { | 845 | for_each_context(il, ctx) { |
846 | ctx->staging.cck_basic_rates = | 846 | ctx->staging.cck_basic_rates = |
@@ -878,7 +878,7 @@ void il_rx_csa(struct il_priv *il, struct il_rx_mem_buffer *rxb) | |||
878 | if (!le32_to_cpu(csa->status) && csa->channel == il->switch_channel) { | 878 | if (!le32_to_cpu(csa->status) && csa->channel == il->switch_channel) { |
879 | rxon->channel = csa->channel; | 879 | rxon->channel = csa->channel; |
880 | ctx->staging.channel = csa->channel; | 880 | ctx->staging.channel = csa->channel; |
881 | IL_DEBUG_11H(il, "CSA notif: channel %d\n", | 881 | D_11H("CSA notif: channel %d\n", |
882 | le16_to_cpu(csa->channel)); | 882 | le16_to_cpu(csa->channel)); |
883 | il_chswitch_done(il, true); | 883 | il_chswitch_done(il, true); |
884 | } else { | 884 | } else { |
@@ -895,21 +895,21 @@ void il_print_rx_config_cmd(struct il_priv *il, | |||
895 | { | 895 | { |
896 | struct il_rxon_cmd *rxon = &ctx->staging; | 896 | struct il_rxon_cmd *rxon = &ctx->staging; |
897 | 897 | ||
898 | IL_DEBUG_RADIO(il, "RX CONFIG:\n"); | 898 | D_RADIO("RX CONFIG:\n"); |
899 | il_print_hex_dump(il, IL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); | 899 | il_print_hex_dump(il, IL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); |
900 | IL_DEBUG_RADIO(il, "u16 channel: 0x%x\n", | 900 | D_RADIO("u16 channel: 0x%x\n", |
901 | le16_to_cpu(rxon->channel)); | 901 | le16_to_cpu(rxon->channel)); |
902 | IL_DEBUG_RADIO(il, "u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags)); | 902 | D_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags)); |
903 | IL_DEBUG_RADIO(il, "u32 filter_flags: 0x%08x\n", | 903 | D_RADIO("u32 filter_flags: 0x%08x\n", |
904 | le32_to_cpu(rxon->filter_flags)); | 904 | le32_to_cpu(rxon->filter_flags)); |
905 | IL_DEBUG_RADIO(il, "u8 dev_type: 0x%x\n", rxon->dev_type); | 905 | D_RADIO("u8 dev_type: 0x%x\n", rxon->dev_type); |
906 | IL_DEBUG_RADIO(il, "u8 ofdm_basic_rates: 0x%02x\n", | 906 | D_RADIO("u8 ofdm_basic_rates: 0x%02x\n", |
907 | rxon->ofdm_basic_rates); | 907 | rxon->ofdm_basic_rates); |
908 | IL_DEBUG_RADIO(il, "u8 cck_basic_rates: 0x%02x\n", | 908 | D_RADIO("u8 cck_basic_rates: 0x%02x\n", |
909 | rxon->cck_basic_rates); | 909 | rxon->cck_basic_rates); |
910 | IL_DEBUG_RADIO(il, "u8[6] node_addr: %pM\n", rxon->node_addr); | 910 | D_RADIO("u8[6] node_addr: %pM\n", rxon->node_addr); |
911 | IL_DEBUG_RADIO(il, "u8[6] bssid_addr: %pM\n", rxon->bssid_addr); | 911 | D_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr); |
912 | IL_DEBUG_RADIO(il, "u16 assoc_id: 0x%x\n", | 912 | D_RADIO("u16 assoc_id: 0x%x\n", |
913 | le16_to_cpu(rxon->assoc_id)); | 913 | le16_to_cpu(rxon->assoc_id)); |
914 | } | 914 | } |
915 | EXPORT_SYMBOL(il_print_rx_config_cmd); | 915 | EXPORT_SYMBOL(il_print_rx_config_cmd); |
@@ -944,7 +944,7 @@ void il_irq_handle_error(struct il_priv *il) | |||
944 | clear_bit(STATUS_READY, &il->status); | 944 | clear_bit(STATUS_READY, &il->status); |
945 | 945 | ||
946 | if (!test_bit(STATUS_EXIT_PENDING, &il->status)) { | 946 | if (!test_bit(STATUS_EXIT_PENDING, &il->status)) { |
947 | IL_DEBUG(il, IL_DL_FW_ERRORS, | 947 | IL_DBG(IL_DL_FW_ERRORS, |
948 | "Restarting adapter due to uCode error.\n"); | 948 | "Restarting adapter due to uCode error.\n"); |
949 | 949 | ||
950 | if (il->cfg->mod_params->restart_fw) | 950 | if (il->cfg->mod_params->restart_fw) |
@@ -965,14 +965,14 @@ static int il_apm_stop_master(struct il_priv *il) | |||
965 | if (ret) | 965 | if (ret) |
966 | IL_WARN(il, "Master Disable Timed Out, 100 usec\n"); | 966 | IL_WARN(il, "Master Disable Timed Out, 100 usec\n"); |
967 | 967 | ||
968 | IL_DEBUG_INFO(il, "stop master\n"); | 968 | D_INFO("stop master\n"); |
969 | 969 | ||
970 | return ret; | 970 | return ret; |
971 | } | 971 | } |
972 | 972 | ||
973 | void il_apm_stop(struct il_priv *il) | 973 | void il_apm_stop(struct il_priv *il) |
974 | { | 974 | { |
975 | IL_DEBUG_INFO(il, "Stop card, put in low power state\n"); | 975 | D_INFO("Stop card, put in low power state\n"); |
976 | 976 | ||
977 | /* Stop device's DMA activity */ | 977 | /* Stop device's DMA activity */ |
978 | il_apm_stop_master(il); | 978 | il_apm_stop_master(il); |
@@ -1002,7 +1002,7 @@ int il_apm_init(struct il_priv *il) | |||
1002 | int ret = 0; | 1002 | int ret = 0; |
1003 | u16 lctl; | 1003 | u16 lctl; |
1004 | 1004 | ||
1005 | IL_DEBUG_INFO(il, "Init card's basic functions\n"); | 1005 | D_INFO("Init card's basic functions\n"); |
1006 | 1006 | ||
1007 | /* | 1007 | /* |
1008 | * Use "set_bit" below rather than "write", to preserve any hardware | 1008 | * Use "set_bit" below rather than "write", to preserve any hardware |
@@ -1047,12 +1047,12 @@ int il_apm_init(struct il_priv *il) | |||
1047 | /* L1-ASPM enabled; disable(!) L0S */ | 1047 | /* L1-ASPM enabled; disable(!) L0S */ |
1048 | il_set_bit(il, CSR_GIO_REG, | 1048 | il_set_bit(il, CSR_GIO_REG, |
1049 | CSR_GIO_REG_VAL_L0S_ENABLED); | 1049 | CSR_GIO_REG_VAL_L0S_ENABLED); |
1050 | IL_DEBUG_POWER(il, "L1 Enabled; Disabling L0S\n"); | 1050 | D_POWER("L1 Enabled; Disabling L0S\n"); |
1051 | } else { | 1051 | } else { |
1052 | /* L1-ASPM disabled; enable(!) L0S */ | 1052 | /* L1-ASPM disabled; enable(!) L0S */ |
1053 | il_clear_bit(il, CSR_GIO_REG, | 1053 | il_clear_bit(il, CSR_GIO_REG, |
1054 | CSR_GIO_REG_VAL_L0S_ENABLED); | 1054 | CSR_GIO_REG_VAL_L0S_ENABLED); |
1055 | IL_DEBUG_POWER(il, "L1 Disabled; Enabling L0S\n"); | 1055 | D_POWER("L1 Disabled; Enabling L0S\n"); |
1056 | } | 1056 | } |
1057 | } | 1057 | } |
1058 | 1058 | ||
@@ -1076,7 +1076,7 @@ int il_apm_init(struct il_priv *il) | |||
1076 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | 1076 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, |
1077 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | 1077 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
1078 | if (ret < 0) { | 1078 | if (ret < 0) { |
1079 | IL_DEBUG_INFO(il, "Failed to init the card\n"); | 1079 | D_INFO("Failed to init the card\n"); |
1080 | goto out; | 1080 | goto out; |
1081 | } | 1081 | } |
1082 | 1082 | ||
@@ -1147,7 +1147,7 @@ int il_set_tx_power(struct il_priv *il, s8 tx_power, bool force) | |||
1147 | defer = test_bit(STATUS_SCANNING, &il->status) || | 1147 | defer = test_bit(STATUS_SCANNING, &il->status) || |
1148 | memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging)); | 1148 | memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging)); |
1149 | if (defer && !force) { | 1149 | if (defer && !force) { |
1150 | IL_DEBUG_INFO(il, "Deferring tx power set\n"); | 1150 | D_INFO("Deferring tx power set\n"); |
1151 | return 0; | 1151 | return 0; |
1152 | } | 1152 | } |
1153 | 1153 | ||
@@ -1179,7 +1179,7 @@ void il_send_bt_config(struct il_priv *il) | |||
1179 | else | 1179 | else |
1180 | bt_cmd.flags = BT_COEX_ENABLE; | 1180 | bt_cmd.flags = BT_COEX_ENABLE; |
1181 | 1181 | ||
1182 | IL_DEBUG_INFO(il, "BT coex %s\n", | 1182 | D_INFO("BT coex %s\n", |
1183 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); | 1183 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); |
1184 | 1184 | ||
1185 | if (il_send_cmd_pdu(il, REPLY_BT_CONFIG, | 1185 | if (il_send_cmd_pdu(il, REPLY_BT_CONFIG, |
@@ -1212,7 +1212,7 @@ void il_rx_pm_sleep_notif(struct il_priv *il, | |||
1212 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 1212 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
1213 | struct il_rx_packet *pkt = rxb_addr(rxb); | 1213 | struct il_rx_packet *pkt = rxb_addr(rxb); |
1214 | struct il_sleep_notification *sleep = &(pkt->u.sleep_notif); | 1214 | struct il_sleep_notification *sleep = &(pkt->u.sleep_notif); |
1215 | IL_DEBUG_RX(il, "sleep mode: %d, src: %d\n", | 1215 | D_RX("sleep mode: %d, src: %d\n", |
1216 | sleep->pm_sleep_mode, sleep->pm_wakeup_src); | 1216 | sleep->pm_sleep_mode, sleep->pm_wakeup_src); |
1217 | #endif | 1217 | #endif |
1218 | } | 1218 | } |
@@ -1223,7 +1223,7 @@ void il_rx_pm_debug_statistics_notif(struct il_priv *il, | |||
1223 | { | 1223 | { |
1224 | struct il_rx_packet *pkt = rxb_addr(rxb); | 1224 | struct il_rx_packet *pkt = rxb_addr(rxb); |
1225 | u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; | 1225 | u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; |
1226 | IL_DEBUG_RADIO(il, "Dumping %d bytes of unhandled " | 1226 | D_RADIO("Dumping %d bytes of unhandled " |
1227 | "notification for %s:\n", len, | 1227 | "notification for %s:\n", len, |
1228 | il_get_cmd_string(pkt->hdr.cmd)); | 1228 | il_get_cmd_string(pkt->hdr.cmd)); |
1229 | il_print_hex_dump(il, IL_DL_RADIO, pkt->u.raw, len); | 1229 | il_print_hex_dump(il, IL_DL_RADIO, pkt->u.raw, len); |
@@ -1259,15 +1259,15 @@ int il_mac_conf_tx(struct ieee80211_hw *hw, | |||
1259 | unsigned long flags; | 1259 | unsigned long flags; |
1260 | int q; | 1260 | int q; |
1261 | 1261 | ||
1262 | IL_DEBUG_MAC80211(il, "enter\n"); | 1262 | D_MAC80211("enter\n"); |
1263 | 1263 | ||
1264 | if (!il_is_ready_rf(il)) { | 1264 | if (!il_is_ready_rf(il)) { |
1265 | IL_DEBUG_MAC80211(il, "leave - RF not ready\n"); | 1265 | D_MAC80211("leave - RF not ready\n"); |
1266 | return -EIO; | 1266 | return -EIO; |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | if (queue >= AC_NUM) { | 1269 | if (queue >= AC_NUM) { |
1270 | IL_DEBUG_MAC80211(il, "leave - queue >= AC_NUM %d\n", queue); | 1270 | D_MAC80211("leave - queue >= AC_NUM %d\n", queue); |
1271 | return 0; | 1271 | return 0; |
1272 | } | 1272 | } |
1273 | 1273 | ||
@@ -1289,7 +1289,7 @@ int il_mac_conf_tx(struct ieee80211_hw *hw, | |||
1289 | 1289 | ||
1290 | spin_unlock_irqrestore(&il->lock, flags); | 1290 | spin_unlock_irqrestore(&il->lock, flags); |
1291 | 1291 | ||
1292 | IL_DEBUG_MAC80211(il, "leave\n"); | 1292 | D_MAC80211("leave\n"); |
1293 | return 0; | 1293 | return 0; |
1294 | } | 1294 | } |
1295 | EXPORT_SYMBOL(il_mac_conf_tx); | 1295 | EXPORT_SYMBOL(il_mac_conf_tx); |
@@ -1348,7 +1348,7 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
1348 | struct il_rxon_context *tmp, *ctx = NULL; | 1348 | struct il_rxon_context *tmp, *ctx = NULL; |
1349 | int err; | 1349 | int err; |
1350 | 1350 | ||
1351 | IL_DEBUG_MAC80211(il, "enter: type %d, addr %pM\n", | 1351 | D_MAC80211("enter: type %d, addr %pM\n", |
1352 | vif->type, vif->addr); | 1352 | vif->type, vif->addr); |
1353 | 1353 | ||
1354 | mutex_lock(&il->mutex); | 1354 | mutex_lock(&il->mutex); |
@@ -1398,7 +1398,7 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
1398 | out: | 1398 | out: |
1399 | mutex_unlock(&il->mutex); | 1399 | mutex_unlock(&il->mutex); |
1400 | 1400 | ||
1401 | IL_DEBUG_MAC80211(il, "leave\n"); | 1401 | D_MAC80211("leave\n"); |
1402 | return err; | 1402 | return err; |
1403 | } | 1403 | } |
1404 | EXPORT_SYMBOL(il_mac_add_interface); | 1404 | EXPORT_SYMBOL(il_mac_add_interface); |
@@ -1429,7 +1429,7 @@ void il_mac_remove_interface(struct ieee80211_hw *hw, | |||
1429 | struct il_priv *il = hw->priv; | 1429 | struct il_priv *il = hw->priv; |
1430 | struct il_rxon_context *ctx = il_rxon_ctx_from_vif(vif); | 1430 | struct il_rxon_context *ctx = il_rxon_ctx_from_vif(vif); |
1431 | 1431 | ||
1432 | IL_DEBUG_MAC80211(il, "enter\n"); | 1432 | D_MAC80211("enter\n"); |
1433 | 1433 | ||
1434 | mutex_lock(&il->mutex); | 1434 | mutex_lock(&il->mutex); |
1435 | 1435 | ||
@@ -1441,7 +1441,7 @@ void il_mac_remove_interface(struct ieee80211_hw *hw, | |||
1441 | memset(il->bssid, 0, ETH_ALEN); | 1441 | memset(il->bssid, 0, ETH_ALEN); |
1442 | mutex_unlock(&il->mutex); | 1442 | mutex_unlock(&il->mutex); |
1443 | 1443 | ||
1444 | IL_DEBUG_MAC80211(il, "leave\n"); | 1444 | D_MAC80211("leave\n"); |
1445 | 1445 | ||
1446 | } | 1446 | } |
1447 | EXPORT_SYMBOL(il_mac_remove_interface); | 1447 | EXPORT_SYMBOL(il_mac_remove_interface); |
@@ -1720,7 +1720,7 @@ int il_force_reset(struct il_priv *il, bool external) | |||
1720 | if (force_reset->last_force_reset_jiffies && | 1720 | if (force_reset->last_force_reset_jiffies && |
1721 | time_after(force_reset->last_force_reset_jiffies + | 1721 | time_after(force_reset->last_force_reset_jiffies + |
1722 | force_reset->reset_duration, jiffies)) { | 1722 | force_reset->reset_duration, jiffies)) { |
1723 | IL_DEBUG_INFO(il, "force reset rejected\n"); | 1723 | D_INFO("force reset rejected\n"); |
1724 | force_reset->reset_reject_count++; | 1724 | force_reset->reset_reject_count++; |
1725 | return -EAGAIN; | 1725 | return -EAGAIN; |
1726 | } | 1726 | } |
@@ -1738,7 +1738,7 @@ int il_force_reset(struct il_priv *il, bool external) | |||
1738 | */ | 1738 | */ |
1739 | 1739 | ||
1740 | if (!external && !il->cfg->mod_params->restart_fw) { | 1740 | if (!external && !il->cfg->mod_params->restart_fw) { |
1741 | IL_DEBUG_INFO(il, "Cancel firmware reload based on " | 1741 | D_INFO("Cancel firmware reload based on " |
1742 | "module parameter setting\n"); | 1742 | "module parameter setting\n"); |
1743 | return 0; | 1743 | return 0; |
1744 | } | 1744 | } |
@@ -2046,7 +2046,7 @@ il_update_qos(struct il_priv *il, struct il_rxon_context *ctx) | |||
2046 | if (ctx->ht.enabled) | 2046 | if (ctx->ht.enabled) |
2047 | ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; | 2047 | ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; |
2048 | 2048 | ||
2049 | IL_DEBUG_QOS(il, "send QoS cmd with Qos active=%d FLAGS=0x%X\n", | 2049 | D_QOS("send QoS cmd with Qos active=%d FLAGS=0x%X\n", |
2050 | ctx->qos_data.qos_active, | 2050 | ctx->qos_data.qos_active, |
2051 | ctx->qos_data.def_qos_parm.qos_flags); | 2051 | ctx->qos_data.def_qos_parm.qos_flags); |
2052 | 2052 | ||
@@ -2077,12 +2077,12 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2077 | 2077 | ||
2078 | mutex_lock(&il->mutex); | 2078 | mutex_lock(&il->mutex); |
2079 | 2079 | ||
2080 | IL_DEBUG_MAC80211(il, "enter to channel %d changed 0x%X\n", | 2080 | D_MAC80211("enter to channel %d changed 0x%X\n", |
2081 | channel->hw_value, changed); | 2081 | channel->hw_value, changed); |
2082 | 2082 | ||
2083 | if (unlikely(test_bit(STATUS_SCANNING, &il->status))) { | 2083 | if (unlikely(test_bit(STATUS_SCANNING, &il->status))) { |
2084 | scan_active = 1; | 2084 | scan_active = 1; |
2085 | IL_DEBUG_MAC80211(il, "scan active\n"); | 2085 | D_MAC80211("scan active\n"); |
2086 | } | 2086 | } |
2087 | 2087 | ||
2088 | if (changed & (IEEE80211_CONF_CHANGE_SMPS | | 2088 | if (changed & (IEEE80211_CONF_CHANGE_SMPS | |
@@ -2112,14 +2112,14 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2112 | ch = channel->hw_value; | 2112 | ch = channel->hw_value; |
2113 | ch_info = il_get_channel_info(il, channel->band, ch); | 2113 | ch_info = il_get_channel_info(il, channel->band, ch); |
2114 | if (!il_is_channel_valid(ch_info)) { | 2114 | if (!il_is_channel_valid(ch_info)) { |
2115 | IL_DEBUG_MAC80211(il, "leave - invalid channel\n"); | 2115 | D_MAC80211("leave - invalid channel\n"); |
2116 | ret = -EINVAL; | 2116 | ret = -EINVAL; |
2117 | goto set_ch_out; | 2117 | goto set_ch_out; |
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | if (il->iw_mode == NL80211_IFTYPE_ADHOC && | 2120 | if (il->iw_mode == NL80211_IFTYPE_ADHOC && |
2121 | !il_is_channel_ibss(ch_info)) { | 2121 | !il_is_channel_ibss(ch_info)) { |
2122 | IL_DEBUG_MAC80211(il, "leave - not IBSS channel\n"); | 2122 | D_MAC80211("leave - not IBSS channel\n"); |
2123 | ret = -EINVAL; | 2123 | ret = -EINVAL; |
2124 | goto set_ch_out; | 2124 | goto set_ch_out; |
2125 | } | 2125 | } |
@@ -2186,18 +2186,18 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2186 | IEEE80211_CONF_CHANGE_IDLE)) { | 2186 | IEEE80211_CONF_CHANGE_IDLE)) { |
2187 | ret = il_power_update_mode(il, false); | 2187 | ret = il_power_update_mode(il, false); |
2188 | if (ret) | 2188 | if (ret) |
2189 | IL_DEBUG_MAC80211(il, "Error setting sleep level\n"); | 2189 | D_MAC80211("Error setting sleep level\n"); |
2190 | } | 2190 | } |
2191 | 2191 | ||
2192 | if (changed & IEEE80211_CONF_CHANGE_POWER) { | 2192 | if (changed & IEEE80211_CONF_CHANGE_POWER) { |
2193 | IL_DEBUG_MAC80211(il, "TX Power old=%d new=%d\n", | 2193 | D_MAC80211("TX Power old=%d new=%d\n", |
2194 | il->tx_power_user_lmt, conf->power_level); | 2194 | il->tx_power_user_lmt, conf->power_level); |
2195 | 2195 | ||
2196 | il_set_tx_power(il, conf->power_level, false); | 2196 | il_set_tx_power(il, conf->power_level, false); |
2197 | } | 2197 | } |
2198 | 2198 | ||
2199 | if (!il_is_ready(il)) { | 2199 | if (!il_is_ready(il)) { |
2200 | IL_DEBUG_MAC80211(il, "leave - not ready\n"); | 2200 | D_MAC80211("leave - not ready\n"); |
2201 | goto out; | 2201 | goto out; |
2202 | } | 2202 | } |
2203 | 2203 | ||
@@ -2208,14 +2208,14 @@ int il_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2208 | if (memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging))) | 2208 | if (memcmp(&ctx->active, &ctx->staging, sizeof(ctx->staging))) |
2209 | il_commit_rxon(il, ctx); | 2209 | il_commit_rxon(il, ctx); |
2210 | else | 2210 | else |
2211 | IL_DEBUG_INFO(il, | 2211 | D_INFO( |
2212 | "Not re-sending same RXON configuration.\n"); | 2212 | "Not re-sending same RXON configuration.\n"); |
2213 | if (ht_changed[ctx->ctxid]) | 2213 | if (ht_changed[ctx->ctxid]) |
2214 | il_update_qos(il, ctx); | 2214 | il_update_qos(il, ctx); |
2215 | } | 2215 | } |
2216 | 2216 | ||
2217 | out: | 2217 | out: |
2218 | IL_DEBUG_MAC80211(il, "leave\n"); | 2218 | D_MAC80211("leave\n"); |
2219 | mutex_unlock(&il->mutex); | 2219 | mutex_unlock(&il->mutex); |
2220 | return ret; | 2220 | return ret; |
2221 | } | 2221 | } |
@@ -2233,7 +2233,7 @@ void il_mac_reset_tsf(struct ieee80211_hw *hw, | |||
2233 | return; | 2233 | return; |
2234 | 2234 | ||
2235 | mutex_lock(&il->mutex); | 2235 | mutex_lock(&il->mutex); |
2236 | IL_DEBUG_MAC80211(il, "enter\n"); | 2236 | D_MAC80211("enter\n"); |
2237 | 2237 | ||
2238 | spin_lock_irqsave(&il->lock, flags); | 2238 | spin_lock_irqsave(&il->lock, flags); |
2239 | memset(&il->current_ht_config, 0, sizeof(struct il_ht_config)); | 2239 | memset(&il->current_ht_config, 0, sizeof(struct il_ht_config)); |
@@ -2253,7 +2253,7 @@ void il_mac_reset_tsf(struct ieee80211_hw *hw, | |||
2253 | 2253 | ||
2254 | il_scan_cancel_timeout(il, 100); | 2254 | il_scan_cancel_timeout(il, 100); |
2255 | if (!il_is_ready_rf(il)) { | 2255 | if (!il_is_ready_rf(il)) { |
2256 | IL_DEBUG_MAC80211(il, "leave - not ready\n"); | 2256 | D_MAC80211("leave - not ready\n"); |
2257 | mutex_unlock(&il->mutex); | 2257 | mutex_unlock(&il->mutex); |
2258 | return; | 2258 | return; |
2259 | } | 2259 | } |
@@ -2268,7 +2268,7 @@ void il_mac_reset_tsf(struct ieee80211_hw *hw, | |||
2268 | 2268 | ||
2269 | mutex_unlock(&il->mutex); | 2269 | mutex_unlock(&il->mutex); |
2270 | 2270 | ||
2271 | IL_DEBUG_MAC80211(il, "leave\n"); | 2271 | D_MAC80211("leave\n"); |
2272 | } | 2272 | } |
2273 | EXPORT_SYMBOL(il_mac_reset_tsf); | 2273 | EXPORT_SYMBOL(il_mac_reset_tsf); |
2274 | 2274 | ||
@@ -2280,7 +2280,7 @@ static void il_ht_conf(struct il_priv *il, | |||
2280 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; | 2280 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; |
2281 | struct il_rxon_context *ctx = il_rxon_ctx_from_vif(vif); | 2281 | struct il_rxon_context *ctx = il_rxon_ctx_from_vif(vif); |
2282 | 2282 | ||
2283 | IL_DEBUG_ASSOC(il, "enter:\n"); | 2283 | D_ASSOC("enter:\n"); |
2284 | 2284 | ||
2285 | if (!ctx->ht.enabled) | 2285 | if (!ctx->ht.enabled) |
2286 | return; | 2286 | return; |
@@ -2329,7 +2329,7 @@ static void il_ht_conf(struct il_priv *il, | |||
2329 | break; | 2329 | break; |
2330 | } | 2330 | } |
2331 | 2331 | ||
2332 | IL_DEBUG_ASSOC(il, "leave\n"); | 2332 | D_ASSOC("leave\n"); |
2333 | } | 2333 | } |
2334 | 2334 | ||
2335 | static inline void il_set_no_assoc(struct il_priv *il, | 2335 | static inline void il_set_no_assoc(struct il_priv *il, |
@@ -2358,7 +2358,7 @@ static void il_beacon_update(struct ieee80211_hw *hw, | |||
2358 | if (!skb) | 2358 | if (!skb) |
2359 | return; | 2359 | return; |
2360 | 2360 | ||
2361 | IL_DEBUG_MAC80211(il, "enter\n"); | 2361 | D_MAC80211("enter\n"); |
2362 | 2362 | ||
2363 | lockdep_assert_held(&il->mutex); | 2363 | lockdep_assert_held(&il->mutex); |
2364 | 2364 | ||
@@ -2378,11 +2378,11 @@ static void il_beacon_update(struct ieee80211_hw *hw, | |||
2378 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; | 2378 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; |
2379 | il->timestamp = le64_to_cpu(timestamp); | 2379 | il->timestamp = le64_to_cpu(timestamp); |
2380 | 2380 | ||
2381 | IL_DEBUG_MAC80211(il, "leave\n"); | 2381 | D_MAC80211("leave\n"); |
2382 | spin_unlock_irqrestore(&il->lock, flags); | 2382 | spin_unlock_irqrestore(&il->lock, flags); |
2383 | 2383 | ||
2384 | if (!il_is_ready_rf(il)) { | 2384 | if (!il_is_ready_rf(il)) { |
2385 | IL_DEBUG_MAC80211(il, "leave - RF not ready\n"); | 2385 | D_MAC80211("leave - RF not ready\n"); |
2386 | return; | 2386 | return; |
2387 | } | 2387 | } |
2388 | 2388 | ||
@@ -2401,7 +2401,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2401 | if (WARN_ON(!il->cfg->ops->legacy)) | 2401 | if (WARN_ON(!il->cfg->ops->legacy)) |
2402 | return; | 2402 | return; |
2403 | 2403 | ||
2404 | IL_DEBUG_MAC80211(il, "changes = 0x%X\n", changes); | 2404 | D_MAC80211("changes = 0x%X\n", changes); |
2405 | 2405 | ||
2406 | mutex_lock(&il->mutex); | 2406 | mutex_lock(&il->mutex); |
2407 | 2407 | ||
@@ -2432,7 +2432,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2432 | } | 2432 | } |
2433 | 2433 | ||
2434 | if (changes & BSS_CHANGED_BSSID) { | 2434 | if (changes & BSS_CHANGED_BSSID) { |
2435 | IL_DEBUG_MAC80211(il, "BSSID %pM\n", bss_conf->bssid); | 2435 | D_MAC80211("BSSID %pM\n", bss_conf->bssid); |
2436 | 2436 | ||
2437 | /* | 2437 | /* |
2438 | * If there is currently a HW scan going on in the | 2438 | * If there is currently a HW scan going on in the |
@@ -2442,7 +2442,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2442 | if (il_scan_cancel_timeout(il, 100)) { | 2442 | if (il_scan_cancel_timeout(il, 100)) { |
2443 | IL_WARN(il, | 2443 | IL_WARN(il, |
2444 | "Aborted scan still in progress after 100ms\n"); | 2444 | "Aborted scan still in progress after 100ms\n"); |
2445 | IL_DEBUG_MAC80211(il, | 2445 | D_MAC80211( |
2446 | "leaving - scan abort failed.\n"); | 2446 | "leaving - scan abort failed.\n"); |
2447 | mutex_unlock(&il->mutex); | 2447 | mutex_unlock(&il->mutex); |
2448 | return; | 2448 | return; |
@@ -2471,7 +2471,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2471 | il_beacon_update(hw, vif); | 2471 | il_beacon_update(hw, vif); |
2472 | 2472 | ||
2473 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { | 2473 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { |
2474 | IL_DEBUG_MAC80211(il, "ERP_PREAMBLE %d\n", | 2474 | D_MAC80211("ERP_PREAMBLE %d\n", |
2475 | bss_conf->use_short_preamble); | 2475 | bss_conf->use_short_preamble); |
2476 | if (bss_conf->use_short_preamble) | 2476 | if (bss_conf->use_short_preamble) |
2477 | ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; | 2477 | ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; |
@@ -2480,7 +2480,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2480 | } | 2480 | } |
2481 | 2481 | ||
2482 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { | 2482 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { |
2483 | IL_DEBUG_MAC80211(il, | 2483 | D_MAC80211( |
2484 | "ERP_CTS %d\n", bss_conf->use_cts_prot); | 2484 | "ERP_CTS %d\n", bss_conf->use_cts_prot); |
2485 | if (bss_conf->use_cts_prot && | 2485 | if (bss_conf->use_cts_prot && |
2486 | (il->band != IEEE80211_BAND_5GHZ)) | 2486 | (il->band != IEEE80211_BAND_5GHZ)) |
@@ -2518,7 +2518,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2518 | } | 2518 | } |
2519 | 2519 | ||
2520 | if (changes & BSS_CHANGED_ASSOC) { | 2520 | if (changes & BSS_CHANGED_ASSOC) { |
2521 | IL_DEBUG_MAC80211(il, "ASSOC %d\n", bss_conf->assoc); | 2521 | D_MAC80211("ASSOC %d\n", bss_conf->assoc); |
2522 | if (bss_conf->assoc) { | 2522 | if (bss_conf->assoc) { |
2523 | il->timestamp = bss_conf->timestamp; | 2523 | il->timestamp = bss_conf->timestamp; |
2524 | 2524 | ||
@@ -2529,7 +2529,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2529 | } | 2529 | } |
2530 | 2530 | ||
2531 | if (changes && il_is_associated_ctx(ctx) && bss_conf->aid) { | 2531 | if (changes && il_is_associated_ctx(ctx) && bss_conf->aid) { |
2532 | IL_DEBUG_MAC80211(il, "Changes (%#x) while associated\n", | 2532 | D_MAC80211("Changes (%#x) while associated\n", |
2533 | changes); | 2533 | changes); |
2534 | ret = il_send_rxon_assoc(il, ctx); | 2534 | ret = il_send_rxon_assoc(il, ctx); |
2535 | if (!ret) { | 2535 | if (!ret) { |
@@ -2561,7 +2561,7 @@ void il_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2561 | 2561 | ||
2562 | mutex_unlock(&il->mutex); | 2562 | mutex_unlock(&il->mutex); |
2563 | 2563 | ||
2564 | IL_DEBUG_MAC80211(il, "leave\n"); | 2564 | D_MAC80211("leave\n"); |
2565 | } | 2565 | } |
2566 | EXPORT_SYMBOL(il_mac_bss_info_changed); | 2566 | EXPORT_SYMBOL(il_mac_bss_info_changed); |
2567 | 2567 | ||
@@ -2591,7 +2591,7 @@ irqreturn_t il_isr(int irq, void *data) | |||
2591 | * This may be due to IRQ shared with another device, | 2591 | * This may be due to IRQ shared with another device, |
2592 | * or due to sporadic interrupts thrown from our NIC. */ | 2592 | * or due to sporadic interrupts thrown from our NIC. */ |
2593 | if (!inta && !inta_fh) { | 2593 | if (!inta && !inta_fh) { |
2594 | IL_DEBUG_ISR(il, | 2594 | D_ISR( |
2595 | "Ignore interrupt, inta == 0, inta_fh == 0\n"); | 2595 | "Ignore interrupt, inta == 0, inta_fh == 0\n"); |
2596 | goto none; | 2596 | goto none; |
2597 | } | 2597 | } |
@@ -2603,7 +2603,7 @@ irqreturn_t il_isr(int irq, void *data) | |||
2603 | goto unplugged; | 2603 | goto unplugged; |
2604 | } | 2604 | } |
2605 | 2605 | ||
2606 | IL_DEBUG_ISR(il, "ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 2606 | D_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
2607 | inta, inta_mask, inta_fh); | 2607 | inta, inta_mask, inta_fh); |
2608 | 2608 | ||
2609 | inta &= ~CSR_INT_BIT_SCD; | 2609 | inta &= ~CSR_INT_BIT_SCD; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-debug.h b/drivers/net/wireless/iwlegacy/iwl-debug.h index c6dcbf3a2ff..2c5c42fa4bb 100644 --- a/drivers/net/wireless/iwlegacy/iwl-debug.h +++ b/drivers/net/wireless/iwlegacy/iwl-debug.h | |||
@@ -37,17 +37,17 @@ extern u32 il_debug_level; | |||
37 | #define IL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a) | 37 | #define IL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a) |
38 | #define IL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a) | 38 | #define IL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a) |
39 | 39 | ||
40 | #define il_print_hex_error(il, p, len) \ | 40 | #define il_print_hex_error(il, p, len) \ |
41 | do { \ | 41 | do { \ |
42 | print_hex_dump(KERN_ERR, "iwl data: ", \ | 42 | print_hex_dump(KERN_ERR, "iwl data: ", \ |
43 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ | 43 | DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ |
44 | } while (0) | 44 | } while (0) |
45 | 45 | ||
46 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 46 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
47 | #define IL_DEBUG(__priv, level, fmt, args...) \ | 47 | #define IL_DBG(level, fmt, args...) \ |
48 | do { \ | 48 | do { \ |
49 | if (il_get_debug_level(__priv) & (level)) \ | 49 | if (il_get_debug_level(il) & level) \ |
50 | dev_printk(KERN_ERR, &(__priv->hw->wiphy->dev), \ | 50 | dev_printk(KERN_ERR, &il->hw->wiphy->dev, \ |
51 | "%c %s " fmt, in_interrupt() ? 'I' : 'U', \ | 51 | "%c %s " fmt, in_interrupt() ? 'I' : 'U', \ |
52 | __func__ , ## args); \ | 52 | __func__ , ## args); \ |
53 | } while (0) | 53 | } while (0) |
@@ -60,7 +60,7 @@ do { \ | |||
60 | } while (0) | 60 | } while (0) |
61 | 61 | ||
62 | #else | 62 | #else |
63 | #define IL_DEBUG(__priv, level, fmt, args...) | 63 | #define IL_DBG(level, fmt, args...) |
64 | static inline void il_print_hex_dump(struct il_priv *il, int level, | 64 | static inline void il_print_hex_dump(struct il_priv *il, int level, |
65 | const void *p, u32 len) | 65 | const void *p, u32 len) |
66 | {} | 66 | {} |
@@ -91,12 +91,12 @@ static inline void il_dbgfs_unregister(struct il_priv *il) | |||
91 | * where xxxx should be the name of the classification (for example, WEP). | 91 | * where xxxx should be the name of the classification (for example, WEP). |
92 | * | 92 | * |
93 | * You then need to either add a IL_xxxx_DEBUG() macro definition for your | 93 | * You then need to either add a IL_xxxx_DEBUG() macro definition for your |
94 | * classification, or use IL_DEBUG(IL_DL_xxxx, ...) whenever you want | 94 | * classification, or use IL_DBG(IL_DL_xxxx, ...) whenever you want |
95 | * to send output to that classification. | 95 | * to send output to that classification. |
96 | * | 96 | * |
97 | * The active debug levels can be accessed via files | 97 | * The active debug levels can be accessed via files |
98 | * | 98 | * |
99 | * /sys/module/iwl4965/parameters/debug{50} | 99 | * /sys/module/iwl4965/parameters/debug |
100 | * /sys/module/iwl3945/parameters/debug | 100 | * /sys/module/iwl3945/parameters/debug |
101 | * /sys/class/net/wlan0/device/debug_level | 101 | * /sys/class/net/wlan0/device/debug_level |
102 | * | 102 | * |
@@ -110,7 +110,7 @@ static inline void il_dbgfs_unregister(struct il_priv *il) | |||
110 | #define IL_DL_STATE (1 << 3) | 110 | #define IL_DL_STATE (1 << 3) |
111 | /* 0x000000F0 - 0x00000010 */ | 111 | /* 0x000000F0 - 0x00000010 */ |
112 | #define IL_DL_MACDUMP (1 << 4) | 112 | #define IL_DL_MACDUMP (1 << 4) |
113 | #define IL_DL_HCMD_DUMP (1 << 5) | 113 | #define IL_DL_HCMD_DUMP (1 << 5) |
114 | #define IL_DL_EEPROM (1 << 6) | 114 | #define IL_DL_EEPROM (1 << 6) |
115 | #define IL_DL_RADIO (1 << 7) | 115 | #define IL_DL_RADIO (1 << 7) |
116 | /* 0x00000F00 - 0x00000100 */ | 116 | /* 0x00000F00 - 0x00000100 */ |
@@ -126,7 +126,7 @@ static inline void il_dbgfs_unregister(struct il_priv *il) | |||
126 | /* 0x000F0000 - 0x00010000 */ | 126 | /* 0x000F0000 - 0x00010000 */ |
127 | #define IL_DL_FW (1 << 16) | 127 | #define IL_DL_FW (1 << 16) |
128 | #define IL_DL_RF_KILL (1 << 17) | 128 | #define IL_DL_RF_KILL (1 << 17) |
129 | #define IL_DL_FW_ERRORS (1 << 18) | 129 | #define IL_DL_FW_ERRORS (1 << 18) |
130 | #define IL_DL_LED (1 << 19) | 130 | #define IL_DL_LED (1 << 19) |
131 | /* 0x00F00000 - 0x00100000 */ | 131 | /* 0x00F00000 - 0x00100000 */ |
132 | #define IL_DL_RATE (1 << 20) | 132 | #define IL_DL_RATE (1 << 20) |
@@ -143,34 +143,34 @@ static inline void il_dbgfs_unregister(struct il_priv *il) | |||
143 | #define IL_DL_TX_REPLY (1 << 30) | 143 | #define IL_DL_TX_REPLY (1 << 30) |
144 | #define IL_DL_QOS (1 << 31) | 144 | #define IL_DL_QOS (1 << 31) |
145 | 145 | ||
146 | #define IL_DEBUG_INFO(p, f, a...) IL_DEBUG(p, IL_DL_INFO, f, ## a) | 146 | #define D_INFO(f, a...) IL_DBG(IL_DL_INFO, f, ## a) |
147 | #define IL_DEBUG_MAC80211(p, f, a...) IL_DEBUG(p, IL_DL_MAC80211, f, ## a) | 147 | #define D_MAC80211(f, a...) IL_DBG(IL_DL_MAC80211, f, ## a) |
148 | #define IL_DEBUG_MACDUMP(p, f, a...) IL_DEBUG(p, IL_DL_MACDUMP, f, ## a) | 148 | #define D_MACDUMP(f, a...) IL_DBG(IL_DL_MACDUMP, f, ## a) |
149 | #define IL_DEBUG_TEMP(p, f, a...) IL_DEBUG(p, IL_DL_TEMP, f, ## a) | 149 | #define D_TEMP(f, a...) IL_DBG(IL_DL_TEMP, f, ## a) |
150 | #define IL_DEBUG_SCAN(p, f, a...) IL_DEBUG(p, IL_DL_SCAN, f, ## a) | 150 | #define D_SCAN(f, a...) IL_DBG(IL_DL_SCAN, f, ## a) |
151 | #define IL_DEBUG_RX(p, f, a...) IL_DEBUG(p, IL_DL_RX, f, ## a) | 151 | #define D_RX(f, a...) IL_DBG(IL_DL_RX, f, ## a) |
152 | #define IL_DEBUG_TX(p, f, a...) IL_DEBUG(p, IL_DL_TX, f, ## a) | 152 | #define D_TX(f, a...) IL_DBG(IL_DL_TX, f, ## a) |
153 | #define IL_DEBUG_ISR(p, f, a...) IL_DEBUG(p, IL_DL_ISR, f, ## a) | 153 | #define D_ISR(f, a...) IL_DBG(IL_DL_ISR, f, ## a) |
154 | #define IL_DEBUG_LED(p, f, a...) IL_DEBUG(p, IL_DL_LED, f, ## a) | 154 | #define D_LED(f, a...) IL_DBG(IL_DL_LED, f, ## a) |
155 | #define IL_DEBUG_WEP(p, f, a...) IL_DEBUG(p, IL_DL_WEP, f, ## a) | 155 | #define D_WEP(f, a...) IL_DBG(IL_DL_WEP, f, ## a) |
156 | #define IL_DEBUG_HC(p, f, a...) IL_DEBUG(p, IL_DL_HCMD, f, ## a) | 156 | #define D_HC(f, a...) IL_DBG(IL_DL_HCMD, f, ## a) |
157 | #define IL_DEBUG_HC_DUMP(p, f, a...) IL_DEBUG(p, IL_DL_HCMD_DUMP, f, ## a) | 157 | #define D_HC_DUMP(f, a...) IL_DBG(IL_DL_HCMD_DUMP, f, ## a) |
158 | #define IL_DEBUG_EEPROM(p, f, a...) IL_DEBUG(p, IL_DL_EEPROM, f, ## a) | 158 | #define D_EEPROM(f, a...) IL_DBG(IL_DL_EEPROM, f, ## a) |
159 | #define IL_DEBUG_CALIB(p, f, a...) IL_DEBUG(p, IL_DL_CALIB, f, ## a) | 159 | #define D_CALIB(f, a...) IL_DBG(IL_DL_CALIB, f, ## a) |
160 | #define IL_DEBUG_FW(p, f, a...) IL_DEBUG(p, IL_DL_FW, f, ## a) | 160 | #define D_FW(f, a...) IL_DBG(IL_DL_FW, f, ## a) |
161 | #define IL_DEBUG_RF_KILL(p, f, a...) IL_DEBUG(p, IL_DL_RF_KILL, f, ## a) | 161 | #define D_RF_KILL(f, a...) IL_DBG(IL_DL_RF_KILL, f, ## a) |
162 | #define IL_DEBUG_DROP(p, f, a...) IL_DEBUG(p, IL_DL_DROP, f, ## a) | 162 | #define D_DROP(f, a...) IL_DBG(IL_DL_DROP, f, ## a) |
163 | #define IL_DEBUG_AP(p, f, a...) IL_DEBUG(p, IL_DL_AP, f, ## a) | 163 | #define D_AP(f, a...) IL_DBG(IL_DL_AP, f, ## a) |
164 | #define IL_DEBUG_TXPOWER(p, f, a...) IL_DEBUG(p, IL_DL_TXPOWER, f, ## a) | 164 | #define D_TXPOWER(f, a...) IL_DBG(IL_DL_TXPOWER, f, ## a) |
165 | #define IL_DEBUG_RATE(p, f, a...) IL_DEBUG(p, IL_DL_RATE, f, ## a) | 165 | #define D_RATE(f, a...) IL_DBG(IL_DL_RATE, f, ## a) |
166 | #define IL_DEBUG_NOTIF(p, f, a...) IL_DEBUG(p, IL_DL_NOTIF, f, ## a) | 166 | #define D_NOTIF(f, a...) IL_DBG(IL_DL_NOTIF, f, ## a) |
167 | #define IL_DEBUG_ASSOC(p, f, a...) IL_DEBUG(p, IL_DL_ASSOC, f, ## a) | 167 | #define D_ASSOC(f, a...) IL_DBG(IL_DL_ASSOC, f, ## a) |
168 | #define IL_DEBUG_HT(p, f, a...) IL_DEBUG(p, IL_DL_HT, f, ## a) | 168 | #define D_HT(f, a...) IL_DBG(IL_DL_HT, f, ## a) |
169 | #define IL_DEBUG_STATS(p, f, a...) IL_DEBUG(p, IL_DL_STATS, f, ## a) | 169 | #define D_STATS(f, a...) IL_DBG(IL_DL_STATS, f, ## a) |
170 | #define IL_DEBUG_TX_REPLY(p, f, a...) IL_DEBUG(p, IL_DL_TX_REPLY, f, ## a) | 170 | #define D_TX_REPLY(f, a...) IL_DBG(IL_DL_TX_REPLY, f, ## a) |
171 | #define IL_DEBUG_QOS(p, f, a...) IL_DEBUG(p, IL_DL_QOS, f, ## a) | 171 | #define D_QOS(f, a...) IL_DBG(IL_DL_QOS, f, ## a) |
172 | #define IL_DEBUG_RADIO(p, f, a...) IL_DEBUG(p, IL_DL_RADIO, f, ## a) | 172 | #define D_RADIO(f, a...) IL_DBG(IL_DL_RADIO, f, ## a) |
173 | #define IL_DEBUG_POWER(p, f, a...) IL_DEBUG(p, IL_DL_POWER, f, ## a) | 173 | #define D_POWER(f, a...) IL_DBG(IL_DL_POWER, f, ## a) |
174 | #define IL_DEBUG_11H(p, f, a...) IL_DEBUG(p, IL_DL_11H, f, ## a) | 174 | #define D_11H(f, a...) IL_DBG(IL_DL_11H, f, ## a) |
175 | 175 | ||
176 | #endif | 176 | #endif |
diff --git a/drivers/net/wireless/iwlegacy/iwl-eeprom.c b/drivers/net/wireless/iwlegacy/iwl-eeprom.c index f6b9d6d28d9..33fe5989e82 100644 --- a/drivers/net/wireless/iwlegacy/iwl-eeprom.c +++ b/drivers/net/wireless/iwlegacy/iwl-eeprom.c | |||
@@ -147,7 +147,7 @@ static int il_eeprom_verify_signature(struct il_priv *il) | |||
147 | u32 gp = il_read32(il, CSR_EEPROM_GP) & CSR_EEPROM_GP_VALID_MSK; | 147 | u32 gp = il_read32(il, CSR_EEPROM_GP) & CSR_EEPROM_GP_VALID_MSK; |
148 | int ret = 0; | 148 | int ret = 0; |
149 | 149 | ||
150 | IL_DEBUG_EEPROM(il, "EEPROM signature=0x%08x\n", gp); | 150 | D_EEPROM("EEPROM signature=0x%08x\n", gp); |
151 | switch (gp) { | 151 | switch (gp) { |
152 | case CSR_EEPROM_GP_GOOD_SIG_EEP_LESS_THAN_4K: | 152 | case CSR_EEPROM_GP_GOOD_SIG_EEP_LESS_THAN_4K: |
153 | case CSR_EEPROM_GP_GOOD_SIG_EEP_MORE_THAN_4K: | 153 | case CSR_EEPROM_GP_GOOD_SIG_EEP_MORE_THAN_4K: |
@@ -194,7 +194,7 @@ int il_eeprom_init(struct il_priv *il) | |||
194 | 194 | ||
195 | /* allocate eeprom */ | 195 | /* allocate eeprom */ |
196 | sz = il->cfg->base_params->eeprom_size; | 196 | sz = il->cfg->base_params->eeprom_size; |
197 | IL_DEBUG_EEPROM(il, "NVM size = %d\n", sz); | 197 | D_EEPROM("NVM size = %d\n", sz); |
198 | il->eeprom = kzalloc(sz, GFP_KERNEL); | 198 | il->eeprom = kzalloc(sz, GFP_KERNEL); |
199 | if (!il->eeprom) { | 199 | if (!il->eeprom) { |
200 | ret = -ENOMEM; | 200 | ret = -ENOMEM; |
@@ -239,7 +239,7 @@ int il_eeprom_init(struct il_priv *il) | |||
239 | e[addr / 2] = cpu_to_le16(r >> 16); | 239 | e[addr / 2] = cpu_to_le16(r >> 16); |
240 | } | 240 | } |
241 | 241 | ||
242 | IL_DEBUG_EEPROM(il, "NVM Type: %s, version: 0x%x\n", | 242 | D_EEPROM("NVM Type: %s, version: 0x%x\n", |
243 | "EEPROM", | 243 | "EEPROM", |
244 | il_eeprom_query16(il, EEPROM_VERSION)); | 244 | il_eeprom_query16(il, EEPROM_VERSION)); |
245 | 245 | ||
@@ -339,7 +339,7 @@ static int il_mod_ht40_chan_info(struct il_priv *il, | |||
339 | if (!il_is_channel_valid(ch_info)) | 339 | if (!il_is_channel_valid(ch_info)) |
340 | return -1; | 340 | return -1; |
341 | 341 | ||
342 | IL_DEBUG_EEPROM(il, "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm):" | 342 | D_EEPROM("HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm):" |
343 | " Ad-Hoc %ssupported\n", | 343 | " Ad-Hoc %ssupported\n", |
344 | ch_info->channel, | 344 | ch_info->channel, |
345 | il_is_channel_a_band(ch_info) ? | 345 | il_is_channel_a_band(ch_info) ? |
@@ -380,11 +380,11 @@ int il_init_channel_map(struct il_priv *il) | |||
380 | struct il_channel_info *ch_info; | 380 | struct il_channel_info *ch_info; |
381 | 381 | ||
382 | if (il->channel_count) { | 382 | if (il->channel_count) { |
383 | IL_DEBUG_EEPROM(il, "Channel map already initialized.\n"); | 383 | D_EEPROM("Channel map already initialized.\n"); |
384 | return 0; | 384 | return 0; |
385 | } | 385 | } |
386 | 386 | ||
387 | IL_DEBUG_EEPROM(il, "Initializing regulatory info from EEPROM\n"); | 387 | D_EEPROM("Initializing regulatory info from EEPROM\n"); |
388 | 388 | ||
389 | il->channel_count = | 389 | il->channel_count = |
390 | ARRAY_SIZE(il_eeprom_band_1) + | 390 | ARRAY_SIZE(il_eeprom_band_1) + |
@@ -393,7 +393,7 @@ int il_init_channel_map(struct il_priv *il) | |||
393 | ARRAY_SIZE(il_eeprom_band_4) + | 393 | ARRAY_SIZE(il_eeprom_band_4) + |
394 | ARRAY_SIZE(il_eeprom_band_5); | 394 | ARRAY_SIZE(il_eeprom_band_5); |
395 | 395 | ||
396 | IL_DEBUG_EEPROM(il, "Parsing data for %d channels.\n", | 396 | D_EEPROM("Parsing data for %d channels.\n", |
397 | il->channel_count); | 397 | il->channel_count); |
398 | 398 | ||
399 | il->channel_info = kzalloc(sizeof(struct il_channel_info) * | 399 | il->channel_info = kzalloc(sizeof(struct il_channel_info) * |
@@ -433,7 +433,7 @@ int il_init_channel_map(struct il_priv *il) | |||
433 | IEEE80211_CHAN_NO_HT40; | 433 | IEEE80211_CHAN_NO_HT40; |
434 | 434 | ||
435 | if (!(il_is_channel_valid(ch_info))) { | 435 | if (!(il_is_channel_valid(ch_info))) { |
436 | IL_DEBUG_EEPROM(il, | 436 | D_EEPROM( |
437 | "Ch. %d Flags %x [%sGHz] - " | 437 | "Ch. %d Flags %x [%sGHz] - " |
438 | "No traffic\n", | 438 | "No traffic\n", |
439 | ch_info->channel, | 439 | ch_info->channel, |
@@ -450,7 +450,7 @@ int il_init_channel_map(struct il_priv *il) | |||
450 | ch_info->scan_power = eeprom_ch_info[ch].max_power_avg; | 450 | ch_info->scan_power = eeprom_ch_info[ch].max_power_avg; |
451 | ch_info->min_power = 0; | 451 | ch_info->min_power = 0; |
452 | 452 | ||
453 | IL_DEBUG_EEPROM(il, "Ch. %d [%sGHz] " | 453 | D_EEPROM("Ch. %d [%sGHz] " |
454 | "%s%s%s%s%s%s(0x%02x %ddBm):" | 454 | "%s%s%s%s%s%s(0x%02x %ddBm):" |
455 | " Ad-Hoc %ssupported\n", | 455 | " Ad-Hoc %ssupported\n", |
456 | ch_info->channel, | 456 | ch_info->channel, |
diff --git a/drivers/net/wireless/iwlegacy/iwl-hcmd.c b/drivers/net/wireless/iwlegacy/iwl-hcmd.c index f16e31109e0..61cf0d83af5 100644 --- a/drivers/net/wireless/iwlegacy/iwl-hcmd.c +++ b/drivers/net/wireless/iwlegacy/iwl-hcmd.c | |||
@@ -104,11 +104,11 @@ static void il_generic_cmd_callback(struct il_priv *il, | |||
104 | switch (cmd->hdr.cmd) { | 104 | switch (cmd->hdr.cmd) { |
105 | case REPLY_TX_LINK_QUALITY_CMD: | 105 | case REPLY_TX_LINK_QUALITY_CMD: |
106 | case SENSITIVITY_CMD: | 106 | case SENSITIVITY_CMD: |
107 | IL_DEBUG_HC_DUMP(il, "back from %s (0x%08X)\n", | 107 | D_HC_DUMP("back from %s (0x%08X)\n", |
108 | il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); | 108 | il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); |
109 | break; | 109 | break; |
110 | default: | 110 | default: |
111 | IL_DEBUG_HC(il, "back from %s (0x%08X)\n", | 111 | D_HC("back from %s (0x%08X)\n", |
112 | il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); | 112 | il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); |
113 | } | 113 | } |
114 | #endif | 114 | #endif |
@@ -152,11 +152,11 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd) | |||
152 | /* A synchronous command can not have a callback set. */ | 152 | /* A synchronous command can not have a callback set. */ |
153 | BUG_ON(cmd->callback); | 153 | BUG_ON(cmd->callback); |
154 | 154 | ||
155 | IL_DEBUG_INFO(il, "Attempting to send sync command %s\n", | 155 | D_INFO("Attempting to send sync command %s\n", |
156 | il_get_cmd_string(cmd->id)); | 156 | il_get_cmd_string(cmd->id)); |
157 | 157 | ||
158 | set_bit(STATUS_HCMD_ACTIVE, &il->status); | 158 | set_bit(STATUS_HCMD_ACTIVE, &il->status); |
159 | IL_DEBUG_INFO(il, "Setting HCMD_ACTIVE for command %s\n", | 159 | D_INFO("Setting HCMD_ACTIVE for command %s\n", |
160 | il_get_cmd_string(cmd->id)); | 160 | il_get_cmd_string(cmd->id)); |
161 | 161 | ||
162 | cmd_idx = il_enqueue_hcmd(il, cmd); | 162 | cmd_idx = il_enqueue_hcmd(il, cmd); |
@@ -178,7 +178,7 @@ int il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd) | |||
178 | jiffies_to_msecs(HOST_COMPLETE_TIMEOUT)); | 178 | jiffies_to_msecs(HOST_COMPLETE_TIMEOUT)); |
179 | 179 | ||
180 | clear_bit(STATUS_HCMD_ACTIVE, &il->status); | 180 | clear_bit(STATUS_HCMD_ACTIVE, &il->status); |
181 | IL_DEBUG_INFO(il, | 181 | D_INFO( |
182 | "Clearing HCMD_ACTIVE for command %s\n", | 182 | "Clearing HCMD_ACTIVE for command %s\n", |
183 | il_get_cmd_string(cmd->id)); | 183 | il_get_cmd_string(cmd->id)); |
184 | ret = -ETIMEDOUT; | 184 | ret = -ETIMEDOUT; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-helpers.h b/drivers/net/wireless/iwlegacy/iwl-helpers.h index e55f2ef1c57..a0a84b29525 100644 --- a/drivers/net/wireless/iwlegacy/iwl-helpers.h +++ b/drivers/net/wireless/iwlegacy/iwl-helpers.h | |||
@@ -155,18 +155,18 @@ static inline void il_disable_interrupts(struct il_priv *il) | |||
155 | * from uCode or flow handler (Rx/Tx DMA) */ | 155 | * from uCode or flow handler (Rx/Tx DMA) */ |
156 | il_write32(il, CSR_INT, 0xffffffff); | 156 | il_write32(il, CSR_INT, 0xffffffff); |
157 | il_write32(il, CSR_FH_INT_STATUS, 0xffffffff); | 157 | il_write32(il, CSR_FH_INT_STATUS, 0xffffffff); |
158 | IL_DEBUG_ISR(il, "Disabled interrupts\n"); | 158 | D_ISR("Disabled interrupts\n"); |
159 | } | 159 | } |
160 | 160 | ||
161 | static inline void il_enable_rfkill_int(struct il_priv *il) | 161 | static inline void il_enable_rfkill_int(struct il_priv *il) |
162 | { | 162 | { |
163 | IL_DEBUG_ISR(il, "Enabling rfkill interrupt\n"); | 163 | D_ISR("Enabling rfkill interrupt\n"); |
164 | il_write32(il, CSR_INT_MASK, CSR_INT_BIT_RF_KILL); | 164 | il_write32(il, CSR_INT_MASK, CSR_INT_BIT_RF_KILL); |
165 | } | 165 | } |
166 | 166 | ||
167 | static inline void il_enable_interrupts(struct il_priv *il) | 167 | static inline void il_enable_interrupts(struct il_priv *il) |
168 | { | 168 | { |
169 | IL_DEBUG_ISR(il, "Enabling interrupts\n"); | 169 | D_ISR("Enabling interrupts\n"); |
170 | set_bit(STATUS_INT_ENABLED, &il->status); | 170 | set_bit(STATUS_INT_ENABLED, &il->status); |
171 | il_write32(il, CSR_INT_MASK, il->inta_mask); | 171 | il_write32(il, CSR_INT_MASK, il->inta_mask); |
172 | } | 172 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl-led.c b/drivers/net/wireless/iwlegacy/iwl-led.c index 13add43987b..b4d71cf7e39 100644 --- a/drivers/net/wireless/iwlegacy/iwl-led.c +++ b/drivers/net/wireless/iwlegacy/iwl-led.c | |||
@@ -118,7 +118,7 @@ static int il_led_cmd(struct il_priv *il, | |||
118 | on = IL_LED_SOLID; | 118 | on = IL_LED_SOLID; |
119 | } | 119 | } |
120 | 120 | ||
121 | IL_DEBUG_LED(il, "Led blink time compensation=%u\n", | 121 | D_LED("Led blink time compensation=%u\n", |
122 | il->cfg->base_params->led_compensation); | 122 | il->cfg->base_params->led_compensation); |
123 | led_cmd.on = il_blink_compensation(il, on, | 123 | led_cmd.on = il_blink_compensation(il, on, |
124 | il->cfg->base_params->led_compensation); | 124 | il->cfg->base_params->led_compensation); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-power.c b/drivers/net/wireless/iwlegacy/iwl-power.c index 63862464fcd..33aec397247 100644 --- a/drivers/net/wireless/iwlegacy/iwl-power.c +++ b/drivers/net/wireless/iwlegacy/iwl-power.c | |||
@@ -68,19 +68,19 @@ static void il_power_sleep_cam_cmd(struct il_priv *il, | |||
68 | if (il->power_data.pci_pm) | 68 | if (il->power_data.pci_pm) |
69 | cmd->flags |= IL_POWER_PCI_PM_MSK; | 69 | cmd->flags |= IL_POWER_PCI_PM_MSK; |
70 | 70 | ||
71 | IL_DEBUG_POWER(il, "Sleep command for CAM\n"); | 71 | D_POWER("Sleep command for CAM\n"); |
72 | } | 72 | } |
73 | 73 | ||
74 | static int | 74 | static int |
75 | il_set_power(struct il_priv *il, struct il_powertable_cmd *cmd) | 75 | il_set_power(struct il_priv *il, struct il_powertable_cmd *cmd) |
76 | { | 76 | { |
77 | IL_DEBUG_POWER(il, "Sending power/sleep command\n"); | 77 | D_POWER("Sending power/sleep command\n"); |
78 | IL_DEBUG_POWER(il, "Flags value = 0x%08X\n", cmd->flags); | 78 | D_POWER("Flags value = 0x%08X\n", cmd->flags); |
79 | IL_DEBUG_POWER(il, "Tx timeout = %u\n", | 79 | D_POWER("Tx timeout = %u\n", |
80 | le32_to_cpu(cmd->tx_data_timeout)); | 80 | le32_to_cpu(cmd->tx_data_timeout)); |
81 | IL_DEBUG_POWER(il, "Rx timeout = %u\n", | 81 | D_POWER("Rx timeout = %u\n", |
82 | le32_to_cpu(cmd->rx_data_timeout)); | 82 | le32_to_cpu(cmd->rx_data_timeout)); |
83 | IL_DEBUG_POWER(il, | 83 | D_POWER( |
84 | "Sleep interval vector = { %d , %d , %d , %d , %d }\n", | 84 | "Sleep interval vector = { %d , %d , %d , %d , %d }\n", |
85 | le32_to_cpu(cmd->sleep_interval[0]), | 85 | le32_to_cpu(cmd->sleep_interval[0]), |
86 | le32_to_cpu(cmd->sleep_interval[1]), | 86 | le32_to_cpu(cmd->sleep_interval[1]), |
@@ -114,7 +114,7 @@ il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd, | |||
114 | /* scan complete use sleep_power_next, need to be updated */ | 114 | /* scan complete use sleep_power_next, need to be updated */ |
115 | memcpy(&il->power_data.sleep_cmd_next, cmd, sizeof(*cmd)); | 115 | memcpy(&il->power_data.sleep_cmd_next, cmd, sizeof(*cmd)); |
116 | if (test_bit(STATUS_SCANNING, &il->status) && !force) { | 116 | if (test_bit(STATUS_SCANNING, &il->status) && !force) { |
117 | IL_DEBUG_INFO(il, "Defer power set mode while scanning\n"); | 117 | D_INFO("Defer power set mode while scanning\n"); |
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
120 | 120 | ||
@@ -129,7 +129,7 @@ il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd, | |||
129 | if (il->cfg->ops->lib->update_chain_flags && update_chains) | 129 | if (il->cfg->ops->lib->update_chain_flags && update_chains) |
130 | il->cfg->ops->lib->update_chain_flags(il); | 130 | il->cfg->ops->lib->update_chain_flags(il); |
131 | else if (il->cfg->ops->lib->update_chain_flags) | 131 | else if (il->cfg->ops->lib->update_chain_flags) |
132 | IL_DEBUG_POWER(il, | 132 | D_POWER( |
133 | "Cannot update the power, chain noise " | 133 | "Cannot update the power, chain noise " |
134 | "calibration running: %d\n", | 134 | "calibration running: %d\n", |
135 | il->chain_noise_data.state); | 135 | il->chain_noise_data.state); |
diff --git a/drivers/net/wireless/iwlegacy/iwl-rx.c b/drivers/net/wireless/iwlegacy/iwl-rx.c index b6c5dd09bd8..183acdc69a2 100644 --- a/drivers/net/wireless/iwlegacy/iwl-rx.c +++ b/drivers/net/wireless/iwlegacy/iwl-rx.c | |||
@@ -141,7 +141,7 @@ il_rx_queue_update_write_ptr(struct il_priv *il, | |||
141 | reg = il_read32(il, CSR_UCODE_DRV_GP1); | 141 | reg = il_read32(il, CSR_UCODE_DRV_GP1); |
142 | 142 | ||
143 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { | 143 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { |
144 | IL_DEBUG_INFO(il, | 144 | D_INFO( |
145 | "Rx queue requesting wakeup," | 145 | "Rx queue requesting wakeup," |
146 | " GP1 = 0x%x\n", reg); | 146 | " GP1 = 0x%x\n", reg); |
147 | il_set_bit(il, CSR_GP_CNTRL, | 147 | il_set_bit(il, CSR_GP_CNTRL, |
@@ -217,7 +217,7 @@ void il_rx_spectrum_measure_notif(struct il_priv *il, | |||
217 | struct il_spectrum_notification *report = &(pkt->u.spectrum_notif); | 217 | struct il_spectrum_notification *report = &(pkt->u.spectrum_notif); |
218 | 218 | ||
219 | if (!report->state) { | 219 | if (!report->state) { |
220 | IL_DEBUG_11H(il, | 220 | D_11H( |
221 | "Spectrum Measure Notification: Start\n"); | 221 | "Spectrum Measure Notification: Start\n"); |
222 | return; | 222 | return; |
223 | } | 223 | } |
@@ -248,7 +248,7 @@ int il_set_decrypted_flag(struct il_priv *il, | |||
248 | if (!(fc & IEEE80211_FCTL_PROTECTED)) | 248 | if (!(fc & IEEE80211_FCTL_PROTECTED)) |
249 | return 0; | 249 | return 0; |
250 | 250 | ||
251 | IL_DEBUG_RX(il, "decrypt_res:0x%x\n", decrypt_res); | 251 | D_RX("decrypt_res:0x%x\n", decrypt_res); |
252 | switch (decrypt_res & RX_RES_STATUS_SEC_TYPE_MSK) { | 252 | switch (decrypt_res & RX_RES_STATUS_SEC_TYPE_MSK) { |
253 | case RX_RES_STATUS_SEC_TYPE_TKIP: | 253 | case RX_RES_STATUS_SEC_TYPE_TKIP: |
254 | /* The uCode has got a bad phase 1 Key, pushes the packet. | 254 | /* The uCode has got a bad phase 1 Key, pushes the packet. |
@@ -262,13 +262,13 @@ int il_set_decrypted_flag(struct il_priv *il, | |||
262 | RX_RES_STATUS_BAD_ICV_MIC) { | 262 | RX_RES_STATUS_BAD_ICV_MIC) { |
263 | /* bad ICV, the packet is destroyed since the | 263 | /* bad ICV, the packet is destroyed since the |
264 | * decryption is inplace, drop it */ | 264 | * decryption is inplace, drop it */ |
265 | IL_DEBUG_RX(il, "Packet destroyed\n"); | 265 | D_RX("Packet destroyed\n"); |
266 | return -1; | 266 | return -1; |
267 | } | 267 | } |
268 | case RX_RES_STATUS_SEC_TYPE_CCMP: | 268 | case RX_RES_STATUS_SEC_TYPE_CCMP: |
269 | if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) == | 269 | if ((decrypt_res & RX_RES_STATUS_DECRYPT_TYPE_MSK) == |
270 | RX_RES_STATUS_DECRYPT_OK) { | 270 | RX_RES_STATUS_DECRYPT_OK) { |
271 | IL_DEBUG_RX(il, "hw decrypt successfully!!!\n"); | 271 | D_RX("hw decrypt successfully!!!\n"); |
272 | stats->flag |= RX_FLAG_DECRYPTED; | 272 | stats->flag |= RX_FLAG_DECRYPTED; |
273 | } | 273 | } |
274 | break; | 274 | break; |
diff --git a/drivers/net/wireless/iwlegacy/iwl-scan.c b/drivers/net/wireless/iwlegacy/iwl-scan.c index 5a967d2b15d..c534dcef4a7 100644 --- a/drivers/net/wireless/iwlegacy/iwl-scan.c +++ b/drivers/net/wireless/iwlegacy/iwl-scan.c | |||
@@ -85,7 +85,7 @@ static int il_send_scan_abort(struct il_priv *il) | |||
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 | IL_DEBUG_SCAN(il, "SCAN_ABORT ret %d.\n", pkt->u.status); | 88 | D_SCAN("SCAN_ABORT ret %d.\n", pkt->u.status); |
89 | ret = -EIO; | 89 | ret = -EIO; |
90 | } | 90 | } |
91 | 91 | ||
@@ -97,7 +97,7 @@ static void il_complete_scan(struct il_priv *il, bool aborted) | |||
97 | { | 97 | { |
98 | /* check if scan was requested from mac80211 */ | 98 | /* check if scan was requested from mac80211 */ |
99 | if (il->scan_request) { | 99 | if (il->scan_request) { |
100 | IL_DEBUG_SCAN(il, "Complete scan in mac80211\n"); | 100 | D_SCAN("Complete scan in mac80211\n"); |
101 | ieee80211_scan_completed(il->hw, aborted); | 101 | ieee80211_scan_completed(il->hw, aborted); |
102 | } | 102 | } |
103 | 103 | ||
@@ -110,11 +110,11 @@ void il_force_scan_end(struct il_priv *il) | |||
110 | lockdep_assert_held(&il->mutex); | 110 | lockdep_assert_held(&il->mutex); |
111 | 111 | ||
112 | if (!test_bit(STATUS_SCANNING, &il->status)) { | 112 | if (!test_bit(STATUS_SCANNING, &il->status)) { |
113 | IL_DEBUG_SCAN(il, "Forcing scan end while not scanning\n"); | 113 | D_SCAN("Forcing scan end while not scanning\n"); |
114 | return; | 114 | return; |
115 | } | 115 | } |
116 | 116 | ||
117 | IL_DEBUG_SCAN(il, "Forcing scan end\n"); | 117 | D_SCAN("Forcing scan end\n"); |
118 | clear_bit(STATUS_SCANNING, &il->status); | 118 | clear_bit(STATUS_SCANNING, &il->status); |
119 | clear_bit(STATUS_SCAN_HW, &il->status); | 119 | clear_bit(STATUS_SCAN_HW, &il->status); |
120 | clear_bit(STATUS_SCAN_ABORTING, &il->status); | 120 | clear_bit(STATUS_SCAN_ABORTING, &il->status); |
@@ -128,21 +128,21 @@ static void il_do_scan_abort(struct il_priv *il) | |||
128 | lockdep_assert_held(&il->mutex); | 128 | lockdep_assert_held(&il->mutex); |
129 | 129 | ||
130 | if (!test_bit(STATUS_SCANNING, &il->status)) { | 130 | if (!test_bit(STATUS_SCANNING, &il->status)) { |
131 | IL_DEBUG_SCAN(il, "Not performing scan to abort\n"); | 131 | D_SCAN("Not performing scan to abort\n"); |
132 | return; | 132 | return; |
133 | } | 133 | } |
134 | 134 | ||
135 | if (test_and_set_bit(STATUS_SCAN_ABORTING, &il->status)) { | 135 | if (test_and_set_bit(STATUS_SCAN_ABORTING, &il->status)) { |
136 | IL_DEBUG_SCAN(il, "Scan abort in progress\n"); | 136 | D_SCAN("Scan abort in progress\n"); |
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | 139 | ||
140 | ret = il_send_scan_abort(il); | 140 | ret = il_send_scan_abort(il); |
141 | if (ret) { | 141 | if (ret) { |
142 | IL_DEBUG_SCAN(il, "Send scan abort failed %d\n", ret); | 142 | D_SCAN("Send scan abort failed %d\n", ret); |
143 | il_force_scan_end(il); | 143 | il_force_scan_end(il); |
144 | } else | 144 | } else |
145 | IL_DEBUG_SCAN(il, "Successfully send scan abort\n"); | 145 | D_SCAN("Successfully send scan abort\n"); |
146 | } | 146 | } |
147 | 147 | ||
148 | /** | 148 | /** |
@@ -150,7 +150,7 @@ static void il_do_scan_abort(struct il_priv *il) | |||
150 | */ | 150 | */ |
151 | int il_scan_cancel(struct il_priv *il) | 151 | int il_scan_cancel(struct il_priv *il) |
152 | { | 152 | { |
153 | IL_DEBUG_SCAN(il, "Queuing abort scan\n"); | 153 | D_SCAN("Queuing abort scan\n"); |
154 | queue_work(il->workqueue, &il->abort_scan); | 154 | queue_work(il->workqueue, &il->abort_scan); |
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
@@ -167,7 +167,7 @@ int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms) | |||
167 | 167 | ||
168 | lockdep_assert_held(&il->mutex); | 168 | lockdep_assert_held(&il->mutex); |
169 | 169 | ||
170 | IL_DEBUG_SCAN(il, "Scan cancel timeout\n"); | 170 | D_SCAN("Scan cancel timeout\n"); |
171 | 171 | ||
172 | il_do_scan_abort(il); | 172 | il_do_scan_abort(il); |
173 | 173 | ||
@@ -190,7 +190,7 @@ static void il_rx_reply_scan(struct il_priv *il, | |||
190 | struct il_scanreq_notification *notif = | 190 | struct il_scanreq_notification *notif = |
191 | (struct il_scanreq_notification *)pkt->u.raw; | 191 | (struct il_scanreq_notification *)pkt->u.raw; |
192 | 192 | ||
193 | IL_DEBUG_SCAN(il, "Scan request status = 0x%x\n", notif->status); | 193 | D_SCAN("Scan request status = 0x%x\n", notif->status); |
194 | #endif | 194 | #endif |
195 | } | 195 | } |
196 | 196 | ||
@@ -202,7 +202,7 @@ static void il_rx_scan_start_notif(struct il_priv *il, | |||
202 | struct il_scanstart_notification *notif = | 202 | struct il_scanstart_notification *notif = |
203 | (struct il_scanstart_notification *)pkt->u.raw; | 203 | (struct il_scanstart_notification *)pkt->u.raw; |
204 | il->scan_start_tsf = le32_to_cpu(notif->tsf_low); | 204 | il->scan_start_tsf = le32_to_cpu(notif->tsf_low); |
205 | IL_DEBUG_SCAN(il, "Scan start: " | 205 | D_SCAN("Scan start: " |
206 | "%d [802.11%s] " | 206 | "%d [802.11%s] " |
207 | "(TSF: 0x%08X:%08X) - %d (beacon timer %u)\n", | 207 | "(TSF: 0x%08X:%08X) - %d (beacon timer %u)\n", |
208 | notif->channel, | 208 | notif->channel, |
@@ -221,7 +221,7 @@ static void il_rx_scan_results_notif(struct il_priv *il, | |||
221 | struct il_scanresults_notification *notif = | 221 | struct il_scanresults_notification *notif = |
222 | (struct il_scanresults_notification *)pkt->u.raw; | 222 | (struct il_scanresults_notification *)pkt->u.raw; |
223 | 223 | ||
224 | IL_DEBUG_SCAN(il, "Scan ch.res: " | 224 | D_SCAN("Scan ch.res: " |
225 | "%d [802.11%s] " | 225 | "%d [802.11%s] " |
226 | "(TSF: 0x%08X:%08X) - %d " | 226 | "(TSF: 0x%08X:%08X) - %d " |
227 | "elapsed=%lu usec\n", | 227 | "elapsed=%lu usec\n", |
@@ -244,7 +244,7 @@ static void il_rx_scan_complete_notif(struct il_priv *il, | |||
244 | struct il_scancomplete_notification *scan_notif = (void *)pkt->u.raw; | 244 | struct il_scancomplete_notification *scan_notif = (void *)pkt->u.raw; |
245 | #endif | 245 | #endif |
246 | 246 | ||
247 | IL_DEBUG_SCAN(il, | 247 | D_SCAN( |
248 | "Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n", | 248 | "Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n", |
249 | scan_notif->scanned_channels, | 249 | scan_notif->scanned_channels, |
250 | scan_notif->tsf_low, | 250 | scan_notif->tsf_low, |
@@ -253,7 +253,7 @@ static void il_rx_scan_complete_notif(struct il_priv *il, | |||
253 | /* The HW is no longer scanning */ | 253 | /* The HW is no longer scanning */ |
254 | clear_bit(STATUS_SCAN_HW, &il->status); | 254 | clear_bit(STATUS_SCAN_HW, &il->status); |
255 | 255 | ||
256 | IL_DEBUG_SCAN(il, "Scan on %sGHz took %dms\n", | 256 | D_SCAN("Scan on %sGHz took %dms\n", |
257 | (il->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", | 257 | (il->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", |
258 | jiffies_to_msecs(jiffies - il->scan_start)); | 258 | jiffies_to_msecs(jiffies - il->scan_start)); |
259 | 259 | ||
@@ -346,17 +346,17 @@ static int il_scan_initiate(struct il_priv *il, | |||
346 | } | 346 | } |
347 | 347 | ||
348 | if (test_bit(STATUS_SCAN_HW, &il->status)) { | 348 | if (test_bit(STATUS_SCAN_HW, &il->status)) { |
349 | IL_DEBUG_SCAN(il, | 349 | D_SCAN( |
350 | "Multiple concurrent scan requests in parallel.\n"); | 350 | "Multiple concurrent scan requests in parallel.\n"); |
351 | return -EBUSY; | 351 | return -EBUSY; |
352 | } | 352 | } |
353 | 353 | ||
354 | if (test_bit(STATUS_SCAN_ABORTING, &il->status)) { | 354 | if (test_bit(STATUS_SCAN_ABORTING, &il->status)) { |
355 | IL_DEBUG_SCAN(il, "Scan request while abort pending.\n"); | 355 | D_SCAN("Scan request while abort pending.\n"); |
356 | return -EBUSY; | 356 | return -EBUSY; |
357 | } | 357 | } |
358 | 358 | ||
359 | IL_DEBUG_SCAN(il, "Starting scan...\n"); | 359 | D_SCAN("Starting scan...\n"); |
360 | 360 | ||
361 | set_bit(STATUS_SCANNING, &il->status); | 361 | set_bit(STATUS_SCANNING, &il->status); |
362 | il->scan_start = jiffies; | 362 | il->scan_start = jiffies; |
@@ -380,7 +380,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw, | |||
380 | struct il_priv *il = hw->priv; | 380 | struct il_priv *il = hw->priv; |
381 | int ret; | 381 | int ret; |
382 | 382 | ||
383 | IL_DEBUG_MAC80211(il, "enter\n"); | 383 | D_MAC80211("enter\n"); |
384 | 384 | ||
385 | if (req->n_channels == 0) | 385 | if (req->n_channels == 0) |
386 | return -EINVAL; | 386 | return -EINVAL; |
@@ -388,7 +388,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw, | |||
388 | mutex_lock(&il->mutex); | 388 | mutex_lock(&il->mutex); |
389 | 389 | ||
390 | if (test_bit(STATUS_SCANNING, &il->status)) { | 390 | if (test_bit(STATUS_SCANNING, &il->status)) { |
391 | IL_DEBUG_SCAN(il, "Scan already in progress.\n"); | 391 | D_SCAN("Scan already in progress.\n"); |
392 | ret = -EAGAIN; | 392 | ret = -EAGAIN; |
393 | goto out_unlock; | 393 | goto out_unlock; |
394 | } | 394 | } |
@@ -400,7 +400,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw, | |||
400 | 400 | ||
401 | ret = il_scan_initiate(il, vif); | 401 | ret = il_scan_initiate(il, vif); |
402 | 402 | ||
403 | IL_DEBUG_MAC80211(il, "leave\n"); | 403 | D_MAC80211("leave\n"); |
404 | 404 | ||
405 | out_unlock: | 405 | out_unlock: |
406 | mutex_unlock(&il->mutex); | 406 | mutex_unlock(&il->mutex); |
@@ -414,7 +414,7 @@ static void il_bg_scan_check(struct work_struct *data) | |||
414 | struct il_priv *il = | 414 | struct il_priv *il = |
415 | container_of(data, struct il_priv, scan_check.work); | 415 | container_of(data, struct il_priv, scan_check.work); |
416 | 416 | ||
417 | IL_DEBUG_SCAN(il, "Scan check work\n"); | 417 | D_SCAN("Scan check work\n"); |
418 | 418 | ||
419 | /* Since we are here firmware does not finish scan and | 419 | /* Since we are here firmware does not finish scan and |
420 | * most likely is in bad shape, so we don't bother to | 420 | * most likely is in bad shape, so we don't bother to |
@@ -477,7 +477,7 @@ static void il_bg_abort_scan(struct work_struct *work) | |||
477 | { | 477 | { |
478 | struct il_priv *il = container_of(work, struct il_priv, abort_scan); | 478 | struct il_priv *il = container_of(work, struct il_priv, abort_scan); |
479 | 479 | ||
480 | IL_DEBUG_SCAN(il, "Abort scan work\n"); | 480 | D_SCAN("Abort scan work\n"); |
481 | 481 | ||
482 | /* We keep scan_check work queued in case when firmware will not | 482 | /* We keep scan_check work queued in case when firmware will not |
483 | * report back scan completed notification */ | 483 | * report back scan completed notification */ |
@@ -492,7 +492,7 @@ static void il_bg_scan_completed(struct work_struct *work) | |||
492 | container_of(work, struct il_priv, scan_completed); | 492 | container_of(work, struct il_priv, scan_completed); |
493 | bool aborted; | 493 | bool aborted; |
494 | 494 | ||
495 | IL_DEBUG_SCAN(il, "Completed scan.\n"); | 495 | D_SCAN("Completed scan.\n"); |
496 | 496 | ||
497 | cancel_delayed_work(&il->scan_check); | 497 | cancel_delayed_work(&il->scan_check); |
498 | 498 | ||
@@ -500,10 +500,10 @@ static void il_bg_scan_completed(struct work_struct *work) | |||
500 | 500 | ||
501 | aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &il->status); | 501 | aborted = test_and_clear_bit(STATUS_SCAN_ABORTING, &il->status); |
502 | if (aborted) | 502 | if (aborted) |
503 | IL_DEBUG_SCAN(il, "Aborted scan completed.\n"); | 503 | D_SCAN("Aborted scan completed.\n"); |
504 | 504 | ||
505 | if (!test_and_clear_bit(STATUS_SCANNING, &il->status)) { | 505 | if (!test_and_clear_bit(STATUS_SCANNING, &il->status)) { |
506 | IL_DEBUG_SCAN(il, "Scan already completed.\n"); | 506 | D_SCAN("Scan already completed.\n"); |
507 | goto out_settings; | 507 | goto out_settings; |
508 | } | 508 | } |
509 | 509 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl-sta.c b/drivers/net/wireless/iwlegacy/iwl-sta.c index 7d66e79f5d3..a48af855dc0 100644 --- a/drivers/net/wireless/iwlegacy/iwl-sta.c +++ b/drivers/net/wireless/iwlegacy/iwl-sta.c | |||
@@ -46,13 +46,13 @@ static void il_sta_ucode_activate(struct il_priv *il, u8 sta_id) | |||
46 | sta_id, il->stations[sta_id].sta.sta.addr); | 46 | sta_id, il->stations[sta_id].sta.sta.addr); |
47 | 47 | ||
48 | if (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE) { | 48 | if (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE) { |
49 | IL_DEBUG_ASSOC(il, | 49 | D_ASSOC( |
50 | "STA id %u addr %pM already present" | 50 | "STA id %u addr %pM already present" |
51 | " in uCode (according to driver)\n", | 51 | " in uCode (according to driver)\n", |
52 | sta_id, il->stations[sta_id].sta.sta.addr); | 52 | sta_id, il->stations[sta_id].sta.sta.addr); |
53 | } else { | 53 | } else { |
54 | il->stations[sta_id].used |= IL_STA_UCODE_ACTIVE; | 54 | il->stations[sta_id].used |= IL_STA_UCODE_ACTIVE; |
55 | IL_DEBUG_ASSOC(il, "Added STA id %u addr %pM to uCode\n", | 55 | D_ASSOC("Added STA id %u addr %pM to uCode\n", |
56 | sta_id, il->stations[sta_id].sta.sta.addr); | 56 | sta_id, il->stations[sta_id].sta.sta.addr); |
57 | } | 57 | } |
58 | } | 58 | } |
@@ -72,14 +72,14 @@ static int il_process_add_sta_resp(struct il_priv *il, | |||
72 | return ret; | 72 | return ret; |
73 | } | 73 | } |
74 | 74 | ||
75 | IL_DEBUG_INFO(il, "Processing response for adding station %u\n", | 75 | D_INFO("Processing response for adding station %u\n", |
76 | sta_id); | 76 | sta_id); |
77 | 77 | ||
78 | spin_lock_irqsave(&il->sta_lock, flags); | 78 | spin_lock_irqsave(&il->sta_lock, flags); |
79 | 79 | ||
80 | switch (pkt->u.add_sta.status) { | 80 | switch (pkt->u.add_sta.status) { |
81 | case ADD_STA_SUCCESS_MSK: | 81 | case ADD_STA_SUCCESS_MSK: |
82 | IL_DEBUG_INFO(il, "REPLY_ADD_STA PASSED\n"); | 82 | D_INFO("REPLY_ADD_STA PASSED\n"); |
83 | il_sta_ucode_activate(il, sta_id); | 83 | il_sta_ucode_activate(il, sta_id); |
84 | ret = 0; | 84 | ret = 0; |
85 | break; | 85 | break; |
@@ -97,12 +97,12 @@ static int il_process_add_sta_resp(struct il_priv *il, | |||
97 | sta_id); | 97 | sta_id); |
98 | break; | 98 | break; |
99 | default: | 99 | default: |
100 | IL_DEBUG_ASSOC(il, "Received REPLY_ADD_STA:(0x%08X)\n", | 100 | D_ASSOC("Received REPLY_ADD_STA:(0x%08X)\n", |
101 | pkt->u.add_sta.status); | 101 | pkt->u.add_sta.status); |
102 | break; | 102 | break; |
103 | } | 103 | } |
104 | 104 | ||
105 | IL_DEBUG_INFO(il, "%s station id %u addr %pM\n", | 105 | D_INFO("%s station id %u addr %pM\n", |
106 | il->stations[sta_id].sta.mode == | 106 | il->stations[sta_id].sta.mode == |
107 | STA_CONTROL_MODIFY_MSK ? "Modified" : "Added", | 107 | STA_CONTROL_MODIFY_MSK ? "Modified" : "Added", |
108 | sta_id, il->stations[sta_id].sta.sta.addr); | 108 | sta_id, il->stations[sta_id].sta.sta.addr); |
@@ -115,7 +115,7 @@ static int il_process_add_sta_resp(struct il_priv *il, | |||
115 | * issue has not yet been resolved and this debugging is left to | 115 | * issue has not yet been resolved and this debugging is left to |
116 | * observe the problem. | 116 | * observe the problem. |
117 | */ | 117 | */ |
118 | IL_DEBUG_INFO(il, "%s station according to cmd buffer %pM\n", | 118 | D_INFO("%s station according to cmd buffer %pM\n", |
119 | il->stations[sta_id].sta.mode == | 119 | il->stations[sta_id].sta.mode == |
120 | STA_CONTROL_MODIFY_MSK ? "Modified" : "Added", | 120 | STA_CONTROL_MODIFY_MSK ? "Modified" : "Added", |
121 | addsta->sta.addr); | 121 | addsta->sta.addr); |
@@ -148,7 +148,7 @@ int il_send_add_sta(struct il_priv *il, | |||
148 | }; | 148 | }; |
149 | u8 sta_id __maybe_unused = sta->sta.sta_id; | 149 | u8 sta_id __maybe_unused = sta->sta.sta_id; |
150 | 150 | ||
151 | IL_DEBUG_INFO(il, "Adding sta %u (%pM) %ssynchronously\n", | 151 | D_INFO("Adding sta %u (%pM) %ssynchronously\n", |
152 | sta_id, sta->sta.addr, flags & CMD_ASYNC ? "a" : ""); | 152 | sta_id, sta->sta.addr, flags & CMD_ASYNC ? "a" : ""); |
153 | 153 | ||
154 | if (flags & CMD_ASYNC) | 154 | if (flags & CMD_ASYNC) |
@@ -186,7 +186,7 @@ static void il_set_ht_add_station(struct il_priv *il, u8 index, | |||
186 | goto done; | 186 | goto done; |
187 | 187 | ||
188 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; | 188 | mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2; |
189 | IL_DEBUG_ASSOC(il, "spatial multiplexing power save mode: %s\n", | 189 | D_ASSOC("spatial multiplexing power save mode: %s\n", |
190 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? | 190 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? |
191 | "static" : | 191 | "static" : |
192 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? | 192 | (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? |
@@ -269,7 +269,7 @@ u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, | |||
269 | * another. | 269 | * another. |
270 | */ | 270 | */ |
271 | if (il->stations[sta_id].used & IL_STA_UCODE_INPROGRESS) { | 271 | if (il->stations[sta_id].used & IL_STA_UCODE_INPROGRESS) { |
272 | IL_DEBUG_INFO(il, | 272 | D_INFO( |
273 | "STA %d already in process of being added.\n", | 273 | "STA %d already in process of being added.\n", |
274 | sta_id); | 274 | sta_id); |
275 | return sta_id; | 275 | return sta_id; |
@@ -278,7 +278,7 @@ u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, | |||
278 | if ((il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE) && | 278 | if ((il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE) && |
279 | (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE) && | 279 | (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE) && |
280 | !compare_ether_addr(il->stations[sta_id].sta.sta.addr, addr)) { | 280 | !compare_ether_addr(il->stations[sta_id].sta.sta.addr, addr)) { |
281 | IL_DEBUG_ASSOC(il, | 281 | D_ASSOC( |
282 | "STA %d (%pM) already added, not adding again.\n", | 282 | "STA %d (%pM) already added, not adding again.\n", |
283 | sta_id, addr); | 283 | sta_id, addr); |
284 | return sta_id; | 284 | return sta_id; |
@@ -286,7 +286,7 @@ u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, | |||
286 | 286 | ||
287 | station = &il->stations[sta_id]; | 287 | station = &il->stations[sta_id]; |
288 | station->used = IL_STA_DRIVER_ACTIVE; | 288 | station->used = IL_STA_DRIVER_ACTIVE; |
289 | IL_DEBUG_ASSOC(il, "Add STA to driver ID %d: %pM\n", | 289 | D_ASSOC("Add STA to driver ID %d: %pM\n", |
290 | sta_id, addr); | 290 | sta_id, addr); |
291 | il->num_stations++; | 291 | il->num_stations++; |
292 | 292 | ||
@@ -355,7 +355,7 @@ il_add_station_common(struct il_priv *il, | |||
355 | * another. | 355 | * another. |
356 | */ | 356 | */ |
357 | if (il->stations[sta_id].used & IL_STA_UCODE_INPROGRESS) { | 357 | if (il->stations[sta_id].used & IL_STA_UCODE_INPROGRESS) { |
358 | IL_DEBUG_INFO(il, | 358 | D_INFO( |
359 | "STA %d already in process of being added.\n", | 359 | "STA %d already in process of being added.\n", |
360 | sta_id); | 360 | sta_id); |
361 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); | 361 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); |
@@ -364,7 +364,7 @@ il_add_station_common(struct il_priv *il, | |||
364 | 364 | ||
365 | if ((il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE) && | 365 | if ((il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE) && |
366 | (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE)) { | 366 | (il->stations[sta_id].used & IL_STA_UCODE_ACTIVE)) { |
367 | IL_DEBUG_ASSOC(il, | 367 | D_ASSOC( |
368 | "STA %d (%pM) already added, not adding again.\n", | 368 | "STA %d (%pM) already added, not adding again.\n", |
369 | sta_id, addr); | 369 | sta_id, addr); |
370 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); | 370 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); |
@@ -407,7 +407,7 @@ static void il_sta_ucode_deactivate(struct il_priv *il, u8 sta_id) | |||
407 | il->stations[sta_id].used &= ~IL_STA_UCODE_ACTIVE; | 407 | il->stations[sta_id].used &= ~IL_STA_UCODE_ACTIVE; |
408 | 408 | ||
409 | memset(&il->stations[sta_id], 0, sizeof(struct il_station_entry)); | 409 | memset(&il->stations[sta_id], 0, sizeof(struct il_station_entry)); |
410 | IL_DEBUG_ASSOC(il, "Removed STA %u\n", sta_id); | 410 | D_ASSOC("Removed STA %u\n", sta_id); |
411 | } | 411 | } |
412 | 412 | ||
413 | static int il_send_remove_station(struct il_priv *il, | 413 | static int il_send_remove_station(struct il_priv *il, |
@@ -454,7 +454,7 @@ static int il_send_remove_station(struct il_priv *il, | |||
454 | spin_unlock_irqrestore(&il->sta_lock, | 454 | spin_unlock_irqrestore(&il->sta_lock, |
455 | flags_spin); | 455 | flags_spin); |
456 | } | 456 | } |
457 | IL_DEBUG_ASSOC(il, "REPLY_REMOVE_STA PASSED\n"); | 457 | D_ASSOC("REPLY_REMOVE_STA PASSED\n"); |
458 | break; | 458 | break; |
459 | default: | 459 | default: |
460 | ret = -EIO; | 460 | ret = -EIO; |
@@ -476,7 +476,7 @@ int il_remove_station(struct il_priv *il, const u8 sta_id, | |||
476 | unsigned long flags; | 476 | unsigned long flags; |
477 | 477 | ||
478 | if (!il_is_ready(il)) { | 478 | if (!il_is_ready(il)) { |
479 | IL_DEBUG_INFO(il, | 479 | D_INFO( |
480 | "Unable to remove station %pM, device not ready.\n", | 480 | "Unable to remove station %pM, device not ready.\n", |
481 | addr); | 481 | addr); |
482 | /* | 482 | /* |
@@ -487,7 +487,7 @@ int il_remove_station(struct il_priv *il, const u8 sta_id, | |||
487 | return 0; | 487 | return 0; |
488 | } | 488 | } |
489 | 489 | ||
490 | IL_DEBUG_ASSOC(il, "Removing STA from driver:%d %pM\n", | 490 | D_ASSOC("Removing STA from driver:%d %pM\n", |
491 | sta_id, addr); | 491 | sta_id, addr); |
492 | 492 | ||
493 | if (WARN_ON(sta_id == IL_INVALID_STATION)) | 493 | if (WARN_ON(sta_id == IL_INVALID_STATION)) |
@@ -496,13 +496,13 @@ int il_remove_station(struct il_priv *il, const u8 sta_id, | |||
496 | spin_lock_irqsave(&il->sta_lock, flags); | 496 | spin_lock_irqsave(&il->sta_lock, flags); |
497 | 497 | ||
498 | if (!(il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE)) { | 498 | if (!(il->stations[sta_id].used & IL_STA_DRIVER_ACTIVE)) { |
499 | IL_DEBUG_INFO(il, "Removing %pM but non DRIVER active\n", | 499 | D_INFO("Removing %pM but non DRIVER active\n", |
500 | addr); | 500 | addr); |
501 | goto out_err; | 501 | goto out_err; |
502 | } | 502 | } |
503 | 503 | ||
504 | if (!(il->stations[sta_id].used & IL_STA_UCODE_ACTIVE)) { | 504 | if (!(il->stations[sta_id].used & IL_STA_UCODE_ACTIVE)) { |
505 | IL_DEBUG_INFO(il, "Removing %pM but non UCODE active\n", | 505 | D_INFO("Removing %pM but non UCODE active\n", |
506 | addr); | 506 | addr); |
507 | goto out_err; | 507 | goto out_err; |
508 | } | 508 | } |
@@ -542,7 +542,7 @@ void il_clear_ucode_stations(struct il_priv *il, | |||
542 | unsigned long flags_spin; | 542 | unsigned long flags_spin; |
543 | bool cleared = false; | 543 | bool cleared = false; |
544 | 544 | ||
545 | IL_DEBUG_INFO(il, "Clearing ucode stations in driver\n"); | 545 | D_INFO("Clearing ucode stations in driver\n"); |
546 | 546 | ||
547 | spin_lock_irqsave(&il->sta_lock, flags_spin); | 547 | spin_lock_irqsave(&il->sta_lock, flags_spin); |
548 | for (i = 0; i < il->hw_params.max_stations; i++) { | 548 | for (i = 0; i < il->hw_params.max_stations; i++) { |
@@ -550,7 +550,7 @@ void il_clear_ucode_stations(struct il_priv *il, | |||
550 | continue; | 550 | continue; |
551 | 551 | ||
552 | if (il->stations[i].used & IL_STA_UCODE_ACTIVE) { | 552 | if (il->stations[i].used & IL_STA_UCODE_ACTIVE) { |
553 | IL_DEBUG_INFO(il, | 553 | D_INFO( |
554 | "Clearing ucode active for station %d\n", i); | 554 | "Clearing ucode active for station %d\n", i); |
555 | il->stations[i].used &= ~IL_STA_UCODE_ACTIVE; | 555 | il->stations[i].used &= ~IL_STA_UCODE_ACTIVE; |
556 | cleared = true; | 556 | cleared = true; |
@@ -559,7 +559,7 @@ void il_clear_ucode_stations(struct il_priv *il, | |||
559 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); | 559 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); |
560 | 560 | ||
561 | if (!cleared) | 561 | if (!cleared) |
562 | IL_DEBUG_INFO(il, | 562 | D_INFO( |
563 | "No active stations found to be cleared\n"); | 563 | "No active stations found to be cleared\n"); |
564 | } | 564 | } |
565 | EXPORT_SYMBOL(il_clear_ucode_stations); | 565 | EXPORT_SYMBOL(il_clear_ucode_stations); |
@@ -584,19 +584,19 @@ il_restore_stations(struct il_priv *il, struct il_rxon_context *ctx) | |||
584 | bool send_lq; | 584 | bool send_lq; |
585 | 585 | ||
586 | if (!il_is_ready(il)) { | 586 | if (!il_is_ready(il)) { |
587 | IL_DEBUG_INFO(il, | 587 | D_INFO( |
588 | "Not ready yet, not restoring any stations.\n"); | 588 | "Not ready yet, not restoring any stations.\n"); |
589 | return; | 589 | return; |
590 | } | 590 | } |
591 | 591 | ||
592 | IL_DEBUG_ASSOC(il, "Restoring all known stations ... start.\n"); | 592 | D_ASSOC("Restoring all known stations ... start.\n"); |
593 | spin_lock_irqsave(&il->sta_lock, flags_spin); | 593 | spin_lock_irqsave(&il->sta_lock, flags_spin); |
594 | for (i = 0; i < il->hw_params.max_stations; i++) { | 594 | for (i = 0; i < il->hw_params.max_stations; i++) { |
595 | if (ctx->ctxid != il->stations[i].ctxid) | 595 | if (ctx->ctxid != il->stations[i].ctxid) |
596 | continue; | 596 | continue; |
597 | if ((il->stations[i].used & IL_STA_DRIVER_ACTIVE) && | 597 | if ((il->stations[i].used & IL_STA_DRIVER_ACTIVE) && |
598 | !(il->stations[i].used & IL_STA_UCODE_ACTIVE)) { | 598 | !(il->stations[i].used & IL_STA_UCODE_ACTIVE)) { |
599 | IL_DEBUG_ASSOC(il, "Restoring sta %pM\n", | 599 | D_ASSOC("Restoring sta %pM\n", |
600 | il->stations[i].sta.sta.addr); | 600 | il->stations[i].sta.sta.addr); |
601 | il->stations[i].sta.mode = 0; | 601 | il->stations[i].sta.mode = 0; |
602 | il->stations[i].used |= IL_STA_UCODE_INPROGRESS; | 602 | il->stations[i].used |= IL_STA_UCODE_INPROGRESS; |
@@ -641,10 +641,10 @@ il_restore_stations(struct il_priv *il, struct il_rxon_context *ctx) | |||
641 | 641 | ||
642 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); | 642 | spin_unlock_irqrestore(&il->sta_lock, flags_spin); |
643 | if (!found) | 643 | if (!found) |
644 | IL_DEBUG_INFO(il, "Restoring all known stations" | 644 | D_INFO("Restoring all known stations" |
645 | " .... no stations to be restored.\n"); | 645 | " .... no stations to be restored.\n"); |
646 | else | 646 | else |
647 | IL_DEBUG_INFO(il, "Restoring all known stations" | 647 | D_INFO("Restoring all known stations" |
648 | " .... complete.\n"); | 648 | " .... complete.\n"); |
649 | } | 649 | } |
650 | EXPORT_SYMBOL(il_restore_stations); | 650 | EXPORT_SYMBOL(il_restore_stations); |
@@ -686,13 +686,13 @@ static void il_dump_lq_cmd(struct il_priv *il, | |||
686 | struct il_link_quality_cmd *lq) | 686 | struct il_link_quality_cmd *lq) |
687 | { | 687 | { |
688 | int i; | 688 | int i; |
689 | IL_DEBUG_RATE(il, "lq station id 0x%x\n", lq->sta_id); | 689 | D_RATE("lq station id 0x%x\n", lq->sta_id); |
690 | IL_DEBUG_RATE(il, "lq ant 0x%X 0x%X\n", | 690 | D_RATE("lq ant 0x%X 0x%X\n", |
691 | lq->general_params.single_stream_ant_msk, | 691 | lq->general_params.single_stream_ant_msk, |
692 | lq->general_params.dual_stream_ant_msk); | 692 | lq->general_params.dual_stream_ant_msk); |
693 | 693 | ||
694 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) | 694 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) |
695 | IL_DEBUG_RATE(il, "lq index %d 0x%X\n", | 695 | D_RATE("lq index %d 0x%X\n", |
696 | i, lq->rs_table[i].rate_n_flags); | 696 | i, lq->rs_table[i].rate_n_flags); |
697 | } | 697 | } |
698 | #else | 698 | #else |
@@ -722,12 +722,12 @@ static bool il_is_lq_table_valid(struct il_priv *il, | |||
722 | if (ctx->ht.enabled) | 722 | if (ctx->ht.enabled) |
723 | return true; | 723 | return true; |
724 | 724 | ||
725 | IL_DEBUG_INFO(il, "Channel %u is not an HT channel\n", | 725 | D_INFO("Channel %u is not an HT channel\n", |
726 | ctx->active.channel); | 726 | ctx->active.channel); |
727 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) { | 727 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) { |
728 | if (le32_to_cpu(lq->rs_table[i].rate_n_flags) & | 728 | if (le32_to_cpu(lq->rs_table[i].rate_n_flags) & |
729 | RATE_MCS_HT_MSK) { | 729 | RATE_MCS_HT_MSK) { |
730 | IL_DEBUG_INFO(il, | 730 | D_INFO( |
731 | "index %d of LQ expects HT channel\n", | 731 | "index %d of LQ expects HT channel\n", |
732 | i); | 732 | i); |
733 | return false; | 733 | return false; |
@@ -782,7 +782,7 @@ int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx, | |||
782 | return ret; | 782 | return ret; |
783 | 783 | ||
784 | if (init) { | 784 | if (init) { |
785 | IL_DEBUG_INFO(il, "init LQ command complete," | 785 | D_INFO("init LQ command complete," |
786 | " clearing sta addition status for sta %d\n", | 786 | " clearing sta addition status for sta %d\n", |
787 | lq->sta_id); | 787 | lq->sta_id); |
788 | spin_lock_irqsave(&il->sta_lock, flags_spin); | 788 | spin_lock_irqsave(&il->sta_lock, flags_spin); |
@@ -801,10 +801,10 @@ int il_mac_sta_remove(struct ieee80211_hw *hw, | |||
801 | struct il_station_priv_common *sta_common = (void *)sta->drv_priv; | 801 | struct il_station_priv_common *sta_common = (void *)sta->drv_priv; |
802 | int ret; | 802 | int ret; |
803 | 803 | ||
804 | IL_DEBUG_INFO(il, "received request to remove station %pM\n", | 804 | D_INFO("received request to remove station %pM\n", |
805 | sta->addr); | 805 | sta->addr); |
806 | mutex_lock(&il->mutex); | 806 | mutex_lock(&il->mutex); |
807 | IL_DEBUG_INFO(il, "proceeding to remove station %pM\n", | 807 | D_INFO("proceeding to remove station %pM\n", |
808 | sta->addr); | 808 | sta->addr); |
809 | ret = il_remove_station(il, sta_common->sta_id, sta->addr); | 809 | ret = il_remove_station(il, sta_common->sta_id, sta->addr); |
810 | if (ret) | 810 | if (ret) |
diff --git a/drivers/net/wireless/iwlegacy/iwl-tx.c b/drivers/net/wireless/iwlegacy/iwl-tx.c index af6ac4fe267..22617c47fc7 100644 --- a/drivers/net/wireless/iwlegacy/iwl-tx.c +++ b/drivers/net/wireless/iwlegacy/iwl-tx.c | |||
@@ -58,7 +58,7 @@ il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq) | |||
58 | reg = il_read32(il, CSR_UCODE_DRV_GP1); | 58 | reg = il_read32(il, CSR_UCODE_DRV_GP1); |
59 | 59 | ||
60 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { | 60 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { |
61 | IL_DEBUG_INFO(il, | 61 | D_INFO( |
62 | "Tx queue %d requesting wakeup," | 62 | "Tx queue %d requesting wakeup," |
63 | " GP1 = 0x%x\n", txq_id, reg); | 63 | " GP1 = 0x%x\n", txq_id, reg); |
64 | il_set_bit(il, CSR_GP_CNTRL, | 64 | il_set_bit(il, CSR_GP_CNTRL, |
@@ -511,7 +511,7 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd) | |||
511 | switch (out_cmd->hdr.cmd) { | 511 | switch (out_cmd->hdr.cmd) { |
512 | case REPLY_TX_LINK_QUALITY_CMD: | 512 | case REPLY_TX_LINK_QUALITY_CMD: |
513 | case SENSITIVITY_CMD: | 513 | case SENSITIVITY_CMD: |
514 | IL_DEBUG_HC_DUMP(il, | 514 | D_HC_DUMP( |
515 | "Sending command %s (#%x), seq: 0x%04X, " | 515 | "Sending command %s (#%x), seq: 0x%04X, " |
516 | "%d bytes at %d[%d]:%d\n", | 516 | "%d bytes at %d[%d]:%d\n", |
517 | il_get_cmd_string(out_cmd->hdr.cmd), | 517 | il_get_cmd_string(out_cmd->hdr.cmd), |
@@ -520,7 +520,7 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd) | |||
520 | q->write_ptr, idx, il->cmd_queue); | 520 | q->write_ptr, idx, il->cmd_queue); |
521 | break; | 521 | break; |
522 | default: | 522 | default: |
523 | IL_DEBUG_HC(il, "Sending command %s (#%x), seq: 0x%04X, " | 523 | D_HC("Sending command %s (#%x), seq: 0x%04X, " |
524 | "%d bytes at %d[%d]:%d\n", | 524 | "%d bytes at %d[%d]:%d\n", |
525 | il_get_cmd_string(out_cmd->hdr.cmd), | 525 | il_get_cmd_string(out_cmd->hdr.cmd), |
526 | out_cmd->hdr.cmd, | 526 | out_cmd->hdr.cmd, |
@@ -642,7 +642,7 @@ il_tx_cmd_complete(struct il_priv *il, struct il_rx_mem_buffer *rxb) | |||
642 | 642 | ||
643 | if (!(meta->flags & CMD_ASYNC)) { | 643 | if (!(meta->flags & CMD_ASYNC)) { |
644 | clear_bit(STATUS_HCMD_ACTIVE, &il->status); | 644 | clear_bit(STATUS_HCMD_ACTIVE, &il->status); |
645 | IL_DEBUG_INFO(il, "Clearing HCMD_ACTIVE for command %s\n", | 645 | D_INFO("Clearing HCMD_ACTIVE for command %s\n", |
646 | il_get_cmd_string(cmd->hdr.cmd)); | 646 | il_get_cmd_string(cmd->hdr.cmd)); |
647 | wake_up(&il->wait_command_queue); | 647 | wake_up(&il->wait_command_queue); |
648 | } | 648 | } |
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index af3f1945e17..8aa22a01ae6 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
@@ -174,7 +174,7 @@ static int il3945_set_ccmp_dynamic_key_info(struct il_priv *il, | |||
174 | il->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; | 174 | il->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; |
175 | il->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | 175 | il->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; |
176 | 176 | ||
177 | IL_DEBUG_INFO(il, "hwcrypto: modify ucode station key info\n"); | 177 | D_INFO("hwcrypto: modify ucode station key info\n"); |
178 | 178 | ||
179 | ret = il_send_add_sta(il, | 179 | ret = il_send_add_sta(il, |
180 | &il->stations[sta_id].sta, CMD_ASYNC); | 180 | &il->stations[sta_id].sta, CMD_ASYNC); |
@@ -213,7 +213,7 @@ static int il3945_clear_sta_key_info(struct il_priv *il, u8 sta_id) | |||
213 | memcpy(&sta_cmd, &il->stations[sta_id].sta, sizeof(struct il_addsta_cmd)); | 213 | memcpy(&sta_cmd, &il->stations[sta_id].sta, sizeof(struct il_addsta_cmd)); |
214 | spin_unlock_irqrestore(&il->sta_lock, flags); | 214 | spin_unlock_irqrestore(&il->sta_lock, flags); |
215 | 215 | ||
216 | IL_DEBUG_INFO(il, "hwcrypto: clear ucode station key info\n"); | 216 | D_INFO("hwcrypto: clear ucode station key info\n"); |
217 | return il_send_add_sta(il, &sta_cmd, CMD_SYNC); | 217 | return il_send_add_sta(il, &sta_cmd, CMD_SYNC); |
218 | } | 218 | } |
219 | 219 | ||
@@ -241,7 +241,7 @@ static int il3945_set_dynamic_key(struct il_priv *il, | |||
241 | ret = -EINVAL; | 241 | ret = -EINVAL; |
242 | } | 242 | } |
243 | 243 | ||
244 | IL_DEBUG_WEP(il, "Set dynamic key: alg=%x len=%d idx=%d sta=%d ret=%d\n", | 244 | D_WEP("Set dynamic key: alg=%x len=%d idx=%d sta=%d ret=%d\n", |
245 | keyconf->cipher, keyconf->keylen, keyconf->keyidx, | 245 | keyconf->cipher, keyconf->keylen, keyconf->keyidx, |
246 | sta_id, ret); | 246 | sta_id, ret); |
247 | 247 | ||
@@ -270,7 +270,7 @@ static void il3945_clear_free_frames(struct il_priv *il) | |||
270 | { | 270 | { |
271 | struct list_head *element; | 271 | struct list_head *element; |
272 | 272 | ||
273 | IL_DEBUG_INFO(il, "%d frames on pre-allocated heap on clear.\n", | 273 | D_INFO("%d frames on pre-allocated heap on clear.\n", |
274 | il->frames_count); | 274 | il->frames_count); |
275 | 275 | ||
276 | while (!list_empty(&il->free_frames)) { | 276 | while (!list_empty(&il->free_frames)) { |
@@ -381,7 +381,7 @@ static void il3945_build_tx_cmd_hwcrypto(struct il_priv *il, | |||
381 | case WLAN_CIPHER_SUITE_CCMP: | 381 | case WLAN_CIPHER_SUITE_CCMP: |
382 | tx_cmd->sec_ctl = TX_CMD_SEC_CCM; | 382 | tx_cmd->sec_ctl = TX_CMD_SEC_CCM; |
383 | memcpy(tx_cmd->key, keyinfo->key, keyinfo->keylen); | 383 | memcpy(tx_cmd->key, keyinfo->key, keyinfo->keylen); |
384 | IL_DEBUG_TX(il, "tx_cmd with AES hwcrypto\n"); | 384 | D_TX("tx_cmd with AES hwcrypto\n"); |
385 | break; | 385 | break; |
386 | 386 | ||
387 | case WLAN_CIPHER_SUITE_TKIP: | 387 | case WLAN_CIPHER_SUITE_TKIP: |
@@ -396,7 +396,7 @@ static void il3945_build_tx_cmd_hwcrypto(struct il_priv *il, | |||
396 | 396 | ||
397 | memcpy(&tx_cmd->key[3], keyinfo->key, keyinfo->keylen); | 397 | memcpy(&tx_cmd->key[3], keyinfo->key, keyinfo->keylen); |
398 | 398 | ||
399 | IL_DEBUG_TX(il, "Configuring packet for WEP encryption " | 399 | D_TX("Configuring packet for WEP encryption " |
400 | "with key %d\n", info->control.hw_key->hw_key_idx); | 400 | "with key %d\n", info->control.hw_key->hw_key_idx); |
401 | break; | 401 | break; |
402 | 402 | ||
@@ -486,7 +486,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
486 | 486 | ||
487 | spin_lock_irqsave(&il->lock, flags); | 487 | spin_lock_irqsave(&il->lock, flags); |
488 | if (il_is_rfkill(il)) { | 488 | if (il_is_rfkill(il)) { |
489 | IL_DEBUG_DROP(il, "Dropping - RF KILL\n"); | 489 | D_DROP("Dropping - RF KILL\n"); |
490 | goto drop_unlock; | 490 | goto drop_unlock; |
491 | } | 491 | } |
492 | 492 | ||
@@ -502,11 +502,11 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
502 | 502 | ||
503 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 503 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
504 | if (ieee80211_is_auth(fc)) | 504 | if (ieee80211_is_auth(fc)) |
505 | IL_DEBUG_TX(il, "Sending AUTH frame\n"); | 505 | D_TX("Sending AUTH frame\n"); |
506 | else if (ieee80211_is_assoc_req(fc)) | 506 | else if (ieee80211_is_assoc_req(fc)) |
507 | IL_DEBUG_TX(il, "Sending ASSOC frame\n"); | 507 | D_TX("Sending ASSOC frame\n"); |
508 | else if (ieee80211_is_reassoc_req(fc)) | 508 | else if (ieee80211_is_reassoc_req(fc)) |
509 | IL_DEBUG_TX(il, "Sending REASSOC frame\n"); | 509 | D_TX("Sending REASSOC frame\n"); |
510 | #endif | 510 | #endif |
511 | 511 | ||
512 | spin_unlock_irqrestore(&il->lock, flags); | 512 | spin_unlock_irqrestore(&il->lock, flags); |
@@ -518,12 +518,12 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
518 | il, &il->contexts[IL_RXON_CTX_BSS], | 518 | il, &il->contexts[IL_RXON_CTX_BSS], |
519 | info->control.sta); | 519 | info->control.sta); |
520 | if (sta_id == IL_INVALID_STATION) { | 520 | if (sta_id == IL_INVALID_STATION) { |
521 | IL_DEBUG_DROP(il, "Dropping - INVALID STATION: %pM\n", | 521 | D_DROP("Dropping - INVALID STATION: %pM\n", |
522 | hdr->addr1); | 522 | hdr->addr1); |
523 | goto drop; | 523 | goto drop; |
524 | } | 524 | } |
525 | 525 | ||
526 | IL_DEBUG_RATE(il, "station Id %d\n", sta_id); | 526 | D_RATE("station Id %d\n", sta_id); |
527 | 527 | ||
528 | if (ieee80211_is_data_qos(fc)) { | 528 | if (ieee80211_is_data_qos(fc)) { |
529 | u8 *qc = ieee80211_get_qos_ctl(hdr); | 529 | u8 *qc = ieee80211_get_qos_ctl(hdr); |
@@ -594,9 +594,9 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
594 | txq->need_update = 0; | 594 | txq->need_update = 0; |
595 | } | 595 | } |
596 | 596 | ||
597 | IL_DEBUG_TX(il, "sequence nr = 0X%x\n", | 597 | D_TX("sequence nr = 0X%x\n", |
598 | le16_to_cpu(out_cmd->hdr.sequence)); | 598 | le16_to_cpu(out_cmd->hdr.sequence)); |
599 | IL_DEBUG_TX(il, "tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); | 599 | D_TX("tx_flags = 0X%x\n", le32_to_cpu(tx_cmd->tx_flags)); |
600 | il_print_hex_dump(il, IL_DL_TX, tx_cmd, sizeof(*tx_cmd)); | 600 | il_print_hex_dump(il, IL_DL_TX, tx_cmd, sizeof(*tx_cmd)); |
601 | il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd->hdr, | 601 | il_print_hex_dump(il, IL_DL_TX, (u8 *)tx_cmd->hdr, |
602 | ieee80211_hdrlen(fc)); | 602 | ieee80211_hdrlen(fc)); |
@@ -726,7 +726,7 @@ static int il3945_get_measurement(struct il_priv *il, | |||
726 | switch (spectrum_resp_status) { | 726 | switch (spectrum_resp_status) { |
727 | case 0: /* Command will be handled */ | 727 | case 0: /* Command will be handled */ |
728 | if (pkt->u.spectrum.id != 0xff) { | 728 | if (pkt->u.spectrum.id != 0xff) { |
729 | IL_DEBUG_INFO(il, "Replaced existing measurement: %d\n", | 729 | D_INFO("Replaced existing measurement: %d\n", |
730 | pkt->u.spectrum.id); | 730 | pkt->u.spectrum.id); |
731 | il->measurement_status &= ~MEASUREMENT_READY; | 731 | il->measurement_status &= ~MEASUREMENT_READY; |
732 | } | 732 | } |
@@ -753,18 +753,18 @@ static void il3945_rx_reply_alive(struct il_priv *il, | |||
753 | 753 | ||
754 | palive = &pkt->u.alive_frame; | 754 | palive = &pkt->u.alive_frame; |
755 | 755 | ||
756 | IL_DEBUG_INFO(il, "Alive ucode status 0x%08X revision " | 756 | D_INFO("Alive ucode status 0x%08X revision " |
757 | "0x%01X 0x%01X\n", | 757 | "0x%01X 0x%01X\n", |
758 | palive->is_valid, palive->ver_type, | 758 | palive->is_valid, palive->ver_type, |
759 | palive->ver_subtype); | 759 | palive->ver_subtype); |
760 | 760 | ||
761 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { | 761 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { |
762 | IL_DEBUG_INFO(il, "Initialization Alive received.\n"); | 762 | D_INFO("Initialization Alive received.\n"); |
763 | memcpy(&il->card_alive_init, &pkt->u.alive_frame, | 763 | memcpy(&il->card_alive_init, &pkt->u.alive_frame, |
764 | sizeof(struct il_alive_resp)); | 764 | sizeof(struct il_alive_resp)); |
765 | pwork = &il->init_alive_start; | 765 | pwork = &il->init_alive_start; |
766 | } else { | 766 | } else { |
767 | IL_DEBUG_INFO(il, "Runtime Alive received.\n"); | 767 | D_INFO("Runtime Alive received.\n"); |
768 | memcpy(&il->card_alive, &pkt->u.alive_frame, | 768 | memcpy(&il->card_alive, &pkt->u.alive_frame, |
769 | sizeof(struct il_alive_resp)); | 769 | sizeof(struct il_alive_resp)); |
770 | pwork = &il->alive_start; | 770 | pwork = &il->alive_start; |
@@ -787,7 +787,7 @@ static void il3945_rx_reply_add_sta(struct il_priv *il, | |||
787 | struct il_rx_packet *pkt = rxb_addr(rxb); | 787 | struct il_rx_packet *pkt = rxb_addr(rxb); |
788 | #endif | 788 | #endif |
789 | 789 | ||
790 | IL_DEBUG_RX(il, "Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status); | 790 | D_RX("Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status); |
791 | } | 791 | } |
792 | 792 | ||
793 | static void il3945_rx_beacon_notif(struct il_priv *il, | 793 | static void il3945_rx_beacon_notif(struct il_priv *il, |
@@ -798,7 +798,7 @@ static void il3945_rx_beacon_notif(struct il_priv *il, | |||
798 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 798 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
799 | u8 rate = beacon->beacon_notify_hdr.rate; | 799 | u8 rate = beacon->beacon_notify_hdr.rate; |
800 | 800 | ||
801 | IL_DEBUG_RX(il, "beacon status %x retries %d iss %d " | 801 | D_RX("beacon status %x retries %d iss %d " |
802 | "tsf %d %d rate %d\n", | 802 | "tsf %d %d rate %d\n", |
803 | le32_to_cpu(beacon->beacon_notify_hdr.status) & TX_STATUS_MSK, | 803 | le32_to_cpu(beacon->beacon_notify_hdr.status) & TX_STATUS_MSK, |
804 | beacon->beacon_notify_hdr.failure_frame, | 804 | beacon->beacon_notify_hdr.failure_frame, |
@@ -1040,7 +1040,7 @@ static void il3945_rx_allocate(struct il_priv *il, gfp_t priority) | |||
1040 | page = alloc_pages(gfp_mask, il->hw_params.rx_page_order); | 1040 | page = alloc_pages(gfp_mask, il->hw_params.rx_page_order); |
1041 | if (!page) { | 1041 | if (!page) { |
1042 | if (net_ratelimit()) | 1042 | if (net_ratelimit()) |
1043 | IL_DEBUG_INFO(il, "Failed to allocate SKB buffer.\n"); | 1043 | D_INFO("Failed to allocate SKB buffer.\n"); |
1044 | if ((rxq->free_count <= RX_LOW_WATERMARK) && | 1044 | if ((rxq->free_count <= RX_LOW_WATERMARK) && |
1045 | net_ratelimit()) | 1045 | net_ratelimit()) |
1046 | IL_CRIT(il, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", | 1046 | IL_CRIT(il, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", |
@@ -1225,7 +1225,7 @@ static void il3945_rx_handle(struct il_priv *il) | |||
1225 | fill_rx = 1; | 1225 | fill_rx = 1; |
1226 | /* Rx interrupt, but nothing sent from uCode */ | 1226 | /* Rx interrupt, but nothing sent from uCode */ |
1227 | if (i == r) | 1227 | if (i == r) |
1228 | IL_DEBUG_RX(il, "r = %d, i = %d\n", r, i); | 1228 | D_RX("r = %d, i = %d\n", r, i); |
1229 | 1229 | ||
1230 | while (i != r) { | 1230 | while (i != r) { |
1231 | int len; | 1231 | int len; |
@@ -1261,13 +1261,13 @@ static void il3945_rx_handle(struct il_priv *il) | |||
1261 | * handle those that need handling via function in | 1261 | * handle those that need handling via function in |
1262 | * rx_handlers table. See il3945_setup_rx_handlers() */ | 1262 | * rx_handlers table. See il3945_setup_rx_handlers() */ |
1263 | if (il->rx_handlers[pkt->hdr.cmd]) { | 1263 | if (il->rx_handlers[pkt->hdr.cmd]) { |
1264 | IL_DEBUG_RX(il, "r = %d, i = %d, %s, 0x%02x\n", r, i, | 1264 | D_RX("r = %d, i = %d, %s, 0x%02x\n", r, i, |
1265 | il_get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); | 1265 | il_get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); |
1266 | il->isr_stats.rx_handlers[pkt->hdr.cmd]++; | 1266 | il->isr_stats.rx_handlers[pkt->hdr.cmd]++; |
1267 | il->rx_handlers[pkt->hdr.cmd] (il, rxb); | 1267 | il->rx_handlers[pkt->hdr.cmd] (il, rxb); |
1268 | } else { | 1268 | } else { |
1269 | /* No handling needed */ | 1269 | /* No handling needed */ |
1270 | IL_DEBUG_RX(il, | 1270 | D_RX( |
1271 | "r %d i %d No handler needed for %s, 0x%02x\n", | 1271 | "r %d i %d No handler needed for %s, 0x%02x\n", |
1272 | r, i, il_get_cmd_string(pkt->hdr.cmd), | 1272 | r, i, il_get_cmd_string(pkt->hdr.cmd), |
1273 | pkt->hdr.cmd); | 1273 | pkt->hdr.cmd); |
@@ -1432,7 +1432,7 @@ static void il3945_irq_tasklet(struct il_priv *il) | |||
1432 | if (il_get_debug_level(il) & IL_DL_ISR) { | 1432 | if (il_get_debug_level(il) & IL_DL_ISR) { |
1433 | /* just for debug */ | 1433 | /* just for debug */ |
1434 | inta_mask = il_read32(il, CSR_INT_MASK); | 1434 | inta_mask = il_read32(il, CSR_INT_MASK); |
1435 | IL_DEBUG_ISR(il, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 1435 | D_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
1436 | inta, inta_mask, inta_fh); | 1436 | inta, inta_mask, inta_fh); |
1437 | } | 1437 | } |
1438 | #endif | 1438 | #endif |
@@ -1467,14 +1467,14 @@ static void il3945_irq_tasklet(struct il_priv *il) | |||
1467 | if (il_get_debug_level(il) & (IL_DL_ISR)) { | 1467 | if (il_get_debug_level(il) & (IL_DL_ISR)) { |
1468 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | 1468 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ |
1469 | if (inta & CSR_INT_BIT_SCD) { | 1469 | if (inta & CSR_INT_BIT_SCD) { |
1470 | IL_DEBUG_ISR(il, "Scheduler finished to transmit " | 1470 | D_ISR("Scheduler finished to transmit " |
1471 | "the frame/frames.\n"); | 1471 | "the frame/frames.\n"); |
1472 | il->isr_stats.sch++; | 1472 | il->isr_stats.sch++; |
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | /* Alive notification via Rx interrupt will do the real work */ | 1475 | /* Alive notification via Rx interrupt will do the real work */ |
1476 | if (inta & CSR_INT_BIT_ALIVE) { | 1476 | if (inta & CSR_INT_BIT_ALIVE) { |
1477 | IL_DEBUG_ISR(il, "Alive interrupt\n"); | 1477 | D_ISR("Alive interrupt\n"); |
1478 | il->isr_stats.alive++; | 1478 | il->isr_stats.alive++; |
1479 | } | 1479 | } |
1480 | } | 1480 | } |
@@ -1493,7 +1493,7 @@ static void il3945_irq_tasklet(struct il_priv *il) | |||
1493 | 1493 | ||
1494 | /* uCode wakes up after power-down sleep */ | 1494 | /* uCode wakes up after power-down sleep */ |
1495 | if (inta & CSR_INT_BIT_WAKEUP) { | 1495 | if (inta & CSR_INT_BIT_WAKEUP) { |
1496 | IL_DEBUG_ISR(il, "Wakeup interrupt\n"); | 1496 | D_ISR("Wakeup interrupt\n"); |
1497 | il_rx_queue_update_write_ptr(il, &il->rxq); | 1497 | il_rx_queue_update_write_ptr(il, &il->rxq); |
1498 | il_txq_update_write_ptr(il, &il->txq[0]); | 1498 | il_txq_update_write_ptr(il, &il->txq[0]); |
1499 | il_txq_update_write_ptr(il, &il->txq[1]); | 1499 | il_txq_update_write_ptr(il, &il->txq[1]); |
@@ -1516,7 +1516,7 @@ static void il3945_irq_tasklet(struct il_priv *il) | |||
1516 | } | 1516 | } |
1517 | 1517 | ||
1518 | if (inta & CSR_INT_BIT_FH_TX) { | 1518 | if (inta & CSR_INT_BIT_FH_TX) { |
1519 | IL_DEBUG_ISR(il, "Tx interrupt\n"); | 1519 | D_ISR("Tx interrupt\n"); |
1520 | il->isr_stats.tx++; | 1520 | il->isr_stats.tx++; |
1521 | 1521 | ||
1522 | il_write32(il, CSR_FH_INT_STATUS, (1 << 6)); | 1522 | il_write32(il, CSR_FH_INT_STATUS, (1 << 6)); |
@@ -1546,7 +1546,7 @@ static void il3945_irq_tasklet(struct il_priv *il) | |||
1546 | inta = il_read32(il, CSR_INT); | 1546 | inta = il_read32(il, CSR_INT); |
1547 | inta_mask = il_read32(il, CSR_INT_MASK); | 1547 | inta_mask = il_read32(il, CSR_INT_MASK); |
1548 | inta_fh = il_read32(il, CSR_FH_INT_STATUS); | 1548 | inta_fh = il_read32(il, CSR_FH_INT_STATUS); |
1549 | IL_DEBUG_ISR(il, "End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " | 1549 | D_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " |
1550 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); | 1550 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); |
1551 | } | 1551 | } |
1552 | #endif | 1552 | #endif |
@@ -1586,7 +1586,7 @@ static int il3945_get_channels_for_scan(struct il_priv *il, | |||
1586 | ch_info = il_get_channel_info(il, band, | 1586 | ch_info = il_get_channel_info(il, band, |
1587 | scan_ch->channel); | 1587 | scan_ch->channel); |
1588 | if (!il_is_channel_valid(ch_info)) { | 1588 | if (!il_is_channel_valid(ch_info)) { |
1589 | IL_DEBUG_SCAN(il, | 1589 | D_SCAN( |
1590 | "Channel %d is INVALID for this band.\n", | 1590 | "Channel %d is INVALID for this band.\n", |
1591 | scan_ch->channel); | 1591 | scan_ch->channel); |
1592 | continue; | 1592 | continue; |
@@ -1635,7 +1635,7 @@ static int il3945_get_channels_for_scan(struct il_priv *il, | |||
1635 | */ | 1635 | */ |
1636 | } | 1636 | } |
1637 | 1637 | ||
1638 | IL_DEBUG_SCAN(il, "Scanning %d [%s %d]\n", | 1638 | D_SCAN("Scanning %d [%s %d]\n", |
1639 | scan_ch->channel, | 1639 | scan_ch->channel, |
1640 | (scan_ch->type & 1) ? "ACTIVE" : "PASSIVE", | 1640 | (scan_ch->type & 1) ? "ACTIVE" : "PASSIVE", |
1641 | (scan_ch->type & 1) ? | 1641 | (scan_ch->type & 1) ? |
@@ -1645,7 +1645,7 @@ static int il3945_get_channels_for_scan(struct il_priv *il, | |||
1645 | added++; | 1645 | added++; |
1646 | } | 1646 | } |
1647 | 1647 | ||
1648 | IL_DEBUG_SCAN(il, "total channels to scan %d\n", added); | 1648 | D_SCAN("total channels to scan %d\n", added); |
1649 | return added; | 1649 | return added; |
1650 | } | 1650 | } |
1651 | 1651 | ||
@@ -1696,7 +1696,7 @@ static int il3945_verify_inst_full(struct il_priv *il, __le32 *image, u32 len) | |||
1696 | int rc = 0; | 1696 | int rc = 0; |
1697 | u32 errcnt; | 1697 | u32 errcnt; |
1698 | 1698 | ||
1699 | IL_DEBUG_INFO(il, "ucode inst image size is %u\n", len); | 1699 | D_INFO("ucode inst image size is %u\n", len); |
1700 | 1700 | ||
1701 | il_write_direct32(il, HBUS_TARG_MEM_RADDR, | 1701 | il_write_direct32(il, HBUS_TARG_MEM_RADDR, |
1702 | IWL39_RTC_INST_LOWER_BOUND); | 1702 | IWL39_RTC_INST_LOWER_BOUND); |
@@ -1720,7 +1720,7 @@ static int il3945_verify_inst_full(struct il_priv *il, __le32 *image, u32 len) | |||
1720 | 1720 | ||
1721 | 1721 | ||
1722 | if (!errcnt) | 1722 | if (!errcnt) |
1723 | IL_DEBUG_INFO(il, | 1723 | D_INFO( |
1724 | "ucode image in INSTRUCTION memory is good\n"); | 1724 | "ucode image in INSTRUCTION memory is good\n"); |
1725 | 1725 | ||
1726 | return rc; | 1726 | return rc; |
@@ -1739,7 +1739,7 @@ static int il3945_verify_inst_sparse(struct il_priv *il, __le32 *image, u32 len) | |||
1739 | u32 errcnt = 0; | 1739 | u32 errcnt = 0; |
1740 | u32 i; | 1740 | u32 i; |
1741 | 1741 | ||
1742 | IL_DEBUG_INFO(il, "ucode inst image size is %u\n", len); | 1742 | D_INFO("ucode inst image size is %u\n", len); |
1743 | 1743 | ||
1744 | for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) { | 1744 | for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) { |
1745 | /* read data comes through single port, auto-incr addr */ | 1745 | /* read data comes through single port, auto-incr addr */ |
@@ -1780,7 +1780,7 @@ static int il3945_verify_ucode(struct il_priv *il) | |||
1780 | len = il->ucode_boot.len; | 1780 | len = il->ucode_boot.len; |
1781 | rc = il3945_verify_inst_sparse(il, image, len); | 1781 | rc = il3945_verify_inst_sparse(il, image, len); |
1782 | if (rc == 0) { | 1782 | if (rc == 0) { |
1783 | IL_DEBUG_INFO(il, "Bootstrap uCode is good in inst SRAM\n"); | 1783 | D_INFO("Bootstrap uCode is good in inst SRAM\n"); |
1784 | return 0; | 1784 | return 0; |
1785 | } | 1785 | } |
1786 | 1786 | ||
@@ -1789,7 +1789,7 @@ static int il3945_verify_ucode(struct il_priv *il) | |||
1789 | len = il->ucode_init.len; | 1789 | len = il->ucode_init.len; |
1790 | rc = il3945_verify_inst_sparse(il, image, len); | 1790 | rc = il3945_verify_inst_sparse(il, image, len); |
1791 | if (rc == 0) { | 1791 | if (rc == 0) { |
1792 | IL_DEBUG_INFO(il, "Initialize uCode is good in inst SRAM\n"); | 1792 | D_INFO("Initialize uCode is good in inst SRAM\n"); |
1793 | return 0; | 1793 | return 0; |
1794 | } | 1794 | } |
1795 | 1795 | ||
@@ -1798,7 +1798,7 @@ static int il3945_verify_ucode(struct il_priv *il) | |||
1798 | len = il->ucode_code.len; | 1798 | len = il->ucode_code.len; |
1799 | rc = il3945_verify_inst_sparse(il, image, len); | 1799 | rc = il3945_verify_inst_sparse(il, image, len); |
1800 | if (rc == 0) { | 1800 | if (rc == 0) { |
1801 | IL_DEBUG_INFO(il, "Runtime uCode is good in inst SRAM\n"); | 1801 | D_INFO("Runtime uCode is good in inst SRAM\n"); |
1802 | return 0; | 1802 | return 0; |
1803 | } | 1803 | } |
1804 | 1804 | ||
@@ -1879,7 +1879,7 @@ static int il3945_read_ucode(struct il_priv *il) | |||
1879 | "which is deprecated. " | 1879 | "which is deprecated. " |
1880 | " Please use API v%u instead.\n", | 1880 | " Please use API v%u instead.\n", |
1881 | buf, api_max); | 1881 | buf, api_max); |
1882 | IL_DEBUG_INFO(il, "Got firmware '%s' file " | 1882 | D_INFO("Got firmware '%s' file " |
1883 | "(%zd bytes) from disk\n", | 1883 | "(%zd bytes) from disk\n", |
1884 | buf, ucode_raw->size); | 1884 | buf, ucode_raw->size); |
1885 | break; | 1885 | break; |
@@ -1940,17 +1940,17 @@ static int il3945_read_ucode(struct il_priv *il) | |||
1940 | IL_UCODE_API(il->ucode_ver), | 1940 | IL_UCODE_API(il->ucode_ver), |
1941 | IL_UCODE_SERIAL(il->ucode_ver)); | 1941 | IL_UCODE_SERIAL(il->ucode_ver)); |
1942 | 1942 | ||
1943 | IL_DEBUG_INFO(il, "f/w package hdr ucode version raw = 0x%x\n", | 1943 | D_INFO("f/w package hdr ucode version raw = 0x%x\n", |
1944 | il->ucode_ver); | 1944 | il->ucode_ver); |
1945 | IL_DEBUG_INFO(il, "f/w package hdr runtime inst size = %u\n", | 1945 | D_INFO("f/w package hdr runtime inst size = %u\n", |
1946 | inst_size); | 1946 | inst_size); |
1947 | IL_DEBUG_INFO(il, "f/w package hdr runtime data size = %u\n", | 1947 | D_INFO("f/w package hdr runtime data size = %u\n", |
1948 | data_size); | 1948 | data_size); |
1949 | IL_DEBUG_INFO(il, "f/w package hdr init inst size = %u\n", | 1949 | D_INFO("f/w package hdr init inst size = %u\n", |
1950 | init_size); | 1950 | init_size); |
1951 | IL_DEBUG_INFO(il, "f/w package hdr init data size = %u\n", | 1951 | D_INFO("f/w package hdr init data size = %u\n", |
1952 | init_data_size); | 1952 | init_data_size); |
1953 | IL_DEBUG_INFO(il, "f/w package hdr boot inst size = %u\n", | 1953 | D_INFO("f/w package hdr boot inst size = %u\n", |
1954 | boot_size); | 1954 | boot_size); |
1955 | 1955 | ||
1956 | 1956 | ||
@@ -1959,7 +1959,7 @@ static int il3945_read_ucode(struct il_priv *il) | |||
1959 | inst_size + data_size + init_size + | 1959 | inst_size + data_size + init_size + |
1960 | init_data_size + boot_size) { | 1960 | init_data_size + boot_size) { |
1961 | 1961 | ||
1962 | IL_DEBUG_INFO(il, | 1962 | D_INFO( |
1963 | "uCode file size %zd does not match expected size\n", | 1963 | "uCode file size %zd does not match expected size\n", |
1964 | ucode_raw->size); | 1964 | ucode_raw->size); |
1965 | ret = -EINVAL; | 1965 | ret = -EINVAL; |
@@ -1968,34 +1968,34 @@ static int il3945_read_ucode(struct il_priv *il) | |||
1968 | 1968 | ||
1969 | /* Verify that uCode images will fit in card's SRAM */ | 1969 | /* Verify that uCode images will fit in card's SRAM */ |
1970 | if (inst_size > IWL39_MAX_INST_SIZE) { | 1970 | if (inst_size > IWL39_MAX_INST_SIZE) { |
1971 | IL_DEBUG_INFO(il, "uCode instr len %d too large to fit in\n", | 1971 | D_INFO("uCode instr len %d too large to fit in\n", |
1972 | inst_size); | 1972 | inst_size); |
1973 | ret = -EINVAL; | 1973 | ret = -EINVAL; |
1974 | goto err_release; | 1974 | goto err_release; |
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | if (data_size > IWL39_MAX_DATA_SIZE) { | 1977 | if (data_size > IWL39_MAX_DATA_SIZE) { |
1978 | IL_DEBUG_INFO(il, "uCode data len %d too large to fit in\n", | 1978 | D_INFO("uCode data len %d too large to fit in\n", |
1979 | data_size); | 1979 | data_size); |
1980 | ret = -EINVAL; | 1980 | ret = -EINVAL; |
1981 | goto err_release; | 1981 | goto err_release; |
1982 | } | 1982 | } |
1983 | if (init_size > IWL39_MAX_INST_SIZE) { | 1983 | if (init_size > IWL39_MAX_INST_SIZE) { |
1984 | IL_DEBUG_INFO(il, | 1984 | D_INFO( |
1985 | "uCode init instr len %d too large to fit in\n", | 1985 | "uCode init instr len %d too large to fit in\n", |
1986 | init_size); | 1986 | init_size); |
1987 | ret = -EINVAL; | 1987 | ret = -EINVAL; |
1988 | goto err_release; | 1988 | goto err_release; |
1989 | } | 1989 | } |
1990 | if (init_data_size > IWL39_MAX_DATA_SIZE) { | 1990 | if (init_data_size > IWL39_MAX_DATA_SIZE) { |
1991 | IL_DEBUG_INFO(il, | 1991 | D_INFO( |
1992 | "uCode init data len %d too large to fit in\n", | 1992 | "uCode init data len %d too large to fit in\n", |
1993 | init_data_size); | 1993 | init_data_size); |
1994 | ret = -EINVAL; | 1994 | ret = -EINVAL; |
1995 | goto err_release; | 1995 | goto err_release; |
1996 | } | 1996 | } |
1997 | if (boot_size > IWL39_MAX_BSM_SIZE) { | 1997 | if (boot_size > IWL39_MAX_BSM_SIZE) { |
1998 | IL_DEBUG_INFO(il, | 1998 | D_INFO( |
1999 | "uCode boot instr len %d too large to fit in\n", | 1999 | "uCode boot instr len %d too large to fit in\n", |
2000 | boot_size); | 2000 | boot_size); |
2001 | ret = -EINVAL; | 2001 | ret = -EINVAL; |
@@ -2045,18 +2045,18 @@ static int il3945_read_ucode(struct il_priv *il) | |||
2045 | 2045 | ||
2046 | /* Runtime instructions (first block of data in file) */ | 2046 | /* Runtime instructions (first block of data in file) */ |
2047 | len = inst_size; | 2047 | len = inst_size; |
2048 | IL_DEBUG_INFO(il, | 2048 | D_INFO( |
2049 | "Copying (but not loading) uCode instr len %zd\n", len); | 2049 | "Copying (but not loading) uCode instr len %zd\n", len); |
2050 | memcpy(il->ucode_code.v_addr, src, len); | 2050 | memcpy(il->ucode_code.v_addr, src, len); |
2051 | src += len; | 2051 | src += len; |
2052 | 2052 | ||
2053 | IL_DEBUG_INFO(il, "uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", | 2053 | D_INFO("uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", |
2054 | il->ucode_code.v_addr, (u32)il->ucode_code.p_addr); | 2054 | il->ucode_code.v_addr, (u32)il->ucode_code.p_addr); |
2055 | 2055 | ||
2056 | /* Runtime data (2nd block) | 2056 | /* Runtime data (2nd block) |
2057 | * NOTE: Copy into backup buffer will be done in il3945_up() */ | 2057 | * NOTE: Copy into backup buffer will be done in il3945_up() */ |
2058 | len = data_size; | 2058 | len = data_size; |
2059 | IL_DEBUG_INFO(il, | 2059 | D_INFO( |
2060 | "Copying (but not loading) uCode data len %zd\n", len); | 2060 | "Copying (but not loading) uCode data len %zd\n", len); |
2061 | memcpy(il->ucode_data.v_addr, src, len); | 2061 | memcpy(il->ucode_data.v_addr, src, len); |
2062 | memcpy(il->ucode_data_backup.v_addr, src, len); | 2062 | memcpy(il->ucode_data_backup.v_addr, src, len); |
@@ -2065,7 +2065,7 @@ static int il3945_read_ucode(struct il_priv *il) | |||
2065 | /* Initialization instructions (3rd block) */ | 2065 | /* Initialization instructions (3rd block) */ |
2066 | if (init_size) { | 2066 | if (init_size) { |
2067 | len = init_size; | 2067 | len = init_size; |
2068 | IL_DEBUG_INFO(il, | 2068 | D_INFO( |
2069 | "Copying (but not loading) init instr len %zd\n", len); | 2069 | "Copying (but not loading) init instr len %zd\n", len); |
2070 | memcpy(il->ucode_init.v_addr, src, len); | 2070 | memcpy(il->ucode_init.v_addr, src, len); |
2071 | src += len; | 2071 | src += len; |
@@ -2074,7 +2074,7 @@ static int il3945_read_ucode(struct il_priv *il) | |||
2074 | /* Initialization data (4th block) */ | 2074 | /* Initialization data (4th block) */ |
2075 | if (init_data_size) { | 2075 | if (init_data_size) { |
2076 | len = init_data_size; | 2076 | len = init_data_size; |
2077 | IL_DEBUG_INFO(il, | 2077 | D_INFO( |
2078 | "Copying (but not loading) init data len %zd\n", len); | 2078 | "Copying (but not loading) init data len %zd\n", len); |
2079 | memcpy(il->ucode_init_data.v_addr, src, len); | 2079 | memcpy(il->ucode_init_data.v_addr, src, len); |
2080 | src += len; | 2080 | src += len; |
@@ -2082,7 +2082,7 @@ static int il3945_read_ucode(struct il_priv *il) | |||
2082 | 2082 | ||
2083 | /* Bootstrap instructions (5th block) */ | 2083 | /* Bootstrap instructions (5th block) */ |
2084 | len = boot_size; | 2084 | len = boot_size; |
2085 | IL_DEBUG_INFO(il, | 2085 | D_INFO( |
2086 | "Copying (but not loading) boot instr len %zd\n", len); | 2086 | "Copying (but not loading) boot instr len %zd\n", len); |
2087 | memcpy(il->ucode_boot.v_addr, src, len); | 2087 | memcpy(il->ucode_boot.v_addr, src, len); |
2088 | 2088 | ||
@@ -2132,7 +2132,7 @@ static int il3945_set_ucode_ptrs(struct il_priv *il) | |||
2132 | il_write_prph(il, BSM_DRAM_INST_BYTECOUNT_REG, | 2132 | il_write_prph(il, BSM_DRAM_INST_BYTECOUNT_REG, |
2133 | il->ucode_code.len | BSM_DRAM_INST_LOAD); | 2133 | il->ucode_code.len | BSM_DRAM_INST_LOAD); |
2134 | 2134 | ||
2135 | IL_DEBUG_INFO(il, "Runtime uCode pointers are set.\n"); | 2135 | D_INFO("Runtime uCode pointers are set.\n"); |
2136 | 2136 | ||
2137 | return 0; | 2137 | return 0; |
2138 | } | 2138 | } |
@@ -2150,7 +2150,7 @@ static void il3945_init_alive_start(struct il_priv *il) | |||
2150 | if (il->card_alive_init.is_valid != UCODE_VALID_OK) { | 2150 | if (il->card_alive_init.is_valid != UCODE_VALID_OK) { |
2151 | /* We had an error bringing up the hardware, so take it | 2151 | /* We had an error bringing up the hardware, so take it |
2152 | * all the way back down so we can try again */ | 2152 | * all the way back down so we can try again */ |
2153 | IL_DEBUG_INFO(il, "Initialize Alive failed.\n"); | 2153 | D_INFO("Initialize Alive failed.\n"); |
2154 | goto restart; | 2154 | goto restart; |
2155 | } | 2155 | } |
2156 | 2156 | ||
@@ -2160,18 +2160,18 @@ static void il3945_init_alive_start(struct il_priv *il) | |||
2160 | if (il3945_verify_ucode(il)) { | 2160 | if (il3945_verify_ucode(il)) { |
2161 | /* Runtime instruction load was bad; | 2161 | /* Runtime instruction load was bad; |
2162 | * take it all the way back down so we can try again */ | 2162 | * take it all the way back down so we can try again */ |
2163 | IL_DEBUG_INFO(il, "Bad \"initialize\" uCode load.\n"); | 2163 | D_INFO("Bad \"initialize\" uCode load.\n"); |
2164 | goto restart; | 2164 | goto restart; |
2165 | } | 2165 | } |
2166 | 2166 | ||
2167 | /* Send pointers to protocol/runtime uCode image ... init code will | 2167 | /* Send pointers to protocol/runtime uCode image ... init code will |
2168 | * load and launch runtime uCode, which will send us another "Alive" | 2168 | * load and launch runtime uCode, which will send us another "Alive" |
2169 | * notification. */ | 2169 | * notification. */ |
2170 | IL_DEBUG_INFO(il, "Initialization Alive received.\n"); | 2170 | D_INFO("Initialization Alive received.\n"); |
2171 | if (il3945_set_ucode_ptrs(il)) { | 2171 | if (il3945_set_ucode_ptrs(il)) { |
2172 | /* Runtime instruction load won't happen; | 2172 | /* Runtime instruction load won't happen; |
2173 | * take it all the way back down so we can try again */ | 2173 | * take it all the way back down so we can try again */ |
2174 | IL_DEBUG_INFO(il, "Couldn't set up uCode pointers.\n"); | 2174 | D_INFO("Couldn't set up uCode pointers.\n"); |
2175 | goto restart; | 2175 | goto restart; |
2176 | } | 2176 | } |
2177 | return; | 2177 | return; |
@@ -2191,12 +2191,12 @@ static void il3945_alive_start(struct il_priv *il) | |||
2191 | u32 rfkill; | 2191 | u32 rfkill; |
2192 | struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS]; | 2192 | struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS]; |
2193 | 2193 | ||
2194 | IL_DEBUG_INFO(il, "Runtime Alive received.\n"); | 2194 | D_INFO("Runtime Alive received.\n"); |
2195 | 2195 | ||
2196 | if (il->card_alive.is_valid != UCODE_VALID_OK) { | 2196 | if (il->card_alive.is_valid != UCODE_VALID_OK) { |
2197 | /* We had an error bringing up the hardware, so take it | 2197 | /* We had an error bringing up the hardware, so take it |
2198 | * all the way back down so we can try again */ | 2198 | * all the way back down so we can try again */ |
2199 | IL_DEBUG_INFO(il, "Alive failed.\n"); | 2199 | D_INFO("Alive failed.\n"); |
2200 | goto restart; | 2200 | goto restart; |
2201 | } | 2201 | } |
2202 | 2202 | ||
@@ -2206,12 +2206,12 @@ static void il3945_alive_start(struct il_priv *il) | |||
2206 | if (il3945_verify_ucode(il)) { | 2206 | if (il3945_verify_ucode(il)) { |
2207 | /* Runtime instruction load was bad; | 2207 | /* Runtime instruction load was bad; |
2208 | * take it all the way back down so we can try again */ | 2208 | * take it all the way back down so we can try again */ |
2209 | IL_DEBUG_INFO(il, "Bad runtime uCode load.\n"); | 2209 | D_INFO("Bad runtime uCode load.\n"); |
2210 | goto restart; | 2210 | goto restart; |
2211 | } | 2211 | } |
2212 | 2212 | ||
2213 | rfkill = il_read_prph(il, APMG_RFKILL_REG); | 2213 | rfkill = il_read_prph(il, APMG_RFKILL_REG); |
2214 | IL_DEBUG_INFO(il, "RFKILL status: 0x%x\n", rfkill); | 2214 | D_INFO("RFKILL status: 0x%x\n", rfkill); |
2215 | 2215 | ||
2216 | if (rfkill & 0x1) { | 2216 | if (rfkill & 0x1) { |
2217 | clear_bit(STATUS_RF_KILL_HW, &il->status); | 2217 | clear_bit(STATUS_RF_KILL_HW, &il->status); |
@@ -2223,7 +2223,7 @@ static void il3945_alive_start(struct il_priv *il) | |||
2223 | } | 2223 | } |
2224 | 2224 | ||
2225 | if (thermal_spin) | 2225 | if (thermal_spin) |
2226 | IL_DEBUG_INFO(il, "Thermal calibration took %dus\n", | 2226 | D_INFO("Thermal calibration took %dus\n", |
2227 | thermal_spin * 10); | 2227 | thermal_spin * 10); |
2228 | } else | 2228 | } else |
2229 | set_bit(STATUS_RF_KILL_HW, &il->status); | 2229 | set_bit(STATUS_RF_KILL_HW, &il->status); |
@@ -2264,7 +2264,7 @@ static void il3945_alive_start(struct il_priv *il) | |||
2264 | 2264 | ||
2265 | il3945_reg_txpower_periodic(il); | 2265 | il3945_reg_txpower_periodic(il); |
2266 | 2266 | ||
2267 | IL_DEBUG_INFO(il, "ALIVE processing complete.\n"); | 2267 | D_INFO("ALIVE processing complete.\n"); |
2268 | wake_up(&il->wait_command_queue); | 2268 | wake_up(&il->wait_command_queue); |
2269 | 2269 | ||
2270 | return; | 2270 | return; |
@@ -2280,7 +2280,7 @@ static void __il3945_down(struct il_priv *il) | |||
2280 | unsigned long flags; | 2280 | unsigned long flags; |
2281 | int exit_pending; | 2281 | int exit_pending; |
2282 | 2282 | ||
2283 | IL_DEBUG_INFO(il, DRV_NAME " is going down\n"); | 2283 | D_INFO(DRV_NAME " is going down\n"); |
2284 | 2284 | ||
2285 | il_scan_cancel_timeout(il, 200); | 2285 | il_scan_cancel_timeout(il, 200); |
2286 | 2286 | ||
@@ -2468,7 +2468,7 @@ static int __il3945_up(struct il_priv *il) | |||
2468 | /* start card; "initialize" will load runtime ucode */ | 2468 | /* start card; "initialize" will load runtime ucode */ |
2469 | il3945_nic_start(il); | 2469 | il3945_nic_start(il); |
2470 | 2470 | ||
2471 | IL_DEBUG_INFO(il, DRV_NAME " is coming up\n"); | 2471 | D_INFO(DRV_NAME " is coming up\n"); |
2472 | 2472 | ||
2473 | return 0; | 2473 | return 0; |
2474 | } | 2474 | } |
@@ -2540,7 +2540,7 @@ static void il3945_rfkill_poll(struct work_struct *data) | |||
2540 | 2540 | ||
2541 | wiphy_rfkill_set_hw_state(il->hw->wiphy, new_rfkill); | 2541 | wiphy_rfkill_set_hw_state(il->hw->wiphy, new_rfkill); |
2542 | 2542 | ||
2543 | IL_DEBUG_RF_KILL(il, "RF_KILL bit toggled to %s.\n", | 2543 | D_RF_KILL("RF_KILL bit toggled to %s.\n", |
2544 | new_rfkill ? "disable radio" : "enable radio"); | 2544 | new_rfkill ? "disable radio" : "enable radio"); |
2545 | } | 2545 | } |
2546 | 2546 | ||
@@ -2571,7 +2571,7 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2571 | il->scan_cmd = kmalloc(sizeof(struct il3945_scan_cmd) + | 2571 | il->scan_cmd = kmalloc(sizeof(struct il3945_scan_cmd) + |
2572 | IL_MAX_SCAN_SIZE, GFP_KERNEL); | 2572 | IL_MAX_SCAN_SIZE, GFP_KERNEL); |
2573 | if (!il->scan_cmd) { | 2573 | if (!il->scan_cmd) { |
2574 | IL_DEBUG_SCAN(il, "Fail to allocate scan memory\n"); | 2574 | D_SCAN("Fail to allocate scan memory\n"); |
2575 | return -ENOMEM; | 2575 | return -ENOMEM; |
2576 | } | 2576 | } |
2577 | } | 2577 | } |
@@ -2587,7 +2587,7 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2587 | u32 suspend_time = 100; | 2587 | u32 suspend_time = 100; |
2588 | u32 scan_suspend_time = 100; | 2588 | u32 scan_suspend_time = 100; |
2589 | 2589 | ||
2590 | IL_DEBUG_INFO(il, "Scanning while associated...\n"); | 2590 | D_INFO("Scanning while associated...\n"); |
2591 | 2591 | ||
2592 | interval = vif->bss_conf.beacon_int; | 2592 | interval = vif->bss_conf.beacon_int; |
2593 | 2593 | ||
@@ -2607,13 +2607,13 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2607 | (extra | ((suspend_time % interval) * 1024)); | 2607 | (extra | ((suspend_time % interval) * 1024)); |
2608 | 2608 | ||
2609 | scan->suspend_time = cpu_to_le32(scan_suspend_time); | 2609 | scan->suspend_time = cpu_to_le32(scan_suspend_time); |
2610 | IL_DEBUG_SCAN(il, "suspend_time 0x%X beacon interval %d\n", | 2610 | D_SCAN("suspend_time 0x%X beacon interval %d\n", |
2611 | scan_suspend_time, interval); | 2611 | scan_suspend_time, interval); |
2612 | } | 2612 | } |
2613 | 2613 | ||
2614 | if (il->scan_request->n_ssids) { | 2614 | if (il->scan_request->n_ssids) { |
2615 | int i, p = 0; | 2615 | int i, p = 0; |
2616 | IL_DEBUG_SCAN(il, "Kicking off active scan\n"); | 2616 | D_SCAN("Kicking off active scan\n"); |
2617 | for (i = 0; i < il->scan_request->n_ssids; i++) { | 2617 | for (i = 0; i < il->scan_request->n_ssids; i++) { |
2618 | /* always does wildcard anyway */ | 2618 | /* always does wildcard anyway */ |
2619 | if (!il->scan_request->ssids[i].ssid_len) | 2619 | if (!il->scan_request->ssids[i].ssid_len) |
@@ -2629,7 +2629,7 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2629 | } | 2629 | } |
2630 | is_active = true; | 2630 | is_active = true; |
2631 | } else | 2631 | } else |
2632 | IL_DEBUG_SCAN(il, "Kicking off passive scan.\n"); | 2632 | D_SCAN("Kicking off passive scan.\n"); |
2633 | 2633 | ||
2634 | /* We don't build a direct scan probe request; the uCode will do | 2634 | /* We don't build a direct scan probe request; the uCode will do |
2635 | * that based on the direct_mask added to each channel entry */ | 2635 | * that based on the direct_mask added to each channel entry */ |
@@ -2674,7 +2674,7 @@ int il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
2674 | scan->channel_count = il3945_get_channels_for_scan(il, band, is_active, n_probes, | 2674 | scan->channel_count = il3945_get_channels_for_scan(il, band, is_active, n_probes, |
2675 | (void *)&scan->data[len], vif); | 2675 | (void *)&scan->data[len], vif); |
2676 | if (scan->channel_count == 0) { | 2676 | if (scan->channel_count == 0) { |
2677 | IL_DEBUG_SCAN(il, "channel count %d\n", scan->channel_count); | 2677 | D_SCAN("channel count %d\n", scan->channel_count); |
2678 | return -EIO; | 2678 | return -EIO; |
2679 | } | 2679 | } |
2680 | 2680 | ||
@@ -2755,7 +2755,7 @@ void il3945_post_associate(struct il_priv *il) | |||
2755 | if (!ctx->vif || !il->is_open) | 2755 | if (!ctx->vif || !il->is_open) |
2756 | return; | 2756 | return; |
2757 | 2757 | ||
2758 | IL_DEBUG_ASSOC(il, "Associated as %d to: %pM\n", | 2758 | D_ASSOC("Associated as %d to: %pM\n", |
2759 | ctx->vif->bss_conf.aid, ctx->active.bssid_addr); | 2759 | ctx->vif->bss_conf.aid, ctx->active.bssid_addr); |
2760 | 2760 | ||
2761 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2761 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) |
@@ -2777,7 +2777,7 @@ void il3945_post_associate(struct il_priv *il) | |||
2777 | 2777 | ||
2778 | ctx->staging.assoc_id = cpu_to_le16(ctx->vif->bss_conf.aid); | 2778 | ctx->staging.assoc_id = cpu_to_le16(ctx->vif->bss_conf.aid); |
2779 | 2779 | ||
2780 | IL_DEBUG_ASSOC(il, "assoc id %d beacon interval %d\n", | 2780 | D_ASSOC("assoc id %d beacon interval %d\n", |
2781 | ctx->vif->bss_conf.aid, ctx->vif->bss_conf.beacon_int); | 2781 | ctx->vif->bss_conf.aid, ctx->vif->bss_conf.beacon_int); |
2782 | 2782 | ||
2783 | if (ctx->vif->bss_conf.use_short_preamble) | 2783 | if (ctx->vif->bss_conf.use_short_preamble) |
@@ -2821,7 +2821,7 @@ static int il3945_mac_start(struct ieee80211_hw *hw) | |||
2821 | struct il_priv *il = hw->priv; | 2821 | struct il_priv *il = hw->priv; |
2822 | int ret; | 2822 | int ret; |
2823 | 2823 | ||
2824 | IL_DEBUG_MAC80211(il, "enter\n"); | 2824 | D_MAC80211("enter\n"); |
2825 | 2825 | ||
2826 | /* we should be verifying the device is ready to be opened */ | 2826 | /* we should be verifying the device is ready to be opened */ |
2827 | mutex_lock(&il->mutex); | 2827 | mutex_lock(&il->mutex); |
@@ -2845,7 +2845,7 @@ static int il3945_mac_start(struct ieee80211_hw *hw) | |||
2845 | if (ret) | 2845 | if (ret) |
2846 | goto out_release_irq; | 2846 | goto out_release_irq; |
2847 | 2847 | ||
2848 | IL_DEBUG_INFO(il, "Start UP work.\n"); | 2848 | D_INFO("Start UP work.\n"); |
2849 | 2849 | ||
2850 | /* Wait for START_ALIVE from ucode. Otherwise callbacks from | 2850 | /* Wait for START_ALIVE from ucode. Otherwise callbacks from |
2851 | * mac80211 will not be run successfully. */ | 2851 | * mac80211 will not be run successfully. */ |
@@ -2867,12 +2867,12 @@ static int il3945_mac_start(struct ieee80211_hw *hw) | |||
2867 | cancel_delayed_work(&il->_3945.rfkill_poll); | 2867 | cancel_delayed_work(&il->_3945.rfkill_poll); |
2868 | 2868 | ||
2869 | il->is_open = 1; | 2869 | il->is_open = 1; |
2870 | IL_DEBUG_MAC80211(il, "leave\n"); | 2870 | D_MAC80211("leave\n"); |
2871 | return 0; | 2871 | return 0; |
2872 | 2872 | ||
2873 | out_release_irq: | 2873 | out_release_irq: |
2874 | il->is_open = 0; | 2874 | il->is_open = 0; |
2875 | IL_DEBUG_MAC80211(il, "leave - failed\n"); | 2875 | D_MAC80211("leave - failed\n"); |
2876 | return ret; | 2876 | return ret; |
2877 | } | 2877 | } |
2878 | 2878 | ||
@@ -2880,10 +2880,10 @@ static void il3945_mac_stop(struct ieee80211_hw *hw) | |||
2880 | { | 2880 | { |
2881 | struct il_priv *il = hw->priv; | 2881 | struct il_priv *il = hw->priv; |
2882 | 2882 | ||
2883 | IL_DEBUG_MAC80211(il, "enter\n"); | 2883 | D_MAC80211("enter\n"); |
2884 | 2884 | ||
2885 | if (!il->is_open) { | 2885 | if (!il->is_open) { |
2886 | IL_DEBUG_MAC80211(il, "leave - skip\n"); | 2886 | D_MAC80211("leave - skip\n"); |
2887 | return; | 2887 | return; |
2888 | } | 2888 | } |
2889 | 2889 | ||
@@ -2897,22 +2897,22 @@ static void il3945_mac_stop(struct ieee80211_hw *hw) | |||
2897 | queue_delayed_work(il->workqueue, &il->_3945.rfkill_poll, | 2897 | queue_delayed_work(il->workqueue, &il->_3945.rfkill_poll, |
2898 | round_jiffies_relative(2 * HZ)); | 2898 | round_jiffies_relative(2 * HZ)); |
2899 | 2899 | ||
2900 | IL_DEBUG_MAC80211(il, "leave\n"); | 2900 | D_MAC80211("leave\n"); |
2901 | } | 2901 | } |
2902 | 2902 | ||
2903 | static void il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 2903 | static void il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
2904 | { | 2904 | { |
2905 | struct il_priv *il = hw->priv; | 2905 | struct il_priv *il = hw->priv; |
2906 | 2906 | ||
2907 | IL_DEBUG_MAC80211(il, "enter\n"); | 2907 | D_MAC80211("enter\n"); |
2908 | 2908 | ||
2909 | IL_DEBUG_TX(il, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 2909 | D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
2910 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 2910 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
2911 | 2911 | ||
2912 | if (il3945_tx_skb(il, skb)) | 2912 | if (il3945_tx_skb(il, skb)) |
2913 | dev_kfree_skb_any(skb); | 2913 | dev_kfree_skb_any(skb); |
2914 | 2914 | ||
2915 | IL_DEBUG_MAC80211(il, "leave\n"); | 2915 | D_MAC80211("leave\n"); |
2916 | } | 2916 | } |
2917 | 2917 | ||
2918 | void il3945_config_ap(struct il_priv *il) | 2918 | void il3945_config_ap(struct il_priv *il) |
@@ -2971,10 +2971,10 @@ static int il3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2971 | u8 sta_id = IL_INVALID_STATION; | 2971 | u8 sta_id = IL_INVALID_STATION; |
2972 | u8 static_key; | 2972 | u8 static_key; |
2973 | 2973 | ||
2974 | IL_DEBUG_MAC80211(il, "enter\n"); | 2974 | D_MAC80211("enter\n"); |
2975 | 2975 | ||
2976 | if (il3945_mod_params.sw_crypto) { | 2976 | if (il3945_mod_params.sw_crypto) { |
2977 | IL_DEBUG_MAC80211(il, "leave - hwcrypto disabled\n"); | 2977 | D_MAC80211("leave - hwcrypto disabled\n"); |
2978 | return -EOPNOTSUPP; | 2978 | return -EOPNOTSUPP; |
2979 | } | 2979 | } |
2980 | 2980 | ||
@@ -3004,21 +3004,21 @@ static int il3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3004 | ret = il3945_set_static_key(il, key); | 3004 | ret = il3945_set_static_key(il, key); |
3005 | else | 3005 | else |
3006 | ret = il3945_set_dynamic_key(il, key, sta_id); | 3006 | ret = il3945_set_dynamic_key(il, key, sta_id); |
3007 | IL_DEBUG_MAC80211(il, "enable hwcrypto key\n"); | 3007 | D_MAC80211("enable hwcrypto key\n"); |
3008 | break; | 3008 | break; |
3009 | case DISABLE_KEY: | 3009 | case DISABLE_KEY: |
3010 | if (static_key) | 3010 | if (static_key) |
3011 | ret = il3945_remove_static_key(il); | 3011 | ret = il3945_remove_static_key(il); |
3012 | else | 3012 | else |
3013 | ret = il3945_clear_sta_key_info(il, sta_id); | 3013 | ret = il3945_clear_sta_key_info(il, sta_id); |
3014 | IL_DEBUG_MAC80211(il, "disable hwcrypto key\n"); | 3014 | D_MAC80211("disable hwcrypto key\n"); |
3015 | break; | 3015 | break; |
3016 | default: | 3016 | default: |
3017 | ret = -EINVAL; | 3017 | ret = -EINVAL; |
3018 | } | 3018 | } |
3019 | 3019 | ||
3020 | mutex_unlock(&il->mutex); | 3020 | mutex_unlock(&il->mutex); |
3021 | IL_DEBUG_MAC80211(il, "leave\n"); | 3021 | D_MAC80211("leave\n"); |
3022 | 3022 | ||
3023 | return ret; | 3023 | return ret; |
3024 | } | 3024 | } |
@@ -3033,10 +3033,10 @@ static int il3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3033 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; | 3033 | bool is_ap = vif->type == NL80211_IFTYPE_STATION; |
3034 | u8 sta_id; | 3034 | u8 sta_id; |
3035 | 3035 | ||
3036 | IL_DEBUG_INFO(il, "received request to add station %pM\n", | 3036 | D_INFO("received request to add station %pM\n", |
3037 | sta->addr); | 3037 | sta->addr); |
3038 | mutex_lock(&il->mutex); | 3038 | mutex_lock(&il->mutex); |
3039 | IL_DEBUG_INFO(il, "proceeding to add station %pM\n", | 3039 | D_INFO("proceeding to add station %pM\n", |
3040 | sta->addr); | 3040 | sta->addr); |
3041 | sta_priv->common.sta_id = IL_INVALID_STATION; | 3041 | sta_priv->common.sta_id = IL_INVALID_STATION; |
3042 | 3042 | ||
@@ -3055,7 +3055,7 @@ static int il3945_mac_sta_add(struct ieee80211_hw *hw, | |||
3055 | sta_priv->common.sta_id = sta_id; | 3055 | sta_priv->common.sta_id = sta_id; |
3056 | 3056 | ||
3057 | /* Initialize rate scaling */ | 3057 | /* Initialize rate scaling */ |
3058 | IL_DEBUG_INFO(il, "Initializing rate scaling for station %pM\n", | 3058 | D_INFO("Initializing rate scaling for station %pM\n", |
3059 | sta->addr); | 3059 | sta->addr); |
3060 | il3945_rs_rate_init(il, sta, sta_id); | 3060 | il3945_rs_rate_init(il, sta, sta_id); |
3061 | mutex_unlock(&il->mutex); | 3061 | mutex_unlock(&il->mutex); |
@@ -3079,7 +3079,7 @@ static void il3945_configure_filter(struct ieee80211_hw *hw, | |||
3079 | filter_nand |= (flag); \ | 3079 | filter_nand |= (flag); \ |
3080 | } while (0) | 3080 | } while (0) |
3081 | 3081 | ||
3082 | IL_DEBUG_MAC80211(il, "Enter: changed: 0x%x, total: 0x%x\n", | 3082 | D_MAC80211("Enter: changed: 0x%x, total: 0x%x\n", |
3083 | changed_flags, *total_flags); | 3083 | changed_flags, *total_flags); |
3084 | 3084 | ||
3085 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); | 3085 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); |
@@ -3224,7 +3224,7 @@ static ssize_t il3945_store_flags(struct device *d, | |||
3224 | if (il_scan_cancel_timeout(il, 100)) | 3224 | if (il_scan_cancel_timeout(il, 100)) |
3225 | IL_WARN(il, "Could not cancel scan.\n"); | 3225 | IL_WARN(il, "Could not cancel scan.\n"); |
3226 | else { | 3226 | else { |
3227 | IL_DEBUG_INFO(il, "Committing rxon.flags = 0x%04X\n", | 3227 | D_INFO("Committing rxon.flags = 0x%04X\n", |
3228 | flags); | 3228 | flags); |
3229 | ctx->staging.flags = cpu_to_le32(flags); | 3229 | ctx->staging.flags = cpu_to_le32(flags); |
3230 | il3945_commit_rxon(il, ctx); | 3230 | il3945_commit_rxon(il, ctx); |
@@ -3261,7 +3261,7 @@ static ssize_t il3945_store_filter_flags(struct device *d, | |||
3261 | if (il_scan_cancel_timeout(il, 100)) | 3261 | if (il_scan_cancel_timeout(il, 100)) |
3262 | IL_WARN(il, "Could not cancel scan.\n"); | 3262 | IL_WARN(il, "Could not cancel scan.\n"); |
3263 | else { | 3263 | else { |
3264 | IL_DEBUG_INFO(il, "Committing rxon.filter_flags = " | 3264 | D_INFO("Committing rxon.filter_flags = " |
3265 | "0x%04X\n", filter_flags); | 3265 | "0x%04X\n", filter_flags); |
3266 | ctx->staging.filter_flags = | 3266 | ctx->staging.filter_flags = |
3267 | cpu_to_le32(filter_flags); | 3267 | cpu_to_le32(filter_flags); |
@@ -3337,7 +3337,7 @@ static ssize_t il3945_store_measurement(struct device *d, | |||
3337 | type = simple_strtoul(p + 1, NULL, 0); | 3337 | type = simple_strtoul(p + 1, NULL, 0); |
3338 | } | 3338 | } |
3339 | 3339 | ||
3340 | IL_DEBUG_INFO(il, "Invoking measurement of type %d on " | 3340 | D_INFO("Invoking measurement of type %d on " |
3341 | "channel %d (for '%s')\n", type, params.channel, buf); | 3341 | "channel %d (for '%s')\n", type, params.channel, buf); |
3342 | il3945_get_measurement(il, ¶ms, type); | 3342 | il3945_get_measurement(il, ¶ms, type); |
3343 | 3343 | ||
@@ -3402,15 +3402,15 @@ static ssize_t il3945_store_antenna(struct device *d, | |||
3402 | return 0; | 3402 | return 0; |
3403 | 3403 | ||
3404 | if (sscanf(buf, "%1i", &ant) != 1) { | 3404 | if (sscanf(buf, "%1i", &ant) != 1) { |
3405 | IL_DEBUG_INFO(il, "not in hex or decimal form.\n"); | 3405 | D_INFO("not in hex or decimal form.\n"); |
3406 | return count; | 3406 | return count; |
3407 | } | 3407 | } |
3408 | 3408 | ||
3409 | if ((ant >= 0) && (ant <= 2)) { | 3409 | if ((ant >= 0) && (ant <= 2)) { |
3410 | IL_DEBUG_INFO(il, "Setting antenna select to %d.\n", ant); | 3410 | D_INFO("Setting antenna select to %d.\n", ant); |
3411 | il3945_mod_params.antenna = (enum il3945_antenna)ant; | 3411 | il3945_mod_params.antenna = (enum il3945_antenna)ant; |
3412 | } else | 3412 | } else |
3413 | IL_DEBUG_INFO(il, "Bad antenna select value %d.\n", ant); | 3413 | D_INFO("Bad antenna select value %d.\n", ant); |
3414 | 3414 | ||
3415 | 3415 | ||
3416 | return count; | 3416 | return count; |
@@ -3682,11 +3682,11 @@ static int il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en | |||
3682 | * "the hard way", rather than using device's scan. | 3682 | * "the hard way", rather than using device's scan. |
3683 | */ | 3683 | */ |
3684 | if (il3945_mod_params.disable_hw_scan) { | 3684 | if (il3945_mod_params.disable_hw_scan) { |
3685 | IL_DEBUG_INFO(il, "Disabling hw_scan\n"); | 3685 | D_INFO("Disabling hw_scan\n"); |
3686 | il3945_hw_ops.hw_scan = NULL; | 3686 | il3945_hw_ops.hw_scan = NULL; |
3687 | } | 3687 | } |
3688 | 3688 | ||
3689 | IL_DEBUG_INFO(il, "*** LOAD DRIVER ***\n"); | 3689 | D_INFO("*** LOAD DRIVER ***\n"); |
3690 | il->cfg = cfg; | 3690 | il->cfg = cfg; |
3691 | il->pci_dev = pdev; | 3691 | il->pci_dev = pdev; |
3692 | il->inta_mask = CSR_INI_SET_MASK; | 3692 | il->inta_mask = CSR_INI_SET_MASK; |
@@ -3729,9 +3729,9 @@ static int il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en | |||
3729 | goto out_pci_release_regions; | 3729 | goto out_pci_release_regions; |
3730 | } | 3730 | } |
3731 | 3731 | ||
3732 | IL_DEBUG_INFO(il, "pci_resource_len = 0x%08llx\n", | 3732 | D_INFO("pci_resource_len = 0x%08llx\n", |
3733 | (unsigned long long) pci_resource_len(pdev, 0)); | 3733 | (unsigned long long) pci_resource_len(pdev, 0)); |
3734 | IL_DEBUG_INFO(il, "pci_resource_base = %p\n", il->hw_base); | 3734 | D_INFO("pci_resource_base = %p\n", il->hw_base); |
3735 | 3735 | ||
3736 | /* We disable the RETRY_TIMEOUT register (0x41) to keep | 3736 | /* We disable the RETRY_TIMEOUT register (0x41) to keep |
3737 | * PCI Tx retries from interfering with C3 CPU state */ | 3737 | * PCI Tx retries from interfering with C3 CPU state */ |
@@ -3762,7 +3762,7 @@ static int il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en | |||
3762 | } | 3762 | } |
3763 | /* MAC Address location in EEPROM same for 3945/4965 */ | 3763 | /* MAC Address location in EEPROM same for 3945/4965 */ |
3764 | eeprom = (struct il3945_eeprom *)il->eeprom; | 3764 | eeprom = (struct il3945_eeprom *)il->eeprom; |
3765 | IL_DEBUG_INFO(il, "MAC address: %pM\n", eeprom->mac_address); | 3765 | D_INFO("MAC address: %pM\n", eeprom->mac_address); |
3766 | SET_IEEE80211_PERM_ADDR(il->hw, eeprom->mac_address); | 3766 | SET_IEEE80211_PERM_ADDR(il->hw, eeprom->mac_address); |
3767 | 3767 | ||
3768 | /*********************** | 3768 | /*********************** |
@@ -3873,7 +3873,7 @@ static void __devexit il3945_pci_remove(struct pci_dev *pdev) | |||
3873 | if (!il) | 3873 | if (!il) |
3874 | return; | 3874 | return; |
3875 | 3875 | ||
3876 | IL_DEBUG_INFO(il, "*** UNLOAD DRIVER ***\n"); | 3876 | D_INFO("*** UNLOAD DRIVER ***\n"); |
3877 | 3877 | ||
3878 | il_dbgfs_unregister(il); | 3878 | il_dbgfs_unregister(il); |
3879 | 3879 | ||
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c index d4eacc3cbe7..88dc8db3d66 100644 --- a/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c | |||
@@ -104,7 +104,7 @@ static void il4965_clear_free_frames(struct il_priv *il) | |||
104 | { | 104 | { |
105 | struct list_head *element; | 105 | struct list_head *element; |
106 | 106 | ||
107 | IL_DEBUG_INFO(il, "%d frames on pre-allocated heap on clear.\n", | 107 | D_INFO("%d frames on pre-allocated heap on clear.\n", |
108 | il->frames_count); | 108 | il->frames_count); |
109 | 109 | ||
110 | while (!list_empty(&il->free_frames)) { | 110 | while (!list_empty(&il->free_frames)) { |
@@ -436,19 +436,19 @@ static void il4965_rx_reply_alive(struct il_priv *il, | |||
436 | 436 | ||
437 | palive = &pkt->u.alive_frame; | 437 | palive = &pkt->u.alive_frame; |
438 | 438 | ||
439 | IL_DEBUG_INFO(il, "Alive ucode status 0x%08X revision " | 439 | D_INFO("Alive ucode status 0x%08X revision " |
440 | "0x%01X 0x%01X\n", | 440 | "0x%01X 0x%01X\n", |
441 | palive->is_valid, palive->ver_type, | 441 | palive->is_valid, palive->ver_type, |
442 | palive->ver_subtype); | 442 | palive->ver_subtype); |
443 | 443 | ||
444 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { | 444 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { |
445 | IL_DEBUG_INFO(il, "Initialization Alive received.\n"); | 445 | D_INFO("Initialization Alive received.\n"); |
446 | memcpy(&il->card_alive_init, | 446 | memcpy(&il->card_alive_init, |
447 | &pkt->u.alive_frame, | 447 | &pkt->u.alive_frame, |
448 | sizeof(struct il_init_alive_resp)); | 448 | sizeof(struct il_init_alive_resp)); |
449 | pwork = &il->init_alive_start; | 449 | pwork = &il->init_alive_start; |
450 | } else { | 450 | } else { |
451 | IL_DEBUG_INFO(il, "Runtime Alive received.\n"); | 451 | D_INFO("Runtime Alive received.\n"); |
452 | memcpy(&il->card_alive, &pkt->u.alive_frame, | 452 | memcpy(&il->card_alive, &pkt->u.alive_frame, |
453 | sizeof(struct il_alive_resp)); | 453 | sizeof(struct il_alive_resp)); |
454 | pwork = &il->alive_start; | 454 | pwork = &il->alive_start; |
@@ -496,7 +496,7 @@ static void il4965_rx_beacon_notif(struct il_priv *il, | |||
496 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG | 496 | #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG |
497 | u8 rate = il4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); | 497 | u8 rate = il4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); |
498 | 498 | ||
499 | IL_DEBUG_RX(il, "beacon status %x retries %d iss %d " | 499 | D_RX("beacon status %x retries %d iss %d " |
500 | "tsf %d %d rate %d\n", | 500 | "tsf %d %d rate %d\n", |
501 | le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK, | 501 | le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK, |
502 | beacon->beacon_notify_hdr.failure_frame, | 502 | beacon->beacon_notify_hdr.failure_frame, |
@@ -512,7 +512,7 @@ static void il4965_perform_ct_kill_task(struct il_priv *il) | |||
512 | { | 512 | { |
513 | unsigned long flags; | 513 | unsigned long flags; |
514 | 514 | ||
515 | IL_DEBUG_POWER(il, "Stop all queues\n"); | 515 | D_POWER("Stop all queues\n"); |
516 | 516 | ||
517 | if (il->mac80211_registered) | 517 | if (il->mac80211_registered) |
518 | ieee80211_stop_queues(il->hw); | 518 | ieee80211_stop_queues(il->hw); |
@@ -536,7 +536,7 @@ static void il4965_rx_card_state_notif(struct il_priv *il, | |||
536 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); | 536 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); |
537 | unsigned long status = il->status; | 537 | unsigned long status = il->status; |
538 | 538 | ||
539 | IL_DEBUG_RF_KILL(il, "Card state received: HW:%s SW:%s CT:%s\n", | 539 | D_RF_KILL("Card state received: HW:%s SW:%s CT:%s\n", |
540 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", | 540 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", |
541 | (flags & SW_CARD_DISABLED) ? "Kill" : "On", | 541 | (flags & SW_CARD_DISABLED) ? "Kill" : "On", |
542 | (flags & CT_CARD_DISABLED) ? | 542 | (flags & CT_CARD_DISABLED) ? |
@@ -650,7 +650,7 @@ void il4965_rx_handle(struct il_priv *il) | |||
650 | 650 | ||
651 | /* Rx interrupt, but nothing sent from uCode */ | 651 | /* Rx interrupt, but nothing sent from uCode */ |
652 | if (i == r) | 652 | if (i == r) |
653 | IL_DEBUG_RX(il, "r = %d, i = %d\n", r, i); | 653 | D_RX("r = %d, i = %d\n", r, i); |
654 | 654 | ||
655 | /* calculate total frames need to be restock after handling RX */ | 655 | /* calculate total frames need to be restock after handling RX */ |
656 | total_empty = r - rxq->write_actual; | 656 | total_empty = r - rxq->write_actual; |
@@ -698,14 +698,14 @@ void il4965_rx_handle(struct il_priv *il) | |||
698 | * handle those that need handling via function in | 698 | * handle those that need handling via function in |
699 | * rx_handlers table. See il4965_setup_rx_handlers() */ | 699 | * rx_handlers table. See il4965_setup_rx_handlers() */ |
700 | if (il->rx_handlers[pkt->hdr.cmd]) { | 700 | if (il->rx_handlers[pkt->hdr.cmd]) { |
701 | IL_DEBUG_RX(il, "r = %d, i = %d, %s, 0x%02x\n", r, | 701 | D_RX("r = %d, i = %d, %s, 0x%02x\n", r, |
702 | i, il_get_cmd_string(pkt->hdr.cmd), | 702 | i, il_get_cmd_string(pkt->hdr.cmd), |
703 | pkt->hdr.cmd); | 703 | pkt->hdr.cmd); |
704 | il->isr_stats.rx_handlers[pkt->hdr.cmd]++; | 704 | il->isr_stats.rx_handlers[pkt->hdr.cmd]++; |
705 | il->rx_handlers[pkt->hdr.cmd] (il, rxb); | 705 | il->rx_handlers[pkt->hdr.cmd] (il, rxb); |
706 | } else { | 706 | } else { |
707 | /* No handling needed */ | 707 | /* No handling needed */ |
708 | IL_DEBUG_RX(il, | 708 | D_RX( |
709 | "r %d i %d No handler needed for %s, 0x%02x\n", | 709 | "r %d i %d No handler needed for %s, 0x%02x\n", |
710 | r, i, il_get_cmd_string(pkt->hdr.cmd), | 710 | r, i, il_get_cmd_string(pkt->hdr.cmd), |
711 | pkt->hdr.cmd); | 711 | pkt->hdr.cmd); |
@@ -800,7 +800,7 @@ static void il4965_irq_tasklet(struct il_priv *il) | |||
800 | if (il_get_debug_level(il) & IL_DL_ISR) { | 800 | if (il_get_debug_level(il) & IL_DL_ISR) { |
801 | /* just for debug */ | 801 | /* just for debug */ |
802 | inta_mask = il_read32(il, CSR_INT_MASK); | 802 | inta_mask = il_read32(il, CSR_INT_MASK); |
803 | IL_DEBUG_ISR(il, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 803 | D_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
804 | inta, inta_mask, inta_fh); | 804 | inta, inta_mask, inta_fh); |
805 | } | 805 | } |
806 | #endif | 806 | #endif |
@@ -835,14 +835,14 @@ static void il4965_irq_tasklet(struct il_priv *il) | |||
835 | if (il_get_debug_level(il) & (IL_DL_ISR)) { | 835 | if (il_get_debug_level(il) & (IL_DL_ISR)) { |
836 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | 836 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ |
837 | if (inta & CSR_INT_BIT_SCD) { | 837 | if (inta & CSR_INT_BIT_SCD) { |
838 | IL_DEBUG_ISR(il, "Scheduler finished to transmit " | 838 | D_ISR("Scheduler finished to transmit " |
839 | "the frame/frames.\n"); | 839 | "the frame/frames.\n"); |
840 | il->isr_stats.sch++; | 840 | il->isr_stats.sch++; |
841 | } | 841 | } |
842 | 842 | ||
843 | /* Alive notification via Rx interrupt will do the real work */ | 843 | /* Alive notification via Rx interrupt will do the real work */ |
844 | if (inta & CSR_INT_BIT_ALIVE) { | 844 | if (inta & CSR_INT_BIT_ALIVE) { |
845 | IL_DEBUG_ISR(il, "Alive interrupt\n"); | 845 | D_ISR("Alive interrupt\n"); |
846 | il->isr_stats.alive++; | 846 | il->isr_stats.alive++; |
847 | } | 847 | } |
848 | } | 848 | } |
@@ -900,7 +900,7 @@ static void il4965_irq_tasklet(struct il_priv *il) | |||
900 | * and about any Rx buffers made available while asleep. | 900 | * and about any Rx buffers made available while asleep. |
901 | */ | 901 | */ |
902 | if (inta & CSR_INT_BIT_WAKEUP) { | 902 | if (inta & CSR_INT_BIT_WAKEUP) { |
903 | IL_DEBUG_ISR(il, "Wakeup interrupt\n"); | 903 | D_ISR("Wakeup interrupt\n"); |
904 | il_rx_queue_update_write_ptr(il, &il->rxq); | 904 | il_rx_queue_update_write_ptr(il, &il->rxq); |
905 | for (i = 0; i < il->hw_params.max_txq_num; i++) | 905 | for (i = 0; i < il->hw_params.max_txq_num; i++) |
906 | il_txq_update_write_ptr(il, &il->txq[i]); | 906 | il_txq_update_write_ptr(il, &il->txq[i]); |
@@ -919,7 +919,7 @@ static void il4965_irq_tasklet(struct il_priv *il) | |||
919 | 919 | ||
920 | /* This "Tx" DMA channel is used only for loading uCode */ | 920 | /* This "Tx" DMA channel is used only for loading uCode */ |
921 | if (inta & CSR_INT_BIT_FH_TX) { | 921 | if (inta & CSR_INT_BIT_FH_TX) { |
922 | IL_DEBUG_ISR(il, "uCode load interrupt\n"); | 922 | D_ISR("uCode load interrupt\n"); |
923 | il->isr_stats.tx++; | 923 | il->isr_stats.tx++; |
924 | handled |= CSR_INT_BIT_FH_TX; | 924 | handled |= CSR_INT_BIT_FH_TX; |
925 | /* Wake up uCode load routine, now that load is complete */ | 925 | /* Wake up uCode load routine, now that load is complete */ |
@@ -951,7 +951,7 @@ static void il4965_irq_tasklet(struct il_priv *il) | |||
951 | inta = il_read32(il, CSR_INT); | 951 | inta = il_read32(il, CSR_INT); |
952 | inta_mask = il_read32(il, CSR_INT_MASK); | 952 | inta_mask = il_read32(il, CSR_INT_MASK); |
953 | inta_fh = il_read32(il, CSR_FH_INT_STATUS); | 953 | inta_fh = il_read32(il, CSR_FH_INT_STATUS); |
954 | IL_DEBUG_ISR(il, | 954 | D_ISR( |
955 | "End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " | 955 | "End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " |
956 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); | 956 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); |
957 | } | 957 | } |
@@ -1120,7 +1120,7 @@ static int __must_check il4965_request_firmware(struct il_priv *il, bool first) | |||
1120 | 1120 | ||
1121 | sprintf(il->firmware_name, "%s%s%s", name_pre, tag, ".ucode"); | 1121 | sprintf(il->firmware_name, "%s%s%s", name_pre, tag, ".ucode"); |
1122 | 1122 | ||
1123 | IL_DEBUG_INFO(il, "attempting to load firmware '%s'\n", | 1123 | D_INFO("attempting to load firmware '%s'\n", |
1124 | il->firmware_name); | 1124 | il->firmware_name); |
1125 | 1125 | ||
1126 | return request_firmware_nowait(THIS_MODULE, 1, il->firmware_name, | 1126 | return request_firmware_nowait(THIS_MODULE, 1, il->firmware_name, |
@@ -1220,7 +1220,7 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1220 | goto try_again; | 1220 | goto try_again; |
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | IL_DEBUG_INFO(il, "Loaded firmware file '%s' (%zd bytes).\n", | 1223 | D_INFO("Loaded firmware file '%s' (%zd bytes).\n", |
1224 | il->firmware_name, ucode_raw->size); | 1224 | il->firmware_name, ucode_raw->size); |
1225 | 1225 | ||
1226 | /* Make sure that we got at least the API version number */ | 1226 | /* Make sure that we got at least the API version number */ |
@@ -1279,17 +1279,17 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1279 | * user just got a corrupted version of the latest API. | 1279 | * user just got a corrupted version of the latest API. |
1280 | */ | 1280 | */ |
1281 | 1281 | ||
1282 | IL_DEBUG_INFO(il, "f/w package hdr ucode version raw = 0x%x\n", | 1282 | D_INFO("f/w package hdr ucode version raw = 0x%x\n", |
1283 | il->ucode_ver); | 1283 | il->ucode_ver); |
1284 | IL_DEBUG_INFO(il, "f/w package hdr runtime inst size = %Zd\n", | 1284 | D_INFO("f/w package hdr runtime inst size = %Zd\n", |
1285 | pieces.inst_size); | 1285 | pieces.inst_size); |
1286 | IL_DEBUG_INFO(il, "f/w package hdr runtime data size = %Zd\n", | 1286 | D_INFO("f/w package hdr runtime data size = %Zd\n", |
1287 | pieces.data_size); | 1287 | pieces.data_size); |
1288 | IL_DEBUG_INFO(il, "f/w package hdr init inst size = %Zd\n", | 1288 | D_INFO("f/w package hdr init inst size = %Zd\n", |
1289 | pieces.init_size); | 1289 | pieces.init_size); |
1290 | IL_DEBUG_INFO(il, "f/w package hdr init data size = %Zd\n", | 1290 | D_INFO("f/w package hdr init data size = %Zd\n", |
1291 | pieces.init_data_size); | 1291 | pieces.init_data_size); |
1292 | IL_DEBUG_INFO(il, "f/w package hdr boot inst size = %Zd\n", | 1292 | D_INFO("f/w package hdr boot inst size = %Zd\n", |
1293 | pieces.boot_size); | 1293 | pieces.boot_size); |
1294 | 1294 | ||
1295 | /* Verify that uCode images will fit in card's SRAM */ | 1295 | /* Verify that uCode images will fit in card's SRAM */ |
@@ -1369,25 +1369,25 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1369 | /* Copy images into buffers for card's bus-master reads ... */ | 1369 | /* Copy images into buffers for card's bus-master reads ... */ |
1370 | 1370 | ||
1371 | /* Runtime instructions (first block of data in file) */ | 1371 | /* Runtime instructions (first block of data in file) */ |
1372 | IL_DEBUG_INFO(il, "Copying (but not loading) uCode instr len %Zd\n", | 1372 | D_INFO("Copying (but not loading) uCode instr len %Zd\n", |
1373 | pieces.inst_size); | 1373 | pieces.inst_size); |
1374 | memcpy(il->ucode_code.v_addr, pieces.inst, pieces.inst_size); | 1374 | memcpy(il->ucode_code.v_addr, pieces.inst, pieces.inst_size); |
1375 | 1375 | ||
1376 | IL_DEBUG_INFO(il, "uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", | 1376 | D_INFO("uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", |
1377 | il->ucode_code.v_addr, (u32)il->ucode_code.p_addr); | 1377 | il->ucode_code.v_addr, (u32)il->ucode_code.p_addr); |
1378 | 1378 | ||
1379 | /* | 1379 | /* |
1380 | * Runtime data | 1380 | * Runtime data |
1381 | * NOTE: Copy into backup buffer will be done in il_up() | 1381 | * NOTE: Copy into backup buffer will be done in il_up() |
1382 | */ | 1382 | */ |
1383 | IL_DEBUG_INFO(il, "Copying (but not loading) uCode data len %Zd\n", | 1383 | D_INFO("Copying (but not loading) uCode data len %Zd\n", |
1384 | pieces.data_size); | 1384 | pieces.data_size); |
1385 | memcpy(il->ucode_data.v_addr, pieces.data, pieces.data_size); | 1385 | memcpy(il->ucode_data.v_addr, pieces.data, pieces.data_size); |
1386 | memcpy(il->ucode_data_backup.v_addr, pieces.data, pieces.data_size); | 1386 | memcpy(il->ucode_data_backup.v_addr, pieces.data, pieces.data_size); |
1387 | 1387 | ||
1388 | /* Initialization instructions */ | 1388 | /* Initialization instructions */ |
1389 | if (pieces.init_size) { | 1389 | if (pieces.init_size) { |
1390 | IL_DEBUG_INFO(il, | 1390 | D_INFO( |
1391 | "Copying (but not loading) init instr len %Zd\n", | 1391 | "Copying (but not loading) init instr len %Zd\n", |
1392 | pieces.init_size); | 1392 | pieces.init_size); |
1393 | memcpy(il->ucode_init.v_addr, pieces.init, pieces.init_size); | 1393 | memcpy(il->ucode_init.v_addr, pieces.init, pieces.init_size); |
@@ -1395,7 +1395,7 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1395 | 1395 | ||
1396 | /* Initialization data */ | 1396 | /* Initialization data */ |
1397 | if (pieces.init_data_size) { | 1397 | if (pieces.init_data_size) { |
1398 | IL_DEBUG_INFO(il, | 1398 | D_INFO( |
1399 | "Copying (but not loading) init data len %Zd\n", | 1399 | "Copying (but not loading) init data len %Zd\n", |
1400 | pieces.init_data_size); | 1400 | pieces.init_data_size); |
1401 | memcpy(il->ucode_init_data.v_addr, pieces.init_data, | 1401 | memcpy(il->ucode_init_data.v_addr, pieces.init_data, |
@@ -1403,7 +1403,7 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | /* Bootstrap instructions */ | 1405 | /* Bootstrap instructions */ |
1406 | IL_DEBUG_INFO(il, "Copying (but not loading) boot instr len %Zd\n", | 1406 | D_INFO("Copying (but not loading) boot instr len %Zd\n", |
1407 | pieces.boot_size); | 1407 | pieces.boot_size); |
1408 | memcpy(il->ucode_boot.v_addr, pieces.boot, pieces.boot_size); | 1408 | memcpy(il->ucode_boot.v_addr, pieces.boot, pieces.boot_size); |
1409 | 1409 | ||
@@ -1596,7 +1596,7 @@ static void il4965_rf_kill_ct_config(struct il_priv *il) | |||
1596 | if (ret) | 1596 | if (ret) |
1597 | IL_ERR(il, "REPLY_CT_KILL_CONFIG_CMD failed\n"); | 1597 | IL_ERR(il, "REPLY_CT_KILL_CONFIG_CMD failed\n"); |
1598 | else | 1598 | else |
1599 | IL_DEBUG_INFO(il, "REPLY_CT_KILL_CONFIG_CMD " | 1599 | D_INFO("REPLY_CT_KILL_CONFIG_CMD " |
1600 | "succeeded, " | 1600 | "succeeded, " |
1601 | "critical temperature is %d\n", | 1601 | "critical temperature is %d\n", |
1602 | il->hw_params.ct_kill_threshold); | 1602 | il->hw_params.ct_kill_threshold); |
@@ -1719,12 +1719,12 @@ static void il4965_alive_start(struct il_priv *il) | |||
1719 | int ret = 0; | 1719 | int ret = 0; |
1720 | struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS]; | 1720 | struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS]; |
1721 | 1721 | ||
1722 | IL_DEBUG_INFO(il, "Runtime Alive received.\n"); | 1722 | D_INFO("Runtime Alive received.\n"); |
1723 | 1723 | ||
1724 | if (il->card_alive.is_valid != UCODE_VALID_OK) { | 1724 | if (il->card_alive.is_valid != UCODE_VALID_OK) { |
1725 | /* We had an error bringing up the hardware, so take it | 1725 | /* We had an error bringing up the hardware, so take it |
1726 | * all the way back down so we can try again */ | 1726 | * all the way back down so we can try again */ |
1727 | IL_DEBUG_INFO(il, "Alive failed.\n"); | 1727 | D_INFO("Alive failed.\n"); |
1728 | goto restart; | 1728 | goto restart; |
1729 | } | 1729 | } |
1730 | 1730 | ||
@@ -1734,7 +1734,7 @@ static void il4965_alive_start(struct il_priv *il) | |||
1734 | if (il4965_verify_ucode(il)) { | 1734 | if (il4965_verify_ucode(il)) { |
1735 | /* Runtime instruction load was bad; | 1735 | /* Runtime instruction load was bad; |
1736 | * take it all the way back down so we can try again */ | 1736 | * take it all the way back down so we can try again */ |
1737 | IL_DEBUG_INFO(il, "Bad runtime uCode load.\n"); | 1737 | D_INFO("Bad runtime uCode load.\n"); |
1738 | goto restart; | 1738 | goto restart; |
1739 | } | 1739 | } |
1740 | 1740 | ||
@@ -1788,11 +1788,11 @@ static void il4965_alive_start(struct il_priv *il) | |||
1788 | /* At this point, the NIC is initialized and operational */ | 1788 | /* At this point, the NIC is initialized and operational */ |
1789 | il4965_rf_kill_ct_config(il); | 1789 | il4965_rf_kill_ct_config(il); |
1790 | 1790 | ||
1791 | IL_DEBUG_INFO(il, "ALIVE processing complete.\n"); | 1791 | D_INFO("ALIVE processing complete.\n"); |
1792 | wake_up(&il->wait_command_queue); | 1792 | wake_up(&il->wait_command_queue); |
1793 | 1793 | ||
1794 | il_power_update_mode(il, true); | 1794 | il_power_update_mode(il, true); |
1795 | IL_DEBUG_INFO(il, "Updated power mode\n"); | 1795 | D_INFO("Updated power mode\n"); |
1796 | 1796 | ||
1797 | return; | 1797 | return; |
1798 | 1798 | ||
@@ -1807,7 +1807,7 @@ static void __il4965_down(struct il_priv *il) | |||
1807 | unsigned long flags; | 1807 | unsigned long flags; |
1808 | int exit_pending; | 1808 | int exit_pending; |
1809 | 1809 | ||
1810 | IL_DEBUG_INFO(il, DRV_NAME " is going down\n"); | 1810 | D_INFO(DRV_NAME " is going down\n"); |
1811 | 1811 | ||
1812 | il_scan_cancel_timeout(il, 200); | 1812 | il_scan_cancel_timeout(il, 200); |
1813 | 1813 | ||
@@ -1916,7 +1916,7 @@ static int il4965_set_hw_ready(struct il_priv *il) | |||
1916 | else | 1916 | else |
1917 | il->hw_ready = false; | 1917 | il->hw_ready = false; |
1918 | 1918 | ||
1919 | IL_DEBUG_INFO(il, "hardware %s\n", | 1919 | D_INFO("hardware %s\n", |
1920 | (il->hw_ready == 1) ? "ready" : "not ready"); | 1920 | (il->hw_ready == 1) ? "ready" : "not ready"); |
1921 | return ret; | 1921 | return ret; |
1922 | } | 1922 | } |
@@ -1925,7 +1925,7 @@ static int il4965_prepare_card_hw(struct il_priv *il) | |||
1925 | { | 1925 | { |
1926 | int ret = 0; | 1926 | int ret = 0; |
1927 | 1927 | ||
1928 | IL_DEBUG_INFO(il, "il4965_prepare_card_hw enter\n"); | 1928 | D_INFO("il4965_prepare_card_hw enter\n"); |
1929 | 1929 | ||
1930 | ret = il4965_set_hw_ready(il); | 1930 | ret = il4965_set_hw_ready(il); |
1931 | if (il->hw_ready) | 1931 | if (il->hw_ready) |
@@ -2040,7 +2040,7 @@ static int __il4965_up(struct il_priv *il) | |||
2040 | /* start card; "initialize" will load runtime ucode */ | 2040 | /* start card; "initialize" will load runtime ucode */ |
2041 | il4965_nic_start(il); | 2041 | il4965_nic_start(il); |
2042 | 2042 | ||
2043 | IL_DEBUG_INFO(il, DRV_NAME " is coming up\n"); | 2043 | D_INFO(DRV_NAME " is coming up\n"); |
2044 | 2044 | ||
2045 | return 0; | 2045 | return 0; |
2046 | } | 2046 | } |
@@ -2243,7 +2243,7 @@ int il4965_mac_start(struct ieee80211_hw *hw) | |||
2243 | struct il_priv *il = hw->priv; | 2243 | struct il_priv *il = hw->priv; |
2244 | int ret; | 2244 | int ret; |
2245 | 2245 | ||
2246 | IL_DEBUG_MAC80211(il, "enter\n"); | 2246 | D_MAC80211("enter\n"); |
2247 | 2247 | ||
2248 | /* we should be verifying the device is ready to be opened */ | 2248 | /* we should be verifying the device is ready to be opened */ |
2249 | mutex_lock(&il->mutex); | 2249 | mutex_lock(&il->mutex); |
@@ -2256,7 +2256,7 @@ int il4965_mac_start(struct ieee80211_hw *hw) | |||
2256 | if (il_is_rfkill(il)) | 2256 | if (il_is_rfkill(il)) |
2257 | goto out; | 2257 | goto out; |
2258 | 2258 | ||
2259 | IL_DEBUG_INFO(il, "Start UP work done.\n"); | 2259 | D_INFO("Start UP work done.\n"); |
2260 | 2260 | ||
2261 | /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from | 2261 | /* Wait for START_ALIVE from Run Time ucode. Otherwise callbacks from |
2262 | * mac80211 will not be run successfully. */ | 2262 | * mac80211 will not be run successfully. */ |
@@ -2275,7 +2275,7 @@ int il4965_mac_start(struct ieee80211_hw *hw) | |||
2275 | 2275 | ||
2276 | out: | 2276 | out: |
2277 | il->is_open = 1; | 2277 | il->is_open = 1; |
2278 | IL_DEBUG_MAC80211(il, "leave\n"); | 2278 | D_MAC80211("leave\n"); |
2279 | return 0; | 2279 | return 0; |
2280 | } | 2280 | } |
2281 | 2281 | ||
@@ -2283,7 +2283,7 @@ void il4965_mac_stop(struct ieee80211_hw *hw) | |||
2283 | { | 2283 | { |
2284 | struct il_priv *il = hw->priv; | 2284 | struct il_priv *il = hw->priv; |
2285 | 2285 | ||
2286 | IL_DEBUG_MAC80211(il, "enter\n"); | 2286 | D_MAC80211("enter\n"); |
2287 | 2287 | ||
2288 | if (!il->is_open) | 2288 | if (!il->is_open) |
2289 | return; | 2289 | return; |
@@ -2299,22 +2299,22 @@ void il4965_mac_stop(struct ieee80211_hw *hw) | |||
2299 | il_write32(il, CSR_INT, 0xFFFFFFFF); | 2299 | il_write32(il, CSR_INT, 0xFFFFFFFF); |
2300 | il_enable_rfkill_int(il); | 2300 | il_enable_rfkill_int(il); |
2301 | 2301 | ||
2302 | IL_DEBUG_MAC80211(il, "leave\n"); | 2302 | D_MAC80211("leave\n"); |
2303 | } | 2303 | } |
2304 | 2304 | ||
2305 | void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 2305 | void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
2306 | { | 2306 | { |
2307 | struct il_priv *il = hw->priv; | 2307 | struct il_priv *il = hw->priv; |
2308 | 2308 | ||
2309 | IL_DEBUG_MACDUMP(il, "enter\n"); | 2309 | D_MACDUMP("enter\n"); |
2310 | 2310 | ||
2311 | IL_DEBUG_TX(il, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 2311 | D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
2312 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 2312 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
2313 | 2313 | ||
2314 | if (il4965_tx_skb(il, skb)) | 2314 | if (il4965_tx_skb(il, skb)) |
2315 | dev_kfree_skb_any(skb); | 2315 | dev_kfree_skb_any(skb); |
2316 | 2316 | ||
2317 | IL_DEBUG_MACDUMP(il, "leave\n"); | 2317 | D_MACDUMP("leave\n"); |
2318 | } | 2318 | } |
2319 | 2319 | ||
2320 | void il4965_mac_update_tkip_key(struct ieee80211_hw *hw, | 2320 | void il4965_mac_update_tkip_key(struct ieee80211_hw *hw, |
@@ -2326,12 +2326,12 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw, | |||
2326 | struct il_priv *il = hw->priv; | 2326 | struct il_priv *il = hw->priv; |
2327 | struct il_vif_priv *vif_priv = (void *)vif->drv_priv; | 2327 | struct il_vif_priv *vif_priv = (void *)vif->drv_priv; |
2328 | 2328 | ||
2329 | IL_DEBUG_MAC80211(il, "enter\n"); | 2329 | D_MAC80211("enter\n"); |
2330 | 2330 | ||
2331 | il4965_update_tkip_key(il, vif_priv->ctx, keyconf, sta, | 2331 | il4965_update_tkip_key(il, vif_priv->ctx, keyconf, sta, |
2332 | iv32, phase1key); | 2332 | iv32, phase1key); |
2333 | 2333 | ||
2334 | IL_DEBUG_MAC80211(il, "leave\n"); | 2334 | D_MAC80211("leave\n"); |
2335 | } | 2335 | } |
2336 | 2336 | ||
2337 | int il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 2337 | int il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
@@ -2345,10 +2345,10 @@ int il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2345 | u8 sta_id; | 2345 | u8 sta_id; |
2346 | bool is_default_wep_key = false; | 2346 | bool is_default_wep_key = false; |
2347 | 2347 | ||
2348 | IL_DEBUG_MAC80211(il, "enter\n"); | 2348 | D_MAC80211("enter\n"); |
2349 | 2349 | ||
2350 | if (il->cfg->mod_params->sw_crypto) { | 2350 | if (il->cfg->mod_params->sw_crypto) { |
2351 | IL_DEBUG_MAC80211(il, "leave - hwcrypto disabled\n"); | 2351 | D_MAC80211("leave - hwcrypto disabled\n"); |
2352 | return -EOPNOTSUPP; | 2352 | return -EOPNOTSUPP; |
2353 | } | 2353 | } |
2354 | 2354 | ||
@@ -2384,7 +2384,7 @@ int il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2384 | ret = il4965_set_dynamic_key(il, vif_priv->ctx, | 2384 | ret = il4965_set_dynamic_key(il, vif_priv->ctx, |
2385 | key, sta_id); | 2385 | key, sta_id); |
2386 | 2386 | ||
2387 | IL_DEBUG_MAC80211(il, "enable hwcrypto key\n"); | 2387 | D_MAC80211("enable hwcrypto key\n"); |
2388 | break; | 2388 | break; |
2389 | case DISABLE_KEY: | 2389 | case DISABLE_KEY: |
2390 | if (is_default_wep_key) | 2390 | if (is_default_wep_key) |
@@ -2393,14 +2393,14 @@ int il4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2393 | ret = il4965_remove_dynamic_key(il, ctx, | 2393 | ret = il4965_remove_dynamic_key(il, ctx, |
2394 | key, sta_id); | 2394 | key, sta_id); |
2395 | 2395 | ||
2396 | IL_DEBUG_MAC80211(il, "disable hwcrypto key\n"); | 2396 | D_MAC80211("disable hwcrypto key\n"); |
2397 | break; | 2397 | break; |
2398 | default: | 2398 | default: |
2399 | ret = -EINVAL; | 2399 | ret = -EINVAL; |
2400 | } | 2400 | } |
2401 | 2401 | ||
2402 | mutex_unlock(&il->mutex); | 2402 | mutex_unlock(&il->mutex); |
2403 | IL_DEBUG_MAC80211(il, "leave\n"); | 2403 | D_MAC80211("leave\n"); |
2404 | 2404 | ||
2405 | return ret; | 2405 | return ret; |
2406 | } | 2406 | } |
@@ -2414,7 +2414,7 @@ int il4965_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2414 | struct il_priv *il = hw->priv; | 2414 | struct il_priv *il = hw->priv; |
2415 | int ret = -EINVAL; | 2415 | int ret = -EINVAL; |
2416 | 2416 | ||
2417 | IL_DEBUG_HT(il, "A-MPDU action on addr %pM tid %d\n", | 2417 | D_HT("A-MPDU action on addr %pM tid %d\n", |
2418 | sta->addr, tid); | 2418 | sta->addr, tid); |
2419 | 2419 | ||
2420 | if (!(il->cfg->sku & IL_SKU_N)) | 2420 | if (!(il->cfg->sku & IL_SKU_N)) |
@@ -2424,21 +2424,21 @@ int il4965_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2424 | 2424 | ||
2425 | switch (action) { | 2425 | switch (action) { |
2426 | case IEEE80211_AMPDU_RX_START: | 2426 | case IEEE80211_AMPDU_RX_START: |
2427 | IL_DEBUG_HT(il, "start Rx\n"); | 2427 | D_HT("start Rx\n"); |
2428 | ret = il4965_sta_rx_agg_start(il, sta, tid, *ssn); | 2428 | ret = il4965_sta_rx_agg_start(il, sta, tid, *ssn); |
2429 | break; | 2429 | break; |
2430 | case IEEE80211_AMPDU_RX_STOP: | 2430 | case IEEE80211_AMPDU_RX_STOP: |
2431 | IL_DEBUG_HT(il, "stop Rx\n"); | 2431 | D_HT("stop Rx\n"); |
2432 | ret = il4965_sta_rx_agg_stop(il, sta, tid); | 2432 | ret = il4965_sta_rx_agg_stop(il, sta, tid); |
2433 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2433 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) |
2434 | ret = 0; | 2434 | ret = 0; |
2435 | break; | 2435 | break; |
2436 | case IEEE80211_AMPDU_TX_START: | 2436 | case IEEE80211_AMPDU_TX_START: |
2437 | IL_DEBUG_HT(il, "start Tx\n"); | 2437 | D_HT("start Tx\n"); |
2438 | ret = il4965_tx_agg_start(il, vif, sta, tid, ssn); | 2438 | ret = il4965_tx_agg_start(il, vif, sta, tid, ssn); |
2439 | break; | 2439 | break; |
2440 | case IEEE80211_AMPDU_TX_STOP: | 2440 | case IEEE80211_AMPDU_TX_STOP: |
2441 | IL_DEBUG_HT(il, "stop Tx\n"); | 2441 | D_HT("stop Tx\n"); |
2442 | ret = il4965_tx_agg_stop(il, vif, sta, tid); | 2442 | ret = il4965_tx_agg_stop(il, vif, sta, tid); |
2443 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) | 2443 | if (test_bit(STATUS_EXIT_PENDING, &il->status)) |
2444 | ret = 0; | 2444 | ret = 0; |
@@ -2463,10 +2463,10 @@ int il4965_mac_sta_add(struct ieee80211_hw *hw, | |||
2463 | int ret; | 2463 | int ret; |
2464 | u8 sta_id; | 2464 | u8 sta_id; |
2465 | 2465 | ||
2466 | IL_DEBUG_INFO(il, "received request to add station %pM\n", | 2466 | D_INFO("received request to add station %pM\n", |
2467 | sta->addr); | 2467 | sta->addr); |
2468 | mutex_lock(&il->mutex); | 2468 | mutex_lock(&il->mutex); |
2469 | IL_DEBUG_INFO(il, "proceeding to add station %pM\n", | 2469 | D_INFO("proceeding to add station %pM\n", |
2470 | sta->addr); | 2470 | sta->addr); |
2471 | sta_priv->common.sta_id = IL_INVALID_STATION; | 2471 | sta_priv->common.sta_id = IL_INVALID_STATION; |
2472 | 2472 | ||
@@ -2485,7 +2485,7 @@ int il4965_mac_sta_add(struct ieee80211_hw *hw, | |||
2485 | sta_priv->common.sta_id = sta_id; | 2485 | sta_priv->common.sta_id = sta_id; |
2486 | 2486 | ||
2487 | /* Initialize rate scaling */ | 2487 | /* Initialize rate scaling */ |
2488 | IL_DEBUG_INFO(il, "Initializing rate scaling for station %pM\n", | 2488 | D_INFO("Initializing rate scaling for station %pM\n", |
2489 | sta->addr); | 2489 | sta->addr); |
2490 | il4965_rs_rate_init(il, sta, sta_id); | 2490 | il4965_rs_rate_init(il, sta, sta_id); |
2491 | mutex_unlock(&il->mutex); | 2491 | mutex_unlock(&il->mutex); |
@@ -2505,7 +2505,7 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw, | |||
2505 | struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS]; | 2505 | struct il_rxon_context *ctx = &il->contexts[IL_RXON_CTX_BSS]; |
2506 | u16 ch; | 2506 | u16 ch; |
2507 | 2507 | ||
2508 | IL_DEBUG_MAC80211(il, "enter\n"); | 2508 | D_MAC80211("enter\n"); |
2509 | 2509 | ||
2510 | mutex_lock(&il->mutex); | 2510 | mutex_lock(&il->mutex); |
2511 | 2511 | ||
@@ -2529,7 +2529,7 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw, | |||
2529 | 2529 | ||
2530 | ch_info = il_get_channel_info(il, channel->band, ch); | 2530 | ch_info = il_get_channel_info(il, channel->band, ch); |
2531 | if (!il_is_channel_valid(ch_info)) { | 2531 | if (!il_is_channel_valid(ch_info)) { |
2532 | IL_DEBUG_MAC80211(il, "invalid channel\n"); | 2532 | D_MAC80211("invalid channel\n"); |
2533 | goto out; | 2533 | goto out; |
2534 | } | 2534 | } |
2535 | 2535 | ||
@@ -2580,7 +2580,7 @@ void il4965_mac_channel_switch(struct ieee80211_hw *hw, | |||
2580 | 2580 | ||
2581 | out: | 2581 | out: |
2582 | mutex_unlock(&il->mutex); | 2582 | mutex_unlock(&il->mutex); |
2583 | IL_DEBUG_MAC80211(il, "leave\n"); | 2583 | D_MAC80211("leave\n"); |
2584 | } | 2584 | } |
2585 | 2585 | ||
2586 | void il4965_configure_filter(struct ieee80211_hw *hw, | 2586 | void il4965_configure_filter(struct ieee80211_hw *hw, |
@@ -2599,7 +2599,7 @@ void il4965_configure_filter(struct ieee80211_hw *hw, | |||
2599 | filter_nand |= (flag); \ | 2599 | filter_nand |= (flag); \ |
2600 | } while (0) | 2600 | } while (0) |
2601 | 2601 | ||
2602 | IL_DEBUG_MAC80211(il, "Enter: changed: 0x%x, total: 0x%x\n", | 2602 | D_MAC80211("Enter: changed: 0x%x, total: 0x%x\n", |
2603 | changed_flags, *total_flags); | 2603 | changed_flags, *total_flags); |
2604 | 2604 | ||
2605 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); | 2605 | CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK); |
@@ -2755,7 +2755,7 @@ void il4965_tx_queue_set_status(struct il_priv *il, | |||
2755 | 2755 | ||
2756 | txq->sched_retry = scd_retry; | 2756 | txq->sched_retry = scd_retry; |
2757 | 2757 | ||
2758 | IL_DEBUG_INFO(il, "%s %s Queue %d on AC %d\n", | 2758 | D_INFO("%s %s Queue %d on AC %d\n", |
2759 | active ? "Activate" : "Deactivate", | 2759 | active ? "Activate" : "Deactivate", |
2760 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); | 2760 | scd_retry ? "BA" : "AC", txq_id, tx_fifo_id); |
2761 | } | 2761 | } |
@@ -2824,7 +2824,7 @@ static void il4965_hw_detect(struct il_priv *il) | |||
2824 | il->hw_rev = _il_read32(il, CSR_HW_REV); | 2824 | il->hw_rev = _il_read32(il, CSR_HW_REV); |
2825 | il->hw_wa_rev = _il_read32(il, CSR_HW_REV_WA_REG); | 2825 | il->hw_wa_rev = _il_read32(il, CSR_HW_REV_WA_REG); |
2826 | il->rev_id = il->pci_dev->revision; | 2826 | il->rev_id = il->pci_dev->revision; |
2827 | IL_DEBUG_INFO(il, "HW Revision ID = 0x%X\n", il->rev_id); | 2827 | D_INFO("HW Revision ID = 0x%X\n", il->rev_id); |
2828 | } | 2828 | } |
2829 | 2829 | ||
2830 | static int il4965_set_hw_params(struct il_priv *il) | 2830 | static int il4965_set_hw_params(struct il_priv *il) |
@@ -2911,7 +2911,7 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2911 | 2911 | ||
2912 | SET_IEEE80211_DEV(hw, &pdev->dev); | 2912 | SET_IEEE80211_DEV(hw, &pdev->dev); |
2913 | 2913 | ||
2914 | IL_DEBUG_INFO(il, "*** LOAD DRIVER ***\n"); | 2914 | D_INFO("*** LOAD DRIVER ***\n"); |
2915 | il->cfg = cfg; | 2915 | il->cfg = cfg; |
2916 | il->pci_dev = pdev; | 2916 | il->pci_dev = pdev; |
2917 | il->inta_mask = CSR_INI_SET_MASK; | 2917 | il->inta_mask = CSR_INI_SET_MASK; |
@@ -2963,9 +2963,9 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2963 | goto out_pci_release_regions; | 2963 | goto out_pci_release_regions; |
2964 | } | 2964 | } |
2965 | 2965 | ||
2966 | IL_DEBUG_INFO(il, "pci_resource_len = 0x%08llx\n", | 2966 | D_INFO("pci_resource_len = 0x%08llx\n", |
2967 | (unsigned long long) pci_resource_len(pdev, 0)); | 2967 | (unsigned long long) pci_resource_len(pdev, 0)); |
2968 | IL_DEBUG_INFO(il, "pci_resource_base = %p\n", il->hw_base); | 2968 | D_INFO("pci_resource_base = %p\n", il->hw_base); |
2969 | 2969 | ||
2970 | /* these spin locks will be used in apm_ops.init and EEPROM access | 2970 | /* these spin locks will be used in apm_ops.init and EEPROM access |
2971 | * we should init now | 2971 | * we should init now |
@@ -3012,7 +3012,7 @@ il4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3012 | 3012 | ||
3013 | /* extract MAC Address */ | 3013 | /* extract MAC Address */ |
3014 | il4965_eeprom_get_mac(il, il->addresses[0].addr); | 3014 | il4965_eeprom_get_mac(il, il->addresses[0].addr); |
3015 | IL_DEBUG_INFO(il, "MAC address: %pM\n", il->addresses[0].addr); | 3015 | D_INFO("MAC address: %pM\n", il->addresses[0].addr); |
3016 | il->hw->wiphy->addresses = il->addresses; | 3016 | il->hw->wiphy->addresses = il->addresses; |
3017 | il->hw->wiphy->n_addresses = 1; | 3017 | il->hw->wiphy->n_addresses = 1; |
3018 | 3018 | ||
@@ -3118,7 +3118,7 @@ static void __devexit il4965_pci_remove(struct pci_dev *pdev) | |||
3118 | 3118 | ||
3119 | wait_for_completion(&il->_4965.firmware_loading_complete); | 3119 | wait_for_completion(&il->_4965.firmware_loading_complete); |
3120 | 3120 | ||
3121 | IL_DEBUG_INFO(il, "*** UNLOAD DRIVER ***\n"); | 3121 | D_INFO("*** UNLOAD DRIVER ***\n"); |
3122 | 3122 | ||
3123 | il_dbgfs_unregister(il); | 3123 | il_dbgfs_unregister(il); |
3124 | sysfs_remove_group(&pdev->dev.kobj, &il_attribute_group); | 3124 | sysfs_remove_group(&pdev->dev.kobj, &il_attribute_group); |