diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-12-18 21:37:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:15 -0500 |
commit | 978785a3892b34448446e8c8a17f48454f1bdd6a (patch) | |
tree | 76d50b34bc166d9400c99335c533a4681ff8887a /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | 146846aed534aa0eb1fb0a8e6c0394190e5c1ad7 (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/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 24e906f75ea9..6e8ab2e5f3d0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1634,16 +1634,16 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1634 | goto err_release; | 1634 | goto err_release; |
1635 | } | 1635 | } |
1636 | if (api_ver != api_max) | 1636 | if (api_ver != api_max) |
1637 | IWL_ERROR("Firmware has old API version. Expected v%u, " | 1637 | IWL_ERR(priv, "Firmware has old API version. Expected v%u, " |
1638 | "got v%u. New firmware can be obtained " | 1638 | "got v%u. New firmware can be obtained " |
1639 | "from http://www.intellinuxwireless.org.\n", | 1639 | "from http://www.intellinuxwireless.org.\n", |
1640 | api_max, api_ver); | 1640 | api_max, api_ver); |
1641 | 1641 | ||
1642 | printk(KERN_INFO DRV_NAME " loaded firmware version %u.%u.%u.%u\n", | 1642 | IWL_INFO(priv, "loaded firmware version %u.%u.%u.%u\n", |
1643 | IWL_UCODE_MAJOR(priv->ucode_ver), | 1643 | IWL_UCODE_MAJOR(priv->ucode_ver), |
1644 | IWL_UCODE_MINOR(priv->ucode_ver), | 1644 | IWL_UCODE_MINOR(priv->ucode_ver), |
1645 | IWL_UCODE_API(priv->ucode_ver), | 1645 | IWL_UCODE_API(priv->ucode_ver), |
1646 | IWL_UCODE_SERIAL(priv->ucode_ver)); | 1646 | IWL_UCODE_SERIAL(priv->ucode_ver)); |
1647 | 1647 | ||
1648 | IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n", | 1648 | IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n", |
1649 | priv->ucode_ver); | 1649 | priv->ucode_ver); |
@@ -3355,8 +3355,7 @@ static ssize_t store_debug_level(struct device *d, | |||
3355 | 3355 | ||
3356 | ret = strict_strtoul(buf, 0, &val); | 3356 | ret = strict_strtoul(buf, 0, &val); |
3357 | if (ret) | 3357 | if (ret) |
3358 | printk(KERN_INFO DRV_NAME | 3358 | IWL_ERR(priv, "%s is not in hex or decimal form.\n", buf); |
3359 | ": %s is not in hex or decimal form.\n", buf); | ||
3360 | else | 3359 | else |
3361 | priv->debug_level = val; | 3360 | priv->debug_level = val; |
3362 | 3361 | ||
@@ -3435,8 +3434,7 @@ static ssize_t store_tx_power(struct device *d, | |||
3435 | 3434 | ||
3436 | ret = strict_strtoul(buf, 10, &val); | 3435 | ret = strict_strtoul(buf, 10, &val); |
3437 | if (ret) | 3436 | if (ret) |
3438 | printk(KERN_INFO DRV_NAME | 3437 | IWL_INFO(priv, "%s is not in decimal form.\n", buf); |
3439 | ": %s is not in decimal form.\n", buf); | ||
3440 | else | 3438 | else |
3441 | iwl_set_tx_power(priv, val, false); | 3439 | iwl_set_tx_power(priv, val, false); |
3442 | 3440 | ||
@@ -3775,8 +3773,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3775 | err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); | 3773 | err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); |
3776 | /* both attempts failed: */ | 3774 | /* both attempts failed: */ |
3777 | if (err) { | 3775 | if (err) { |
3778 | printk(KERN_WARNING "%s: No suitable DMA available.\n", | 3776 | IWL_WARN(priv, "No suitable DMA available.\n"); |
3779 | DRV_NAME); | ||
3780 | goto out_pci_disable_device; | 3777 | goto out_pci_disable_device; |
3781 | } | 3778 | } |
3782 | } | 3779 | } |
@@ -3802,8 +3799,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3802 | IWL_DEBUG_INFO("pci_resource_base = %p\n", priv->hw_base); | 3799 | IWL_DEBUG_INFO("pci_resource_base = %p\n", priv->hw_base); |
3803 | 3800 | ||
3804 | iwl_hw_detect(priv); | 3801 | iwl_hw_detect(priv); |
3805 | printk(KERN_INFO DRV_NAME | 3802 | IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s REV=0x%X\n", |
3806 | ": Detected Intel Wireless WiFi Link %s REV=0x%X\n", | ||
3807 | priv->cfg->name, priv->hw_rev); | 3803 | priv->cfg->name, priv->hw_rev); |
3808 | 3804 | ||
3809 | /* We disable the RETRY_TIMEOUT register (0x41) to keep | 3805 | /* We disable the RETRY_TIMEOUT register (0x41) to keep |