aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-12-18 21:37:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:15 -0500
commit978785a3892b34448446e8c8a17f48454f1bdd6a (patch)
tree76d50b34bc166d9400c99335c533a4681ff8887a /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent146846aed534aa0eb1fb0a8e6c0394190e5c1ad7 (diff)
iwlwifi: clean up printing
Use IWL_ macros where possible to unify debug output usage. Define new unconditional printouts IWL_ERR, IWL_WARN, IWL_INFO, and IWL_CRIT which don'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.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 6bbc887449ca..14864cc6775c 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2239,7 +2239,7 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
2239 break; 2239 break;
2240 2240
2241 default: 2241 default:
2242 printk(KERN_ERR "Unknown encode alg %d\n", keyinfo->alg); 2242 IWL_ERR(priv, "Unknown encode alg %d\n", keyinfo->alg);
2243 break; 2243 break;
2244 } 2244 }
2245} 2245}
@@ -3504,8 +3504,7 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv)
3504 alloc_skb(IWL_RX_BUF_SIZE, __GFP_NOWARN | GFP_ATOMIC); 3504 alloc_skb(IWL_RX_BUF_SIZE, __GFP_NOWARN | GFP_ATOMIC);
3505 if (!rxb->skb) { 3505 if (!rxb->skb) {
3506 if (net_ratelimit()) 3506 if (net_ratelimit())
3507 printk(KERN_CRIT DRV_NAME 3507 IWL_CRIT(priv, ": Can not allocate SKB buffers\n");
3508 ": Can not allocate SKB buffers\n");
3509 /* We don't reschedule replenish work here -- we will 3508 /* We don't reschedule replenish work here -- we will
3510 * call the restock method and if it still needs 3509 * call the restock method and if it still needs
3511 * more buffers it will schedule replenish */ 3510 * more buffers it will schedule replenish */
@@ -4874,15 +4873,13 @@ static int iwl3945_init_geos(struct iwl_priv *priv)
4874 4873
4875 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && 4874 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&
4876 priv->cfg->sku & IWL_SKU_A) { 4875 priv->cfg->sku & IWL_SKU_A) {
4877 printk(KERN_INFO DRV_NAME 4876 IWL_INFO(priv, "Incorrectly detected BG card as ABG. "
4878 ": Incorrectly detected BG card as ABG. Please send " 4877 "Please send your PCI ID 0x%04X:0x%04X to maintainer.\n",
4879 "your PCI ID 0x%04X:0x%04X to maintainer.\n", 4878 priv->pci_dev->device, priv->pci_dev->subsystem_device);
4880 priv->pci_dev->device, priv->pci_dev->subsystem_device);
4881 priv->cfg->sku &= ~IWL_SKU_A; 4879 priv->cfg->sku &= ~IWL_SKU_A;
4882 } 4880 }
4883 4881
4884 printk(KERN_INFO DRV_NAME 4882 IWL_INFO(priv, "Tunable channels: %d 802.11bg, %d 802.11a channels\n",
4885 ": Tunable channels: %d 802.11bg, %d 802.11a channels\n",
4886 priv->bands[IEEE80211_BAND_2GHZ].n_channels, 4883 priv->bands[IEEE80211_BAND_2GHZ].n_channels,
4887 priv->bands[IEEE80211_BAND_5GHZ].n_channels); 4884 priv->bands[IEEE80211_BAND_5GHZ].n_channels);
4888 4885
@@ -5299,11 +5296,12 @@ static int iwl3945_read_ucode(struct iwl_priv *priv)
5299 "from http://www.intellinuxwireless.org.\n", 5296 "from http://www.intellinuxwireless.org.\n",
5300 api_max, api_ver); 5297 api_max, api_ver);
5301 5298
5302 printk(KERN_INFO DRV_NAME " loaded firmware version %u.%u.%u.%u\n", 5299 IWL_INFO(priv, "loaded firmware version %u.%u.%u.%u\n",
5303 IWL_UCODE_MAJOR(priv->ucode_ver), 5300 IWL_UCODE_MAJOR(priv->ucode_ver),
5304 IWL_UCODE_MINOR(priv->ucode_ver), 5301 IWL_UCODE_MINOR(priv->ucode_ver),
5305 IWL_UCODE_API(priv->ucode_ver), 5302 IWL_UCODE_API(priv->ucode_ver),
5306 IWL_UCODE_SERIAL(priv->ucode_ver)); 5303 IWL_UCODE_SERIAL(priv->ucode_ver));
5304
5307 IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n", 5305 IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n",
5308 priv->ucode_ver); 5306 priv->ucode_ver);
5309 IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", inst_size); 5307 IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", inst_size);
@@ -7192,8 +7190,7 @@ static ssize_t store_debug_level(struct device *d,
7192 7190
7193 ret = strict_strtoul(buf, 0, &val); 7191 ret = strict_strtoul(buf, 0, &val);
7194 if (ret) 7192 if (ret)
7195 printk(KERN_INFO DRV_NAME 7193 IWL_INFO(priv, "%s is not in hex or decimal form.\n", buf);
7196 ": %s is not in hex or decimal form.\n", buf);
7197 else 7194 else
7198 priv->debug_level = val; 7195 priv->debug_level = val;
7199 7196
@@ -7235,8 +7232,7 @@ static ssize_t store_tx_power(struct device *d,
7235 7232
7236 val = simple_strtoul(p, &p, 10); 7233 val = simple_strtoul(p, &p, 10);
7237 if (p == buf) 7234 if (p == buf)
7238 printk(KERN_INFO DRV_NAME 7235 IWL_INFO(priv, ": %s is not in decimal form.\n", buf);
7239 ": %s is not in decimal form.\n", buf);
7240 else 7236 else
7241 iwl3945_hw_reg_set_txpower(priv, val); 7237 iwl3945_hw_reg_set_txpower(priv, val);
7242 7238
@@ -7792,7 +7788,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7792 if (!err) 7788 if (!err)
7793 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 7789 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
7794 if (err) { 7790 if (err) {
7795 printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n"); 7791 IWL_WARN(priv, "No suitable DMA available.\n");
7796 goto out_pci_disable_device; 7792 goto out_pci_disable_device;
7797 } 7793 }
7798 7794
@@ -7900,8 +7896,8 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7900 goto out_free_channel_map; 7896 goto out_free_channel_map;
7901 } 7897 }
7902 7898
7903 printk(KERN_INFO DRV_NAME 7899 IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s\n",
7904 ": Detected Intel Wireless WiFi Link %s\n", priv->cfg->name); 7900 priv->cfg->name);
7905 7901
7906 /*********************************** 7902 /***********************************
7907 * 7. Initialize Module Parameters 7903 * 7. Initialize Module Parameters