aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl3945-base.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 05:21:01 -0500
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 05:21:01 -0500
commit58de00a464f1e7cf0b108341dc6cc49276d19d7a (patch)
tree9d9d56256f22f2bd5e87aa673eeadbae375293d5 /drivers/net/wireless/iwlegacy/iwl3945-base.c
parent2d27c5dbd696e7e3a162bba7b948486a9856abca (diff)
iwlegacy: rename IL_DEBUG_ to D_
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl3945-base.c222
1 files changed, 111 insertions, 111 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c
index af3f1945e17d..8aa22a01ae68 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
793static void il3945_rx_beacon_notif(struct il_priv *il, 793static 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
2873out_release_irq: 2873out_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
2903static void il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 2903static 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
2918void il3945_config_ap(struct il_priv *il) 2918void 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, &params, type); 3342 il3945_get_measurement(il, &params, 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