diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2009-01-27 17:27:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:34 -0500 |
commit | e1623446bb1de1834ff1c57b3e8ed341d5d4a927 (patch) | |
tree | ece3595deda6d6bad747961be257d5f2cbb507b1 /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 450154e4f471248e188d18e45c2409b37a133765 (diff) |
iwlwifi: don't use implicit priv in IWL_DEBUG
Call IWL_DEBUG macro with explicit priv argument.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 281 |
1 files changed, 139 insertions, 142 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index ad6403395e43..c196abc6db7a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -147,7 +147,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
147 | * we must clear the associated from the active configuration | 147 | * we must clear the associated from the active configuration |
148 | * before we apply the new config */ | 148 | * before we apply the new config */ |
149 | if (iwl_is_associated(priv) && new_assoc) { | 149 | if (iwl_is_associated(priv) && new_assoc) { |
150 | IWL_DEBUG_INFO("Toggling associated bit on current RXON\n"); | 150 | IWL_DEBUG_INFO(priv, "Toggling associated bit on current RXON\n"); |
151 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 151 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
152 | 152 | ||
153 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON, | 153 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON, |
@@ -163,7 +163,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | IWL_DEBUG_INFO("Sending RXON\n" | 166 | IWL_DEBUG_INFO(priv, "Sending RXON\n" |
167 | "* with%s RXON_FILTER_ASSOC_MSK\n" | 167 | "* with%s RXON_FILTER_ASSOC_MSK\n" |
168 | "* channel = %d\n" | 168 | "* channel = %d\n" |
169 | "* bssid = %pM\n", | 169 | "* bssid = %pM\n", |
@@ -254,7 +254,7 @@ static void iwl_clear_free_frames(struct iwl_priv *priv) | |||
254 | { | 254 | { |
255 | struct list_head *element; | 255 | struct list_head *element; |
256 | 256 | ||
257 | IWL_DEBUG_INFO("%d frames on pre-allocated heap on clear.\n", | 257 | IWL_DEBUG_INFO(priv, "%d frames on pre-allocated heap on clear.\n", |
258 | priv->frames_count); | 258 | priv->frames_count); |
259 | 259 | ||
260 | while (!list_empty(&priv->free_frames)) { | 260 | while (!list_empty(&priv->free_frames)) { |
@@ -538,7 +538,7 @@ static void iwl_ht_conf(struct iwl_priv *priv, | |||
538 | struct iwl_ht_info *iwl_conf = &priv->current_ht_config; | 538 | struct iwl_ht_info *iwl_conf = &priv->current_ht_config; |
539 | struct ieee80211_sta *sta; | 539 | struct ieee80211_sta *sta; |
540 | 540 | ||
541 | IWL_DEBUG_MAC80211("enter: \n"); | 541 | IWL_DEBUG_MAC80211(priv, "enter: \n"); |
542 | 542 | ||
543 | if (!iwl_conf->is_ht) | 543 | if (!iwl_conf->is_ht) |
544 | return; | 544 | return; |
@@ -598,7 +598,7 @@ static void iwl_ht_conf(struct iwl_priv *priv, | |||
598 | 598 | ||
599 | rcu_read_unlock(); | 599 | rcu_read_unlock(); |
600 | 600 | ||
601 | IWL_DEBUG_MAC80211("leave\n"); | 601 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
602 | } | 602 | } |
603 | 603 | ||
604 | /* | 604 | /* |
@@ -623,7 +623,7 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force) | |||
623 | priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; | 623 | priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; |
624 | 624 | ||
625 | if (force || iwl_is_associated(priv)) { | 625 | if (force || iwl_is_associated(priv)) { |
626 | IWL_DEBUG_QOS("send QoS cmd with Qos active=%d FLAGS=0x%X\n", | 626 | IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n", |
627 | priv->qos_data.qos_active, | 627 | priv->qos_data.qos_active, |
628 | priv->qos_data.def_qos_parm.qos_flags); | 628 | priv->qos_data.def_qos_parm.qos_flags); |
629 | 629 | ||
@@ -680,7 +680,7 @@ static void iwl_setup_rxon_timing(struct iwl_priv *priv) | |||
680 | priv->rxon_timing.beacon_init_val = cpu_to_le32(interval_tm - rem); | 680 | priv->rxon_timing.beacon_init_val = cpu_to_le32(interval_tm - rem); |
681 | 681 | ||
682 | spin_unlock_irqrestore(&priv->lock, flags); | 682 | spin_unlock_irqrestore(&priv->lock, flags); |
683 | IWL_DEBUG_ASSOC("beacon interval %d beacon timer %d beacon tim %d\n", | 683 | IWL_DEBUG_ASSOC(priv, "beacon interval %d beacon timer %d beacon tim %d\n", |
684 | le16_to_cpu(priv->rxon_timing.beacon_interval), | 684 | le16_to_cpu(priv->rxon_timing.beacon_interval), |
685 | le32_to_cpu(priv->rxon_timing.beacon_init_val), | 685 | le32_to_cpu(priv->rxon_timing.beacon_init_val), |
686 | le16_to_cpu(priv->rxon_timing.atim_window)); | 686 | le16_to_cpu(priv->rxon_timing.atim_window)); |
@@ -701,7 +701,7 @@ static int iwl_set_mode(struct iwl_priv *priv, int mode) | |||
701 | cancel_delayed_work(&priv->scan_check); | 701 | cancel_delayed_work(&priv->scan_check); |
702 | if (iwl_scan_cancel_timeout(priv, 100)) { | 702 | if (iwl_scan_cancel_timeout(priv, 100)) { |
703 | IWL_WARN(priv, "Aborted scan still in progress after 100ms\n"); | 703 | IWL_WARN(priv, "Aborted scan still in progress after 100ms\n"); |
704 | IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); | 704 | IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n"); |
705 | return -EAGAIN; | 705 | return -EAGAIN; |
706 | } | 706 | } |
707 | 707 | ||
@@ -724,19 +724,19 @@ static void iwl_rx_reply_alive(struct iwl_priv *priv, | |||
724 | 724 | ||
725 | palive = &pkt->u.alive_frame; | 725 | palive = &pkt->u.alive_frame; |
726 | 726 | ||
727 | IWL_DEBUG_INFO("Alive ucode status 0x%08X revision " | 727 | IWL_DEBUG_INFO(priv, "Alive ucode status 0x%08X revision " |
728 | "0x%01X 0x%01X\n", | 728 | "0x%01X 0x%01X\n", |
729 | palive->is_valid, palive->ver_type, | 729 | palive->is_valid, palive->ver_type, |
730 | palive->ver_subtype); | 730 | palive->ver_subtype); |
731 | 731 | ||
732 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { | 732 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { |
733 | IWL_DEBUG_INFO("Initialization Alive received.\n"); | 733 | IWL_DEBUG_INFO(priv, "Initialization Alive received.\n"); |
734 | memcpy(&priv->card_alive_init, | 734 | memcpy(&priv->card_alive_init, |
735 | &pkt->u.alive_frame, | 735 | &pkt->u.alive_frame, |
736 | sizeof(struct iwl_init_alive_resp)); | 736 | sizeof(struct iwl_init_alive_resp)); |
737 | pwork = &priv->init_alive_start; | 737 | pwork = &priv->init_alive_start; |
738 | } else { | 738 | } else { |
739 | IWL_DEBUG_INFO("Runtime Alive received.\n"); | 739 | IWL_DEBUG_INFO(priv, "Runtime Alive received.\n"); |
740 | memcpy(&priv->card_alive, &pkt->u.alive_frame, | 740 | memcpy(&priv->card_alive, &pkt->u.alive_frame, |
741 | sizeof(struct iwl_alive_resp)); | 741 | sizeof(struct iwl_alive_resp)); |
742 | pwork = &priv->alive_start; | 742 | pwork = &priv->alive_start; |
@@ -771,7 +771,7 @@ static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv, | |||
771 | #ifdef CONFIG_IWLWIFI_DEBUG | 771 | #ifdef CONFIG_IWLWIFI_DEBUG |
772 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 772 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
773 | struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); | 773 | struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); |
774 | IWL_DEBUG_RX("sleep mode: %d, src: %d\n", | 774 | IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n", |
775 | sleep->pm_sleep_mode, sleep->pm_wakeup_src); | 775 | sleep->pm_sleep_mode, sleep->pm_wakeup_src); |
776 | #endif | 776 | #endif |
777 | } | 777 | } |
@@ -780,7 +780,7 @@ static void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv, | |||
780 | struct iwl_rx_mem_buffer *rxb) | 780 | struct iwl_rx_mem_buffer *rxb) |
781 | { | 781 | { |
782 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 782 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
783 | IWL_DEBUG_RADIO("Dumping %d bytes of unhandled " | 783 | IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled " |
784 | "notification for %s:\n", | 784 | "notification for %s:\n", |
785 | le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); | 785 | le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); |
786 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)); | 786 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)); |
@@ -844,7 +844,7 @@ static void iwl_rx_beacon_notif(struct iwl_priv *priv, | |||
844 | (struct iwl4965_beacon_notif *)pkt->u.raw; | 844 | (struct iwl4965_beacon_notif *)pkt->u.raw; |
845 | u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); | 845 | u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); |
846 | 846 | ||
847 | IWL_DEBUG_RX("beacon status %x retries %d iss %d " | 847 | IWL_DEBUG_RX(priv, "beacon status %x retries %d iss %d " |
848 | "tsf %d %d rate %d\n", | 848 | "tsf %d %d rate %d\n", |
849 | le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK, | 849 | le32_to_cpu(beacon->beacon_notify_hdr.u.status) & TX_STATUS_MSK, |
850 | beacon->beacon_notify_hdr.failure_frame, | 850 | beacon->beacon_notify_hdr.failure_frame, |
@@ -867,7 +867,7 @@ static void iwl_rx_card_state_notif(struct iwl_priv *priv, | |||
867 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); | 867 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); |
868 | unsigned long status = priv->status; | 868 | unsigned long status = priv->status; |
869 | 869 | ||
870 | IWL_DEBUG_RF_KILL("Card state received: HW:%s SW:%s\n", | 870 | IWL_DEBUG_RF_KILL(priv, "Card state received: HW:%s SW:%s\n", |
871 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", | 871 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", |
872 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); | 872 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); |
873 | 873 | ||
@@ -1029,7 +1029,7 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1029 | 1029 | ||
1030 | /* Rx interrupt, but nothing sent from uCode */ | 1030 | /* Rx interrupt, but nothing sent from uCode */ |
1031 | if (i == r) | 1031 | if (i == r) |
1032 | IWL_DEBUG(IWL_DL_RX, "r = %d, i = %d\n", r, i); | 1032 | IWL_DEBUG_RX(priv, "r = %d, i = %d\n", r, i); |
1033 | 1033 | ||
1034 | if (iwl_rx_queue_space(rxq) > (RX_QUEUE_SIZE / 2)) | 1034 | if (iwl_rx_queue_space(rxq) > (RX_QUEUE_SIZE / 2)) |
1035 | fill_rx = 1; | 1035 | fill_rx = 1; |
@@ -1069,12 +1069,12 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1069 | * handle those that need handling via function in | 1069 | * handle those that need handling via function in |
1070 | * rx_handlers table. See iwl_setup_rx_handlers() */ | 1070 | * rx_handlers table. See iwl_setup_rx_handlers() */ |
1071 | if (priv->rx_handlers[pkt->hdr.cmd]) { | 1071 | if (priv->rx_handlers[pkt->hdr.cmd]) { |
1072 | IWL_DEBUG(IWL_DL_RX, "r = %d, i = %d, %s, 0x%02x\n", r, | 1072 | IWL_DEBUG_RX(priv, "r = %d, i = %d, %s, 0x%02x\n", r, |
1073 | i, get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); | 1073 | i, get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); |
1074 | priv->rx_handlers[pkt->hdr.cmd] (priv, rxb); | 1074 | priv->rx_handlers[pkt->hdr.cmd] (priv, rxb); |
1075 | } else { | 1075 | } else { |
1076 | /* No handling needed */ | 1076 | /* No handling needed */ |
1077 | IWL_DEBUG(IWL_DL_RX, | 1077 | IWL_DEBUG_RX(priv, |
1078 | "r %d i %d No handler needed for %s, 0x%02x\n", | 1078 | "r %d i %d No handler needed for %s, 0x%02x\n", |
1079 | r, i, get_cmd_string(pkt->hdr.cmd), | 1079 | r, i, get_cmd_string(pkt->hdr.cmd), |
1080 | pkt->hdr.cmd); | 1080 | pkt->hdr.cmd); |
@@ -1175,7 +1175,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1175 | if (priv->debug_level & IWL_DL_ISR) { | 1175 | if (priv->debug_level & IWL_DL_ISR) { |
1176 | /* just for debug */ | 1176 | /* just for debug */ |
1177 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 1177 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
1178 | IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 1178 | IWL_DEBUG_ISR(priv, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
1179 | inta, inta_mask, inta_fh); | 1179 | inta, inta_mask, inta_fh); |
1180 | } | 1180 | } |
1181 | #endif | 1181 | #endif |
@@ -1209,12 +1209,12 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1209 | if (priv->debug_level & (IWL_DL_ISR)) { | 1209 | if (priv->debug_level & (IWL_DL_ISR)) { |
1210 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | 1210 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ |
1211 | if (inta & CSR_INT_BIT_SCD) | 1211 | if (inta & CSR_INT_BIT_SCD) |
1212 | IWL_DEBUG_ISR("Scheduler finished to transmit " | 1212 | IWL_DEBUG_ISR(priv, "Scheduler finished to transmit " |
1213 | "the frame/frames.\n"); | 1213 | "the frame/frames.\n"); |
1214 | 1214 | ||
1215 | /* Alive notification via Rx interrupt will do the real work */ | 1215 | /* Alive notification via Rx interrupt will do the real work */ |
1216 | if (inta & CSR_INT_BIT_ALIVE) | 1216 | if (inta & CSR_INT_BIT_ALIVE) |
1217 | IWL_DEBUG_ISR("Alive interrupt\n"); | 1217 | IWL_DEBUG_ISR(priv, "Alive interrupt\n"); |
1218 | } | 1218 | } |
1219 | #endif | 1219 | #endif |
1220 | /* Safely ignore these bits for debug checks below */ | 1220 | /* Safely ignore these bits for debug checks below */ |
@@ -1227,7 +1227,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1227 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)) | 1227 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)) |
1228 | hw_rf_kill = 1; | 1228 | hw_rf_kill = 1; |
1229 | 1229 | ||
1230 | IWL_DEBUG(IWL_DL_RF_KILL, "RF_KILL bit toggled to %s.\n", | 1230 | IWL_DEBUG_RF_KILL(priv, "RF_KILL bit toggled to %s.\n", |
1231 | hw_rf_kill ? "disable radio" : "enable radio"); | 1231 | hw_rf_kill ? "disable radio" : "enable radio"); |
1232 | 1232 | ||
1233 | /* driver only loads ucode once setting the interface up. | 1233 | /* driver only loads ucode once setting the interface up. |
@@ -1262,7 +1262,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1262 | 1262 | ||
1263 | /* uCode wakes up after power-down sleep */ | 1263 | /* uCode wakes up after power-down sleep */ |
1264 | if (inta & CSR_INT_BIT_WAKEUP) { | 1264 | if (inta & CSR_INT_BIT_WAKEUP) { |
1265 | IWL_DEBUG_ISR("Wakeup interrupt\n"); | 1265 | IWL_DEBUG_ISR(priv, "Wakeup interrupt\n"); |
1266 | iwl_rx_queue_update_write_ptr(priv, &priv->rxq); | 1266 | iwl_rx_queue_update_write_ptr(priv, &priv->rxq); |
1267 | iwl_txq_update_write_ptr(priv, &priv->txq[0]); | 1267 | iwl_txq_update_write_ptr(priv, &priv->txq[0]); |
1268 | iwl_txq_update_write_ptr(priv, &priv->txq[1]); | 1268 | iwl_txq_update_write_ptr(priv, &priv->txq[1]); |
@@ -1283,7 +1283,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1283 | } | 1283 | } |
1284 | 1284 | ||
1285 | if (inta & CSR_INT_BIT_FH_TX) { | 1285 | if (inta & CSR_INT_BIT_FH_TX) { |
1286 | IWL_DEBUG_ISR("Tx interrupt\n"); | 1286 | IWL_DEBUG_ISR(priv, "Tx interrupt\n"); |
1287 | handled |= CSR_INT_BIT_FH_TX; | 1287 | handled |= CSR_INT_BIT_FH_TX; |
1288 | /* FH finished to write, send event */ | 1288 | /* FH finished to write, send event */ |
1289 | priv->ucode_write_complete = 1; | 1289 | priv->ucode_write_complete = 1; |
@@ -1309,7 +1309,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1309 | inta = iwl_read32(priv, CSR_INT); | 1309 | inta = iwl_read32(priv, CSR_INT); |
1310 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 1310 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
1311 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); | 1311 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
1312 | IWL_DEBUG_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " | 1312 | IWL_DEBUG_ISR(priv, "End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " |
1313 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); | 1313 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); |
1314 | } | 1314 | } |
1315 | #endif | 1315 | #endif |
@@ -1341,7 +1341,7 @@ static irqreturn_t iwl_isr(int irq, void *data) | |||
1341 | * This may be due to IRQ shared with another device, | 1341 | * This may be due to IRQ shared with another device, |
1342 | * or due to sporadic interrupts thrown from our NIC. */ | 1342 | * or due to sporadic interrupts thrown from our NIC. */ |
1343 | if (!inta && !inta_fh) { | 1343 | if (!inta && !inta_fh) { |
1344 | IWL_DEBUG_ISR("Ignore interrupt, inta == 0, inta_fh == 0\n"); | 1344 | IWL_DEBUG_ISR(priv, "Ignore interrupt, inta == 0, inta_fh == 0\n"); |
1345 | goto none; | 1345 | goto none; |
1346 | } | 1346 | } |
1347 | 1347 | ||
@@ -1352,7 +1352,7 @@ static irqreturn_t iwl_isr(int irq, void *data) | |||
1352 | goto unplugged; | 1352 | goto unplugged; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | IWL_DEBUG_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 1355 | IWL_DEBUG_ISR(priv, "ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
1356 | inta, inta_mask, inta_fh); | 1356 | inta, inta_mask, inta_fh); |
1357 | 1357 | ||
1358 | inta &= ~CSR_INT_BIT_SCD; | 1358 | inta &= ~CSR_INT_BIT_SCD; |
@@ -1434,7 +1434,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1434 | "Please use API v%u instead.\n", | 1434 | "Please use API v%u instead.\n", |
1435 | buf, api_max); | 1435 | buf, api_max); |
1436 | 1436 | ||
1437 | IWL_DEBUG_INFO("Got firmware '%s' file (%zd bytes) from disk\n", | 1437 | IWL_DEBUG_INFO(priv, "Got firmware '%s' file (%zd bytes) from disk\n", |
1438 | buf, ucode_raw->size); | 1438 | buf, ucode_raw->size); |
1439 | break; | 1439 | break; |
1440 | } | 1440 | } |
@@ -1485,17 +1485,17 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1485 | IWL_UCODE_API(priv->ucode_ver), | 1485 | IWL_UCODE_API(priv->ucode_ver), |
1486 | IWL_UCODE_SERIAL(priv->ucode_ver)); | 1486 | IWL_UCODE_SERIAL(priv->ucode_ver)); |
1487 | 1487 | ||
1488 | IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n", | 1488 | IWL_DEBUG_INFO(priv, "f/w package hdr ucode version raw = 0x%x\n", |
1489 | priv->ucode_ver); | 1489 | priv->ucode_ver); |
1490 | IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", | 1490 | IWL_DEBUG_INFO(priv, "f/w package hdr runtime inst size = %u\n", |
1491 | inst_size); | 1491 | inst_size); |
1492 | IWL_DEBUG_INFO("f/w package hdr runtime data size = %u\n", | 1492 | IWL_DEBUG_INFO(priv, "f/w package hdr runtime data size = %u\n", |
1493 | data_size); | 1493 | data_size); |
1494 | IWL_DEBUG_INFO("f/w package hdr init inst size = %u\n", | 1494 | IWL_DEBUG_INFO(priv, "f/w package hdr init inst size = %u\n", |
1495 | init_size); | 1495 | init_size); |
1496 | IWL_DEBUG_INFO("f/w package hdr init data size = %u\n", | 1496 | IWL_DEBUG_INFO(priv, "f/w package hdr init data size = %u\n", |
1497 | init_data_size); | 1497 | init_data_size); |
1498 | IWL_DEBUG_INFO("f/w package hdr boot inst size = %u\n", | 1498 | IWL_DEBUG_INFO(priv, "f/w package hdr boot inst size = %u\n", |
1499 | boot_size); | 1499 | boot_size); |
1500 | 1500 | ||
1501 | /* Verify size of file vs. image size info in file's header */ | 1501 | /* Verify size of file vs. image size info in file's header */ |
@@ -1503,7 +1503,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1503 | inst_size + data_size + init_size + | 1503 | inst_size + data_size + init_size + |
1504 | init_data_size + boot_size) { | 1504 | init_data_size + boot_size) { |
1505 | 1505 | ||
1506 | IWL_DEBUG_INFO("uCode file size %d too small\n", | 1506 | IWL_DEBUG_INFO(priv, "uCode file size %d too small\n", |
1507 | (int)ucode_raw->size); | 1507 | (int)ucode_raw->size); |
1508 | ret = -EINVAL; | 1508 | ret = -EINVAL; |
1509 | goto err_release; | 1509 | goto err_release; |
@@ -1511,36 +1511,33 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1511 | 1511 | ||
1512 | /* Verify that uCode images will fit in card's SRAM */ | 1512 | /* Verify that uCode images will fit in card's SRAM */ |
1513 | if (inst_size > priv->hw_params.max_inst_size) { | 1513 | if (inst_size > priv->hw_params.max_inst_size) { |
1514 | IWL_DEBUG_INFO("uCode instr len %d too large to fit in\n", | 1514 | IWL_DEBUG_INFO(priv, "uCode instr len %d too large to fit in\n", |
1515 | inst_size); | 1515 | inst_size); |
1516 | ret = -EINVAL; | 1516 | ret = -EINVAL; |
1517 | goto err_release; | 1517 | goto err_release; |
1518 | } | 1518 | } |
1519 | 1519 | ||
1520 | if (data_size > priv->hw_params.max_data_size) { | 1520 | if (data_size > priv->hw_params.max_data_size) { |
1521 | IWL_DEBUG_INFO("uCode data len %d too large to fit in\n", | 1521 | IWL_DEBUG_INFO(priv, "uCode data len %d too large to fit in\n", |
1522 | data_size); | 1522 | data_size); |
1523 | ret = -EINVAL; | 1523 | ret = -EINVAL; |
1524 | goto err_release; | 1524 | goto err_release; |
1525 | } | 1525 | } |
1526 | if (init_size > priv->hw_params.max_inst_size) { | 1526 | if (init_size > priv->hw_params.max_inst_size) { |
1527 | IWL_DEBUG_INFO | 1527 | IWL_INFO(priv, "uCode init instr len %d too large to fit in\n", |
1528 | ("uCode init instr len %d too large to fit in\n", | 1528 | init_size); |
1529 | init_size); | ||
1530 | ret = -EINVAL; | 1529 | ret = -EINVAL; |
1531 | goto err_release; | 1530 | goto err_release; |
1532 | } | 1531 | } |
1533 | if (init_data_size > priv->hw_params.max_data_size) { | 1532 | if (init_data_size > priv->hw_params.max_data_size) { |
1534 | IWL_DEBUG_INFO | 1533 | IWL_INFO(priv, "uCode init data len %d too large to fit in\n", |
1535 | ("uCode init data len %d too large to fit in\n", | ||
1536 | init_data_size); | 1534 | init_data_size); |
1537 | ret = -EINVAL; | 1535 | ret = -EINVAL; |
1538 | goto err_release; | 1536 | goto err_release; |
1539 | } | 1537 | } |
1540 | if (boot_size > priv->hw_params.max_bsm_size) { | 1538 | if (boot_size > priv->hw_params.max_bsm_size) { |
1541 | IWL_DEBUG_INFO | 1539 | IWL_INFO(priv, "uCode boot instr len %d too large to fit in\n", |
1542 | ("uCode boot instr len %d too large to fit in\n", | 1540 | boot_size); |
1543 | boot_size); | ||
1544 | ret = -EINVAL; | 1541 | ret = -EINVAL; |
1545 | goto err_release; | 1542 | goto err_release; |
1546 | } | 1543 | } |
@@ -1589,16 +1586,16 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1589 | /* Runtime instructions (first block of data in file) */ | 1586 | /* Runtime instructions (first block of data in file) */ |
1590 | src = &ucode->data[0]; | 1587 | src = &ucode->data[0]; |
1591 | len = priv->ucode_code.len; | 1588 | len = priv->ucode_code.len; |
1592 | IWL_DEBUG_INFO("Copying (but not loading) uCode instr len %Zd\n", len); | 1589 | IWL_DEBUG_INFO(priv, "Copying (but not loading) uCode instr len %Zd\n", len); |
1593 | memcpy(priv->ucode_code.v_addr, src, len); | 1590 | memcpy(priv->ucode_code.v_addr, src, len); |
1594 | IWL_DEBUG_INFO("uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", | 1591 | IWL_DEBUG_INFO(priv, "uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", |
1595 | priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr); | 1592 | priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr); |
1596 | 1593 | ||
1597 | /* Runtime data (2nd block) | 1594 | /* Runtime data (2nd block) |
1598 | * NOTE: Copy into backup buffer will be done in iwl_up() */ | 1595 | * NOTE: Copy into backup buffer will be done in iwl_up() */ |
1599 | src = &ucode->data[inst_size]; | 1596 | src = &ucode->data[inst_size]; |
1600 | len = priv->ucode_data.len; | 1597 | len = priv->ucode_data.len; |
1601 | IWL_DEBUG_INFO("Copying (but not loading) uCode data len %Zd\n", len); | 1598 | IWL_DEBUG_INFO(priv, "Copying (but not loading) uCode data len %Zd\n", len); |
1602 | memcpy(priv->ucode_data.v_addr, src, len); | 1599 | memcpy(priv->ucode_data.v_addr, src, len); |
1603 | memcpy(priv->ucode_data_backup.v_addr, src, len); | 1600 | memcpy(priv->ucode_data_backup.v_addr, src, len); |
1604 | 1601 | ||
@@ -1606,7 +1603,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1606 | if (init_size) { | 1603 | if (init_size) { |
1607 | src = &ucode->data[inst_size + data_size]; | 1604 | src = &ucode->data[inst_size + data_size]; |
1608 | len = priv->ucode_init.len; | 1605 | len = priv->ucode_init.len; |
1609 | IWL_DEBUG_INFO("Copying (but not loading) init instr len %Zd\n", | 1606 | IWL_DEBUG_INFO(priv, "Copying (but not loading) init instr len %Zd\n", |
1610 | len); | 1607 | len); |
1611 | memcpy(priv->ucode_init.v_addr, src, len); | 1608 | memcpy(priv->ucode_init.v_addr, src, len); |
1612 | } | 1609 | } |
@@ -1615,7 +1612,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1615 | if (init_data_size) { | 1612 | if (init_data_size) { |
1616 | src = &ucode->data[inst_size + data_size + init_size]; | 1613 | src = &ucode->data[inst_size + data_size + init_size]; |
1617 | len = priv->ucode_init_data.len; | 1614 | len = priv->ucode_init_data.len; |
1618 | IWL_DEBUG_INFO("Copying (but not loading) init data len %Zd\n", | 1615 | IWL_DEBUG_INFO(priv, "Copying (but not loading) init data len %Zd\n", |
1619 | len); | 1616 | len); |
1620 | memcpy(priv->ucode_init_data.v_addr, src, len); | 1617 | memcpy(priv->ucode_init_data.v_addr, src, len); |
1621 | } | 1618 | } |
@@ -1623,7 +1620,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1623 | /* Bootstrap instructions (5th block) */ | 1620 | /* Bootstrap instructions (5th block) */ |
1624 | src = &ucode->data[inst_size + data_size + init_size + init_data_size]; | 1621 | src = &ucode->data[inst_size + data_size + init_size + init_data_size]; |
1625 | len = priv->ucode_boot.len; | 1622 | len = priv->ucode_boot.len; |
1626 | IWL_DEBUG_INFO("Copying (but not loading) boot instr len %Zd\n", len); | 1623 | IWL_DEBUG_INFO(priv, "Copying (but not loading) boot instr len %Zd\n", len); |
1627 | memcpy(priv->ucode_boot.v_addr, src, len); | 1624 | memcpy(priv->ucode_boot.v_addr, src, len); |
1628 | 1625 | ||
1629 | /* We have our copies now, allow OS release its copies */ | 1626 | /* We have our copies now, allow OS release its copies */ |
@@ -1655,12 +1652,12 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
1655 | { | 1652 | { |
1656 | int ret = 0; | 1653 | int ret = 0; |
1657 | 1654 | ||
1658 | IWL_DEBUG_INFO("Runtime Alive received.\n"); | 1655 | IWL_DEBUG_INFO(priv, "Runtime Alive received.\n"); |
1659 | 1656 | ||
1660 | if (priv->card_alive.is_valid != UCODE_VALID_OK) { | 1657 | if (priv->card_alive.is_valid != UCODE_VALID_OK) { |
1661 | /* We had an error bringing up the hardware, so take it | 1658 | /* We had an error bringing up the hardware, so take it |
1662 | * all the way back down so we can try again */ | 1659 | * all the way back down so we can try again */ |
1663 | IWL_DEBUG_INFO("Alive failed.\n"); | 1660 | IWL_DEBUG_INFO(priv, "Alive failed.\n"); |
1664 | goto restart; | 1661 | goto restart; |
1665 | } | 1662 | } |
1666 | 1663 | ||
@@ -1670,7 +1667,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
1670 | if (iwl_verify_ucode(priv)) { | 1667 | if (iwl_verify_ucode(priv)) { |
1671 | /* Runtime instruction load was bad; | 1668 | /* Runtime instruction load was bad; |
1672 | * take it all the way back down so we can try again */ | 1669 | * take it all the way back down so we can try again */ |
1673 | IWL_DEBUG_INFO("Bad runtime uCode load.\n"); | 1670 | IWL_DEBUG_INFO(priv, "Bad runtime uCode load.\n"); |
1674 | goto restart; | 1671 | goto restart; |
1675 | } | 1672 | } |
1676 | 1673 | ||
@@ -1720,7 +1717,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
1720 | 1717 | ||
1721 | iwl_leds_register(priv); | 1718 | iwl_leds_register(priv); |
1722 | 1719 | ||
1723 | IWL_DEBUG_INFO("ALIVE processing complete.\n"); | 1720 | IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); |
1724 | set_bit(STATUS_READY, &priv->status); | 1721 | set_bit(STATUS_READY, &priv->status); |
1725 | wake_up_interruptible(&priv->wait_command_queue); | 1722 | wake_up_interruptible(&priv->wait_command_queue); |
1726 | 1723 | ||
@@ -1754,7 +1751,7 @@ static void __iwl_down(struct iwl_priv *priv) | |||
1754 | unsigned long flags; | 1751 | unsigned long flags; |
1755 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); | 1752 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); |
1756 | 1753 | ||
1757 | IWL_DEBUG_INFO(DRV_NAME " is going down\n"); | 1754 | IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n"); |
1758 | 1755 | ||
1759 | if (!exit_pending) | 1756 | if (!exit_pending) |
1760 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 1757 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
@@ -1935,7 +1932,7 @@ static int __iwl_up(struct iwl_priv *priv) | |||
1935 | /* start card; "initialize" will load runtime ucode */ | 1932 | /* start card; "initialize" will load runtime ucode */ |
1936 | iwl_nic_start(priv); | 1933 | iwl_nic_start(priv); |
1937 | 1934 | ||
1938 | IWL_DEBUG_INFO(DRV_NAME " is coming up\n"); | 1935 | IWL_DEBUG_INFO(priv, DRV_NAME " is coming up\n"); |
1939 | 1936 | ||
1940 | return 0; | 1937 | return 0; |
1941 | } | 1938 | } |
@@ -2056,7 +2053,7 @@ static void iwl_post_associate(struct iwl_priv *priv) | |||
2056 | return; | 2053 | return; |
2057 | } | 2054 | } |
2058 | 2055 | ||
2059 | IWL_DEBUG_ASSOC("Associated as %d to: %pM\n", | 2056 | IWL_DEBUG_ASSOC(priv, "Associated as %d to: %pM\n", |
2060 | priv->assoc_id, priv->active_rxon.bssid_addr); | 2057 | priv->assoc_id, priv->active_rxon.bssid_addr); |
2061 | 2058 | ||
2062 | 2059 | ||
@@ -2089,7 +2086,7 @@ static void iwl_post_associate(struct iwl_priv *priv) | |||
2089 | iwl_set_rxon_chain(priv); | 2086 | iwl_set_rxon_chain(priv); |
2090 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); | 2087 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); |
2091 | 2088 | ||
2092 | IWL_DEBUG_ASSOC("assoc id %d beacon interval %d\n", | 2089 | IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n", |
2093 | priv->assoc_id, priv->beacon_int); | 2090 | priv->assoc_id, priv->beacon_int); |
2094 | 2091 | ||
2095 | if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) | 2092 | if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) |
@@ -2162,7 +2159,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2162 | struct iwl_priv *priv = hw->priv; | 2159 | struct iwl_priv *priv = hw->priv; |
2163 | int ret; | 2160 | int ret; |
2164 | 2161 | ||
2165 | IWL_DEBUG_MAC80211("enter\n"); | 2162 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2166 | 2163 | ||
2167 | /* we should be verifying the device is ready to be opened */ | 2164 | /* we should be verifying the device is ready to be opened */ |
2168 | mutex_lock(&priv->mutex); | 2165 | mutex_lock(&priv->mutex); |
@@ -2192,7 +2189,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2192 | if (iwl_is_rfkill(priv)) | 2189 | if (iwl_is_rfkill(priv)) |
2193 | goto out; | 2190 | goto out; |
2194 | 2191 | ||
2195 | IWL_DEBUG_INFO("Start UP work done.\n"); | 2192 | IWL_DEBUG_INFO(priv, "Start UP work done.\n"); |
2196 | 2193 | ||
2197 | if (test_bit(STATUS_IN_SUSPEND, &priv->status)) | 2194 | if (test_bit(STATUS_IN_SUSPEND, &priv->status)) |
2198 | return 0; | 2195 | return 0; |
@@ -2212,7 +2209,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2212 | 2209 | ||
2213 | out: | 2210 | out: |
2214 | priv->is_open = 1; | 2211 | priv->is_open = 1; |
2215 | IWL_DEBUG_MAC80211("leave\n"); | 2212 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2216 | return 0; | 2213 | return 0; |
2217 | } | 2214 | } |
2218 | 2215 | ||
@@ -2220,10 +2217,10 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) | |||
2220 | { | 2217 | { |
2221 | struct iwl_priv *priv = hw->priv; | 2218 | struct iwl_priv *priv = hw->priv; |
2222 | 2219 | ||
2223 | IWL_DEBUG_MAC80211("enter\n"); | 2220 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2224 | 2221 | ||
2225 | if (!priv->is_open) { | 2222 | if (!priv->is_open) { |
2226 | IWL_DEBUG_MAC80211("leave - skip\n"); | 2223 | IWL_DEBUG_MAC80211(priv, "leave - skip\n"); |
2227 | return; | 2224 | return; |
2228 | } | 2225 | } |
2229 | 2226 | ||
@@ -2246,22 +2243,22 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) | |||
2246 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); | 2243 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
2247 | iwl_enable_interrupts(priv); | 2244 | iwl_enable_interrupts(priv); |
2248 | 2245 | ||
2249 | IWL_DEBUG_MAC80211("leave\n"); | 2246 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2250 | } | 2247 | } |
2251 | 2248 | ||
2252 | static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 2249 | static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
2253 | { | 2250 | { |
2254 | struct iwl_priv *priv = hw->priv; | 2251 | struct iwl_priv *priv = hw->priv; |
2255 | 2252 | ||
2256 | IWL_DEBUG_MACDUMP("enter\n"); | 2253 | IWL_DEBUG_MACDUMP(priv, "enter\n"); |
2257 | 2254 | ||
2258 | IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 2255 | IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
2259 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 2256 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
2260 | 2257 | ||
2261 | if (iwl_tx_skb(priv, skb)) | 2258 | if (iwl_tx_skb(priv, skb)) |
2262 | dev_kfree_skb_any(skb); | 2259 | dev_kfree_skb_any(skb); |
2263 | 2260 | ||
2264 | IWL_DEBUG_MACDUMP("leave\n"); | 2261 | IWL_DEBUG_MACDUMP(priv, "leave\n"); |
2265 | return NETDEV_TX_OK; | 2262 | return NETDEV_TX_OK; |
2266 | } | 2263 | } |
2267 | 2264 | ||
@@ -2271,10 +2268,10 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
2271 | struct iwl_priv *priv = hw->priv; | 2268 | struct iwl_priv *priv = hw->priv; |
2272 | unsigned long flags; | 2269 | unsigned long flags; |
2273 | 2270 | ||
2274 | IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); | 2271 | IWL_DEBUG_MAC80211(priv, "enter: type %d\n", conf->type); |
2275 | 2272 | ||
2276 | if (priv->vif) { | 2273 | if (priv->vif) { |
2277 | IWL_DEBUG_MAC80211("leave - vif != NULL\n"); | 2274 | IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n"); |
2278 | return -EOPNOTSUPP; | 2275 | return -EOPNOTSUPP; |
2279 | } | 2276 | } |
2280 | 2277 | ||
@@ -2287,7 +2284,7 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
2287 | mutex_lock(&priv->mutex); | 2284 | mutex_lock(&priv->mutex); |
2288 | 2285 | ||
2289 | if (conf->mac_addr) { | 2286 | if (conf->mac_addr) { |
2290 | IWL_DEBUG_MAC80211("Set %pM\n", conf->mac_addr); | 2287 | IWL_DEBUG_MAC80211(priv, "Set %pM\n", conf->mac_addr); |
2291 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | 2288 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); |
2292 | } | 2289 | } |
2293 | 2290 | ||
@@ -2297,7 +2294,7 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
2297 | 2294 | ||
2298 | mutex_unlock(&priv->mutex); | 2295 | mutex_unlock(&priv->mutex); |
2299 | 2296 | ||
2300 | IWL_DEBUG_MAC80211("leave\n"); | 2297 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2301 | return 0; | 2298 | return 0; |
2302 | } | 2299 | } |
2303 | 2300 | ||
@@ -2318,12 +2315,12 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2318 | u16 channel; | 2315 | u16 channel; |
2319 | 2316 | ||
2320 | mutex_lock(&priv->mutex); | 2317 | mutex_lock(&priv->mutex); |
2321 | IWL_DEBUG_MAC80211("enter to channel %d\n", conf->channel->hw_value); | 2318 | IWL_DEBUG_MAC80211(priv, "enter to channel %d\n", conf->channel->hw_value); |
2322 | 2319 | ||
2323 | priv->current_ht_config.is_ht = conf_is_ht(conf); | 2320 | priv->current_ht_config.is_ht = conf_is_ht(conf); |
2324 | 2321 | ||
2325 | if (conf->radio_enabled && iwl_radio_kill_sw_enable_radio(priv)) { | 2322 | if (conf->radio_enabled && iwl_radio_kill_sw_enable_radio(priv)) { |
2326 | IWL_DEBUG_MAC80211("leave - RF-KILL - waiting for uCode\n"); | 2323 | IWL_DEBUG_MAC80211(priv, "leave - RF-KILL - waiting for uCode\n"); |
2327 | goto out; | 2324 | goto out; |
2328 | } | 2325 | } |
2329 | 2326 | ||
@@ -2331,14 +2328,14 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2331 | iwl_radio_kill_sw_disable_radio(priv); | 2328 | iwl_radio_kill_sw_disable_radio(priv); |
2332 | 2329 | ||
2333 | if (!iwl_is_ready(priv)) { | 2330 | if (!iwl_is_ready(priv)) { |
2334 | IWL_DEBUG_MAC80211("leave - not ready\n"); | 2331 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); |
2335 | ret = -EIO; | 2332 | ret = -EIO; |
2336 | goto out; | 2333 | goto out; |
2337 | } | 2334 | } |
2338 | 2335 | ||
2339 | if (unlikely(!priv->cfg->mod_params->disable_hw_scan && | 2336 | if (unlikely(!priv->cfg->mod_params->disable_hw_scan && |
2340 | test_bit(STATUS_SCANNING, &priv->status))) { | 2337 | test_bit(STATUS_SCANNING, &priv->status))) { |
2341 | IWL_DEBUG_MAC80211("leave - scanning\n"); | 2338 | IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); |
2342 | mutex_unlock(&priv->mutex); | 2339 | mutex_unlock(&priv->mutex); |
2343 | return 0; | 2340 | return 0; |
2344 | } | 2341 | } |
@@ -2346,7 +2343,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2346 | channel = ieee80211_frequency_to_channel(conf->channel->center_freq); | 2343 | channel = ieee80211_frequency_to_channel(conf->channel->center_freq); |
2347 | ch_info = iwl_get_channel_info(priv, conf->channel->band, channel); | 2344 | ch_info = iwl_get_channel_info(priv, conf->channel->band, channel); |
2348 | if (!is_channel_valid(ch_info)) { | 2345 | if (!is_channel_valid(ch_info)) { |
2349 | IWL_DEBUG_MAC80211("leave - invalid channel\n"); | 2346 | IWL_DEBUG_MAC80211(priv, "leave - invalid channel\n"); |
2350 | ret = -EINVAL; | 2347 | ret = -EINVAL; |
2351 | goto out; | 2348 | goto out; |
2352 | } | 2349 | } |
@@ -2391,12 +2388,12 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2391 | #endif | 2388 | #endif |
2392 | 2389 | ||
2393 | if (!conf->radio_enabled) { | 2390 | if (!conf->radio_enabled) { |
2394 | IWL_DEBUG_MAC80211("leave - radio disabled\n"); | 2391 | IWL_DEBUG_MAC80211(priv, "leave - radio disabled\n"); |
2395 | goto out; | 2392 | goto out; |
2396 | } | 2393 | } |
2397 | 2394 | ||
2398 | if (iwl_is_rfkill(priv)) { | 2395 | if (iwl_is_rfkill(priv)) { |
2399 | IWL_DEBUG_MAC80211("leave - RF kill\n"); | 2396 | IWL_DEBUG_MAC80211(priv, "leave - RF kill\n"); |
2400 | ret = -EIO; | 2397 | ret = -EIO; |
2401 | goto out; | 2398 | goto out; |
2402 | } | 2399 | } |
@@ -2406,9 +2403,9 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2406 | else | 2403 | else |
2407 | ret = iwl_power_set_user_mode(priv, IWL_POWER_MODE_CAM); | 2404 | ret = iwl_power_set_user_mode(priv, IWL_POWER_MODE_CAM); |
2408 | if (ret) | 2405 | if (ret) |
2409 | IWL_DEBUG_MAC80211("Error setting power level\n"); | 2406 | IWL_DEBUG_MAC80211(priv, "Error setting power level\n"); |
2410 | 2407 | ||
2411 | IWL_DEBUG_MAC80211("TX Power old=%d new=%d\n", | 2408 | IWL_DEBUG_MAC80211(priv, "TX Power old=%d new=%d\n", |
2412 | priv->tx_power_user_lmt, conf->power_level); | 2409 | priv->tx_power_user_lmt, conf->power_level); |
2413 | 2410 | ||
2414 | iwl_set_tx_power(priv, conf->power_level, false); | 2411 | iwl_set_tx_power(priv, conf->power_level, false); |
@@ -2422,9 +2419,9 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2422 | &priv->staging_rxon, sizeof(priv->staging_rxon))) | 2419 | &priv->staging_rxon, sizeof(priv->staging_rxon))) |
2423 | iwl_commit_rxon(priv); | 2420 | iwl_commit_rxon(priv); |
2424 | else | 2421 | else |
2425 | IWL_DEBUG_INFO("No re-sending same RXON configuration.\n"); | 2422 | IWL_DEBUG_INFO(priv, "No re-sending same RXON configuration.\n"); |
2426 | 2423 | ||
2427 | IWL_DEBUG_MAC80211("leave\n"); | 2424 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2428 | 2425 | ||
2429 | out: | 2426 | out: |
2430 | mutex_unlock(&priv->mutex); | 2427 | mutex_unlock(&priv->mutex); |
@@ -2505,7 +2502,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2505 | return -EIO; | 2502 | return -EIO; |
2506 | 2503 | ||
2507 | if (priv->vif != vif) { | 2504 | if (priv->vif != vif) { |
2508 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | 2505 | IWL_DEBUG_MAC80211(priv, "leave - priv->vif != vif\n"); |
2509 | return 0; | 2506 | return 0; |
2510 | } | 2507 | } |
2511 | 2508 | ||
@@ -2527,7 +2524,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2527 | mutex_lock(&priv->mutex); | 2524 | mutex_lock(&priv->mutex); |
2528 | 2525 | ||
2529 | if (conf->bssid) | 2526 | if (conf->bssid) |
2530 | IWL_DEBUG_MAC80211("bssid: %pM\n", conf->bssid); | 2527 | IWL_DEBUG_MAC80211(priv, "bssid: %pM\n", conf->bssid); |
2531 | 2528 | ||
2532 | /* | 2529 | /* |
2533 | * very dubious code was here; the probe filtering flag is never set: | 2530 | * very dubious code was here; the probe filtering flag is never set: |
@@ -2540,7 +2537,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2540 | if (!conf->bssid) { | 2537 | if (!conf->bssid) { |
2541 | conf->bssid = priv->mac_addr; | 2538 | conf->bssid = priv->mac_addr; |
2542 | memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); | 2539 | memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); |
2543 | IWL_DEBUG_MAC80211("bssid was set to: %pM\n", | 2540 | IWL_DEBUG_MAC80211(priv, "bssid was set to: %pM\n", |
2544 | conf->bssid); | 2541 | conf->bssid); |
2545 | } | 2542 | } |
2546 | if (priv->ibss_beacon) | 2543 | if (priv->ibss_beacon) |
@@ -2559,7 +2556,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2559 | if (iwl_scan_cancel_timeout(priv, 100)) { | 2556 | if (iwl_scan_cancel_timeout(priv, 100)) { |
2560 | IWL_WARN(priv, "Aborted scan still in progress " | 2557 | IWL_WARN(priv, "Aborted scan still in progress " |
2561 | "after 100ms\n"); | 2558 | "after 100ms\n"); |
2562 | IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); | 2559 | IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n"); |
2563 | mutex_unlock(&priv->mutex); | 2560 | mutex_unlock(&priv->mutex); |
2564 | return -EAGAIN; | 2561 | return -EAGAIN; |
2565 | } | 2562 | } |
@@ -2587,7 +2584,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2587 | } | 2584 | } |
2588 | 2585 | ||
2589 | done: | 2586 | done: |
2590 | IWL_DEBUG_MAC80211("leave\n"); | 2587 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2591 | mutex_unlock(&priv->mutex); | 2588 | mutex_unlock(&priv->mutex); |
2592 | 2589 | ||
2593 | return 0; | 2590 | return 0; |
@@ -2598,7 +2595,7 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | |||
2598 | { | 2595 | { |
2599 | struct iwl_priv *priv = hw->priv; | 2596 | struct iwl_priv *priv = hw->priv; |
2600 | 2597 | ||
2601 | IWL_DEBUG_MAC80211("enter\n"); | 2598 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2602 | 2599 | ||
2603 | mutex_lock(&priv->mutex); | 2600 | mutex_lock(&priv->mutex); |
2604 | 2601 | ||
@@ -2613,7 +2610,7 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | |||
2613 | } | 2610 | } |
2614 | mutex_unlock(&priv->mutex); | 2611 | mutex_unlock(&priv->mutex); |
2615 | 2612 | ||
2616 | IWL_DEBUG_MAC80211("leave\n"); | 2613 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2617 | 2614 | ||
2618 | } | 2615 | } |
2619 | 2616 | ||
@@ -2625,10 +2622,10 @@ static void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2625 | { | 2622 | { |
2626 | struct iwl_priv *priv = hw->priv; | 2623 | struct iwl_priv *priv = hw->priv; |
2627 | 2624 | ||
2628 | IWL_DEBUG_MAC80211("changes = 0x%X\n", changes); | 2625 | IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes); |
2629 | 2626 | ||
2630 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { | 2627 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { |
2631 | IWL_DEBUG_MAC80211("ERP_PREAMBLE %d\n", | 2628 | IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n", |
2632 | bss_conf->use_short_preamble); | 2629 | bss_conf->use_short_preamble); |
2633 | if (bss_conf->use_short_preamble) | 2630 | if (bss_conf->use_short_preamble) |
2634 | priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; | 2631 | priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; |
@@ -2637,7 +2634,7 @@ static void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2637 | } | 2634 | } |
2638 | 2635 | ||
2639 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { | 2636 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { |
2640 | IWL_DEBUG_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot); | 2637 | IWL_DEBUG_MAC80211(priv, "ERP_CTS %d\n", bss_conf->use_cts_prot); |
2641 | if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) | 2638 | if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) |
2642 | priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; | 2639 | priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; |
2643 | else | 2640 | else |
@@ -2650,7 +2647,7 @@ static void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2650 | } | 2647 | } |
2651 | 2648 | ||
2652 | if (changes & BSS_CHANGED_ASSOC) { | 2649 | if (changes & BSS_CHANGED_ASSOC) { |
2653 | IWL_DEBUG_MAC80211("ASSOC %d\n", bss_conf->assoc); | 2650 | IWL_DEBUG_MAC80211(priv, "ASSOC %d\n", bss_conf->assoc); |
2654 | /* This should never happen as this function should | 2651 | /* This should never happen as this function should |
2655 | * never be called from interrupt context. */ | 2652 | * never be called from interrupt context. */ |
2656 | if (WARN_ON_ONCE(in_interrupt())) | 2653 | if (WARN_ON_ONCE(in_interrupt())) |
@@ -2672,10 +2669,10 @@ static void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2672 | mutex_unlock(&priv->mutex); | 2669 | mutex_unlock(&priv->mutex); |
2673 | } else { | 2670 | } else { |
2674 | priv->assoc_id = 0; | 2671 | priv->assoc_id = 0; |
2675 | IWL_DEBUG_MAC80211("DISASSOC %d\n", bss_conf->assoc); | 2672 | IWL_DEBUG_MAC80211(priv, "DISASSOC %d\n", bss_conf->assoc); |
2676 | } | 2673 | } |
2677 | } else if (changes && iwl_is_associated(priv) && priv->assoc_id) { | 2674 | } else if (changes && iwl_is_associated(priv) && priv->assoc_id) { |
2678 | IWL_DEBUG_MAC80211("Associated Changes %d\n", changes); | 2675 | IWL_DEBUG_MAC80211(priv, "Associated Changes %d\n", changes); |
2679 | iwl_send_rxon_assoc(priv); | 2676 | iwl_send_rxon_assoc(priv); |
2680 | } | 2677 | } |
2681 | 2678 | ||
@@ -2687,14 +2684,14 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | |||
2687 | struct iwl_priv *priv = hw->priv; | 2684 | struct iwl_priv *priv = hw->priv; |
2688 | int ret; | 2685 | int ret; |
2689 | 2686 | ||
2690 | IWL_DEBUG_MAC80211("enter\n"); | 2687 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2691 | 2688 | ||
2692 | mutex_lock(&priv->mutex); | 2689 | mutex_lock(&priv->mutex); |
2693 | spin_lock_irqsave(&priv->lock, flags); | 2690 | spin_lock_irqsave(&priv->lock, flags); |
2694 | 2691 | ||
2695 | if (!iwl_is_ready_rf(priv)) { | 2692 | if (!iwl_is_ready_rf(priv)) { |
2696 | ret = -EIO; | 2693 | ret = -EIO; |
2697 | IWL_DEBUG_MAC80211("leave - not ready or exit pending\n"); | 2694 | IWL_DEBUG_MAC80211(priv, "leave - not ready or exit pending\n"); |
2698 | goto out_unlock; | 2695 | goto out_unlock; |
2699 | } | 2696 | } |
2700 | 2697 | ||
@@ -2704,7 +2701,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | |||
2704 | */ | 2701 | */ |
2705 | if (priv->next_scan_jiffies && | 2702 | if (priv->next_scan_jiffies && |
2706 | time_after(priv->next_scan_jiffies, jiffies)) { | 2703 | time_after(priv->next_scan_jiffies, jiffies)) { |
2707 | IWL_DEBUG_SCAN("scan rejected: within next scan period\n"); | 2704 | IWL_DEBUG_SCAN(priv, "scan rejected: within next scan period\n"); |
2708 | queue_work(priv->workqueue, &priv->scan_completed); | 2705 | queue_work(priv->workqueue, &priv->scan_completed); |
2709 | ret = 0; | 2706 | ret = 0; |
2710 | goto out_unlock; | 2707 | goto out_unlock; |
@@ -2713,7 +2710,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | |||
2713 | /* if we just finished scan ask for delay */ | 2710 | /* if we just finished scan ask for delay */ |
2714 | if (iwl_is_associated(priv) && priv->last_scan_jiffies && | 2711 | if (iwl_is_associated(priv) && priv->last_scan_jiffies && |
2715 | time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) { | 2712 | time_after(priv->last_scan_jiffies + IWL_DELAY_NEXT_SCAN, jiffies)) { |
2716 | IWL_DEBUG_SCAN("scan rejected: within previous scan period\n"); | 2713 | IWL_DEBUG_SCAN(priv, "scan rejected: within previous scan period\n"); |
2717 | queue_work(priv->workqueue, &priv->scan_completed); | 2714 | queue_work(priv->workqueue, &priv->scan_completed); |
2718 | ret = 0; | 2715 | ret = 0; |
2719 | goto out_unlock; | 2716 | goto out_unlock; |
@@ -2729,7 +2726,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len) | |||
2729 | 2726 | ||
2730 | ret = iwl_scan_initiate(priv); | 2727 | ret = iwl_scan_initiate(priv); |
2731 | 2728 | ||
2732 | IWL_DEBUG_MAC80211("leave\n"); | 2729 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2733 | 2730 | ||
2734 | out_unlock: | 2731 | out_unlock: |
2735 | spin_unlock_irqrestore(&priv->lock, flags); | 2732 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -2744,11 +2741,11 @@ static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, | |||
2744 | { | 2741 | { |
2745 | 2742 | ||
2746 | struct iwl_priv *priv = hw->priv; | 2743 | struct iwl_priv *priv = hw->priv; |
2747 | IWL_DEBUG_MAC80211("enter\n"); | 2744 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2748 | 2745 | ||
2749 | iwl_update_tkip_key(priv, keyconf, addr, iv32, phase1key); | 2746 | iwl_update_tkip_key(priv, keyconf, addr, iv32, phase1key); |
2750 | 2747 | ||
2751 | IWL_DEBUG_MAC80211("leave\n"); | 2748 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2752 | } | 2749 | } |
2753 | 2750 | ||
2754 | static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 2751 | static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
@@ -2762,16 +2759,16 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2762 | u8 sta_id; | 2759 | u8 sta_id; |
2763 | bool is_default_wep_key = false; | 2760 | bool is_default_wep_key = false; |
2764 | 2761 | ||
2765 | IWL_DEBUG_MAC80211("enter\n"); | 2762 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2766 | 2763 | ||
2767 | if (priv->hw_params.sw_crypto) { | 2764 | if (priv->hw_params.sw_crypto) { |
2768 | IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); | 2765 | IWL_DEBUG_MAC80211(priv, "leave - hwcrypto disabled\n"); |
2769 | return -EOPNOTSUPP; | 2766 | return -EOPNOTSUPP; |
2770 | } | 2767 | } |
2771 | addr = sta ? sta->addr : iwl_bcast_addr; | 2768 | addr = sta ? sta->addr : iwl_bcast_addr; |
2772 | sta_id = iwl_find_station(priv, addr); | 2769 | sta_id = iwl_find_station(priv, addr); |
2773 | if (sta_id == IWL_INVALID_STATION) { | 2770 | if (sta_id == IWL_INVALID_STATION) { |
2774 | IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", | 2771 | IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", |
2775 | addr); | 2772 | addr); |
2776 | return -EINVAL; | 2773 | return -EINVAL; |
2777 | 2774 | ||
@@ -2801,7 +2798,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2801 | else | 2798 | else |
2802 | ret = iwl_set_dynamic_key(priv, key, sta_id); | 2799 | ret = iwl_set_dynamic_key(priv, key, sta_id); |
2803 | 2800 | ||
2804 | IWL_DEBUG_MAC80211("enable hwcrypto key\n"); | 2801 | IWL_DEBUG_MAC80211(priv, "enable hwcrypto key\n"); |
2805 | break; | 2802 | break; |
2806 | case DISABLE_KEY: | 2803 | case DISABLE_KEY: |
2807 | if (is_default_wep_key) | 2804 | if (is_default_wep_key) |
@@ -2809,13 +2806,13 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2809 | else | 2806 | else |
2810 | ret = iwl_remove_dynamic_key(priv, key, sta_id); | 2807 | ret = iwl_remove_dynamic_key(priv, key, sta_id); |
2811 | 2808 | ||
2812 | IWL_DEBUG_MAC80211("disable hwcrypto key\n"); | 2809 | IWL_DEBUG_MAC80211(priv, "disable hwcrypto key\n"); |
2813 | break; | 2810 | break; |
2814 | default: | 2811 | default: |
2815 | ret = -EINVAL; | 2812 | ret = -EINVAL; |
2816 | } | 2813 | } |
2817 | 2814 | ||
2818 | IWL_DEBUG_MAC80211("leave\n"); | 2815 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2819 | 2816 | ||
2820 | return ret; | 2817 | return ret; |
2821 | } | 2818 | } |
@@ -2827,15 +2824,15 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
2827 | unsigned long flags; | 2824 | unsigned long flags; |
2828 | int q; | 2825 | int q; |
2829 | 2826 | ||
2830 | IWL_DEBUG_MAC80211("enter\n"); | 2827 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2831 | 2828 | ||
2832 | if (!iwl_is_ready_rf(priv)) { | 2829 | if (!iwl_is_ready_rf(priv)) { |
2833 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 2830 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
2834 | return -EIO; | 2831 | return -EIO; |
2835 | } | 2832 | } |
2836 | 2833 | ||
2837 | if (queue >= AC_NUM) { | 2834 | if (queue >= AC_NUM) { |
2838 | IWL_DEBUG_MAC80211("leave - queue >= AC_NUM %d\n", queue); | 2835 | IWL_DEBUG_MAC80211(priv, "leave - queue >= AC_NUM %d\n", queue); |
2839 | return 0; | 2836 | return 0; |
2840 | } | 2837 | } |
2841 | 2838 | ||
@@ -2859,7 +2856,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
2859 | 2856 | ||
2860 | spin_unlock_irqrestore(&priv->lock, flags); | 2857 | spin_unlock_irqrestore(&priv->lock, flags); |
2861 | 2858 | ||
2862 | IWL_DEBUG_MAC80211("leave\n"); | 2859 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2863 | return 0; | 2860 | return 0; |
2864 | } | 2861 | } |
2865 | 2862 | ||
@@ -2869,7 +2866,7 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2869 | { | 2866 | { |
2870 | struct iwl_priv *priv = hw->priv; | 2867 | struct iwl_priv *priv = hw->priv; |
2871 | 2868 | ||
2872 | IWL_DEBUG_HT("A-MPDU action on addr %pM tid %d\n", | 2869 | IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", |
2873 | sta->addr, tid); | 2870 | sta->addr, tid); |
2874 | 2871 | ||
2875 | if (!(priv->cfg->sku & IWL_SKU_N)) | 2872 | if (!(priv->cfg->sku & IWL_SKU_N)) |
@@ -2877,19 +2874,19 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
2877 | 2874 | ||
2878 | switch (action) { | 2875 | switch (action) { |
2879 | case IEEE80211_AMPDU_RX_START: | 2876 | case IEEE80211_AMPDU_RX_START: |
2880 | IWL_DEBUG_HT("start Rx\n"); | 2877 | IWL_DEBUG_HT(priv, "start Rx\n"); |
2881 | return iwl_sta_rx_agg_start(priv, sta->addr, tid, *ssn); | 2878 | return iwl_sta_rx_agg_start(priv, sta->addr, tid, *ssn); |
2882 | case IEEE80211_AMPDU_RX_STOP: | 2879 | case IEEE80211_AMPDU_RX_STOP: |
2883 | IWL_DEBUG_HT("stop Rx\n"); | 2880 | IWL_DEBUG_HT(priv, "stop Rx\n"); |
2884 | return iwl_sta_rx_agg_stop(priv, sta->addr, tid); | 2881 | return iwl_sta_rx_agg_stop(priv, sta->addr, tid); |
2885 | case IEEE80211_AMPDU_TX_START: | 2882 | case IEEE80211_AMPDU_TX_START: |
2886 | IWL_DEBUG_HT("start Tx\n"); | 2883 | IWL_DEBUG_HT(priv, "start Tx\n"); |
2887 | return iwl_tx_agg_start(priv, sta->addr, tid, ssn); | 2884 | return iwl_tx_agg_start(priv, sta->addr, tid, ssn); |
2888 | case IEEE80211_AMPDU_TX_STOP: | 2885 | case IEEE80211_AMPDU_TX_STOP: |
2889 | IWL_DEBUG_HT("stop Tx\n"); | 2886 | IWL_DEBUG_HT(priv, "stop Tx\n"); |
2890 | return iwl_tx_agg_stop(priv, sta->addr, tid); | 2887 | return iwl_tx_agg_stop(priv, sta->addr, tid); |
2891 | default: | 2888 | default: |
2892 | IWL_DEBUG_HT("unknown\n"); | 2889 | IWL_DEBUG_HT(priv, "unknown\n"); |
2893 | return -EINVAL; | 2890 | return -EINVAL; |
2894 | break; | 2891 | break; |
2895 | } | 2892 | } |
@@ -2905,10 +2902,10 @@ static int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
2905 | struct iwl_queue *q; | 2902 | struct iwl_queue *q; |
2906 | unsigned long flags; | 2903 | unsigned long flags; |
2907 | 2904 | ||
2908 | IWL_DEBUG_MAC80211("enter\n"); | 2905 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2909 | 2906 | ||
2910 | if (!iwl_is_ready_rf(priv)) { | 2907 | if (!iwl_is_ready_rf(priv)) { |
2911 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 2908 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
2912 | return -EIO; | 2909 | return -EIO; |
2913 | } | 2910 | } |
2914 | 2911 | ||
@@ -2926,7 +2923,7 @@ static int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
2926 | } | 2923 | } |
2927 | spin_unlock_irqrestore(&priv->lock, flags); | 2924 | spin_unlock_irqrestore(&priv->lock, flags); |
2928 | 2925 | ||
2929 | IWL_DEBUG_MAC80211("leave\n"); | 2926 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2930 | 2927 | ||
2931 | return 0; | 2928 | return 0; |
2932 | } | 2929 | } |
@@ -2937,8 +2934,8 @@ static int iwl_mac_get_stats(struct ieee80211_hw *hw, | |||
2937 | struct iwl_priv *priv = hw->priv; | 2934 | struct iwl_priv *priv = hw->priv; |
2938 | 2935 | ||
2939 | priv = hw->priv; | 2936 | priv = hw->priv; |
2940 | IWL_DEBUG_MAC80211("enter\n"); | 2937 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2941 | IWL_DEBUG_MAC80211("leave\n"); | 2938 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2942 | 2939 | ||
2943 | return 0; | 2940 | return 0; |
2944 | } | 2941 | } |
@@ -2949,7 +2946,7 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
2949 | unsigned long flags; | 2946 | unsigned long flags; |
2950 | 2947 | ||
2951 | mutex_lock(&priv->mutex); | 2948 | mutex_lock(&priv->mutex); |
2952 | IWL_DEBUG_MAC80211("enter\n"); | 2949 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
2953 | 2950 | ||
2954 | spin_lock_irqsave(&priv->lock, flags); | 2951 | spin_lock_irqsave(&priv->lock, flags); |
2955 | memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_info)); | 2952 | memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_info)); |
@@ -2976,7 +2973,7 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
2976 | spin_unlock_irqrestore(&priv->lock, flags); | 2973 | spin_unlock_irqrestore(&priv->lock, flags); |
2977 | 2974 | ||
2978 | if (!iwl_is_ready_rf(priv)) { | 2975 | if (!iwl_is_ready_rf(priv)) { |
2979 | IWL_DEBUG_MAC80211("leave - not ready\n"); | 2976 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); |
2980 | mutex_unlock(&priv->mutex); | 2977 | mutex_unlock(&priv->mutex); |
2981 | return; | 2978 | return; |
2982 | } | 2979 | } |
@@ -3005,7 +3002,7 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
3005 | IEEE80211_CHAN_RADAR)) | 3002 | IEEE80211_CHAN_RADAR)) |
3006 | iwl_power_disable_management(priv, 3000); | 3003 | iwl_power_disable_management(priv, 3000); |
3007 | 3004 | ||
3008 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); | 3005 | IWL_DEBUG_MAC80211(priv, "leave - not in IBSS\n"); |
3009 | mutex_unlock(&priv->mutex); | 3006 | mutex_unlock(&priv->mutex); |
3010 | return; | 3007 | return; |
3011 | } | 3008 | } |
@@ -3014,7 +3011,7 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw) | |||
3014 | 3011 | ||
3015 | mutex_unlock(&priv->mutex); | 3012 | mutex_unlock(&priv->mutex); |
3016 | 3013 | ||
3017 | IWL_DEBUG_MAC80211("leave\n"); | 3014 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
3018 | } | 3015 | } |
3019 | 3016 | ||
3020 | static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | 3017 | static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) |
@@ -3023,15 +3020,15 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
3023 | unsigned long flags; | 3020 | unsigned long flags; |
3024 | __le64 timestamp; | 3021 | __le64 timestamp; |
3025 | 3022 | ||
3026 | IWL_DEBUG_MAC80211("enter\n"); | 3023 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
3027 | 3024 | ||
3028 | if (!iwl_is_ready_rf(priv)) { | 3025 | if (!iwl_is_ready_rf(priv)) { |
3029 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 3026 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
3030 | return -EIO; | 3027 | return -EIO; |
3031 | } | 3028 | } |
3032 | 3029 | ||
3033 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { | 3030 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { |
3034 | IWL_DEBUG_MAC80211("leave - not IBSS\n"); | 3031 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS\n"); |
3035 | return -EIO; | 3032 | return -EIO; |
3036 | } | 3033 | } |
3037 | 3034 | ||
@@ -3046,7 +3043,7 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
3046 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; | 3043 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; |
3047 | priv->timestamp = le64_to_cpu(timestamp); | 3044 | priv->timestamp = le64_to_cpu(timestamp); |
3048 | 3045 | ||
3049 | IWL_DEBUG_MAC80211("leave\n"); | 3046 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
3050 | spin_unlock_irqrestore(&priv->lock, flags); | 3047 | spin_unlock_irqrestore(&priv->lock, flags); |
3051 | 3048 | ||
3052 | iwl_reset_qos(priv); | 3049 | iwl_reset_qos(priv); |
@@ -3204,7 +3201,7 @@ static ssize_t store_flags(struct device *d, | |||
3204 | if (iwl_scan_cancel_timeout(priv, 100)) | 3201 | if (iwl_scan_cancel_timeout(priv, 100)) |
3205 | IWL_WARN(priv, "Could not cancel scan.\n"); | 3202 | IWL_WARN(priv, "Could not cancel scan.\n"); |
3206 | else { | 3203 | else { |
3207 | IWL_DEBUG_INFO("Commit rxon.flags = 0x%04X\n", flags); | 3204 | IWL_DEBUG_INFO(priv, "Commit rxon.flags = 0x%04X\n", flags); |
3208 | priv->staging_rxon.flags = cpu_to_le32(flags); | 3205 | priv->staging_rxon.flags = cpu_to_le32(flags); |
3209 | iwl_commit_rxon(priv); | 3206 | iwl_commit_rxon(priv); |
3210 | } | 3207 | } |
@@ -3243,7 +3240,7 @@ static ssize_t store_filter_flags(struct device *d, | |||
3243 | if (iwl_scan_cancel_timeout(priv, 100)) | 3240 | if (iwl_scan_cancel_timeout(priv, 100)) |
3244 | IWL_WARN(priv, "Could not cancel scan.\n"); | 3241 | IWL_WARN(priv, "Could not cancel scan.\n"); |
3245 | else { | 3242 | else { |
3246 | IWL_DEBUG_INFO("Committing rxon.filter_flags = " | 3243 | IWL_DEBUG_INFO(priv, "Committing rxon.filter_flags = " |
3247 | "0x%04X\n", filter_flags); | 3244 | "0x%04X\n", filter_flags); |
3248 | priv->staging_rxon.filter_flags = | 3245 | priv->staging_rxon.filter_flags = |
3249 | cpu_to_le32(filter_flags); | 3246 | cpu_to_le32(filter_flags); |
@@ -3280,7 +3277,7 @@ static ssize_t store_power_level(struct device *d, | |||
3280 | 3277 | ||
3281 | ret = iwl_power_set_user_mode(priv, mode); | 3278 | ret = iwl_power_set_user_mode(priv, mode); |
3282 | if (ret) { | 3279 | if (ret) { |
3283 | IWL_DEBUG_MAC80211("failed setting power mode.\n"); | 3280 | IWL_DEBUG_MAC80211(priv, "failed setting power mode.\n"); |
3284 | goto out; | 3281 | goto out; |
3285 | } | 3282 | } |
3286 | ret = count; | 3283 | ret = count; |
@@ -3481,7 +3478,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3481 | 3478 | ||
3482 | SET_IEEE80211_DEV(hw, &pdev->dev); | 3479 | SET_IEEE80211_DEV(hw, &pdev->dev); |
3483 | 3480 | ||
3484 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); | 3481 | IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n"); |
3485 | priv->cfg = cfg; | 3482 | priv->cfg = cfg; |
3486 | priv->pci_dev = pdev; | 3483 | priv->pci_dev = pdev; |
3487 | 3484 | ||
@@ -3530,9 +3527,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3530 | goto out_pci_release_regions; | 3527 | goto out_pci_release_regions; |
3531 | } | 3528 | } |
3532 | 3529 | ||
3533 | IWL_DEBUG_INFO("pci_resource_len = 0x%08llx\n", | 3530 | IWL_DEBUG_INFO(priv, "pci_resource_len = 0x%08llx\n", |
3534 | (unsigned long long) pci_resource_len(pdev, 0)); | 3531 | (unsigned long long) pci_resource_len(pdev, 0)); |
3535 | IWL_DEBUG_INFO("pci_resource_base = %p\n", priv->hw_base); | 3532 | IWL_DEBUG_INFO(priv, "pci_resource_base = %p\n", priv->hw_base); |
3536 | 3533 | ||
3537 | iwl_hw_detect(priv); | 3534 | iwl_hw_detect(priv); |
3538 | IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s REV=0x%X\n", | 3535 | IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s REV=0x%X\n", |
@@ -3545,7 +3542,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3545 | /* amp init */ | 3542 | /* amp init */ |
3546 | err = priv->cfg->ops->lib->apm_ops.init(priv); | 3543 | err = priv->cfg->ops->lib->apm_ops.init(priv); |
3547 | if (err < 0) { | 3544 | if (err < 0) { |
3548 | IWL_DEBUG_INFO("Failed to init APMG\n"); | 3545 | IWL_DEBUG_INFO(priv, "Failed to init APMG\n"); |
3549 | goto out_iounmap; | 3546 | goto out_iounmap; |
3550 | } | 3547 | } |
3551 | /***************** | 3548 | /***************** |
@@ -3563,7 +3560,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3563 | 3560 | ||
3564 | /* extract MAC Address */ | 3561 | /* extract MAC Address */ |
3565 | iwl_eeprom_get_mac(priv, priv->mac_addr); | 3562 | iwl_eeprom_get_mac(priv, priv->mac_addr); |
3566 | IWL_DEBUG_INFO("MAC address: %pM\n", priv->mac_addr); | 3563 | IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr); |
3567 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); | 3564 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); |
3568 | 3565 | ||
3569 | /************************ | 3566 | /************************ |
@@ -3590,7 +3587,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3590 | /* Disable radio (SW RF KILL) via parameter when loading driver */ | 3587 | /* Disable radio (SW RF KILL) via parameter when loading driver */ |
3591 | if (priv->cfg->mod_params->disable) { | 3588 | if (priv->cfg->mod_params->disable) { |
3592 | set_bit(STATUS_RF_KILL_SW, &priv->status); | 3589 | set_bit(STATUS_RF_KILL_SW, &priv->status); |
3593 | IWL_DEBUG_INFO("Radio disabled.\n"); | 3590 | IWL_DEBUG_INFO(priv, "Radio disabled.\n"); |
3594 | } | 3591 | } |
3595 | 3592 | ||
3596 | /******************** | 3593 | /******************** |
@@ -3684,7 +3681,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) | |||
3684 | if (!priv) | 3681 | if (!priv) |
3685 | return; | 3682 | return; |
3686 | 3683 | ||
3687 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); | 3684 | IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n"); |
3688 | 3685 | ||
3689 | iwl_dbgfs_unregister(priv); | 3686 | iwl_dbgfs_unregister(priv); |
3690 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); | 3687 | sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); |