aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/adm8211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r--drivers/net/wireless/adm8211.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index bde2fa8bb63..a105087af96 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -373,8 +373,8 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
373 pktlen = status & RDES0_STATUS_FL; 373 pktlen = status & RDES0_STATUS_FL;
374 if (pktlen > RX_PKT_SIZE) { 374 if (pktlen > RX_PKT_SIZE) {
375 if (net_ratelimit()) 375 if (net_ratelimit())
376 printk(KERN_DEBUG "%s: frame too long (%d)\n", 376 wiphy_debug(dev->wiphy, "frame too long (%d)\n",
377 wiphy_name(dev->wiphy), pktlen); 377 pktlen);
378 pktlen = RX_PKT_SIZE; 378 pktlen = RX_PKT_SIZE;
379 } 379 }
380 380
@@ -454,10 +454,10 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
454 454
455static irqreturn_t adm8211_interrupt(int irq, void *dev_id) 455static irqreturn_t adm8211_interrupt(int irq, void *dev_id)
456{ 456{
457#define ADM8211_INT(x) \ 457#define ADM8211_INT(x) \
458do { \ 458do { \
459 if (unlikely(stsr & ADM8211_STSR_ ## x)) \ 459 if (unlikely(stsr & ADM8211_STSR_ ## x)) \
460 printk(KERN_DEBUG "%s: " #x "\n", wiphy_name(dev->wiphy)); \ 460 wiphy_debug(dev->wiphy, "%s\n", #x); \
461} while (0) 461} while (0)
462 462
463 struct ieee80211_hw *dev = dev_id; 463 struct ieee80211_hw *dev = dev_id;
@@ -570,9 +570,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data)
570 } 570 }
571 571
572 if (timeout == 0) { 572 if (timeout == 0) {
573 printk(KERN_DEBUG "%s: adm8211_write_bbp(%d,%d) failed" 573 wiphy_debug(dev->wiphy,
574 " prewrite (reg=0x%08x)\n", 574 "adm8211_write_bbp(%d,%d) failed prewrite (reg=0x%08x)\n",
575 wiphy_name(dev->wiphy), addr, data, reg); 575 addr, data, reg);
576 return -ETIMEDOUT; 576 return -ETIMEDOUT;
577 } 577 }
578 578
@@ -605,9 +605,9 @@ static int adm8211_write_bbp(struct ieee80211_hw *dev, u8 addr, u8 data)
605 if (timeout == 0) { 605 if (timeout == 0) {
606 ADM8211_CSR_WRITE(BBPCTL, ADM8211_CSR_READ(BBPCTL) & 606 ADM8211_CSR_WRITE(BBPCTL, ADM8211_CSR_READ(BBPCTL) &
607 ~ADM8211_BBPCTL_WR); 607 ~ADM8211_BBPCTL_WR);
608 printk(KERN_DEBUG "%s: adm8211_write_bbp(%d,%d) failed" 608 wiphy_debug(dev->wiphy,
609 " postwrite (reg=0x%08x)\n", 609 "adm8211_write_bbp(%d,%d) failed postwrite (reg=0x%08x)\n",
610 wiphy_name(dev->wiphy), addr, data, reg); 610 addr, data, reg);
611 return -ETIMEDOUT; 611 return -ETIMEDOUT;
612 } 612 }
613 613
@@ -675,8 +675,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
675 break; 675 break;
676 676
677 default: 677 default:
678 printk(KERN_DEBUG "%s: unsupported transceiver type %d\n", 678 wiphy_debug(dev->wiphy, "unsupported transceiver type %d\n",
679 wiphy_name(dev->wiphy), priv->transceiver_type); 679 priv->transceiver_type);
680 break; 680 break;
681 } 681 }
682 682
@@ -732,8 +732,8 @@ static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
732 732
733 /* Nothing to do for ADMtek BBP */ 733 /* Nothing to do for ADMtek BBP */
734 } else if (priv->bbp_type != ADM8211_TYPE_ADMTEK) 734 } else if (priv->bbp_type != ADM8211_TYPE_ADMTEK)
735 printk(KERN_DEBUG "%s: unsupported BBP type %d\n", 735 wiphy_debug(dev->wiphy, "unsupported bbp type %d\n",
736 wiphy_name(dev->wiphy), priv->bbp_type); 736 priv->bbp_type);
737 737
738 ADM8211_RESTORE(); 738 ADM8211_RESTORE();
739 739
@@ -1027,13 +1027,12 @@ static int adm8211_hw_init_bbp(struct ieee80211_hw *dev)
1027 break; 1027 break;
1028 1028
1029 default: 1029 default:
1030 printk(KERN_DEBUG "%s: unsupported transceiver %d\n", 1030 wiphy_debug(dev->wiphy, "unsupported transceiver %d\n",
1031 wiphy_name(dev->wiphy), priv->transceiver_type); 1031 priv->transceiver_type);
1032 break; 1032 break;
1033 } 1033 }
1034 } else 1034 } else
1035 printk(KERN_DEBUG "%s: unsupported BBP %d\n", 1035 wiphy_debug(dev->wiphy, "unsupported bbp %d\n", priv->bbp_type);
1036 wiphy_name(dev->wiphy), priv->bbp_type);
1037 1036
1038 ADM8211_CSR_WRITE(SYNRF, 0); 1037 ADM8211_CSR_WRITE(SYNRF, 0);
1039 1038
@@ -1509,15 +1508,13 @@ static int adm8211_start(struct ieee80211_hw *dev)
1509 /* Power up MAC and RF chips */ 1508 /* Power up MAC and RF chips */
1510 retval = adm8211_hw_reset(dev); 1509 retval = adm8211_hw_reset(dev);
1511 if (retval) { 1510 if (retval) {
1512 printk(KERN_ERR "%s: hardware reset failed\n", 1511 wiphy_err(dev->wiphy, "hardware reset failed\n");
1513 wiphy_name(dev->wiphy));
1514 goto fail; 1512 goto fail;
1515 } 1513 }
1516 1514
1517 retval = adm8211_init_rings(dev); 1515 retval = adm8211_init_rings(dev);
1518 if (retval) { 1516 if (retval) {
1519 printk(KERN_ERR "%s: failed to initialize rings\n", 1517 wiphy_err(dev->wiphy, "failed to initialize rings\n");
1520 wiphy_name(dev->wiphy));
1521 goto fail; 1518 goto fail;
1522 } 1519 }
1523 1520
@@ -1528,8 +1525,7 @@ static int adm8211_start(struct ieee80211_hw *dev)
1528 retval = request_irq(priv->pdev->irq, adm8211_interrupt, 1525 retval = request_irq(priv->pdev->irq, adm8211_interrupt,
1529 IRQF_SHARED, "adm8211", dev); 1526 IRQF_SHARED, "adm8211", dev);
1530 if (retval) { 1527 if (retval) {
1531 printk(KERN_ERR "%s: failed to register IRQ handler\n", 1528 wiphy_err(dev->wiphy, "failed to register irq handler\n");
1532 wiphy_name(dev->wiphy));
1533 goto fail; 1529 goto fail;
1534 } 1530 }
1535 1531
@@ -1906,9 +1902,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1906 goto err_free_eeprom; 1902 goto err_free_eeprom;
1907 } 1903 }
1908 1904
1909 printk(KERN_INFO "%s: hwaddr %pM, Rev 0x%02x\n", 1905 wiphy_info(dev->wiphy, "hwaddr %pm, rev 0x%02x\n",
1910 wiphy_name(dev->wiphy), dev->wiphy->perm_addr, 1906 dev->wiphy->perm_addr, pdev->revision);
1911 pdev->revision);
1912 1907
1913 return 0; 1908 return 0;
1914 1909