aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorWinkler, Tomas <tomas.winkler@intel.com>2008-12-18 21:37:32 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:16 -0500
commit39aadf8c29ad959e823efca15381bea9d0770b1e (patch)
tree302344b24ccacf38a4af759ec9c809d3b83110a0 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent978785a3892b34448446e8c8a17f48454f1bdd6a (diff)
iwlwifi: replace IWL_WARNING with IWL_WARN
IWL_WARN doesn't use hidden priv pointer. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c73
1 files changed, 37 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 14864cc6775c..26f53647bf36 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -781,59 +781,59 @@ static int iwl3945_check_rxon_cmd(struct iwl_priv *priv)
781 (RXON_FLG_TGJ_NARROW_BAND_MSK | 781 (RXON_FLG_TGJ_NARROW_BAND_MSK |
782 RXON_FLG_RADAR_DETECT_MSK)); 782 RXON_FLG_RADAR_DETECT_MSK));
783 if (error) 783 if (error)
784 IWL_WARNING("check 24G fields %d | %d\n", 784 IWL_WARN(priv, "check 24G fields %d | %d\n",
785 counter++, error); 785 counter++, error);
786 } else { 786 } else {
787 error |= (rxon->flags & RXON_FLG_SHORT_SLOT_MSK) ? 787 error |= (rxon->flags & RXON_FLG_SHORT_SLOT_MSK) ?
788 0 : le32_to_cpu(RXON_FLG_SHORT_SLOT_MSK); 788 0 : le32_to_cpu(RXON_FLG_SHORT_SLOT_MSK);
789 if (error) 789 if (error)
790 IWL_WARNING("check 52 fields %d | %d\n", 790 IWL_WARN(priv, "check 52 fields %d | %d\n",
791 counter++, error); 791 counter++, error);
792 error |= le32_to_cpu(rxon->flags & RXON_FLG_CCK_MSK); 792 error |= le32_to_cpu(rxon->flags & RXON_FLG_CCK_MSK);
793 if (error) 793 if (error)
794 IWL_WARNING("check 52 CCK %d | %d\n", 794 IWL_WARN(priv, "check 52 CCK %d | %d\n",
795 counter++, error); 795 counter++, error);
796 } 796 }
797 error |= (rxon->node_addr[0] | rxon->bssid_addr[0]) & 0x1; 797 error |= (rxon->node_addr[0] | rxon->bssid_addr[0]) & 0x1;
798 if (error) 798 if (error)
799 IWL_WARNING("check mac addr %d | %d\n", counter++, error); 799 IWL_WARN(priv, "check mac addr %d | %d\n", counter++, error);
800 800
801 /* make sure basic rates 6Mbps and 1Mbps are supported */ 801 /* make sure basic rates 6Mbps and 1Mbps are supported */
802 error |= (((rxon->ofdm_basic_rates & IWL_RATE_6M_MASK) == 0) && 802 error |= (((rxon->ofdm_basic_rates & IWL_RATE_6M_MASK) == 0) &&
803 ((rxon->cck_basic_rates & IWL_RATE_1M_MASK) == 0)); 803 ((rxon->cck_basic_rates & IWL_RATE_1M_MASK) == 0));
804 if (error) 804 if (error)
805 IWL_WARNING("check basic rate %d | %d\n", counter++, error); 805 IWL_WARN(priv, "check basic rate %d | %d\n", counter++, error);
806 806
807 error |= (le16_to_cpu(rxon->assoc_id) > 2007); 807 error |= (le16_to_cpu(rxon->assoc_id) > 2007);
808 if (error) 808 if (error)
809 IWL_WARNING("check assoc id %d | %d\n", counter++, error); 809 IWL_WARN(priv, "check assoc id %d | %d\n", counter++, error);
810 810
811 error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK)) 811 error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK))
812 == (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK)); 812 == (RXON_FLG_CCK_MSK | RXON_FLG_SHORT_SLOT_MSK));
813 if (error) 813 if (error)
814 IWL_WARNING("check CCK and short slot %d | %d\n", 814 IWL_WARN(priv, "check CCK and short slot %d | %d\n",
815 counter++, error); 815 counter++, error);
816 816
817 error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK)) 817 error |= ((rxon->flags & (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK))
818 == (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK)); 818 == (RXON_FLG_CCK_MSK | RXON_FLG_AUTO_DETECT_MSK));
819 if (error) 819 if (error)
820 IWL_WARNING("check CCK & auto detect %d | %d\n", 820 IWL_WARN(priv, "check CCK & auto detect %d | %d\n",
821 counter++, error); 821 counter++, error);
822 822
823 error |= ((rxon->flags & (RXON_FLG_AUTO_DETECT_MSK | 823 error |= ((rxon->flags & (RXON_FLG_AUTO_DETECT_MSK |
824 RXON_FLG_TGG_PROTECT_MSK)) == RXON_FLG_TGG_PROTECT_MSK); 824 RXON_FLG_TGG_PROTECT_MSK)) == RXON_FLG_TGG_PROTECT_MSK);
825 if (error) 825 if (error)
826 IWL_WARNING("check TGG and auto detect %d | %d\n", 826 IWL_WARN(priv, "check TGG and auto detect %d | %d\n",
827 counter++, error); 827 counter++, error);
828 828
829 if ((rxon->flags & RXON_FLG_DIS_DIV_MSK)) 829 if ((rxon->flags & RXON_FLG_DIS_DIV_MSK))
830 error |= ((rxon->flags & (RXON_FLG_ANT_B_MSK | 830 error |= ((rxon->flags & (RXON_FLG_ANT_B_MSK |
831 RXON_FLG_ANT_A_MSK)) == 0); 831 RXON_FLG_ANT_A_MSK)) == 0);
832 if (error) 832 if (error)
833 IWL_WARNING("check antenna %d %d\n", counter++, error); 833 IWL_WARN(priv, "check antenna %d %d\n", counter++, error);
834 834
835 if (error) 835 if (error)
836 IWL_WARNING("Tuning to channel %d\n", 836 IWL_WARN(priv, "Tuning to channel %d\n",
837 le16_to_cpu(rxon->channel)); 837 le16_to_cpu(rxon->channel));
838 838
839 if (error) { 839 if (error) {
@@ -1207,7 +1207,7 @@ int iwl3945_send_add_station(struct iwl_priv *priv,
1207 break; 1207 break;
1208 default: 1208 default:
1209 rc = -EIO; 1209 rc = -EIO;
1210 IWL_WARNING("REPLY_ADD_STA failed\n"); 1210 IWL_WARN(priv, "REPLY_ADD_STA failed\n");
1211 break; 1211 break;
1212 } 1212 }
1213 } 1213 }
@@ -1289,7 +1289,7 @@ static void iwl3945_clear_free_frames(struct iwl_priv *priv)
1289 } 1289 }
1290 1290
1291 if (priv->frames_count) { 1291 if (priv->frames_count) {
1292 IWL_WARNING("%d frames still in use. Did we lose one?\n", 1292 IWL_WARN(priv, "%d frames still in use. Did we lose one?\n",
1293 priv->frames_count); 1293 priv->frames_count);
1294 priv->frames_count = 0; 1294 priv->frames_count = 0;
1295 } 1295 }
@@ -2187,7 +2187,7 @@ static int iwl3945_set_mode(struct iwl_priv *priv, int mode)
2187 2187
2188 cancel_delayed_work(&priv->scan_check); 2188 cancel_delayed_work(&priv->scan_check);
2189 if (iwl3945_scan_cancel_timeout(priv, 100)) { 2189 if (iwl3945_scan_cancel_timeout(priv, 100)) {
2190 IWL_WARNING("Aborted scan still in progress after 100ms\n"); 2190 IWL_WARN(priv, "Aborted scan still in progress after 100ms\n");
2191 IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); 2191 IWL_DEBUG_MAC80211("leaving - scan abort failed.\n");
2192 return -EAGAIN; 2192 return -EAGAIN;
2193 } 2193 }
@@ -2363,7 +2363,8 @@ static int iwl3945_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2363 return priv->hw_params.bcast_sta_id; 2363 return priv->hw_params.bcast_sta_id;
2364 2364
2365 default: 2365 default:
2366 IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); 2366 IWL_WARN(priv, "Unknown mode of operation: %d\n",
2367 priv->iw_mode);
2367 return priv->hw_params.bcast_sta_id; 2368 return priv->hw_params.bcast_sta_id;
2368 } 2369 }
2369} 2370}
@@ -2895,7 +2896,7 @@ static void iwl3945_rx_reply_alive(struct iwl_priv *priv,
2895 queue_delayed_work(priv->workqueue, pwork, 2896 queue_delayed_work(priv->workqueue, pwork,
2896 msecs_to_jiffies(5)); 2897 msecs_to_jiffies(5));
2897 else 2898 else
2898 IWL_WARNING("uCode did not respond OK.\n"); 2899 IWL_WARN(priv, "uCode did not respond OK.\n");
2899} 2900}
2900 2901
2901static void iwl3945_rx_reply_add_sta(struct iwl_priv *priv, 2902static void iwl3945_rx_reply_add_sta(struct iwl_priv *priv,
@@ -3789,7 +3790,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
3789 if (rxb && rxb->skb) 3790 if (rxb && rxb->skb)
3790 iwl3945_tx_cmd_complete(priv, rxb); 3791 iwl3945_tx_cmd_complete(priv, rxb);
3791 else 3792 else
3792 IWL_WARNING("Claim null rxb?\n"); 3793 IWL_WARN(priv, "Claim null rxb?\n");
3793 } 3794 }
3794 3795
3795 /* For now we just don't re-use anything. We can tweak this 3796 /* For now we just don't re-use anything. We can tweak this
@@ -3960,7 +3961,7 @@ static void iwl3945_dump_nic_error_log(struct iwl_priv *priv)
3960 3961
3961 rc = iwl_grab_nic_access(priv); 3962 rc = iwl_grab_nic_access(priv);
3962 if (rc) { 3963 if (rc) {
3963 IWL_WARNING("Can not read from adapter at this time.\n"); 3964 IWL_WARN(priv, "Can not read from adapter at this time.\n");
3964 return; 3965 return;
3965 } 3966 }
3966 3967
@@ -4063,7 +4064,7 @@ static void iwl3945_dump_nic_event_log(struct iwl_priv *priv)
4063 4064
4064 rc = iwl_grab_nic_access(priv); 4065 rc = iwl_grab_nic_access(priv);
4065 if (rc) { 4066 if (rc) {
4066 IWL_WARNING("Can not read from adapter at this time.\n"); 4067 IWL_WARN(priv, "Can not read from adapter at this time.\n");
4067 return; 4068 return;
4068 } 4069 }
4069 4070
@@ -4270,9 +4271,9 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv)
4270 IWL_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled); 4271 IWL_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled);
4271 4272
4272 if (inta & ~CSR_INI_SET_MASK) { 4273 if (inta & ~CSR_INI_SET_MASK) {
4273 IWL_WARNING("Disabled INTA bits 0x%08x were pending\n", 4274 IWL_WARN(priv, "Disabled INTA bits 0x%08x were pending\n",
4274 inta & ~CSR_INI_SET_MASK); 4275 inta & ~CSR_INI_SET_MASK);
4275 IWL_WARNING(" with FH_INT = 0x%08x\n", inta_fh); 4276 IWL_WARN(priv, " with FH_INT = 0x%08x\n", inta_fh);
4276 } 4277 }
4277 4278
4278 /* Re-enable all interrupts */ 4279 /* Re-enable all interrupts */
@@ -4323,7 +4324,7 @@ static irqreturn_t iwl3945_isr(int irq, void *data)
4323 4324
4324 if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) { 4325 if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) {
4325 /* Hardware disappeared */ 4326 /* Hardware disappeared */
4326 IWL_WARNING("HARDWARE GONE?? INTA == 0x%08x\n", inta); 4327 IWL_WARN(priv, "HARDWARE GONE?? INTA == 0x%08x\n", inta);
4327 goto unplugged; 4328 goto unplugged;
4328 } 4329 }
4329 4330
@@ -4490,7 +4491,7 @@ static int iwl3945_init_channel_map(struct iwl_priv *priv)
4490 } 4491 }
4491 4492
4492 if (priv->eeprom39.version < 0x2f) { 4493 if (priv->eeprom39.version < 0x2f) {
4493 IWL_WARNING("Unsupported EEPROM version: 0x%04X\n", 4494 IWL_WARN(priv, "Unsupported EEPROM version: 0x%04X\n",
4494 priv->eeprom39.version); 4495 priv->eeprom39.version);
4495 return -EINVAL; 4496 return -EINVAL;
4496 } 4497 }
@@ -5583,7 +5584,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
5583 5584
5584 rc = iwl_grab_nic_access(priv); 5585 rc = iwl_grab_nic_access(priv);
5585 if (rc) { 5586 if (rc) {
5586 IWL_WARNING("Can not read RFKILL status from adapter\n"); 5587 IWL_WARN(priv, "Can not read RFKILL status from adapter\n");
5587 return; 5588 return;
5588 } 5589 }
5589 5590
@@ -5783,12 +5784,12 @@ static int __iwl3945_up(struct iwl_priv *priv)
5783 int rc, i; 5784 int rc, i;
5784 5785
5785 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { 5786 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
5786 IWL_WARNING("Exit pending; will not bring the NIC up\n"); 5787 IWL_WARN(priv, "Exit pending; will not bring the NIC up\n");
5787 return -EIO; 5788 return -EIO;
5788 } 5789 }
5789 5790
5790 if (test_bit(STATUS_RF_KILL_SW, &priv->status)) { 5791 if (test_bit(STATUS_RF_KILL_SW, &priv->status)) {
5791 IWL_WARNING("Radio disabled by SW RF kill (module " 5792 IWL_WARN(priv, "Radio disabled by SW RF kill (module "
5792 "parameter)\n"); 5793 "parameter)\n");
5793 return -ENODEV; 5794 return -ENODEV;
5794 } 5795 }
@@ -5805,7 +5806,7 @@ static int __iwl3945_up(struct iwl_priv *priv)
5805 else { 5806 else {
5806 set_bit(STATUS_RF_KILL_HW, &priv->status); 5807 set_bit(STATUS_RF_KILL_HW, &priv->status);
5807 if (!test_bit(STATUS_IN_SUSPEND, &priv->status)) { 5808 if (!test_bit(STATUS_IN_SUSPEND, &priv->status)) {
5808 IWL_WARNING("Radio disabled by HW RF Kill switch\n"); 5809 IWL_WARN(priv, "Radio disabled by HW RF Kill switch\n");
5809 return -ENODEV; 5810 return -ENODEV;
5810 } 5811 }
5811 } 5812 }
@@ -5929,7 +5930,7 @@ static void iwl3945_bg_rf_kill(struct work_struct *work)
5929 IWL_DEBUG_RF_KILL("Can not turn radio back on - " 5930 IWL_DEBUG_RF_KILL("Can not turn radio back on - "
5930 "disabled by SW switch\n"); 5931 "disabled by SW switch\n");
5931 else 5932 else
5932 IWL_WARNING("Radio Frequency Kill Switch is On:\n" 5933 IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
5933 "Kill switch must be turned off for " 5934 "Kill switch must be turned off for "
5934 "wireless networking to work.\n"); 5935 "wireless networking to work.\n");
5935 } 5936 }
@@ -5982,7 +5983,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
5982 mutex_lock(&priv->mutex); 5983 mutex_lock(&priv->mutex);
5983 5984
5984 if (!iwl3945_is_ready(priv)) { 5985 if (!iwl3945_is_ready(priv)) {
5985 IWL_WARNING("request scan called when driver not ready.\n"); 5986 IWL_WARN(priv, "request scan called when driver not ready.\n");
5986 goto done; 5987 goto done;
5987 } 5988 }
5988 5989
@@ -6107,7 +6108,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6107 scan->good_CRC_th = IWL_GOOD_CRC_TH; 6108 scan->good_CRC_th = IWL_GOOD_CRC_TH;
6108 band = IEEE80211_BAND_5GHZ; 6109 band = IEEE80211_BAND_5GHZ;
6109 } else { 6110 } else {
6110 IWL_WARNING("Invalid scan band count\n"); 6111 IWL_WARN(priv, "Invalid scan band count\n");
6111 goto done; 6112 goto done;
6112 } 6113 }
6113 6114
@@ -6228,7 +6229,7 @@ static void iwl3945_post_associate(struct iwl_priv *priv)
6228 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON_TIMING, 6229 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON_TIMING,
6229 sizeof(priv->rxon_timing), &priv->rxon_timing); 6230 sizeof(priv->rxon_timing), &priv->rxon_timing);
6230 if (rc) 6231 if (rc)
6231 IWL_WARNING("REPLY_RXON_TIMING failed - " 6232 IWL_WARN(priv, "REPLY_RXON_TIMING failed - "
6232 "Attempting to continue.\n"); 6233 "Attempting to continue.\n");
6233 6234
6234 priv->staging39_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 6235 priv->staging39_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
@@ -6608,7 +6609,7 @@ static void iwl3945_config_ap(struct iwl_priv *priv)
6608 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON_TIMING, 6609 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON_TIMING,
6609 sizeof(priv->rxon_timing), &priv->rxon_timing); 6610 sizeof(priv->rxon_timing), &priv->rxon_timing);
6610 if (rc) 6611 if (rc)
6611 IWL_WARNING("REPLY_RXON_TIMING failed - " 6612 IWL_WARN(priv, "REPLY_RXON_TIMING failed - "
6612 "Attempting to continue.\n"); 6613 "Attempting to continue.\n");
6613 6614
6614 /* FIXME: what should be the assoc_id for AP? */ 6615 /* FIXME: what should be the assoc_id for AP? */
@@ -6709,7 +6710,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6709 /* If there is currently a HW scan going on in the background 6710 /* If there is currently a HW scan going on in the background
6710 * then we need to cancel it else the RXON below will fail. */ 6711 * then we need to cancel it else the RXON below will fail. */
6711 if (iwl3945_scan_cancel_timeout(priv, 100)) { 6712 if (iwl3945_scan_cancel_timeout(priv, 100)) {
6712 IWL_WARNING("Aborted scan still in progress " 6713 IWL_WARN(priv, "Aborted scan still in progress "
6713 "after 100ms\n"); 6714 "after 100ms\n");
6714 IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); 6715 IWL_DEBUG_MAC80211("leaving - scan abort failed.\n");
6715 mutex_unlock(&priv->mutex); 6716 mutex_unlock(&priv->mutex);
@@ -7260,7 +7261,7 @@ static ssize_t store_flags(struct device *d,
7260 if (le32_to_cpu(priv->staging39_rxon.flags) != flags) { 7261 if (le32_to_cpu(priv->staging39_rxon.flags) != flags) {
7261 /* Cancel any currently running scans... */ 7262 /* Cancel any currently running scans... */
7262 if (iwl3945_scan_cancel_timeout(priv, 100)) 7263 if (iwl3945_scan_cancel_timeout(priv, 100))
7263 IWL_WARNING("Could not cancel scan.\n"); 7264 IWL_WARN(priv, "Could not cancel scan.\n");
7264 else { 7265 else {
7265 IWL_DEBUG_INFO("Committing rxon.flags = 0x%04X\n", 7266 IWL_DEBUG_INFO("Committing rxon.flags = 0x%04X\n",
7266 flags); 7267 flags);
@@ -7295,7 +7296,7 @@ static ssize_t store_filter_flags(struct device *d,
7295 if (le32_to_cpu(priv->staging39_rxon.filter_flags) != filter_flags) { 7296 if (le32_to_cpu(priv->staging39_rxon.filter_flags) != filter_flags) {
7296 /* Cancel any currently running scans... */ 7297 /* Cancel any currently running scans... */
7297 if (iwl3945_scan_cancel_timeout(priv, 100)) 7298 if (iwl3945_scan_cancel_timeout(priv, 100))
7298 IWL_WARNING("Could not cancel scan.\n"); 7299 IWL_WARN(priv, "Could not cancel scan.\n");
7299 else { 7300 else {
7300 IWL_DEBUG_INFO("Committing rxon.filter_flags = " 7301 IWL_DEBUG_INFO("Committing rxon.filter_flags = "
7301 "0x%04X\n", filter_flags); 7302 "0x%04X\n", filter_flags);
@@ -8104,7 +8105,7 @@ static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
8104 iwl3945_radio_kill_sw(priv, 1); 8105 iwl3945_radio_kill_sw(priv, 1);
8105 break; 8106 break;
8106 default: 8107 default:
8107 IWL_WARNING("we received unexpected RFKILL state %d\n", state); 8108 IWL_WARN(priv, "received unexpected RFKILL state %d\n", state);
8108 break; 8109 break;
8109 } 8110 }
8110out_unlock: 8111out_unlock: