aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2009-01-27 17:27:56 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:34 -0500
commite1623446bb1de1834ff1c57b3e8ed341d5d4a927 (patch)
treeece3595deda6d6bad747961be257d5f2cbb507b1 /drivers/net/wireless/iwlwifi/iwl-core.c
parent450154e4f471248e188d18e45c2409b37a133765 (diff)
iwlwifi: don't use implicit priv in IWL_DEBUG
Call IWL_DEBUG macro with explicit priv argument. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 4f2b88c59c71..5f92cfbe9267 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -323,7 +323,7 @@ void iwl_reset_qos(struct iwl_priv *priv)
323 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0; 323 priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
324 } 324 }
325 } 325 }
326 IWL_DEBUG_QOS("set QoS to default \n"); 326 IWL_DEBUG_QOS(priv, "set QoS to default \n");
327 327
328 spin_unlock_irqrestore(&priv->lock, flags); 328 spin_unlock_irqrestore(&priv->lock, flags);
329} 329}
@@ -419,7 +419,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
419 419
420 if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates || 420 if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates ||
421 priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) { 421 priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) {
422 IWL_DEBUG_INFO("Geography modes already initialized.\n"); 422 IWL_DEBUG_INFO(priv, "Geography modes already initialized.\n");
423 set_bit(STATUS_GEO_CONFIGURED, &priv->status); 423 set_bit(STATUS_GEO_CONFIGURED, &priv->status);
424 return 0; 424 return 0;
425 } 425 }
@@ -501,7 +501,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
501 /* Save flags for reg domain usage */ 501 /* Save flags for reg domain usage */
502 geo_ch->orig_flags = geo_ch->flags; 502 geo_ch->orig_flags = geo_ch->flags;
503 503
504 IWL_DEBUG_INFO("Channel %d Freq=%d[%sGHz] %s flag=0x%X\n", 504 IWL_DEBUG_INFO(priv, "Channel %d Freq=%d[%sGHz] %s flag=0x%X\n",
505 ch->channel, geo_ch->center_freq, 505 ch->channel, geo_ch->center_freq,
506 is_channel_a_band(ch) ? "5.2" : "2.4", 506 is_channel_a_band(ch) ? "5.2" : "2.4",
507 geo_ch->flags & IEEE80211_CHAN_DISABLED ? 507 geo_ch->flags & IEEE80211_CHAN_DISABLED ?
@@ -790,7 +790,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
790 790
791 iwl_set_rxon_chain(priv); 791 iwl_set_rxon_chain(priv);
792 792
793 IWL_DEBUG_ASSOC("supported HT rate 0x%X 0x%X 0x%X " 793 IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X "
794 "rxon flags 0x%X operation mode :0x%X " 794 "rxon flags 0x%X operation mode :0x%X "
795 "extension channel offset 0x%x\n", 795 "extension channel offset 0x%x\n",
796 ht_info->mcs.rx_mask[0], 796 ht_info->mcs.rx_mask[0],
@@ -936,7 +936,7 @@ void iwl_set_rxon_chain(struct iwl_priv *priv)
936 else 936 else
937 priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; 937 priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK;
938 938
939 IWL_DEBUG_ASSOC("rx_chain=0x%X active=%d idle=%d\n", 939 IWL_DEBUG_ASSOC(priv, "rx_chain=0x%X active=%d idle=%d\n",
940 priv->staging_rxon.rx_chain, 940 priv->staging_rxon.rx_chain,
941 active_rx_cnt, idle_rx_cnt); 941 active_rx_cnt, idle_rx_cnt);
942 942
@@ -961,7 +961,7 @@ int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch)
961 u16 channel = ieee80211_frequency_to_channel(ch->center_freq); 961 u16 channel = ieee80211_frequency_to_channel(ch->center_freq);
962 962
963 if (!iwl_get_channel_info(priv, band, channel)) { 963 if (!iwl_get_channel_info(priv, band, channel)) {
964 IWL_DEBUG_INFO("Could not set channel to %d [%d]\n", 964 IWL_DEBUG_INFO(priv, "Could not set channel to %d [%d]\n",
965 channel, band); 965 channel, band);
966 return -EINVAL; 966 return -EINVAL;
967 } 967 }
@@ -978,7 +978,7 @@ int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch)
978 978
979 priv->band = band; 979 priv->band = band;
980 980
981 IWL_DEBUG_INFO("Staging channel set to %d [%d]\n", channel, band); 981 IWL_DEBUG_INFO(priv, "Staging channel set to %d [%d]\n", channel, band);
982 982
983 return 0; 983 return 0;
984} 984}
@@ -1108,7 +1108,7 @@ void iwl_set_rate(struct iwl_priv *priv)
1108 priv->active_rate |= (1 << rate->hw_value); 1108 priv->active_rate |= (1 << rate->hw_value);
1109 } 1109 }
1110 1110
1111 IWL_DEBUG_RATE("Set active_rate = %0x, active_rate_basic = %0x\n", 1111 IWL_DEBUG_RATE(priv, "Set active_rate = %0x, active_rate_basic = %0x\n",
1112 priv->active_rate, priv->active_rate_basic); 1112 priv->active_rate, priv->active_rate_basic);
1113 1113
1114 /* 1114 /*
@@ -1140,7 +1140,7 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
1140 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; 1140 struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
1141 struct iwl_rxon_cmd *rxon = (void *)&priv->active_rxon; 1141 struct iwl_rxon_cmd *rxon = (void *)&priv->active_rxon;
1142 struct iwl_csa_notification *csa = &(pkt->u.csa_notif); 1142 struct iwl_csa_notification *csa = &(pkt->u.csa_notif);
1143 IWL_DEBUG_11H("CSA notif: channel %d, status %d\n", 1143 IWL_DEBUG_11H(priv, "CSA notif: channel %d, status %d\n",
1144 le16_to_cpu(csa->channel), le32_to_cpu(csa->status)); 1144 le16_to_cpu(csa->channel), le32_to_cpu(csa->status));
1145 rxon->channel = csa->channel; 1145 rxon->channel = csa->channel;
1146 priv->staging_rxon.channel = csa->channel; 1146 priv->staging_rxon.channel = csa->channel;
@@ -1152,19 +1152,19 @@ static void iwl_print_rx_config_cmd(struct iwl_priv *priv)
1152{ 1152{
1153 struct iwl_rxon_cmd *rxon = &priv->staging_rxon; 1153 struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
1154 1154
1155 IWL_DEBUG_RADIO("RX CONFIG:\n"); 1155 IWL_DEBUG_RADIO(priv, "RX CONFIG:\n");
1156 iwl_print_hex_dump(priv, IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 1156 iwl_print_hex_dump(priv, IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
1157 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 1157 IWL_DEBUG_RADIO(priv, "u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
1158 IWL_DEBUG_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags)); 1158 IWL_DEBUG_RADIO(priv, "u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags));
1159 IWL_DEBUG_RADIO("u32 filter_flags: 0x%08x\n", 1159 IWL_DEBUG_RADIO(priv, "u32 filter_flags: 0x%08x\n",
1160 le32_to_cpu(rxon->filter_flags)); 1160 le32_to_cpu(rxon->filter_flags));
1161 IWL_DEBUG_RADIO("u8 dev_type: 0x%x\n", rxon->dev_type); 1161 IWL_DEBUG_RADIO(priv, "u8 dev_type: 0x%x\n", rxon->dev_type);
1162 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 1162 IWL_DEBUG_RADIO(priv, "u8 ofdm_basic_rates: 0x%02x\n",
1163 rxon->ofdm_basic_rates); 1163 rxon->ofdm_basic_rates);
1164 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 1164 IWL_DEBUG_RADIO(priv, "u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
1165 IWL_DEBUG_RADIO("u8[6] node_addr: %pM\n", rxon->node_addr); 1165 IWL_DEBUG_RADIO(priv, "u8[6] node_addr: %pM\n", rxon->node_addr);
1166 IWL_DEBUG_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr); 1166 IWL_DEBUG_RADIO(priv, "u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
1167 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 1167 IWL_DEBUG_RADIO(priv, "u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
1168} 1168}
1169#endif 1169#endif
1170 1170
@@ -1194,7 +1194,7 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
1194 clear_bit(STATUS_READY, &priv->status); 1194 clear_bit(STATUS_READY, &priv->status);
1195 1195
1196 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) { 1196 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) {
1197 IWL_DEBUG(IWL_DL_FW_ERRORS, 1197 IWL_DEBUG(priv, IWL_DL_FW_ERRORS,
1198 "Restarting adapter due to uCode error.\n"); 1198 "Restarting adapter due to uCode error.\n");
1199 1199
1200 if (iwl_is_associated(priv)) { 1200 if (iwl_is_associated(priv)) {
@@ -1216,7 +1216,7 @@ void iwl_configure_filter(struct ieee80211_hw *hw,
1216 struct iwl_priv *priv = hw->priv; 1216 struct iwl_priv *priv = hw->priv;
1217 __le32 *filter_flags = &priv->staging_rxon.filter_flags; 1217 __le32 *filter_flags = &priv->staging_rxon.filter_flags;
1218 1218
1219 IWL_DEBUG_MAC80211("Enter: changed: 0x%x, total: 0x%x\n", 1219 IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
1220 changed_flags, *total_flags); 1220 changed_flags, *total_flags);
1221 1221
1222 if (changed_flags & (FIF_OTHER_BSS | FIF_PROMISC_IN_BSS)) { 1222 if (changed_flags & (FIF_OTHER_BSS | FIF_PROMISC_IN_BSS)) {
@@ -1429,13 +1429,13 @@ void iwl_disable_interrupts(struct iwl_priv *priv)
1429 * from uCode or flow handler (Rx/Tx DMA) */ 1429 * from uCode or flow handler (Rx/Tx DMA) */
1430 iwl_write32(priv, CSR_INT, 0xffffffff); 1430 iwl_write32(priv, CSR_INT, 0xffffffff);
1431 iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); 1431 iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff);
1432 IWL_DEBUG_ISR("Disabled interrupts\n"); 1432 IWL_DEBUG_ISR(priv, "Disabled interrupts\n");
1433} 1433}
1434EXPORT_SYMBOL(iwl_disable_interrupts); 1434EXPORT_SYMBOL(iwl_disable_interrupts);
1435 1435
1436void iwl_enable_interrupts(struct iwl_priv *priv) 1436void iwl_enable_interrupts(struct iwl_priv *priv)
1437{ 1437{
1438 IWL_DEBUG_ISR("Enabling interrupts\n"); 1438 IWL_DEBUG_ISR(priv, "Enabling interrupts\n");
1439 set_bit(STATUS_INT_ENABLED, &priv->status); 1439 set_bit(STATUS_INT_ENABLED, &priv->status);
1440 iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); 1440 iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK);
1441} 1441}
@@ -1481,7 +1481,7 @@ static int iwlcore_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32
1481 u32 errcnt = 0; 1481 u32 errcnt = 0;
1482 u32 i; 1482 u32 i;
1483 1483
1484 IWL_DEBUG_INFO("ucode inst image size is %u\n", len); 1484 IWL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len);
1485 1485
1486 ret = iwl_grab_nic_access(priv); 1486 ret = iwl_grab_nic_access(priv);
1487 if (ret) 1487 if (ret)
@@ -1519,7 +1519,7 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 *image,
1519 int ret = 0; 1519 int ret = 0;
1520 u32 errcnt; 1520 u32 errcnt;
1521 1521
1522 IWL_DEBUG_INFO("ucode inst image size is %u\n", len); 1522 IWL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len);
1523 1523
1524 ret = iwl_grab_nic_access(priv); 1524 ret = iwl_grab_nic_access(priv);
1525 if (ret) 1525 if (ret)
@@ -1548,8 +1548,8 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 *image,
1548 iwl_release_nic_access(priv); 1548 iwl_release_nic_access(priv);
1549 1549
1550 if (!errcnt) 1550 if (!errcnt)
1551 IWL_DEBUG_INFO 1551 IWL_DEBUG_INFO(priv,
1552 ("ucode image in INSTRUCTION memory is good\n"); 1552 "ucode image in INSTRUCTION memory is good\n");
1553 1553
1554 return ret; 1554 return ret;
1555} 1555}
@@ -1569,7 +1569,7 @@ int iwl_verify_ucode(struct iwl_priv *priv)
1569 len = priv->ucode_boot.len; 1569 len = priv->ucode_boot.len;
1570 ret = iwlcore_verify_inst_sparse(priv, image, len); 1570 ret = iwlcore_verify_inst_sparse(priv, image, len);
1571 if (!ret) { 1571 if (!ret) {
1572 IWL_DEBUG_INFO("Bootstrap uCode is good in inst SRAM\n"); 1572 IWL_DEBUG_INFO(priv, "Bootstrap uCode is good in inst SRAM\n");
1573 return 0; 1573 return 0;
1574 } 1574 }
1575 1575
@@ -1578,7 +1578,7 @@ int iwl_verify_ucode(struct iwl_priv *priv)
1578 len = priv->ucode_init.len; 1578 len = priv->ucode_init.len;
1579 ret = iwlcore_verify_inst_sparse(priv, image, len); 1579 ret = iwlcore_verify_inst_sparse(priv, image, len);
1580 if (!ret) { 1580 if (!ret) {
1581 IWL_DEBUG_INFO("Initialize uCode is good in inst SRAM\n"); 1581 IWL_DEBUG_INFO(priv, "Initialize uCode is good in inst SRAM\n");
1582 return 0; 1582 return 0;
1583 } 1583 }
1584 1584
@@ -1587,7 +1587,7 @@ int iwl_verify_ucode(struct iwl_priv *priv)
1587 len = priv->ucode_code.len; 1587 len = priv->ucode_code.len;
1588 ret = iwlcore_verify_inst_sparse(priv, image, len); 1588 ret = iwlcore_verify_inst_sparse(priv, image, len);
1589 if (!ret) { 1589 if (!ret) {
1590 IWL_DEBUG_INFO("Runtime uCode is good in inst SRAM\n"); 1590 IWL_DEBUG_INFO(priv, "Runtime uCode is good in inst SRAM\n");
1591 return 0; 1591 return 0;
1592 } 1592 }
1593 1593
@@ -1827,7 +1827,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
1827 if (ret) 1827 if (ret)
1828 IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n"); 1828 IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n");
1829 else 1829 else
1830 IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded, " 1830 IWL_DEBUG_INFO(priv, "REPLY_CT_KILL_CONFIG_CMD succeeded, "
1831 "critical temperature is %d\n", 1831 "critical temperature is %d\n",
1832 cmd.critical_temperature_R); 1832 cmd.critical_temperature_R);
1833} 1833}
@@ -1864,7 +1864,7 @@ void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv)
1864 if (test_bit(STATUS_RF_KILL_SW, &priv->status)) 1864 if (test_bit(STATUS_RF_KILL_SW, &priv->status))
1865 return; 1865 return;
1866 1866
1867 IWL_DEBUG_RF_KILL("Manual SW RF KILL set to: RADIO OFF\n"); 1867 IWL_DEBUG_RF_KILL(priv, "Manual SW RF KILL set to: RADIO OFF\n");
1868 1868
1869 iwl_scan_cancel(priv); 1869 iwl_scan_cancel(priv);
1870 /* FIXME: This is a workaround for AP */ 1870 /* FIXME: This is a workaround for AP */
@@ -1893,7 +1893,7 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
1893 if (!test_bit(STATUS_RF_KILL_SW, &priv->status)) 1893 if (!test_bit(STATUS_RF_KILL_SW, &priv->status))
1894 return 0; 1894 return 0;
1895 1895
1896 IWL_DEBUG_RF_KILL("Manual SW RF KILL set to: RADIO ON\n"); 1896 IWL_DEBUG_RF_KILL(priv, "Manual SW RF KILL set to: RADIO ON\n");
1897 1897
1898 spin_lock_irqsave(&priv->lock, flags); 1898 spin_lock_irqsave(&priv->lock, flags);
1899 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); 1899 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
@@ -1918,7 +1918,7 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
1918 spin_unlock_irqrestore(&priv->lock, flags); 1918 spin_unlock_irqrestore(&priv->lock, flags);
1919 1919
1920 if (test_bit(STATUS_RF_KILL_HW, &priv->status)) { 1920 if (test_bit(STATUS_RF_KILL_HW, &priv->status)) {
1921 IWL_DEBUG_RF_KILL("Can not turn radio back on - " 1921 IWL_DEBUG_RF_KILL(priv, "Can not turn radio back on - "
1922 "disabled by HW switch\n"); 1922 "disabled by HW switch\n");
1923 return 0; 1923 return 0;
1924 } 1924 }
@@ -1953,7 +1953,7 @@ void iwl_bg_rf_kill(struct work_struct *work)
1953 mutex_lock(&priv->mutex); 1953 mutex_lock(&priv->mutex);
1954 1954
1955 if (!iwl_is_rfkill(priv)) { 1955 if (!iwl_is_rfkill(priv)) {
1956 IWL_DEBUG(IWL_DL_RF_KILL, 1956 IWL_DEBUG_RF_KILL(priv,
1957 "HW and/or SW RF Kill no longer active, restarting " 1957 "HW and/or SW RF Kill no longer active, restarting "
1958 "device\n"); 1958 "device\n");
1959 if (!test_bit(STATUS_EXIT_PENDING, &priv->status) && 1959 if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
@@ -1965,7 +1965,7 @@ void iwl_bg_rf_kill(struct work_struct *work)
1965 ieee80211_stop_queues(priv->hw); 1965 ieee80211_stop_queues(priv->hw);
1966 1966
1967 if (!test_bit(STATUS_RF_KILL_HW, &priv->status)) 1967 if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
1968 IWL_DEBUG_RF_KILL("Can not turn radio back on - " 1968 IWL_DEBUG_RF_KILL(priv, "Can not turn radio back on - "
1969 "disabled by SW switch\n"); 1969 "disabled by SW switch\n");
1970 else 1970 else
1971 IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n" 1971 IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"