Commit c96c31e4 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville

drivers/net/wireless: Use wiphy_<level>

Standardize the logging macros used.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e1db74fc
...@@ -373,8 +373,8 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev) ...@@ -373,8 +373,8 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
pktlen = status & RDES0_STATUS_FL; pktlen = status & RDES0_STATUS_FL;
if (pktlen > RX_PKT_SIZE) { if (pktlen > RX_PKT_SIZE) {
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "%s: frame too long (%d)\n", wiphy_debug(dev->wiphy, "frame too long (%d)\n",
wiphy_name(dev->wiphy), pktlen); pktlen);
pktlen = RX_PKT_SIZE; pktlen = RX_PKT_SIZE;
} }
...@@ -454,10 +454,10 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev) ...@@ -454,10 +454,10 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
static irqreturn_t adm8211_interrupt(int irq, void *dev_id) static irqreturn_t adm8211_interrupt(int irq, void *dev_id)
{ {
#define ADM8211_INT(x) \ #define ADM8211_INT(x) \
do { \ do { \
if (unlikely(stsr & ADM8211_STSR_ ## x)) \ if (unlikely(stsr & ADM8211_STSR_ ## x)) \
printk(KERN_DEBUG "%s: " #x "\n", wiphy_name(dev->wiphy)); \ wiphy_debug(dev->wiphy, "%s\n", #x); \
} while (0) } while (0)
struct ieee80211_hw *dev = dev_id; struct ieee80211_hw *dev = dev_id;
...@@ -570,9 +570,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data) ...@@ -570,9 +570,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data)
} }
if (timeout == 0) { if (timeout == 0) {
printk(KERN_DEBUG "%s: adm8211_write_bbp(%d,%d) failed" wiphy_debug(dev->wiphy,
" prewrite (reg=0x%08x)\n", "adm8211_write_bbp(%d,%d) failed prewrite (reg=0x%08x)\n",
wiphy_name(dev->wiphy), addr, data, reg); addr, data, reg);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -605,9 +605,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data) ...@@ -605,9 +605,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data)
if (timeout == 0) { if (timeout == 0) {
ADM8211_CSR_WRITE(BBPCTL, ADM8211_CSR_READ(BBPCTL) & ADM8211_CSR_WRITE(BBPCTL, ADM8211_CSR_READ(BBPCTL) &
~ADM8211_BBPCTL_WR); ~ADM8211_BBPCTL_WR);
printk(KERN_DEBUG "%s: adm8211_write_bbp(%d,%d) failed" wiphy_debug(dev->wiphy,
" postwrite (reg=0x%08x)\n", "adm8211_write_bbp(%d,%d) failed postwrite (reg=0x%08x)\n",
wiphy_name(dev->wiphy), addr, data, reg); addr, data, reg);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -675,8 +675,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan) ...@@ -675,8 +675,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
break; break;
default: default:
printk(KERN_DEBUG "%s: unsupported transceiver type %d\n", wiphy_debug(dev->wiphy, "unsupported transceiver type %d\n",
wiphy_name(dev->wiphy), priv->transceiver_type); priv->transceiver_type);
break; break;
} }
...@@ -732,8 +732,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan) ...@@ -732,8 +732,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
/* Nothing to do for ADMtek BBP */ /* Nothing to do for ADMtek BBP */
} else if (priv->bbp_type != ADM8211_TYPE_ADMTEK) } else if (priv->bbp_type != ADM8211_TYPE_ADMTEK)
printk(KERN_DEBUG "%s: unsupported BBP type %d\n", wiphy_debug(dev->wiphy, "unsupported bbp type %d\n",
wiphy_name(dev->wiphy), priv->bbp_type); priv->bbp_type);
ADM8211_RESTORE(); ADM8211_RESTORE();
...@@ -1027,13 +1027,12 @@ static int adm8211_hw_init_bbp(struct ieee80211_hw *dev) ...@@ -1027,13 +1027,12 @@ static int adm8211_hw_init_bbp(struct ieee80211_hw *dev)
break; break;
default: default:
printk(KERN_DEBUG "%s: unsupported transceiver %d\n", wiphy_debug(dev->wiphy, "unsupported transceiver %d\n",
wiphy_name(dev->wiphy), priv->transceiver_type); priv->transceiver_type);
break; break;
} }
} else } else
printk(KERN_DEBUG "%s: unsupported BBP %d\n", wiphy_debug(dev->wiphy, "unsupported bbp %d\n", priv->bbp_type);
wiphy_name(dev->wiphy), priv->bbp_type);
ADM8211_CSR_WRITE(SYNRF, 0); ADM8211_CSR_WRITE(SYNRF, 0);
...@@ -1509,15 +1508,13 @@ static int adm8211_start(struct ieee80211_hw *dev) ...@@ -1509,15 +1508,13 @@ static int adm8211_start(struct ieee80211_hw *dev)
/* Power up MAC and RF chips */ /* Power up MAC and RF chips */
retval = adm8211_hw_reset(dev); retval = adm8211_hw_reset(dev);
if (retval) { if (retval) {
printk(KERN_ERR "%s: hardware reset failed\n", wiphy_err(dev->wiphy, "hardware reset failed\n");
wiphy_name(dev->wiphy));
goto fail; goto fail;
} }
retval = adm8211_init_rings(dev); retval = adm8211_init_rings(dev);
if (retval) { if (retval) {
printk(KERN_ERR "%s: failed to initialize rings\n", wiphy_err(dev->wiphy, "failed to initialize rings\n");
wiphy_name(dev->wiphy));
goto fail; goto fail;
} }
...@@ -1528,8 +1525,7 @@ static int adm8211_start(struct ieee80211_hw *dev) ...@@ -1528,8 +1525,7 @@ static int adm8211_start(struct ieee80211_hw *dev)
retval = request_irq(priv->pdev->irq, adm8211_interrupt, retval = request_irq(priv->pdev->irq, adm8211_interrupt,
IRQF_SHARED, "adm8211", dev); IRQF_SHARED, "adm8211", dev);
if (retval) { if (retval) {
printk(KERN_ERR "%s: failed to register IRQ handler\n", wiphy_err(dev->wiphy, "failed to register irq handler\n");
wiphy_name(dev->wiphy));
goto fail; goto fail;
} }
...@@ -1906,9 +1902,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev, ...@@ -1906,9 +1902,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
goto err_free_eeprom; goto err_free_eeprom;
} }
printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n", wiphy_info(dev->wiphy, "hwaddr %pm, rev 0x%02x\n",
wiphy_name(dev->wiphy), dev->wiphy->perm_addr, dev->wiphy->perm_addr, pdev->revision);
pdev->revision);
return 0; return 0;
......
This diff is collapsed.
...@@ -48,8 +48,7 @@ int ar9170_write_mem(struct ar9170 *ar, const __le32 *data, size_t len) ...@@ -48,8 +48,7 @@ int ar9170_write_mem(struct ar9170 *ar, const __le32 *data, size_t len)
err = ar->exec_cmd(ar, AR9170_CMD_WMEM, len, (u8 *) data, 0, NULL); err = ar->exec_cmd(ar, AR9170_CMD_WMEM, len, (u8 *) data, 0, NULL);
if (err) if (err)
printk(KERN_DEBUG "%s: writing memory failed\n", wiphy_debug(ar->hw->wiphy, "writing memory failed\n");
wiphy_name(ar->hw->wiphy));
return err; return err;
} }
...@@ -67,8 +66,8 @@ int ar9170_write_reg(struct ar9170 *ar, const u32 reg, const u32 val) ...@@ -67,8 +66,8 @@ int ar9170_write_reg(struct ar9170 *ar, const u32 reg, const u32 val)
err = ar->exec_cmd(ar, AR9170_CMD_WREG, sizeof(buf), err = ar->exec_cmd(ar, AR9170_CMD_WREG, sizeof(buf),
(u8 *) buf, 0, NULL); (u8 *) buf, 0, NULL);
if (err) if (err)
printk(KERN_DEBUG "%s: writing reg %#x (val %#x) failed\n", wiphy_debug(ar->hw->wiphy, "writing reg %#x (val %#x) failed\n",
wiphy_name(ar->hw->wiphy), reg, val); reg, val);
return err; return err;
} }
......
...@@ -133,8 +133,8 @@ static int ar9170_register_led(struct ar9170 *ar, int i, char *name, ...@@ -133,8 +133,8 @@ static int ar9170_register_led(struct ar9170 *ar, int i, char *name,
err = led_classdev_register(wiphy_dev(ar->hw->wiphy), err = led_classdev_register(wiphy_dev(ar->hw->wiphy),
&ar->leds[i].l); &ar->leds[i].l);
if (err) if (err)
printk(KERN_ERR "%s: failed to register %s LED (%d).\n", wiphy_err(ar->hw->wiphy, "failed to register %s LED (%d).\n",
wiphy_name(ar->hw->wiphy), ar->leds[i].name, err); ar->leds[i].name, err);
else else
ar->leds[i].registered = true; ar->leds[i].registered = true;
......
This diff is collapsed.
...@@ -670,8 +670,7 @@ static int ar9170_init_rf_banks_0_7(struct ar9170 *ar, bool band5ghz) ...@@ -670,8 +670,7 @@ static int ar9170_init_rf_banks_0_7(struct ar9170 *ar, bool band5ghz)
ar9170_regwrite_finish(); ar9170_regwrite_finish();
err = ar9170_regwrite_result(); err = ar9170_regwrite_result();
if (err) if (err)
printk(KERN_ERR "%s: rf init failed\n", wiphy_err(ar->hw->wiphy, "rf init failed\n");
wiphy_name(ar->hw->wiphy));
return err; return err;
} }
...@@ -1702,9 +1701,8 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, ...@@ -1702,9 +1701,8 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
0x200 | ar->phy_heavy_clip); 0x200 | ar->phy_heavy_clip);
if (err) { if (err) {
if (ar9170_nag_limiter(ar)) if (ar9170_nag_limiter(ar))
printk(KERN_ERR "%s: failed to set " wiphy_err(ar->hw->wiphy,
"heavy clip\n", "failed to set heavy clip\n");
wiphy_name(ar->hw->wiphy));
} }
} }
......
...@@ -131,11 +131,8 @@ static int ath_ahb_probe(struct platform_device *pdev) ...@@ -131,11 +131,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
ah = sc->sc_ah; ah = sc->sc_ah;
ath9k_hw_name(ah, hw_name, sizeof(hw_name)); ath9k_hw_name(ah, hw_name, sizeof(hw_name));
printk(KERN_INFO wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
"%s: %s mem=0x%lx, irq=%d\n", hw_name, (unsigned long)mem, irq);
wiphy_name(hw->wiphy),
hw_name,
(unsigned long)mem, irq);
return 0; return 0;
......
...@@ -209,11 +209,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -209,11 +209,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
} }
ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name)); ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name));
printk(KERN_INFO wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
"%s: %s mem=0x%lx, irq=%d\n", hw_name, (unsigned long)mem, pdev->irq);
wiphy_name(hw->wiphy),
hw_name,
(unsigned long)mem, pdev->irq);
return 0; return 0;
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -4417,19 +4419,18 @@ static int __init iwl_init(void) ...@@ -4417,19 +4419,18 @@ static int __init iwl_init(void)
{ {
int ret; int ret;
printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n"); pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n"); pr_info(DRV_COPYRIGHT "\n");
ret = iwlagn_rate_control_register(); ret = iwlagn_rate_control_register();
if (ret) { if (ret) {
printk(KERN_ERR DRV_NAME pr_err("Unable to register rate control algorithm: %d\n", ret);
"Unable to register rate control algorithm: %d\n", ret);
return ret; return ret;
} }
ret = pci_register_driver(&iwl_driver); ret = pci_register_driver(&iwl_driver);
if (ret) { if (ret) {
printk(KERN_ERR DRV_NAME "Unable to initialize PCI module\n"); pr_err("Unable to initialize PCI module\n");
goto error_register; goto error_register;
} }
......
...@@ -170,7 +170,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, ...@@ -170,7 +170,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
struct ieee80211_hw *hw = struct ieee80211_hw *hw =
ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops); ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops);
if (hw == NULL) { if (hw == NULL) {
printk(KERN_ERR "%s: Can not allocate network device\n", pr_err("%s: Can not allocate network device\n",
cfg->name); cfg->name);
goto out; goto out;
} }
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -3933,7 +3935,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e ...@@ -3933,7 +3935,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
* space for this driver's private structure */ * space for this driver's private structure */
hw = iwl_alloc_all(cfg, &iwl3945_hw_ops); hw = iwl_alloc_all(cfg, &iwl3945_hw_ops);
if (hw == NULL) { if (hw == NULL) {
printk(KERN_ERR DRV_NAME "Can not allocate network device\n"); pr_err("Can not allocate network device\n");
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
...@@ -4225,19 +4227,18 @@ static int __init iwl3945_init(void) ...@@ -4225,19 +4227,18 @@ static int __init iwl3945_init(void)
{ {
int ret; int ret;
printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n"); pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n"); pr_info(DRV_COPYRIGHT "\n");
ret = iwl3945_rate_control_register(); ret = iwl3945_rate_control_register();
if (ret) { if (ret) {
printk(KERN_ERR DRV_NAME pr_err("Unable to register rate control algorithm: %d\n", ret);
"Unable to register rate control algorithm: %d\n", ret);
return ret; return ret;
} }
ret = pci_register_driver(&iwl3945_driver); ret = pci_register_driver(&iwl3945_driver);
if (ret) { if (ret) {
printk(KERN_ERR DRV_NAME "Unable to initialize PCI module\n"); pr_err("Unable to initialize PCI module\n");
goto error_register; goto error_register;
} }
......
...@@ -486,8 +486,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw, ...@@ -486,8 +486,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
struct ieee80211_rx_status rx_status; struct ieee80211_rx_status rx_status;
if (data->idle) { if (data->idle) {
printk(KERN_DEBUG "%s: Trying to TX when idle - reject\n", wiphy_debug(hw->wiphy, "trying to tx when idle - reject\n");
wiphy_name(hw->wiphy));
return false; return false;
} }
...@@ -576,7 +575,7 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -576,7 +575,7 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
static int mac80211_hwsim_start(struct ieee80211_hw *hw) static int mac80211_hwsim_start(struct ieee80211_hw *hw)
{ {
struct mac80211_hwsim_data *data = hw->priv; struct mac80211_hwsim_data *data = hw->priv;
printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); wiphy_debug(hw->wiphy, "%s\n", __func__);
data->started = 1; data->started = 1;
return 0; return 0;
} }
...@@ -587,16 +586,15 @@ static void mac80211_hwsim_stop(struct ieee80211_hw *hw) ...@@ -587,16 +586,15 @@ static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
struct mac80211_hwsim_data *data = hw->priv; struct mac80211_hwsim_data *data = hw->priv;
data->started = 0; data->started = 0;
del_timer(&data->beacon_timer); del_timer(&data->beacon_timer);
printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); wiphy_debug(hw->wiphy, "%s\n", __func__);
} }
static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw, static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif) struct ieee80211_vif *vif)
{ {
printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%pM)\n", wiphy_debug(hw->wiphy, "%s (type=%d mac_addr=%pM)\n",
wiphy_name(hw->wiphy), __func__, vif->type, __func__, vif->type, vif->addr);
vif->addr);
hwsim_set_magic(vif); hwsim_set_magic(vif);
return 0; return 0;
} }
...@@ -605,9 +603,8 @@ static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw, ...@@ -605,9 +603,8 @@ static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
static void mac80211_hwsim_remove_interface( static void mac80211_hwsim_remove_interface(
struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ {
printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%pM)\n", wiphy_debug(hw->wiphy, "%s (type=%d mac_addr=%pM)\n",
wiphy_name(hw->wiphy), __func__, vif->type, __func__, vif->type, vif->addr);
vif->addr);
hwsim_check_magic(vif); hwsim_check_magic(vif);
hwsim_clear_magic(vif); hwsim_clear_magic(vif);
} }
...@@ -670,13 +667,14 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed) ...@@ -670,13 +667,14 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed)
[IEEE80211_SMPS_DYNAMIC] = "dynamic", [IEEE80211_SMPS_DYNAMIC] = "dynamic",
}; };
printk(KERN_DEBUG "%s:%s (freq=%d/%s idle=%d ps=%d smps=%s)\n", wiphy_debug(hw->wiphy,
wiphy_name(hw->wiphy), __func__, "%s (freq=%d/%s idle=%d ps=%d smps=%s)\n",
conf->channel->center_freq, __func__,
hwsim_chantypes[conf->channel_type], conf->channel->center_freq,
!!(conf->flags & IEEE80211_CONF_IDLE), hwsim_chantypes[conf->channel_type],
!!(conf->flags & IEEE80211_CONF_PS), !!(conf->flags & IEEE80211_CONF_IDLE),
smps_modes[conf->smps_mode]); !!(conf->flags & IEEE80211_CONF_PS),
smps_modes[conf->smps_mode]);
data->idle = !!(conf->flags & IEEE80211_CONF_IDLE); data->idle = !!(conf->flags & IEEE80211_CONF_IDLE);
...@@ -696,7 +694,7 @@ static void mac80211_hwsim_configure_filter(struct ieee80211_hw *hw, ...@@ -696,7 +694,7 @@ static void mac80211_hwsim_configure_filter(struct ieee80211_hw *hw,
{ {
struct mac80211_hwsim_data *data = hw->priv; struct mac80211_hwsim_data *data = hw->priv;
printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); wiphy_debug(hw->wiphy, "%s\n", __func__);
data->rx_filter = 0; data->rx_filter = 0;
if (*total_flags & FIF_PROMISC_IN_BSS) if (*total_flags & FIF_PROMISC_IN_BSS)
...@@ -717,26 +715,23 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, ...@@ -717,26 +715,23 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
hwsim_check_magic(vif); hwsim_check_magic(vif);
printk(KERN_DEBUG "%s:%s(changed=0x%x)\n", wiphy_debug(hw->wiphy, "%s(changed=0x%x)\n", __func__, changed);
wiphy_name(hw->wiphy), __func__, changed);
if (changed & BSS_CHANGED_BSSID) { if (changed & BSS_CHANGED_BSSID) {
printk(KERN_DEBUG "%s:%s: BSSID changed: %pM\n", wiphy_debug(hw->wiphy, "%s: BSSID changed: %pM\n",
wiphy_name(hw->wiphy), __func__, __func__, info->bssid);
info->bssid);
memcpy(vp->bssid, info->bssid, ETH_ALEN); memcpy(vp->bssid, info->bssid, ETH_ALEN);
} }
if (changed & BSS_CHANGED_ASSOC) { if (changed & BSS_CHANGED_ASSOC) {
printk(KERN_DEBUG " %s: ASSOC: assoc=%d aid=%d\n", wiphy_debug(hw->wiphy, " ASSOC: assoc=%d aid=%d\n",
wiphy_name(hw->wiphy), info->assoc, info->aid); info->assoc, info->aid);
vp->assoc = info->assoc; vp->assoc = info->assoc;
vp->aid = info->aid; vp->aid = info->aid;
} }
if (changed & BSS_CHANGED_BEACON_INT) { if (changed & BSS_CHANGED_BEACON_INT) {
printk(KERN_DEBUG " %s: BCNINT: %d\n", wiphy_debug(hw->wiphy, " BCNINT: %d\n", info->beacon_int);
wiphy_name(hw->wiphy), info->beacon_int);
data->beacon_int = 1024 * info->beacon_int / 1000 * HZ / 1000; data->beacon_int = 1024 * info->beacon_int / 1000 * HZ / 1000;
if (WARN_ON(!data->beacon_int)) if (WARN_ON(!data->beacon_int))
data->beacon_int = 1; data->beacon_int = 1;
...@@ -746,31 +741,28 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, ...@@ -746,31 +741,28 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
} }
if (changed & BSS_CHANGED_ERP_CTS_PROT) { if (changed & BSS_CHANGED_ERP_CTS_PROT) {
printk(KERN_DEBUG " %s: ERP_CTS_PROT: %d\n", wiphy_debug(hw->wiphy, " ERP_CTS_PROT: %d\n",
wiphy_name(hw->wiphy), info->use_cts_prot); info->use_cts_prot);
} }
if (changed & BSS_CHANGED_ERP_PREAMBLE) { if (changed & BSS_CHANGED_ERP_PREAMBLE) {
printk(KERN_DEBUG " %s: ERP_PREAMBLE: %d\n", wiphy_debug(hw->wiphy, " ERP_PREAMBLE: %d\n",
wiphy_name(hw->wiphy), info->use_short_preamble); info->use_short_preamble);
} }
if (changed & BSS_CHANGED_ERP_SLOT) { if (changed & BSS_CHANGED_ERP_SLOT) {
printk(KERN_DEBUG " %s: ERP_SLOT: %d\n", wiphy_debug(hw->wiphy, " ERP_SLOT: %d\n", info->use_short_slot);
wiphy_name(hw->wiphy), info->use_short_slot);
} }
if (changed & BSS_CHANGED_HT) { if (changed & BSS_CHANGED_HT) {
printk(KERN_DEBUG " %s: HT: op_mode=0x%x, chantype=%s\n", wiphy_debug(hw->wiphy, " HT: op_mode=0x%x, chantype=%s\n",
wiphy_name(hw->wiphy), info->ht_operation_mode,
info->ht_operation_mode, hwsim_chantypes[info->channel_type]);
hwsim_chantypes[info->channel_type]);
} }
if (changed & BSS_CHANGED_BASIC_RATES) { if (changed & BSS_CHANGED_BASIC_RATES) {
printk(KERN_DEBUG " %s: BASIC_RATES: 0x%llx\n", wiphy_debug(hw->wiphy, " BASIC_RATES: 0x%llx\n",
wiphy_name(hw->wiphy), (unsigned long long) info->basic_rates);
(unsigned long long) info->basic_rates);
} }
} }
...@@ -824,10 +816,11 @@ static int mac80211_hwsim_conf_tx( ...@@ -824,10 +816,11 @@ static int mac80211_hwsim_conf_tx(
struct ieee80211_hw *hw, u16 queue, struct ieee80211_hw *hw, u16 queue,
const struct ieee80211_tx_queue_params *params) const struct ieee80211_tx_queue_params *params)
{ {
printk(KERN_DEBUG "%s:%s (queue=%d txop=%d cw_min=%d cw_max=%d " wiphy_debug(hw->wiphy,
"aifs=%d)\n", "%s (queue=%d txop=%d cw_min=%d cw_max=%d aifs=%d)\n",
wiphy_name(hw->wiphy), __func__, queue, __func__, queue,
params->txop, params->cw_min, params->cw_max, params->aifs); params->txop, params->cw_min,
params->cw_max, params->aifs);
return 0; return 0;
} }
...@@ -837,8 +830,7 @@ static int mac80211_hwsim_get_survey( ...@@ -837,8 +830,7 @@ static int mac80211_hwsim_get_survey(
{ {
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
printk(KERN_DEBUG "%s:%s (idx=%d)\n", wiphy_debug(hw->wiphy, "%s (idx=%d)\n", __func__, idx);
wiphy_name(hw->wiphy), __func__, idx);
if (idx != 0) if (idx != 0)
return -ENOENT; return -ENOENT;
...@@ -1108,8 +1100,9 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif) ...@@ -1108,8 +1100,9 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
if (!vp->assoc) if (!vp->assoc)
return; return;
printk(KERN_DEBUG "%s:%s: send PS-Poll to %pM for aid %d\n", wiphy_debug(data->hw->wiphy,
wiphy_name(data->hw->wiphy), __func__, vp->bssid, vp->aid); "%s: send PS-Poll to %pM for aid %d\n",
__func__, vp->bssid, vp->aid);
skb = dev_alloc_skb(sizeof(*pspoll)); skb = dev_alloc_skb(sizeof(*pspoll));
if (!skb) if (!skb)
...@@ -1137,8 +1130,9 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac, ...@@ -1137,8 +1130,9 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
if (!vp->assoc) if (!vp->assoc)
return; return;
printk(KERN_DEBUG "%s:%s: send data::nullfunc to %pM ps=%d\n", wiphy_debug(data->hw->wiphy,
wiphy_name(data->hw->wiphy), __func__, vp->bssid, ps); "%s: send data::nullfunc to %pM ps=%d\n",
__func__, vp->bssid, ps);
skb = dev_alloc_skb(sizeof(*hdr)); skb = dev_alloc_skb(sizeof(*hdr));
if (!skb) if (!skb)
...@@ -1473,9 +1467,8 @@ static int __init init_mac80211_hwsim(void) ...@@ -1473,9 +1467,8 @@ static int __init init_mac80211_hwsim(void)
break; break;
} }
printk(KERN_DEBUG "%s: hwaddr %pM registered\n", wiphy_debug(hw->wiphy, "hwaddr %pm registered\n",
wiphy_name(hw->wiphy), hw->wiphy->perm_addr);
hw->wiphy->perm_addr);
data->debugfs = debugfs_create_dir("hwsim", data->debugfs = debugfs_create_dir("hwsim",
hw->wiphy->debugfsdir); hw->wiphy->debugfsdir);
......
...@@ -905,16 +905,14 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index) ...@@ -905,16 +905,14 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
rxq->rxd = pci_alloc_consistent(priv->pdev, size, &rxq->rxd_dma); rxq->rxd = pci_alloc_consistent(priv->pdev, size, &rxq->rxd_dma);
if (rxq->rxd == NULL) { if (rxq->rxd == NULL) {
printk(KERN_ERR "%s: failed to alloc RX descriptors\n", wiphy_err(hw->wiphy, "failed to alloc rx descriptors\n");
wiphy_name(hw->wiphy));
return -ENOMEM; return -ENOMEM;
} }
memset(rxq->rxd, 0, size); memset(rxq->rxd, 0, size);
rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL); rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL);
if (rxq->buf == NULL) { if (rxq->buf == NULL) {
printk(KERN_ERR "%s: failed to alloc RX skbuff list\n", wiphy_err(hw->wiphy, "failed to alloc rx skbuff list\n");
wiphy_name(hw->wiphy));
pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma); pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1141,16 +1139,14 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index) ...@@ -1141,16 +1139,14 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index)
txq->txd = pci_alloc_consistent(priv->pdev, size, &txq->txd_dma); txq->txd = pci_alloc_consistent(priv->pdev, size, &txq->txd_dma);
if (txq->txd == NULL) { if (txq->txd == NULL) {
printk(KERN_ERR "%s: failed to alloc TX descriptors\n", wiphy_err(hw->wiphy, "failed to alloc tx descriptors\n");
wiphy_name(hw->wiphy));
return -ENOMEM; return -ENOMEM;
} }
memset(txq->txd, 0, size); memset(txq->txd, 0, size);
txq->skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->skb), GFP_KERNEL); txq->skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->skb), GFP_KERNEL);
if (txq->skb == NULL) { if (txq->skb == NULL) {
printk(KERN_ERR "%s: failed to alloc TX skbuff list\n", wiphy_err(hw->wiphy, "failed to alloc tx skbuff list\n");
wiphy_name(hw->wiphy));
pci_free_consistent(priv->pdev, size, txq->txd, txq->txd_dma); pci_free_consistent(priv->pdev, size, txq->txd, txq->txd_dma);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1206,11 +1202,12 @@ static void mwl8k_dump_tx_rings(struct ieee80211_hw *hw) ...@@ -1206,11 +1202,12 @@ static void mwl8k_dump_tx_rings(struct ieee80211_hw *hw)
unused++; unused++;
} }
printk(KERN_ERR "%s: txq[%d] len=%d head=%d tail=%d " wiphy_err(hw->wiphy,
"fw_owned=%d drv_owned=%d unused=%d\n", "txq[%d] len=%d head=%d tail=%d "
wiphy_name(hw->wiphy), i, "fw_owned=%d drv_owned=%d unused=%d\n",
txq->len, txq->head, txq->tail, i,
fw_owned, drv_owned, unused); txq->len, txq->head, txq->tail,
fw_owned, drv_owned, unused);
} }
} }
...@@ -1254,25 +1251,23 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) ...@@ -1254,25 +1251,23 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw)
if (timeout) { if (timeout) {
WARN_ON(priv->pending_tx_pkts); WARN_ON(priv->pending_tx_pkts);
if (retry) { if (retry) {
printk(KERN_NOTICE "%s: tx rings drained\n", wiphy_notice(hw->wiphy, "tx rings drained\n");
wiphy_name(hw->wiphy));
} }
break; break;
} }
if (priv->pending_tx_pkts < oldcount) { if (priv->pending_tx_pkts < oldcount) {
printk(KERN_NOTICE "%s: waiting for tx rings " wiphy_notice(hw->wiphy,
"to drain (%d -> %d pkts)\n", "waiting for tx rings to drain (%d -> %d pkts)\n",
wiphy_name(hw->wiphy), oldcount, oldcount, priv->pending_tx_pkts);
priv->pending_tx_pkts);
retry = 1; retry = 1;
continue; continue;
} }
priv->tx_wait = NULL; priv->tx_wait = NULL;
printk(KERN_ERR "%s: tx rings stuck for %d ms\n", wiphy_err(hw->wiphy, "tx rings stuck for %d ms\n",
wiphy_name(hw->wiphy), MWL8K_TX_WAIT_TIMEOUT_MS); MWL8K_TX_WAIT_TIMEOUT_MS);
mwl8k_dump_tx_rings(hw); mwl8k_dump_tx_rings(hw);
rc = -ETIMEDOUT; rc = -ETIMEDOUT;
...@@ -1423,8 +1418,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) ...@@ -1423,8 +1418,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
skb->len, PCI_DMA_TODEVICE); skb->len, PCI_DMA_TODEVICE);
if (pci_dma_mapping_error(priv->pdev, dma)) { if (pci_dma_mapping_error(priv->pdev, dma)) {
printk(KERN_DEBUG "%s: failed to dma map skb, " wiphy_debug(hw->wiphy,
"dropping TX frame.\n", wiphy_name(hw->wiphy)); "failed to dma map skb, dropping TX frame.\n");
dev_kfree_skb(skb); dev_kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -1572,10 +1567,9 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) ...@@ -1572,10 +1567,9 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
PCI_DMA_BIDIRECTIONAL); PCI_DMA_BIDIRECTIONAL);
if (!timeout) { if (!timeout) {
printk(KERN_ERR "%s: Command %s timeout after %u ms\n", wiphy_err(hw->wiphy, "command %s timeout after %u ms\n",
wiphy_name(hw->wiphy), mwl8k_cmd_name(cmd->code, buf, sizeof(buf)),
mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), MWL8K_CMD_TIMEOUT_MS);
MWL8K_CMD_TIMEOUT_MS);
rc = -ETIMEDOUT; rc = -ETIMEDOUT;
} else { } else {
int ms; int ms;
...@@ -1584,15 +1578,14 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) ...@@ -1584,15 +1578,14 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
rc = cmd->result ? -EINVAL : 0; rc = cmd->result ? -EINVAL : 0;
if (rc) if (rc)
printk(KERN_ERR "%s: Command %s error 0x%x\n", wiphy_err(hw->wiphy, "command %s error 0x%x\n",
wiphy_name(hw->wiphy), mwl8k_cmd_name(cmd->code, buf, sizeof(buf)),
mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), le16_to_cpu(cmd->result));
le16_to_cpu(cmd->result));
else if (ms > 2000) else if (ms > 2000)
printk(KERN_NOTICE "%s: Command %s took %d ms\n", wiphy_notice(hw->wiphy, "command %s took %d ms\n",
wiphy_name(hw->wiphy), mwl8k_cmd_name(cmd->code,
mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), buf, sizeof(buf)),
ms); ms);
} }
return rc; return rc;
...@@ -3192,8 +3185,8 @@ static int mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -3192,8 +3185,8 @@ static int mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
int rc; int rc;
if (!priv->radio_on) { if (!priv->radio_on) {
printk(KERN_DEBUG "%s: dropped TX frame since radio " wiphy_debug(hw->wiphy,
"disabled\n", wiphy_name(hw->wiphy)); "dropped TX frame since radio disabled\n");
dev_kfree_skb(skb); dev_kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -3211,8 +3204,7 @@ static int mwl8k_start(struct ieee80211_hw *hw) ...@@ -3211,8 +3204,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
rc = request_irq(priv->pdev->irq, mwl8k_interrupt, rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
IRQF_SHARED, MWL8K_NAME, hw); IRQF_SHARED, MWL8K_NAME, hw);
if (rc) { if (rc) {
printk(KERN_ERR "%s: failed to register IRQ handler\n", wiphy_err(hw->wiphy, "failed to register irq handler\n");
wiphy_name(hw->wiphy));
return -EIO; return -EIO;
} }
...@@ -3299,9 +3291,8 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw, ...@@ -3299,9 +3291,8 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw,
* mode. (Sniffer mode is only used on STA firmware.) * mode. (Sniffer mode is only used on STA firmware.)
*/ */
if (priv->sniffer_enabled) { if (priv->sniffer_enabled) {
printk(KERN_INFO "%s: unable to create STA " wiphy_info(hw->wiphy,
"interface due to sniffer mode being enabled\n", "unable to create STA interface because sniffer mode is enabled\n");
wiphy_name(hw->wiphy));
return -EINVAL; return -EINVAL;
} }
...@@ -3583,9 +3574,8 @@ mwl8k_configure_filter_sniffer(struct ieee80211_hw *hw, ...@@ -3583,9 +3574,8 @@ mwl8k_configure_filter_sniffer(struct ieee80211_hw *hw,
*/ */
if (!list_empty(&priv->vif_list)) { if (!list_empty(&priv->vif_list)) {
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_INFO "%s: not enabling sniffer " wiphy_info(hw->wiphy,
"mode because STA interface is active\n", "not enabling sniffer mode because STA interface is active\n");
wiphy_name(hw->wiphy));
return 0; return 0;
} }
...@@ -3913,8 +3903,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -3913,8 +3903,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
priv->sram = pci_iomap(pdev, 0, 0x10000); priv->sram = pci_iomap(pdev, 0, 0x10000);
if (priv->sram == NULL) { if (priv->sram == NULL) {
printk(KERN_ERR "%s: Cannot map device SRAM\n", wiphy_err(hw->wiphy, "cannot map device sram\n");
wiphy_name(hw->wiphy));
goto err_iounmap; goto err_iounmap;
} }
...@@ -3926,8 +3915,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -3926,8 +3915,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
if (priv->regs == NULL) { if (priv->regs == NULL) {
priv->regs = pci_iomap(pdev, 2, 0x10000); priv->regs = pci_iomap(pdev, 2, 0x10000);
if (priv->regs == NULL) { if (priv->regs == NULL) {
printk(KERN_ERR "%s: Cannot map device registers\n", wiphy_err(hw->wiphy, "cannot map device registers\n");
wiphy_name(hw->wiphy));
goto err_iounmap; goto err_iounmap;
} }
} }
...@@ -3939,16 +3927,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -3939,16 +3927,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
/* Ask userland hotplug daemon for the device firmware */ /* Ask userland hotplug daemon for the device firmware */
rc = mwl8k_request_firmware(priv); rc = mwl8k_request_firmware(priv);
if (rc) { if (rc) {
printk(KERN_ERR "%s: Firmware files not found\n", wiphy_err(hw->wiphy, "firmware files not found\n");
wiphy_name(hw->wiphy));
goto err_stop_firmware; goto err_stop_firmware;
} }
/* Load firmware into hardware */ /* Load firmware into hardware */
rc = mwl8k_load_firmware(hw); rc = mwl8k_load_firmware(hw);
if (rc) { if (rc) {
printk(KERN_ERR "%s: Cannot start firmware\n", wiphy_err(hw->wiphy, "cannot start firmware\n");
wiphy_name(hw->wiphy));
goto err_stop_firmware; goto err_stop_firmware;
} }
...@@ -3959,9 +3945,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -3959,9 +3945,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
if (priv->ap_fw) { if (priv->ap_fw) {
priv->rxd_ops = priv->device_info->ap_rxd_ops; priv->rxd_ops = priv->device_info->ap_rxd_ops;
if (priv->rxd_ops == NULL) { if (priv->rxd_ops == NULL) {
printk(KERN_ERR "%s: Driver does not have AP " wiphy_err(hw->wiphy,
"firmware image support for this hardware\n", "Driver does not have AP firmware image support for this hardware\n");
wiphy_name(hw->wiphy));
goto err_stop_firmware; goto err_stop_firmware;
} }
} else { } else {
...@@ -4039,8 +4024,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -4039,8 +4024,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
rc = request_irq(priv->pdev->irq, mwl8k_interrupt, rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
IRQF_SHARED, MWL8K_NAME, hw); IRQF_SHARED, MWL8K_NAME, hw);
if (rc) { if (rc) {
printk(KERN_ERR "%s: failed to register IRQ handler\n", wiphy_err(hw->wiphy, "failed to register irq handler\n");
wiphy_name(hw->wiphy));
goto err_free_queues; goto err_free_queues;
} }
...@@ -4060,8 +4044,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -4060,8 +4044,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
rc = mwl8k_cmd_get_hw_spec_sta(hw); rc = mwl8k_cmd_get_hw_spec_sta(hw);
} }
if (rc) { if (rc) {
printk(KERN_ERR "%s: Cannot initialise firmware\n", wiphy_err(hw->wiphy, "cannot initialise firmware\n");
wiphy_name(hw->wiphy));
goto err_free_irq; goto err_free_irq;
} }
...@@ -4075,15 +4058,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -4075,15 +4058,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
/* Turn radio off */ /* Turn radio off */
rc = mwl8k_cmd_radio_disable(hw); rc = mwl8k_cmd_radio_disable(hw);
if (rc) { if (rc) {
printk(KERN_ERR "%s: Cannot disable\n", wiphy_name(hw->wiphy)); wiphy_err(hw->wiphy, "cannot disable\n");
goto err_free_irq; goto err_free_irq;
} }
/* Clear MAC address */ /* Clear MAC address */
rc = mwl8k_cmd_set_mac_addr(hw, NULL, "\x00\x00\x00\x00\x00\x00"); rc = mwl8k_cmd_set_mac_addr(hw, NULL, "\x00\x00\x00\x00\x00\x00");
if (rc) { if (rc) {
printk(KERN_ERR "%s: Cannot clear MAC address\n", wiphy_err(hw->wiphy, "cannot clear mac address\n");
wiphy_name(hw->wiphy));
goto err_free_irq; goto err_free_irq;
} }
...@@ -4093,17 +4075,16 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev, ...@@ -4093,17 +4075,16 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
rc = ieee80211_register_hw(hw); rc = ieee80211_register_hw(hw);
if (rc) { if (rc) {
printk(KERN_ERR "%s: Cannot register device\n", wiphy_err(hw->wiphy, "cannot register device\n");
wiphy_name(hw->wiphy));
goto err_free_queues; goto err_free_queues;
} }
printk(KERN_INFO "%s: %s v%d, %pM, %s firmware %u.%u.%u.%u\n", wiphy_info(hw->wiphy, "%s v%d, %pm, %s firmware %u.%u.%u.%u\n",
wiphy_name(hw->wiphy), priv->device_info->part_name, priv->device_info->part_name,
priv->hw_rev, hw->wiphy->perm_addr, priv->hw_rev, hw->wiphy->perm_addr,
priv->ap_fw ? "AP" : "STA", priv->ap_fw ? "AP" : "STA",
(priv->fw_rev >> 24) & 0xff, (priv->fw_rev >> 16) & 0xff, (priv->fw_rev >> 24) & 0xff, (priv->fw_rev >> 16) & 0xff,
(priv->fw_rev >> 8) & 0xff, priv->fw_rev & 0xff); (priv->fw_rev >> 8) & 0xff, priv->fw_rev & 0xff);
return 0; return 0;
......
...@@ -117,9 +117,8 @@ static int orinoco_change_vif(struct wiphy *wiphy, struct net_device *dev, ...@@ -117,9 +117,8 @@ static int orinoco_change_vif(struct wiphy *wiphy, struct net_device *dev,
case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_MONITOR:
if (priv->broken_monitor && !force_monitor) { if (priv->broken_monitor && !force_monitor) {
printk(KERN_WARNING "%s: Monitor mode support is " wiphy_warn(wiphy,
"buggy in this firmware, not enabling\n", "Monitor mode support is buggy in this firmware, not enabling\n");
wiphy_name(wiphy));
err = -EINVAL; err = -EINVAL;
} }
break; break;
......
...@@ -149,16 +149,15 @@ static int p54_generate_band(struct ieee80211_hw *dev, ...@@ -149,16 +149,15 @@ static int p54_generate_band(struct ieee80211_hw *dev,
continue; continue;
if (list->channels[i].data != CHAN_HAS_ALL) { if (list->channels[i].data != CHAN_HAS_ALL) {
printk(KERN_ERR "%s:%s%s%s is/are missing for " wiphy_err(dev->wiphy,
"channel:%d [%d MHz].\n", "%s%s%s is/are missing for channel:%d [%d MHz].\n",
wiphy_name(dev->wiphy), (list->channels[i].data & CHAN_HAS_CAL ? "" :
(list->channels[i].data & CHAN_HAS_CAL ? "" : " [iqauto calibration data]"),
" [iqauto calibration data]"), (list->channels[i].data & CHAN_HAS_LIMIT ? "" :
(list->channels[i].data & CHAN_HAS_LIMIT ? "" : " [output power limits]"),
" [output power limits]"), (list->channels[i].data & CHAN_HAS_CURVE ? "" :
(list->channels[i].data & CHAN_HAS_CURVE ? "" : " [curve data]"),
" [curve data]"), list->channels[i].index, list->channels[i].freq);
list->channels[i].index, list->channels[i].freq);
continue; continue;
} }
...@@ -168,9 +167,8 @@ static int p54_generate_band(struct ieee80211_hw *dev, ...@@ -168,9 +167,8 @@ static int p54_generate_band(struct ieee80211_hw *dev,
} }
if (j == 0) { if (j == 0) {
printk(KERN_ERR "%s: Disabling totally damaged %s band.\n", wiphy_err(dev->wiphy, "disabling totally damaged %d GHz band\n",
wiphy_name(dev->wiphy), (band == IEEE80211_BAND_2GHZ) ? (band == IEEE80211_BAND_2GHZ) ? 2 : 5);
"2 GHz" : "5 GHz");
ret = -ENODATA; ret = -ENODATA;
goto err_out; goto err_out;
...@@ -244,9 +242,9 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev) ...@@ -244,9 +242,9 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
if ((priv->iq_autocal_len != priv->curve_data->entries) || if ((priv->iq_autocal_len != priv->curve_data->entries) ||
(priv->iq_autocal_len != priv->output_limit->entries)) (priv->iq_autocal_len != priv->output_limit->entries))
printk(KERN_ERR "%s: Unsupported or damaged EEPROM detected. " wiphy_err(dev->wiphy,
"You may not be able to use all channels.\n", "Unsupported or damaged EEPROM detected. "
wiphy_name(dev->wiphy)); "You may not be able to use all channels.\n");
max_channel_num = max_t(unsigned int, priv->output_limit->entries, max_channel_num = max_t(unsigned int, priv->output_limit->entries,
priv->iq_autocal_len); priv->iq_autocal_len);
...@@ -419,15 +417,14 @@ static void p54_parse_rssical(struct ieee80211_hw *dev, void *data, int len, ...@@ -419,15 +417,14 @@ static void p54_parse_rssical(struct ieee80211_hw *dev, void *data, int len,
int i; int i;
if (len != (entry_size * num_entries)) { if (len != (entry_size * num_entries)) {
printk(KERN_ERR "%s: unknown rssi calibration data packing " wiphy_err(dev->wiphy,
" type:(%x) len:%d.\n", "unknown rssi calibration data packing type:(%x) len:%d.\n",
wiphy_name(dev->wiphy), type, len); type, len);
print_hex_dump_bytes("rssical:", DUMP_PREFIX_NONE, print_hex_dump_bytes("rssical:", DUMP_PREFIX_NONE,
data, len); data, len);
printk(KERN_ERR "%s: please report this issue.\n", wiphy_err(dev->wiphy, "please report this issue.\n");
wiphy_name(dev->wiphy));
return; return;
} }
...@@ -445,15 +442,14 @@ static void p54_parse_default_country(struct ieee80211_hw *dev, ...@@ -445,15 +442,14 @@ static void p54_parse_default_country(struct ieee80211_hw *dev,
struct pda_country *country; struct pda_country *country;
if (len != sizeof(*country)) { if (len != sizeof(*country)) {
printk(KERN_ERR "%s: found possible invalid default country " wiphy_err(dev->wiphy,
"eeprom entry. (entry size: %d)\n", "found possible invalid default country eeprom entry. (entry size: %d)\n",
wiphy_name(dev->wiphy), len); len);
print_hex_dump_bytes("country:", DUMP_PREFIX_NONE, print_hex_dump_bytes("country:", DUMP_PREFIX_NONE,
data, len); data, len);
printk(KERN_ERR "%s: please report this issue.\n", wiphy_err(dev->wiphy, "please report this issue.\n");
wiphy_name(dev->wiphy));
return; return;
} }
...@@ -478,8 +474,8 @@ static int p54_convert_output_limits(struct ieee80211_hw *dev, ...@@ -478,8 +474,8 @@ static int p54_convert_output_limits(struct ieee80211_hw *dev,
return -EINVAL; return -EINVAL;
if (data[0] != 0) { if (data[0] != 0) {
printk(KERN_ERR "%s: unknown output power db revision:%x\n", wiphy_err(dev->wiphy, "unknown output power db revision:%x\n",
wiphy_name(dev->wiphy), data[0]); data[0]);
return -EINVAL; return -EINVAL;
} }
...@@ -587,10 +583,9 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) ...@@ -587,10 +583,9 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
err = p54_convert_rev1(dev, curve_data); err = p54_convert_rev1(dev, curve_data);
break; break;
default: default:
printk(KERN_ERR "%s: unknown curve data " wiphy_err(dev->wiphy,
"revision %d\n", "unknown curve data revision %d\n",
wiphy_name(dev->wiphy), curve_data->cal_method_rev);
curve_data->cal_method_rev);
err = -ENODEV; err = -ENODEV;
break; break;
} }
...@@ -672,8 +667,8 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) ...@@ -672,8 +667,8 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
if (!synth || !priv->iq_autocal || !priv->output_limit || if (!synth || !priv->iq_autocal || !priv->output_limit ||
!priv->curve_data) { !priv->curve_data) {
printk(KERN_ERR "%s: not all required entries found in eeprom!\n", wiphy_err(dev->wiphy,
wiphy_name(dev->wiphy)); "not all required entries found in eeprom!\n");
err = -EINVAL; err = -EINVAL;
goto err; goto err;
} }
...@@ -699,15 +694,15 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) ...@@ -699,15 +694,15 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { if (!is_valid_ether_addr(dev->wiphy->perm_addr)) {
u8 perm_addr[ETH_ALEN]; u8 perm_addr[ETH_ALEN];
printk(KERN_WARNING "%s: Invalid hwaddr! Using randomly generated MAC addr\n", wiphy_warn(dev->wiphy,
wiphy_name(dev->wiphy)); "invalid hwaddr! using randomly generated mac addr\n");
random_ether_addr(perm_addr); random_ether_addr(perm_addr);
SET_IEEE80211_PERM_ADDR(dev, perm_addr); SET_IEEE80211_PERM_ADDR(dev, perm_addr);
} }
printk(KERN_INFO "%s: hwaddr %pM, MAC:isl38%02x RF:%s\n", wiphy_info(dev->wiphy, "hwaddr %pm, mac:isl38%02x rf:%s\n",
wiphy_name(dev->wiphy), dev->wiphy->perm_addr, priv->version, dev->wiphy->perm_addr, priv->version,
p54_rf_chips[priv->rxhw]); p54_rf_chips[priv->rxhw]);
return 0; return 0;
...@@ -719,8 +714,7 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) ...@@ -719,8 +714,7 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
priv->output_limit = NULL; priv->output_limit = NULL;
priv->curve_data = NULL; priv->curve_data = NULL;
printk(KERN_ERR "%s: eeprom parse failed!\n", wiphy_err(dev->wiphy, "eeprom parse failed!\n");
wiphy_name(dev->wiphy));
return err; return err;
} }
EXPORT_SYMBOL_GPL(p54_parse_eeprom); EXPORT_SYMBOL_GPL(p54_parse_eeprom);
......
...@@ -62,16 +62,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw) ...@@ -62,16 +62,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
case FW_LM20: case FW_LM20:
case FW_LM87: { case FW_LM87: {
char *iftype = (char *)bootrec->data; char *iftype = (char *)bootrec->data;
printk(KERN_INFO "%s: p54 detected a LM%c%c " wiphy_info(priv->hw->wiphy,
"firmware\n", "p54 detected a LM%c%c firmware\n",
wiphy_name(priv->hw->wiphy), iftype[2], iftype[3]);
iftype[2], iftype[3]);
break; break;
} }
case FW_FMAC: case FW_FMAC:
default: default:
printk(KERN_ERR "%s: unsupported firmware\n", wiphy_err(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy)); "unsupported firmware\n");
return -ENODEV; return -ENODEV;
} }
break; break;
...@@ -125,15 +124,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw) ...@@ -125,15 +124,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
} }
if (fw_version) if (fw_version)
printk(KERN_INFO "%s: FW rev %s - Softmac protocol %x.%x\n", wiphy_info(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy), fw_version, "fw rev %s - softmac protocol %x.%x\n",
priv->fw_var >> 8, priv->fw_var & 0xff); fw_version, priv->fw_var >> 8, priv->fw_var & 0xff);
if (priv->fw_var < 0x500) if (priv->fw_var < 0x500)
printk(KERN_INFO "%s: you are using an obsolete firmware. " wiphy_info(priv->hw->wiphy,
"visit http://wireless.kernel.org/en/users/Drivers/p54 " "you are using an obsolete firmware. "
"and grab one for \"kernel >= 2.6.28\"!\n", "visit http://wireless.kernel.org/en/users/Drivers/p54 "
wiphy_name(priv->hw->wiphy)); "and grab one for \"kernel >= 2.6.28\"!\n");
if (priv->fw_var >= 0x300) { if (priv->fw_var >= 0x300) {
/* Firmware supports QoS, use it! */ /* Firmware supports QoS, use it! */
...@@ -152,13 +151,14 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw) ...@@ -152,13 +151,14 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
priv->hw->queues = P54_QUEUE_AC_NUM; priv->hw->queues = P54_QUEUE_AC_NUM;
} }
printk(KERN_INFO "%s: cryptographic accelerator " wiphy_info(priv->hw->wiphy,
"WEP:%s, TKIP:%s, CCMP:%s\n", wiphy_name(priv->hw->wiphy), "cryptographic accelerator WEP:%s, TKIP:%s, CCMP:%s\n",
(priv->privacy_caps & BR_DESC_PRIV_CAP_WEP) ? "YES" : (priv->privacy_caps & BR_DESC_PRIV_CAP_WEP) ? "YES" : "no",
"no", (priv->privacy_caps & (BR_DESC_PRIV_CAP_TKIP | (priv->privacy_caps &
BR_DESC_PRIV_CAP_MICHAEL)) ? "YES" : "no", (BR_DESC_PRIV_CAP_TKIP | BR_DESC_PRIV_CAP_MICHAEL))
(priv->privacy_caps & BR_DESC_PRIV_CAP_AESCCMP) ? ? "YES" : "no",
"YES" : "no"); (priv->privacy_caps & BR_DESC_PRIV_CAP_AESCCMP)
? "YES" : "no");
if (priv->rx_keycache_size) { if (priv->rx_keycache_size) {
/* /*
...@@ -247,8 +247,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf, ...@@ -247,8 +247,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
if (!wait_for_completion_interruptible_timeout( if (!wait_for_completion_interruptible_timeout(
&priv->eeprom_comp, HZ)) { &priv->eeprom_comp, HZ)) {
printk(KERN_ERR "%s: device does not respond!\n", wiphy_err(priv->hw->wiphy, "device does not respond!\n");
wiphy_name(priv->hw->wiphy));
ret = -EBUSY; ret = -EBUSY;
} }
priv->eeprom = NULL; priv->eeprom = NULL;
...@@ -523,9 +522,9 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell) ...@@ -523,9 +522,9 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)
return 0; return 0;
err: err:
printk(KERN_ERR "%s: frequency change to channel %d failed.\n", wiphy_err(priv->hw->wiphy, "frequency change to channel %d failed.\n",
wiphy_name(priv->hw->wiphy), ieee80211_frequency_to_channel( ieee80211_frequency_to_channel(
priv->hw->conf.channel->center_freq)); priv->hw->conf.channel->center_freq));
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
return -EINVAL; return -EINVAL;
...@@ -676,8 +675,8 @@ int p54_upload_key(struct p54_common *priv, u8 algo, int slot, u8 idx, u8 len, ...@@ -676,8 +675,8 @@ int p54_upload_key(struct p54_common *priv, u8 algo, int slot, u8 idx, u8 len,
break; break;
default: default:
printk(KERN_ERR "%s: invalid cryptographic algorithm: %d\n", wiphy_err(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy), algo); "invalid cryptographic algorithm: %d\n", algo);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return -EINVAL; return -EINVAL;
} }
......
...@@ -57,8 +57,8 @@ static void p54_update_leds(struct work_struct *work) ...@@ -57,8 +57,8 @@ static void p54_update_leds(struct work_struct *work)
err = p54_set_leds(priv); err = p54_set_leds(priv);
if (err && net_ratelimit()) if (err && net_ratelimit())
printk(KERN_ERR "%s: failed to update LEDs (%d).\n", wiphy_err(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy), err); "failed to update leds (%d).\n", err);
if (rerun) if (rerun)
ieee80211_queue_delayed_work(priv->hw, &priv->led_work, ieee80211_queue_delayed_work(priv->hw, &priv->led_work,
...@@ -102,8 +102,8 @@ static int p54_register_led(struct p54_common *priv, ...@@ -102,8 +102,8 @@ static int p54_register_led(struct p54_common *priv,
err = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_dev); err = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_dev);
if (err) if (err)
printk(KERN_ERR "%s: Failed to register %s LED.\n", wiphy_err(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy), name); "failed to register %s led.\n", name);
else else
led->registered = 1; led->registered = 1;
......
...@@ -466,8 +466,7 @@ static int p54p_open(struct ieee80211_hw *dev) ...@@ -466,8 +466,7 @@ static int p54p_open(struct ieee80211_hw *dev)
P54P_READ(dev_int); P54P_READ(dev_int);
if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
printk(KERN_ERR "%s: Cannot boot firmware!\n", wiphy_err(dev->wiphy, "cannot boot firmware!\n");
wiphy_name(dev->wiphy));
p54p_stop(dev); p54p_stop(dev);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
...@@ -38,8 +38,8 @@ static void p54_dump_tx_queue(struct p54_common *priv) ...@@ -38,8 +38,8 @@ static void p54_dump_tx_queue(struct p54_common *priv)
u32 largest_hole = 0, free; u32 largest_hole = 0, free;
spin_lock_irqsave(&priv->tx_queue.lock, flags); spin_lock_irqsave(&priv->tx_queue.lock, flags);
printk(KERN_DEBUG "%s: / --- tx queue dump (%d entries) ---\n", wiphy_debug(priv->hw->wiphy, "/ --- tx queue dump (%d entries) ---\n",
wiphy_name(priv->hw->wiphy), skb_queue_len(&priv->tx_queue)); skb_queue_len(&priv->tx_queue));
prev_addr = priv->rx_start; prev_addr = priv->rx_start;
skb_queue_walk(&priv->tx_queue, skb) { skb_queue_walk(&priv->tx_queue, skb) {
...@@ -48,21 +48,23 @@ static void p54_dump_tx_queue(struct p54_common *priv) ...@@ -48,21 +48,23 @@ static void p54_dump_tx_queue(struct p54_common *priv)
hdr = (void *) skb->data; hdr = (void *) skb->data;
free = range->start_addr - prev_addr; free = range->start_addr - prev_addr;
printk(KERN_DEBUG "%s: | [%02d] => [skb:%p skb_len:0x%04x " wiphy_debug(priv->hw->wiphy,
"hdr:{flags:%02x len:%04x req_id:%04x type:%02x} " "| [%02d] => [skb:%p skb_len:0x%04x "
"mem:{start:%04x end:%04x, free:%d}]\n", "hdr:{flags:%02x len:%04x req_id:%04x type:%02x} "
wiphy_name(priv->hw->wiphy), i++, skb, skb->len, "mem:{start:%04x end:%04x, free:%d}]\n",
le16_to_cpu(hdr->flags), le16_to_cpu(hdr->len), i++, skb, skb->len,
le32_to_cpu(hdr->req_id), le16_to_cpu(hdr->type), le16_to_cpu(hdr->flags), le16_to_cpu(hdr->len),
range->start_addr, range->end_addr, free); le32_to_cpu(hdr->req_id), le16_to_cpu(hdr->type),
range->start_addr, range->end_addr, free);
prev_addr = range->end_addr; prev_addr = range->end_addr;
largest_hole = max(largest_hole, free); largest_hole = max(largest_hole, free);
} }
free = priv->rx_end - prev_addr; free = priv->rx_end - prev_addr;
largest_hole = max(largest_hole, free); largest_hole = max(largest_hole, free);
printk(KERN_DEBUG "%s: \\ --- [free: %d], largest free block: %d ---\n", wiphy_debug(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy), free, largest_hole); "\\ --- [free: %d], largest free block: %d ---\n",
free, largest_hole);
spin_unlock_irqrestore(&priv->tx_queue.lock, flags); spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
} }
#endif /* P54_MM_DEBUG */ #endif /* P54_MM_DEBUG */
...@@ -538,8 +540,7 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb) ...@@ -538,8 +540,7 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb)
case P54_TRAP_BEACON_TX: case P54_TRAP_BEACON_TX:
break; break;
case P54_TRAP_RADAR: case P54_TRAP_RADAR:
printk(KERN_INFO "%s: radar (freq:%d MHz)\n", wiphy_info(priv->hw->wiphy, "radar (freq:%d mhz)\n", freq);
wiphy_name(priv->hw->wiphy), freq);
break; break;
case P54_TRAP_NO_BEACON: case P54_TRAP_NO_BEACON:
if (priv->vif) if (priv->vif)
...@@ -558,8 +559,8 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb) ...@@ -558,8 +559,8 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb)
wiphy_rfkill_set_hw_state(priv->hw->wiphy, false); wiphy_rfkill_set_hw_state(priv->hw->wiphy, false);
break; break;
default: default:
printk(KERN_INFO "%s: received event:%x freq:%d\n", wiphy_info(priv->hw->wiphy, "received event:%x freq:%d\n",
wiphy_name(priv->hw->wiphy), event, freq); event, freq);
break; break;
} }
} }
...@@ -584,8 +585,9 @@ static int p54_rx_control(struct p54_common *priv, struct sk_buff *skb) ...@@ -584,8 +585,9 @@ static int p54_rx_control(struct p54_common *priv, struct sk_buff *skb)
p54_rx_eeprom_readback(priv, skb); p54_rx_eeprom_readback(priv, skb);
break; break;
default: default:
printk(KERN_DEBUG "%s: not handling 0x%02x type control frame\n", wiphy_debug(priv->hw->wiphy,
wiphy_name(priv->hw->wiphy), le16_to_cpu(hdr->type)); "not handling 0x%02x type control frame\n",
le16_to_cpu(hdr->type));
break; break;
} }
return 0; return 0;
......
...@@ -361,7 +361,7 @@ static int rtl8180_init_hw(struct ieee80211_hw *dev) ...@@ -361,7 +361,7 @@ static int rtl8180_init_hw(struct ieee80211_hw *dev)
/* check success of reset */ /* check success of reset */
if (rtl818x_ioread8(priv, &priv->map->CMD) & RTL818X_CMD_RESET) { if (rtl818x_ioread8(priv, &priv->map->CMD) & RTL818X_CMD_RESET) {
printk(KERN_ERR "%s: reset timeout!\n", wiphy_name(dev->wiphy)); wiphy_err(dev->wiphy, "reset timeout!\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -445,8 +445,7 @@ static int rtl8180_init_rx_ring(struct ieee80211_hw *dev) ...@@ -445,8 +445,7 @@ static int rtl8180_init_rx_ring(struct ieee80211_hw *dev)
&priv->rx_ring_dma); &priv->rx_ring_dma);
if (!priv->rx_ring || (unsigned long)priv->rx_ring & 0xFF) { if (!priv->rx_ring || (unsigned long)priv->rx_ring & 0xFF) {
printk(KERN_ERR "%s: Cannot allocate RX ring\n", wiphy_err(dev->wiphy, "cannot allocate rx ring\n");
wiphy_name(dev->wiphy));
return -ENOMEM; return -ENOMEM;
} }
...@@ -503,8 +502,8 @@ static int rtl8180_init_tx_ring(struct ieee80211_hw *dev, ...@@ -503,8 +502,8 @@ static int rtl8180_init_tx_ring(struct ieee80211_hw *dev,
ring = pci_alloc_consistent(priv->pdev, sizeof(*ring) * entries, &dma); ring = pci_alloc_consistent(priv->pdev, sizeof(*ring) * entries, &dma);
if (!ring || (unsigned long)ring & 0xFF) { if (!ring || (unsigned long)ring & 0xFF) {
printk(KERN_ERR "%s: Cannot allocate TX ring (prio = %d)\n", wiphy_err(dev->wiphy, "cannot allocate tx ring (prio = %d)\n",
wiphy_name(dev->wiphy), prio); prio);
return -ENOMEM; return -ENOMEM;
} }
...@@ -569,8 +568,7 @@ static int rtl8180_start(struct ieee80211_hw *dev) ...@@ -569,8 +568,7 @@ static int rtl8180_start(struct ieee80211_hw *dev)
ret = request_irq(priv->pdev->irq, rtl8180_interrupt, ret = request_irq(priv->pdev->irq, rtl8180_interrupt,
IRQF_SHARED, KBUILD_MODNAME, dev); IRQF_SHARED, KBUILD_MODNAME, dev);
if (ret) { if (ret) {
printk(KERN_ERR "%s: failed to register IRQ handler\n", wiphy_err(dev->wiphy, "failed to register irq handler\n");
wiphy_name(dev->wiphy));
goto err_free_rings; goto err_free_rings;
} }
...@@ -1107,9 +1105,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev, ...@@ -1107,9 +1105,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
goto err_iounmap; goto err_iounmap;
} }
printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n", wiphy_info(dev->wiphy, "hwaddr %pm, %s + %s\n",
wiphy_name(dev->wiphy), mac_addr, mac_addr, chip_name, priv->rf->name);
chip_name, priv->rf->name);
return 0; return 0;
......
...@@ -573,7 +573,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev) ...@@ -573,7 +573,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev)
} while (--i); } while (--i);
if (!i) { if (!i) {
printk(KERN_ERR "%s: Reset timeout!\n", wiphy_name(dev->wiphy)); wiphy_err(dev->wiphy, "reset timeout!\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -589,8 +589,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev) ...@@ -589,8 +589,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev)
} while (--i); } while (--i);
if (!i) { if (!i) {
printk(KERN_ERR "%s: eeprom reset timeout!\n", wiphy_err(dev->wiphy, "eeprom reset timeout!\n");
wiphy_name(dev->wiphy));
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -1527,9 +1526,9 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, ...@@ -1527,9 +1526,9 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
mutex_init(&priv->conf_mutex); mutex_init(&priv->conf_mutex);
skb_queue_head_init(&priv->b_tx_status.queue); skb_queue_head_init(&priv->b_tx_status.queue);
printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", wiphy_info(dev->wiphy, "hwaddr %pm, %s v%d + %s, rfkill mask %d\n",
wiphy_name(dev->wiphy), mac_addr, mac_addr, chip_name, priv->asic_rev, priv->rf->name,
chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); priv->rfkill_mask);
#ifdef CONFIG_RTL8187_LEDS #ifdef CONFIG_RTL8187_LEDS
eeprom_93cx6_read(&eeprom, 0x3F, &reg); eeprom_93cx6_read(&eeprom, 0x3F, &reg);
......
...@@ -366,8 +366,8 @@ static void rtl8225_rf_init(struct ieee80211_hw *dev) ...@@ -366,8 +366,8 @@ static void rtl8225_rf_init(struct ieee80211_hw *dev)
rtl8225_write(dev, 0x02, 0x044d); rtl8225_write(dev, 0x02, 0x044d);
msleep(100); msleep(100);
if (!(rtl8225_read(dev, 6) & (1 << 7))) if (!(rtl8225_read(dev, 6) & (1 << 7)))
printk(KERN_WARNING "%s: RF Calibration Failed! %x\n", wiphy_warn(dev->wiphy, "rf calibration failed! %x\n",
wiphy_name(dev->wiphy), rtl8225_read(dev, 6)); rtl8225_read(dev, 6));
} }
rtl8225_write(dev, 0x0, 0x127); rtl8225_write(dev, 0x0, 0x127);
...@@ -735,8 +735,8 @@ static void rtl8225z2_rf_init(struct ieee80211_hw *dev) ...@@ -735,8 +735,8 @@ static void rtl8225z2_rf_init(struct ieee80211_hw *dev)
rtl8225_write(dev, 0x02, 0x044D); rtl8225_write(dev, 0x02, 0x044D);
msleep(100); msleep(100);
if (!(rtl8225_read(dev, 6) & (1 << 7))) if (!(rtl8225_read(dev, 6) & (1 << 7)))
printk(KERN_WARNING "%s: RF Calibration Failed! %x\n", wiphy_warn(dev->wiphy, "rf calibration failed! %x\n",
wiphy_name(dev->wiphy), rtl8225_read(dev, 6)); rtl8225_read(dev, 6));
} }
msleep(200); msleep(200);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment