Skip to content

Commit

Permalink
drivers/net/wireless: Use wiphy_<level>
Browse files Browse the repository at this point in the history
Standardize the logging macros used.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Joe Perches authored and John W. Linville committed Jul 27, 2010
1 parent e1db74f commit c96c31e
Show file tree
Hide file tree
Showing 22 changed files with 398 additions and 464 deletions.
53 changes: 24 additions & 29 deletions drivers/net/wireless/adm8211.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
pktlen = status & RDES0_STATUS_FL;
if (pktlen > RX_PKT_SIZE) {
if (net_ratelimit())
printk(KERN_DEBUG "%s: frame too long (%d)\n",
wiphy_name(dev->wiphy), pktlen);
wiphy_debug(dev->wiphy, "frame too long (%d)\n",
pktlen);
pktlen = RX_PKT_SIZE;
}

Expand Down Expand Up @@ -454,10 +454,10 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)

static irqreturn_t adm8211_interrupt(int irq, void *dev_id)
{
#define ADM8211_INT(x) \
do { \
if (unlikely(stsr & ADM8211_STSR_ ## x)) \
printk(KERN_DEBUG "%s: " #x "\n", wiphy_name(dev->wiphy)); \
#define ADM8211_INT(x) \
do { \
if (unlikely(stsr & ADM8211_STSR_ ## x)) \
wiphy_debug(dev->wiphy, "%s\n", #x); \
} while (0)

struct ieee80211_hw *dev = dev_id;
Expand Down Expand Up @@ -570,9 +570,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data)
}

if (timeout == 0) {
printk(KERN_DEBUG "%s: adm8211_write_bbp(%d,%d) failed"
" prewrite (reg=0x%08x)\n",
wiphy_name(dev->wiphy), addr, data, reg);
wiphy_debug(dev->wiphy,
"adm8211_write_bbp(%d,%d) failed prewrite (reg=0x%08x)\n",
addr, data, reg);
return -ETIMEDOUT;
}

Expand Down Expand Up @@ -605,9 +605,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data)
if (timeout == 0) {
ADM8211_CSR_WRITE(BBPCTL, ADM8211_CSR_READ(BBPCTL) &
~ADM8211_BBPCTL_WR);
printk(KERN_DEBUG "%s: adm8211_write_bbp(%d,%d) failed"
" postwrite (reg=0x%08x)\n",
wiphy_name(dev->wiphy), addr, data, reg);
wiphy_debug(dev->wiphy,
"adm8211_write_bbp(%d,%d) failed postwrite (reg=0x%08x)\n",
addr, data, reg);
return -ETIMEDOUT;
}

Expand Down Expand Up @@ -675,8 +675,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
break;

default:
printk(KERN_DEBUG "%s: unsupported transceiver type %d\n",
wiphy_name(dev->wiphy), priv->transceiver_type);
wiphy_debug(dev->wiphy, "unsupported transceiver type %d\n",
priv->transceiver_type);
break;
}

Expand Down Expand Up @@ -732,8 +732,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)

/* Nothing to do for ADMtek BBP */
} else if (priv->bbp_type != ADM8211_TYPE_ADMTEK)
printk(KERN_DEBUG "%s: unsupported BBP type %d\n",
wiphy_name(dev->wiphy), priv->bbp_type);
wiphy_debug(dev->wiphy, "unsupported bbp type %d\n",
priv->bbp_type);

ADM8211_RESTORE();

Expand Down Expand Up @@ -1027,13 +1027,12 @@ static int adm8211_hw_init_bbp(struct ieee80211_hw *dev)
break;

default:
printk(KERN_DEBUG "%s: unsupported transceiver %d\n",
wiphy_name(dev->wiphy), priv->transceiver_type);
wiphy_debug(dev->wiphy, "unsupported transceiver %d\n",
priv->transceiver_type);
break;
}
} else
printk(KERN_DEBUG "%s: unsupported BBP %d\n",
wiphy_name(dev->wiphy), priv->bbp_type);
wiphy_debug(dev->wiphy, "unsupported bbp %d\n", priv->bbp_type);

ADM8211_CSR_WRITE(SYNRF, 0);

Expand Down Expand Up @@ -1509,15 +1508,13 @@ static int adm8211_start(struct ieee80211_hw *dev)
/* Power up MAC and RF chips */
retval = adm8211_hw_reset(dev);
if (retval) {
printk(KERN_ERR "%s: hardware reset failed\n",
wiphy_name(dev->wiphy));
wiphy_err(dev->wiphy, "hardware reset failed\n");
goto fail;
}

retval = adm8211_init_rings(dev);
if (retval) {
printk(KERN_ERR "%s: failed to initialize rings\n",
wiphy_name(dev->wiphy));
wiphy_err(dev->wiphy, "failed to initialize rings\n");
goto fail;
}

Expand All @@ -1528,8 +1525,7 @@ static int adm8211_start(struct ieee80211_hw *dev)
retval = request_irq(priv->pdev->irq, adm8211_interrupt,
IRQF_SHARED, "adm8211", dev);
if (retval) {
printk(KERN_ERR "%s: failed to register IRQ handler\n",
wiphy_name(dev->wiphy));
wiphy_err(dev->wiphy, "failed to register irq handler\n");
goto fail;
}

Expand Down Expand Up @@ -1906,9 +1902,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
goto err_free_eeprom;
}

printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n",
wiphy_name(dev->wiphy), dev->wiphy->perm_addr,
pdev->revision);
wiphy_info(dev->wiphy, "hwaddr %pm, rev 0x%02x\n",
dev->wiphy->perm_addr, pdev->revision);

return 0;

Expand Down
Loading

0 comments on commit c96c31e

Please sign in to comment.