aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/adm8211.c53
-rw-r--r--drivers/net/wireless/at76c50x-usb.c139
-rw-r--r--drivers/net/wireless/ath/ar9170/cmd.c7
-rw-r--r--drivers/net/wireless/ath/ar9170/led.c4
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c172
-rw-r--r--drivers/net/wireless/ath/ar9170/phy.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/ahb.c7
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c13
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c99
-rw-r--r--drivers/net/wireless/mwl8k.c123
-rw-r--r--drivers/net/wireless/orinoco/cfg.c5
-rw-r--r--drivers/net/wireless/p54/eeprom.c76
-rw-r--r--drivers/net/wireless/p54/fwio.c53
-rw-r--r--drivers/net/wireless/p54/led.c8
-rw-r--r--drivers/net/wireless/p54/p54pci.c3
-rw-r--r--drivers/net/wireless/p54/txrx.c36
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c17
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c11
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_rtl8225.c8
22 files changed, 398 insertions, 464 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index bde2fa8bb639..a105087af963 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
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index cd8caeab86ea..9b0f055420ee 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -658,8 +658,8 @@ static int at76_get_hw_config(struct at76_priv *priv)
658exit: 658exit:
659 kfree(hwcfg); 659 kfree(hwcfg);
660 if (ret < 0) 660 if (ret < 0)
661 printk(KERN_ERR "%s: cannot get HW Config (error %d)\n", 661 wiphy_err(priv->hw->wiphy, "cannot get hw config (error %d)\n",
662 wiphy_name(priv->hw->wiphy), ret); 662 ret);
663 663
664 return ret; 664 return ret;
665} 665}
@@ -794,8 +794,9 @@ static int at76_wait_completion(struct at76_priv *priv, int cmd)
794 do { 794 do {
795 status = at76_get_cmd_status(priv->udev, cmd); 795 status = at76_get_cmd_status(priv->udev, cmd);
796 if (status < 0) { 796 if (status < 0) {
797 printk(KERN_ERR "%s: at76_get_cmd_status failed: %d\n", 797 wiphy_err(priv->hw->wiphy,
798 wiphy_name(priv->hw->wiphy), status); 798 "at76_get_cmd_status failed: %d\n",
799 status);
799 break; 800 break;
800 } 801 }
801 802
@@ -810,9 +811,8 @@ static int at76_wait_completion(struct at76_priv *priv, int cmd)
810 811
811 schedule_timeout_interruptible(HZ / 10); /* 100 ms */ 812 schedule_timeout_interruptible(HZ / 10); /* 100 ms */
812 if (time_after(jiffies, timeout)) { 813 if (time_after(jiffies, timeout)) {
813 printk(KERN_ERR 814 wiphy_err(priv->hw->wiphy,
814 "%s: completion timeout for command %d\n", 815 "completion timeout for command %d\n", cmd);
815 wiphy_name(priv->hw->wiphy), cmd);
816 status = -ETIMEDOUT; 816 status = -ETIMEDOUT;
817 break; 817 break;
818 } 818 }
@@ -833,9 +833,9 @@ static int at76_set_mib(struct at76_priv *priv, struct set_mib_buffer *buf)
833 833
834 ret = at76_wait_completion(priv, CMD_SET_MIB); 834 ret = at76_wait_completion(priv, CMD_SET_MIB);
835 if (ret != CMD_STATUS_COMPLETE) { 835 if (ret != CMD_STATUS_COMPLETE) {
836 printk(KERN_INFO 836 wiphy_info(priv->hw->wiphy,
837 "%s: set_mib: at76_wait_completion failed " 837 "set_mib: at76_wait_completion failed with %d\n",
838 "with %d\n", wiphy_name(priv->hw->wiphy), ret); 838 ret);
839 ret = -EIO; 839 ret = -EIO;
840 } 840 }
841 841
@@ -855,8 +855,8 @@ static int at76_set_radio(struct at76_priv *priv, int enable)
855 855
856 ret = at76_set_card_command(priv->udev, cmd, NULL, 0); 856 ret = at76_set_card_command(priv->udev, cmd, NULL, 0);
857 if (ret < 0) 857 if (ret < 0)
858 printk(KERN_ERR "%s: at76_set_card_command(%d) failed: %d\n", 858 wiphy_err(priv->hw->wiphy,
859 wiphy_name(priv->hw->wiphy), cmd, ret); 859 "at76_set_card_command(%d) failed: %d\n", cmd, ret);
860 else 860 else
861 ret = 1; 861 ret = 1;
862 862
@@ -876,8 +876,8 @@ static int at76_set_pm_mode(struct at76_priv *priv)
876 876
877 ret = at76_set_mib(priv, &priv->mib_buf); 877 ret = at76_set_mib(priv, &priv->mib_buf);
878 if (ret < 0) 878 if (ret < 0)
879 printk(KERN_ERR "%s: set_mib (pm_mode) failed: %d\n", 879 wiphy_err(priv->hw->wiphy, "set_mib (pm_mode) failed: %d\n",
880 wiphy_name(priv->hw->wiphy), ret); 880 ret);
881 881
882 return ret; 882 return ret;
883} 883}
@@ -893,8 +893,8 @@ static int at76_set_preamble(struct at76_priv *priv, u8 type)
893 893
894 ret = at76_set_mib(priv, &priv->mib_buf); 894 ret = at76_set_mib(priv, &priv->mib_buf);
895 if (ret < 0) 895 if (ret < 0)
896 printk(KERN_ERR "%s: set_mib (preamble) failed: %d\n", 896 wiphy_err(priv->hw->wiphy, "set_mib (preamble) failed: %d\n",
897 wiphy_name(priv->hw->wiphy), ret); 897 ret);
898 898
899 return ret; 899 return ret;
900} 900}
@@ -910,8 +910,8 @@ static int at76_set_frag(struct at76_priv *priv, u16 size)
910 910
911 ret = at76_set_mib(priv, &priv->mib_buf); 911 ret = at76_set_mib(priv, &priv->mib_buf);
912 if (ret < 0) 912 if (ret < 0)
913 printk(KERN_ERR "%s: set_mib (frag threshold) failed: %d\n", 913 wiphy_err(priv->hw->wiphy,
914 wiphy_name(priv->hw->wiphy), ret); 914 "set_mib (frag threshold) failed: %d\n", ret);
915 915
916 return ret; 916 return ret;
917} 917}
@@ -927,8 +927,7 @@ static int at76_set_rts(struct at76_priv *priv, u16 size)
927 927
928 ret = at76_set_mib(priv, &priv->mib_buf); 928 ret = at76_set_mib(priv, &priv->mib_buf);
929 if (ret < 0) 929 if (ret < 0)
930 printk(KERN_ERR "%s: set_mib (rts) failed: %d\n", 930 wiphy_err(priv->hw->wiphy, "set_mib (rts) failed: %d\n", ret);
931 wiphy_name(priv->hw->wiphy), ret);
932 931
933 return ret; 932 return ret;
934} 933}
@@ -944,8 +943,8 @@ static int at76_set_autorate_fallback(struct at76_priv *priv, int onoff)
944 943
945 ret = at76_set_mib(priv, &priv->mib_buf); 944 ret = at76_set_mib(priv, &priv->mib_buf);
946 if (ret < 0) 945 if (ret < 0)
947 printk(KERN_ERR "%s: set_mib (autorate fallback) failed: %d\n", 946 wiphy_err(priv->hw->wiphy,
948 wiphy_name(priv->hw->wiphy), ret); 947 "set_mib (autorate fallback) failed: %d\n", ret);
949 948
950 return ret; 949 return ret;
951} 950}
@@ -963,8 +962,8 @@ static void at76_dump_mib_mac_addr(struct at76_priv *priv)
963 ret = at76_get_mib(priv->udev, MIB_MAC_ADDR, m, 962 ret = at76_get_mib(priv->udev, MIB_MAC_ADDR, m,
964 sizeof(struct mib_mac_addr)); 963 sizeof(struct mib_mac_addr));
965 if (ret < 0) { 964 if (ret < 0) {
966 printk(KERN_ERR "%s: at76_get_mib (MAC_ADDR) failed: %d\n", 965 wiphy_err(priv->hw->wiphy,
967 wiphy_name(priv->hw->wiphy), ret); 966 "at76_get_mib (mac_addr) failed: %d\n", ret);
968 goto exit; 967 goto exit;
969 } 968 }
970 969
@@ -992,8 +991,8 @@ static void at76_dump_mib_mac_wep(struct at76_priv *priv)
992 ret = at76_get_mib(priv->udev, MIB_MAC_WEP, m, 991 ret = at76_get_mib(priv->udev, MIB_MAC_WEP, m,
993 sizeof(struct mib_mac_wep)); 992 sizeof(struct mib_mac_wep));
994 if (ret < 0) { 993 if (ret < 0) {
995 printk(KERN_ERR "%s: at76_get_mib (MAC_WEP) failed: %d\n", 994 wiphy_err(priv->hw->wiphy,
996 wiphy_name(priv->hw->wiphy), ret); 995 "at76_get_mib (mac_wep) failed: %d\n", ret);
997 goto exit; 996 goto exit;
998 } 997 }
999 998
@@ -1029,8 +1028,8 @@ static void at76_dump_mib_mac_mgmt(struct at76_priv *priv)
1029 ret = at76_get_mib(priv->udev, MIB_MAC_MGMT, m, 1028 ret = at76_get_mib(priv->udev, MIB_MAC_MGMT, m,
1030 sizeof(struct mib_mac_mgmt)); 1029 sizeof(struct mib_mac_mgmt));
1031 if (ret < 0) { 1030 if (ret < 0) {
1032 printk(KERN_ERR "%s: at76_get_mib (MAC_MGMT) failed: %d\n", 1031 wiphy_err(priv->hw->wiphy,
1033 wiphy_name(priv->hw->wiphy), ret); 1032 "at76_get_mib (mac_mgmt) failed: %d\n", ret);
1034 goto exit; 1033 goto exit;
1035 } 1034 }
1036 1035
@@ -1065,8 +1064,8 @@ static void at76_dump_mib_mac(struct at76_priv *priv)
1065 1064
1066 ret = at76_get_mib(priv->udev, MIB_MAC, m, sizeof(struct mib_mac)); 1065 ret = at76_get_mib(priv->udev, MIB_MAC, m, sizeof(struct mib_mac));
1067 if (ret < 0) { 1066 if (ret < 0) {
1068 printk(KERN_ERR "%s: at76_get_mib (MAC) failed: %d\n", 1067 wiphy_err(priv->hw->wiphy,
1069 wiphy_name(priv->hw->wiphy), ret); 1068 "at76_get_mib (mac) failed: %d\n", ret);
1070 goto exit; 1069 goto exit;
1071 } 1070 }
1072 1071
@@ -1102,8 +1101,8 @@ static void at76_dump_mib_phy(struct at76_priv *priv)
1102 1101
1103 ret = at76_get_mib(priv->udev, MIB_PHY, m, sizeof(struct mib_phy)); 1102 ret = at76_get_mib(priv->udev, MIB_PHY, m, sizeof(struct mib_phy));
1104 if (ret < 0) { 1103 if (ret < 0) {
1105 printk(KERN_ERR "%s: at76_get_mib (PHY) failed: %d\n", 1104 wiphy_err(priv->hw->wiphy,
1106 wiphy_name(priv->hw->wiphy), ret); 1105 "at76_get_mib (phy) failed: %d\n", ret);
1107 goto exit; 1106 goto exit;
1108 } 1107 }
1109 1108
@@ -1135,8 +1134,8 @@ static void at76_dump_mib_local(struct at76_priv *priv)
1135 1134
1136 ret = at76_get_mib(priv->udev, MIB_LOCAL, m, sizeof(struct mib_local)); 1135 ret = at76_get_mib(priv->udev, MIB_LOCAL, m, sizeof(struct mib_local));
1137 if (ret < 0) { 1136 if (ret < 0) {
1138 printk(KERN_ERR "%s: at76_get_mib (LOCAL) failed: %d\n", 1137 wiphy_err(priv->hw->wiphy,
1139 wiphy_name(priv->hw->wiphy), ret); 1138 "at76_get_mib (local) failed: %d\n", ret);
1140 goto exit; 1139 goto exit;
1141 } 1140 }
1142 1141
@@ -1161,8 +1160,8 @@ static void at76_dump_mib_mdomain(struct at76_priv *priv)
1161 ret = at76_get_mib(priv->udev, MIB_MDOMAIN, m, 1160 ret = at76_get_mib(priv->udev, MIB_MDOMAIN, m,
1162 sizeof(struct mib_mdomain)); 1161 sizeof(struct mib_mdomain));
1163 if (ret < 0) { 1162 if (ret < 0) {
1164 printk(KERN_ERR "%s: at76_get_mib (MDOMAIN) failed: %d\n", 1163 wiphy_err(priv->hw->wiphy,
1165 wiphy_name(priv->hw->wiphy), ret); 1164 "at76_get_mib (mdomain) failed: %d\n", ret);
1166 goto exit; 1165 goto exit;
1167 } 1166 }
1168 1167
@@ -1233,16 +1232,16 @@ static int at76_submit_rx_urb(struct at76_priv *priv)
1233 struct sk_buff *skb = priv->rx_skb; 1232 struct sk_buff *skb = priv->rx_skb;
1234 1233
1235 if (!priv->rx_urb) { 1234 if (!priv->rx_urb) {
1236 printk(KERN_ERR "%s: %s: priv->rx_urb is NULL\n", 1235 wiphy_err(priv->hw->wiphy, "%s: priv->rx_urb is null\n",
1237 wiphy_name(priv->hw->wiphy), __func__); 1236 __func__);
1238 return -EFAULT; 1237 return -EFAULT;
1239 } 1238 }
1240 1239
1241 if (!skb) { 1240 if (!skb) {
1242 skb = dev_alloc_skb(sizeof(struct at76_rx_buffer)); 1241 skb = dev_alloc_skb(sizeof(struct at76_rx_buffer));
1243 if (!skb) { 1242 if (!skb) {
1244 printk(KERN_ERR "%s: cannot allocate rx skbuff\n", 1243 wiphy_err(priv->hw->wiphy,
1245 wiphy_name(priv->hw->wiphy)); 1244 "cannot allocate rx skbuff\n");
1246 ret = -ENOMEM; 1245 ret = -ENOMEM;
1247 goto exit; 1246 goto exit;
1248 } 1247 }
@@ -1261,15 +1260,14 @@ static int at76_submit_rx_urb(struct at76_priv *priv)
1261 at76_dbg(DBG_DEVSTART, 1260 at76_dbg(DBG_DEVSTART,
1262 "usb_submit_urb returned -ENODEV"); 1261 "usb_submit_urb returned -ENODEV");
1263 else 1262 else
1264 printk(KERN_ERR "%s: rx, usb_submit_urb failed: %d\n", 1263 wiphy_err(priv->hw->wiphy,
1265 wiphy_name(priv->hw->wiphy), ret); 1264 "rx, usb_submit_urb failed: %d\n", ret);
1266 } 1265 }
1267 1266
1268exit: 1267exit:
1269 if (ret < 0 && ret != -ENODEV) 1268 if (ret < 0 && ret != -ENODEV)
1270 printk(KERN_ERR "%s: cannot submit rx urb - please unload the " 1269 wiphy_err(priv->hw->wiphy,
1271 "driver and/or power cycle the device\n", 1270 "cannot submit rx urb - please unload the driver and/or power cycle the device\n");
1272 wiphy_name(priv->hw->wiphy));
1273 1271
1274 return ret; 1272 return ret;
1275} 1273}
@@ -1438,8 +1436,8 @@ static int at76_startup_device(struct at76_priv *priv)
1438 ret = at76_set_card_command(priv->udev, CMD_STARTUP, &priv->card_config, 1436 ret = at76_set_card_command(priv->udev, CMD_STARTUP, &priv->card_config,
1439 sizeof(struct at76_card_config)); 1437 sizeof(struct at76_card_config));
1440 if (ret < 0) { 1438 if (ret < 0) {
1441 printk(KERN_ERR "%s: at76_set_card_command failed: %d\n", 1439 wiphy_err(priv->hw->wiphy, "at76_set_card_command failed: %d\n",
1442 wiphy_name(priv->hw->wiphy), ret); 1440 ret);
1443 return ret; 1441 return ret;
1444 } 1442 }
1445 1443
@@ -1504,8 +1502,8 @@ static void at76_work_set_promisc(struct work_struct *work)
1504 1502
1505 ret = at76_set_mib(priv, &priv->mib_buf); 1503 ret = at76_set_mib(priv, &priv->mib_buf);
1506 if (ret < 0) 1504 if (ret < 0)
1507 printk(KERN_ERR "%s: set_mib (promiscuous_mode) failed: %d\n", 1505 wiphy_err(priv->hw->wiphy,
1508 wiphy_name(priv->hw->wiphy), ret); 1506 "set_mib (promiscuous_mode) failed: %d\n", ret);
1509 1507
1510 mutex_unlock(&priv->mtx); 1508 mutex_unlock(&priv->mtx);
1511} 1509}
@@ -1668,16 +1666,16 @@ static int at76_join(struct at76_priv *priv)
1668 sizeof(struct at76_req_join)); 1666 sizeof(struct at76_req_join));
1669 1667
1670 if (ret < 0) { 1668 if (ret < 0) {
1671 printk(KERN_ERR "%s: at76_set_card_command failed: %d\n", 1669 wiphy_err(priv->hw->wiphy, "at76_set_card_command failed: %d\n",
1672 wiphy_name(priv->hw->wiphy), ret); 1670 ret);
1673 return 0; 1671 return 0;
1674 } 1672 }
1675 1673
1676 ret = at76_wait_completion(priv, CMD_JOIN); 1674 ret = at76_wait_completion(priv, CMD_JOIN);
1677 at76_dbg(DBG_MAC80211, "%s: CMD_JOIN returned: 0x%02x", __func__, ret); 1675 at76_dbg(DBG_MAC80211, "%s: CMD_JOIN returned: 0x%02x", __func__, ret);
1678 if (ret != CMD_STATUS_COMPLETE) { 1676 if (ret != CMD_STATUS_COMPLETE) {
1679 printk(KERN_ERR "%s: at76_wait_completion failed: %d\n", 1677 wiphy_err(priv->hw->wiphy, "at76_wait_completion failed: %d\n",
1680 wiphy_name(priv->hw->wiphy), ret); 1678 ret);
1681 return 0; 1679 return 0;
1682 } 1680 }
1683 1681
@@ -1745,8 +1743,8 @@ static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1745 at76_dbg(DBG_MAC80211, "%s()", __func__); 1743 at76_dbg(DBG_MAC80211, "%s()", __func__);
1746 1744
1747 if (priv->tx_urb->status == -EINPROGRESS) { 1745 if (priv->tx_urb->status == -EINPROGRESS) {
1748 printk(KERN_ERR "%s: %s called while tx urb is pending\n", 1746 wiphy_err(priv->hw->wiphy,
1749 wiphy_name(priv->hw->wiphy), __func__); 1747 "%s called while tx urb is pending\n", __func__);
1750 return NETDEV_TX_BUSY; 1748 return NETDEV_TX_BUSY;
1751 } 1749 }
1752 1750
@@ -1794,13 +1792,12 @@ static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1794 submit_len, at76_mac80211_tx_callback, priv); 1792 submit_len, at76_mac80211_tx_callback, priv);
1795 ret = usb_submit_urb(priv->tx_urb, GFP_ATOMIC); 1793 ret = usb_submit_urb(priv->tx_urb, GFP_ATOMIC);
1796 if (ret) { 1794 if (ret) {
1797 printk(KERN_ERR "%s: error in tx submit urb: %d\n", 1795 wiphy_err(priv->hw->wiphy, "error in tx submit urb: %d\n", ret);
1798 wiphy_name(priv->hw->wiphy), ret);
1799 if (ret == -EINVAL) 1796 if (ret == -EINVAL)
1800 printk(KERN_ERR 1797 wiphy_err(priv->hw->wiphy,
1801 "%s: -EINVAL: tx urb %p hcpriv %p complete %p\n", 1798 "-einval: tx urb %p hcpriv %p complete %p\n",
1802 wiphy_name(priv->hw->wiphy), priv->tx_urb, 1799 priv->tx_urb,
1803 priv->tx_urb->hcpriv, priv->tx_urb->complete); 1800 priv->tx_urb->hcpriv, priv->tx_urb->complete);
1804 } 1801 }
1805 1802
1806 return 0; 1803 return 0;
@@ -1817,8 +1814,8 @@ static int at76_mac80211_start(struct ieee80211_hw *hw)
1817 1814
1818 ret = at76_submit_rx_urb(priv); 1815 ret = at76_submit_rx_urb(priv);
1819 if (ret < 0) { 1816 if (ret < 0) {
1820 printk(KERN_ERR "%s: open: submit_rx_urb failed: %d\n", 1817 wiphy_err(priv->hw->wiphy, "open: submit_rx_urb failed: %d\n",
1821 wiphy_name(priv->hw->wiphy), ret); 1818 ret);
1822 goto error; 1819 goto error;
1823 } 1820 }
1824 1821
@@ -2316,14 +2313,12 @@ static int at76_init_new_device(struct at76_priv *priv,
2316 2313
2317 priv->mac80211_registered = 1; 2314 priv->mac80211_registered = 1;
2318 2315
2319 printk(KERN_INFO "%s: USB %s, MAC %pM, firmware %d.%d.%d-%d\n", 2316 wiphy_info(priv->hw->wiphy, "usb %s, mac %pm, firmware %d.%d.%d-%d\n",
2320 wiphy_name(priv->hw->wiphy), 2317 dev_name(&interface->dev), priv->mac_addr,
2321 dev_name(&interface->dev), priv->mac_addr, 2318 priv->fw_version.major, priv->fw_version.minor,
2322 priv->fw_version.major, priv->fw_version.minor, 2319 priv->fw_version.patch, priv->fw_version.build);
2323 priv->fw_version.patch, priv->fw_version.build); 2320 wiphy_info(priv->hw->wiphy, "regulatory domain 0x%02x: %s\n",
2324 printk(KERN_INFO "%s: regulatory domain 0x%02x: %s\n", 2321 priv->regulatory_domain, priv->domain->name);
2325 wiphy_name(priv->hw->wiphy),
2326 priv->regulatory_domain, priv->domain->name);
2327 2322
2328exit: 2323exit:
2329 return ret; 2324 return ret;
@@ -2485,7 +2480,7 @@ static void at76_disconnect(struct usb_interface *interface)
2485 if (!priv) 2480 if (!priv)
2486 return; 2481 return;
2487 2482
2488 printk(KERN_INFO "%s: disconnecting\n", wiphy_name(priv->hw->wiphy)); 2483 wiphy_info(priv->hw->wiphy, "disconnecting\n");
2489 at76_delete_device(priv); 2484 at76_delete_device(priv);
2490 dev_printk(KERN_INFO, &interface->dev, "disconnected\n"); 2485 dev_printk(KERN_INFO, &interface->dev, "disconnected\n");
2491} 2486}
diff --git a/drivers/net/wireless/ath/ar9170/cmd.c b/drivers/net/wireless/ath/ar9170/cmd.c
index cf6f5c4174a6..4604de09a8b2 100644
--- a/drivers/net/wireless/ath/ar9170/cmd.c
+++ b/drivers/net/wireless/ath/ar9170/cmd.c
@@ -48,8 +48,7 @@ int ar9170_write_mem(struct ar9170 *ar, const __le32 *data, size_t len)
48 48
49 err = ar->exec_cmd(ar, AR9170_CMD_WMEM, len, (u8 *) data, 0, NULL); 49 err = ar->exec_cmd(ar, AR9170_CMD_WMEM, len, (u8 *) data, 0, NULL);
50 if (err) 50 if (err)
51 printk(KERN_DEBUG "%s: writing memory failed\n", 51 wiphy_debug(ar->hw->wiphy, "writing memory failed\n");
52 wiphy_name(ar->hw->wiphy));
53 return err; 52 return err;
54} 53}
55 54
@@ -67,8 +66,8 @@ int ar9170_write_reg(struct ar9170 *ar, const u32 reg, const u32 val)
67 err = ar->exec_cmd(ar, AR9170_CMD_WREG, sizeof(buf), 66 err = ar->exec_cmd(ar, AR9170_CMD_WREG, sizeof(buf),
68 (u8 *) buf, 0, NULL); 67 (u8 *) buf, 0, NULL);
69 if (err) 68 if (err)
70 printk(KERN_DEBUG "%s: writing reg %#x (val %#x) failed\n", 69 wiphy_debug(ar->hw->wiphy, "writing reg %#x (val %#x) failed\n",
71 wiphy_name(ar->hw->wiphy), reg, val); 70 reg, val);
72 return err; 71 return err;
73} 72}
74 73
diff --git a/drivers/net/wireless/ath/ar9170/led.c b/drivers/net/wireless/ath/ar9170/led.c
index 86c4e79f6bc8..832d90087f8a 100644
--- a/drivers/net/wireless/ath/ar9170/led.c
+++ b/drivers/net/wireless/ath/ar9170/led.c
@@ -133,8 +133,8 @@ static int ar9170_register_led(struct ar9170 *ar, int i, char *name,
133 err = led_classdev_register(wiphy_dev(ar->hw->wiphy), 133 err = led_classdev_register(wiphy_dev(ar->hw->wiphy),
134 &ar->leds[i].l); 134 &ar->leds[i].l);
135 if (err) 135 if (err)
136 printk(KERN_ERR "%s: failed to register %s LED (%d).\n", 136 wiphy_err(ar->hw->wiphy, "failed to register %s LED (%d).\n",
137 wiphy_name(ar->hw->wiphy), ar->leds[i].name, err); 137 ar->leds[i].name, err);
138 else 138 else
139 ar->leds[i].registered = true; 139 ar->leds[i].registered = true;
140 140
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 2abc87578994..5e2c51433967 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -198,12 +198,13 @@ static void ar9170_print_txheader(struct ar9170 *ar, struct sk_buff *skb)
198 struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data; 198 struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data;
199 struct ieee80211_hdr *hdr = (void *) txc->frame_data; 199 struct ieee80211_hdr *hdr = (void *) txc->frame_data;
200 200
201 printk(KERN_DEBUG "%s: => FRAME [skb:%p, q:%d, DA:[%pM] s:%d " 201 wiphy_debug(ar->hw->wiphy,
202 "mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n", 202 "=> FRAME [skb:%p, q:%d, DA:[%pM] s:%d "
203 wiphy_name(ar->hw->wiphy), skb, skb_get_queue_mapping(skb), 203 "mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n",
204 ieee80211_get_DA(hdr), ar9170_get_seq_h(hdr), 204 skb, skb_get_queue_mapping(skb),
205 le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control), 205 ieee80211_get_DA(hdr), ar9170_get_seq_h(hdr),
206 jiffies_to_msecs(arinfo->timeout - jiffies)); 206 le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control),
207 jiffies_to_msecs(arinfo->timeout - jiffies));
207} 208}
208 209
209static void __ar9170_dump_txqueue(struct ar9170 *ar, 210static void __ar9170_dump_txqueue(struct ar9170 *ar,
@@ -213,8 +214,8 @@ static void __ar9170_dump_txqueue(struct ar9170 *ar,
213 int i = 0; 214 int i = 0;
214 215
215 printk(KERN_DEBUG "---[ cut here ]---\n"); 216 printk(KERN_DEBUG "---[ cut here ]---\n");
216 printk(KERN_DEBUG "%s: %d entries in queue.\n", 217 wiphy_debug(ar->hw->wiphy, "%d entries in queue.\n",
217 wiphy_name(ar->hw->wiphy), skb_queue_len(queue)); 218 skb_queue_len(queue));
218 219
219 skb_queue_walk(queue, skb) { 220 skb_queue_walk(queue, skb) {
220 printk(KERN_DEBUG "index:%d =>\n", i++); 221 printk(KERN_DEBUG "index:%d =>\n", i++);
@@ -244,15 +245,14 @@ static void __ar9170_dump_txstats(struct ar9170 *ar)
244{ 245{
245 int i; 246 int i;
246 247
247 printk(KERN_DEBUG "%s: QoS queue stats\n", 248 wiphy_debug(ar->hw->wiphy, "qos queue stats\n");
248 wiphy_name(ar->hw->wiphy));
249 249
250 for (i = 0; i < __AR9170_NUM_TXQ; i++) 250 for (i = 0; i < __AR9170_NUM_TXQ; i++)
251 printk(KERN_DEBUG "%s: queue:%d limit:%d len:%d waitack:%d " 251 wiphy_debug(ar->hw->wiphy,
252 " stopped:%d\n", wiphy_name(ar->hw->wiphy), i, 252 "queue:%d limit:%d len:%d waitack:%d stopped:%d\n",
253 ar->tx_stats[i].limit, ar->tx_stats[i].len, 253 i, ar->tx_stats[i].limit, ar->tx_stats[i].len,
254 skb_queue_len(&ar->tx_status[i]), 254 skb_queue_len(&ar->tx_status[i]),
255 ieee80211_queue_stopped(ar->hw, i)); 255 ieee80211_queue_stopped(ar->hw, i));
256} 256}
257#endif /* AR9170_QUEUE_STOP_DEBUG */ 257#endif /* AR9170_QUEUE_STOP_DEBUG */
258 258
@@ -274,9 +274,9 @@ static void ar9170_recycle_expired(struct ar9170 *ar,
274 274
275 if (time_is_before_jiffies(arinfo->timeout)) { 275 if (time_is_before_jiffies(arinfo->timeout)) {
276#ifdef AR9170_QUEUE_DEBUG 276#ifdef AR9170_QUEUE_DEBUG
277 printk(KERN_DEBUG "%s: [%ld > %ld] frame expired => " 277 wiphy_debug(ar->hw->wiphy,
278 "recycle\n", wiphy_name(ar->hw->wiphy), 278 "[%ld > %ld] frame expired => recycle\n",
279 jiffies, arinfo->timeout); 279 jiffies, arinfo->timeout);
280 ar9170_print_txheader(ar, skb); 280 ar9170_print_txheader(ar, skb);
281#endif /* AR9170_QUEUE_DEBUG */ 281#endif /* AR9170_QUEUE_DEBUG */
282 __skb_unlink(skb, queue); 282 __skb_unlink(skb, queue);
@@ -317,8 +317,8 @@ static void ar9170_tx_status(struct ar9170 *ar, struct sk_buff *skb,
317 break; 317 break;
318 318
319 default: 319 default:
320 printk(KERN_ERR "%s: invalid tx_status response (%x).\n", 320 wiphy_err(ar->hw->wiphy,
321 wiphy_name(ar->hw->wiphy), tx_status); 321 "invalid tx_status response (%x)\n", tx_status);
322 break; 322 break;
323 } 323 }
324 324
@@ -339,8 +339,7 @@ void ar9170_tx_callback(struct ar9170 *ar, struct sk_buff *skb)
339 339
340 if (ar->tx_stats[queue].len < AR9170_NUM_TX_LIMIT_SOFT) { 340 if (ar->tx_stats[queue].len < AR9170_NUM_TX_LIMIT_SOFT) {
341#ifdef AR9170_QUEUE_STOP_DEBUG 341#ifdef AR9170_QUEUE_STOP_DEBUG
342 printk(KERN_DEBUG "%s: wake queue %d\n", 342 wiphy_debug(ar->hw->wiphy, "wake queue %d\n", queue);
343 wiphy_name(ar->hw->wiphy), queue);
344 __ar9170_dump_txstats(ar); 343 __ar9170_dump_txstats(ar);
345#endif /* AR9170_QUEUE_STOP_DEBUG */ 344#endif /* AR9170_QUEUE_STOP_DEBUG */
346 ieee80211_wake_queue(ar->hw, queue); 345 ieee80211_wake_queue(ar->hw, queue);
@@ -387,9 +386,9 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar,
387 386
388 if (mac && compare_ether_addr(ieee80211_get_DA(hdr), mac)) { 387 if (mac && compare_ether_addr(ieee80211_get_DA(hdr), mac)) {
389#ifdef AR9170_QUEUE_DEBUG 388#ifdef AR9170_QUEUE_DEBUG
390 printk(KERN_DEBUG "%s: skip frame => DA %pM != %pM\n", 389 wiphy_debug(ar->hw->wiphy,
391 wiphy_name(ar->hw->wiphy), mac, 390 "skip frame => da %pm != %pm\n",
392 ieee80211_get_DA(hdr)); 391 mac, ieee80211_get_DA(hdr));
393 ar9170_print_txheader(ar, skb); 392 ar9170_print_txheader(ar, skb);
394#endif /* AR9170_QUEUE_DEBUG */ 393#endif /* AR9170_QUEUE_DEBUG */
395 continue; 394 continue;
@@ -400,8 +399,8 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar,
400 399
401 if ((rate != AR9170_TX_INVALID_RATE) && (r != rate)) { 400 if ((rate != AR9170_TX_INVALID_RATE) && (r != rate)) {
402#ifdef AR9170_QUEUE_DEBUG 401#ifdef AR9170_QUEUE_DEBUG
403 printk(KERN_DEBUG "%s: skip frame => rate %d != %d\n", 402 wiphy_debug(ar->hw->wiphy,
404 wiphy_name(ar->hw->wiphy), rate, r); 403 "skip frame => rate %d != %d\n", rate, r);
405 ar9170_print_txheader(ar, skb); 404 ar9170_print_txheader(ar, skb);
406#endif /* AR9170_QUEUE_DEBUG */ 405#endif /* AR9170_QUEUE_DEBUG */
407 continue; 406 continue;
@@ -413,9 +412,9 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar,
413 } 412 }
414 413
415#ifdef AR9170_QUEUE_DEBUG 414#ifdef AR9170_QUEUE_DEBUG
416 printk(KERN_ERR "%s: ESS:[%pM] does not have any " 415 wiphy_err(ar->hw->wiphy,
417 "outstanding frames in queue.\n", 416 "ESS:[%pM] does not have any outstanding frames in queue.\n",
418 wiphy_name(ar->hw->wiphy), mac); 417 mac);
419 __ar9170_dump_txqueue(ar, queue); 418 __ar9170_dump_txqueue(ar, queue);
420#endif /* AR9170_QUEUE_DEBUG */ 419#endif /* AR9170_QUEUE_DEBUG */
421 spin_unlock_irqrestore(&queue->lock, flags); 420 spin_unlock_irqrestore(&queue->lock, flags);
@@ -444,8 +443,8 @@ static void ar9170_tx_janitor(struct work_struct *work)
444 443
445 for (i = 0; i < __AR9170_NUM_TXQ; i++) { 444 for (i = 0; i < __AR9170_NUM_TXQ; i++) {
446#ifdef AR9170_QUEUE_DEBUG 445#ifdef AR9170_QUEUE_DEBUG
447 printk(KERN_DEBUG "%s: garbage collector scans queue:%d\n", 446 wiphy_debug(ar->hw->wiphy, "garbage collector scans queue:%d\n",
448 wiphy_name(ar->hw->wiphy), i); 447 i);
449 ar9170_dump_txqueue(ar, &ar->tx_pending[i]); 448 ar9170_dump_txqueue(ar, &ar->tx_pending[i]);
450 ar9170_dump_txqueue(ar, &ar->tx_status[i]); 449 ar9170_dump_txqueue(ar, &ar->tx_status[i]);
451#endif /* AR9170_QUEUE_DEBUG */ 450#endif /* AR9170_QUEUE_DEBUG */
@@ -495,8 +494,9 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len)
495 u32 q = (phy & AR9170_TX_PHY_QOS_MASK) >> 494 u32 q = (phy & AR9170_TX_PHY_QOS_MASK) >>
496 AR9170_TX_PHY_QOS_SHIFT; 495 AR9170_TX_PHY_QOS_SHIFT;
497#ifdef AR9170_QUEUE_DEBUG 496#ifdef AR9170_QUEUE_DEBUG
498 printk(KERN_DEBUG "%s: recv tx_status for %pM, p:%08x, q:%d\n", 497 wiphy_debug(ar->hw->wiphy,
499 wiphy_name(ar->hw->wiphy), cmd->tx_status.dst, phy, q); 498 "recv tx_status for %pm, p:%08x, q:%d\n",
499 cmd->tx_status.dst, phy, q);
500#endif /* AR9170_QUEUE_DEBUG */ 500#endif /* AR9170_QUEUE_DEBUG */
501 501
502 skb = ar9170_get_queued_skb(ar, cmd->tx_status.dst, 502 skb = ar9170_get_queued_skb(ar, cmd->tx_status.dst,
@@ -582,7 +582,7 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len)
582 break; 582 break;
583 583
584 default: 584 default:
585 printk(KERN_INFO "received unhandled event %x\n", cmd->type); 585 pr_info("received unhandled event %x\n", cmd->type);
586 print_hex_dump_bytes("dump:", DUMP_PREFIX_NONE, buf, len); 586 print_hex_dump_bytes("dump:", DUMP_PREFIX_NONE, buf, len);
587 break; 587 break;
588 } 588 }
@@ -675,9 +675,9 @@ static int ar9170_rx_mac_status(struct ar9170 *ar,
675 /* TODO: update netdevice's RX dropped/errors statistics */ 675 /* TODO: update netdevice's RX dropped/errors statistics */
676 676
677 if (ar9170_nag_limiter(ar)) 677 if (ar9170_nag_limiter(ar))
678 printk(KERN_DEBUG "%s: received frame with " 678 wiphy_debug(ar->hw->wiphy,
679 "suspicious error code (%#x).\n", 679 "received frame with suspicious error code (%#x).\n",
680 wiphy_name(ar->hw->wiphy), error); 680 error);
681 681
682 return -EINVAL; 682 return -EINVAL;
683 } 683 }
@@ -704,9 +704,9 @@ static int ar9170_rx_mac_status(struct ar9170 *ar,
704 break; 704 break;
705 default: 705 default:
706 if (ar9170_nag_limiter(ar)) 706 if (ar9170_nag_limiter(ar))
707 printk(KERN_ERR "%s: invalid plcp cck rate " 707 wiphy_err(ar->hw->wiphy,
708 "(%x).\n", wiphy_name(ar->hw->wiphy), 708 "invalid plcp cck rate (%x).\n",
709 head->plcp[0]); 709 head->plcp[0]);
710 return -EINVAL; 710 return -EINVAL;
711 } 711 }
712 break; 712 break;
@@ -740,9 +740,9 @@ static int ar9170_rx_mac_status(struct ar9170 *ar,
740 break; 740 break;
741 default: 741 default:
742 if (ar9170_nag_limiter(ar)) 742 if (ar9170_nag_limiter(ar))
743 printk(KERN_ERR "%s: invalid plcp ofdm rate " 743 wiphy_err(ar->hw->wiphy,
744 "(%x).\n", wiphy_name(ar->hw->wiphy), 744 "invalid plcp ofdm rate (%x).\n",
745 head->plcp[0]); 745 head->plcp[0]);
746 return -EINVAL; 746 return -EINVAL;
747 } 747 }
748 if (status->band == IEEE80211_BAND_2GHZ) 748 if (status->band == IEEE80211_BAND_2GHZ)
@@ -761,8 +761,7 @@ static int ar9170_rx_mac_status(struct ar9170 *ar,
761 761
762 default: 762 default:
763 if (ar9170_nag_limiter(ar)) 763 if (ar9170_nag_limiter(ar))
764 printk(KERN_ERR "%s: invalid modulation\n", 764 wiphy_err(ar->hw->wiphy, "invalid modulation\n");
765 wiphy_name(ar->hw->wiphy));
766 return -EINVAL; 765 return -EINVAL;
767 } 766 }
768 767
@@ -863,8 +862,8 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len)
863 ar->rx_mpdu.has_plcp = true; 862 ar->rx_mpdu.has_plcp = true;
864 } else { 863 } else {
865 if (ar9170_nag_limiter(ar)) 864 if (ar9170_nag_limiter(ar))
866 printk(KERN_ERR "%s: plcp info is clipped.\n", 865 wiphy_err(ar->hw->wiphy,
867 wiphy_name(ar->hw->wiphy)); 866 "plcp info is clipped.\n");
868 return ; 867 return ;
869 } 868 }
870 break; 869 break;
@@ -877,8 +876,8 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len)
877 phy = (void *)(buf + mpdu_len); 876 phy = (void *)(buf + mpdu_len);
878 } else { 877 } else {
879 if (ar9170_nag_limiter(ar)) 878 if (ar9170_nag_limiter(ar))
880 printk(KERN_ERR "%s: frame tail is clipped.\n", 879 wiphy_err(ar->hw->wiphy,
881 wiphy_name(ar->hw->wiphy)); 880 "frame tail is clipped.\n");
882 return ; 881 return ;
883 } 882 }
884 883
@@ -888,9 +887,8 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len)
888 if (!ar9170_nag_limiter(ar)) 887 if (!ar9170_nag_limiter(ar))
889 return ; 888 return ;
890 889
891 printk(KERN_ERR "%s: rx stream did not start " 890 wiphy_err(ar->hw->wiphy,
892 "with a first_mpdu frame tag.\n", 891 "rx stream did not start with a first_mpdu frame tag.\n");
893 wiphy_name(ar->hw->wiphy));
894 892
895 return ; 893 return ;
896 } 894 }
@@ -954,8 +952,8 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
954 if (!ar->rx_failover_missing) { 952 if (!ar->rx_failover_missing) {
955 /* this is no "short read". */ 953 /* this is no "short read". */
956 if (ar9170_nag_limiter(ar)) { 954 if (ar9170_nag_limiter(ar)) {
957 printk(KERN_ERR "%s: missing tag!\n", 955 wiphy_err(ar->hw->wiphy,
958 wiphy_name(ar->hw->wiphy)); 956 "missing tag!\n");
959 goto err_telluser; 957 goto err_telluser;
960 } else 958 } else
961 goto err_silent; 959 goto err_silent;
@@ -963,9 +961,8 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
963 961
964 if (ar->rx_failover_missing > tlen) { 962 if (ar->rx_failover_missing > tlen) {
965 if (ar9170_nag_limiter(ar)) { 963 if (ar9170_nag_limiter(ar)) {
966 printk(KERN_ERR "%s: possible multi " 964 wiphy_err(ar->hw->wiphy,
967 "stream corruption!\n", 965 "possible multi stream corruption!\n");
968 wiphy_name(ar->hw->wiphy));
969 goto err_telluser; 966 goto err_telluser;
970 } else 967 } else
971 goto err_silent; 968 goto err_silent;
@@ -997,9 +994,8 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
997 if (ar->rx_failover_missing) { 994 if (ar->rx_failover_missing) {
998 /* TODO: handle double stream corruption. */ 995 /* TODO: handle double stream corruption. */
999 if (ar9170_nag_limiter(ar)) { 996 if (ar9170_nag_limiter(ar)) {
1000 printk(KERN_ERR "%s: double rx stream " 997 wiphy_err(ar->hw->wiphy,
1001 "corruption!\n", 998 "double rx stream corruption!\n");
1002 wiphy_name(ar->hw->wiphy));
1003 goto err_telluser; 999 goto err_telluser;
1004 } else 1000 } else
1005 goto err_silent; 1001 goto err_silent;
@@ -1042,9 +1038,9 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
1042 1038
1043 if (tlen) { 1039 if (tlen) {
1044 if (net_ratelimit()) 1040 if (net_ratelimit())
1045 printk(KERN_ERR "%s: %d bytes of unprocessed " 1041 wiphy_err(ar->hw->wiphy,
1046 "data left in rx stream!\n", 1042 "%d bytes of unprocessed data left in rx stream!\n",
1047 wiphy_name(ar->hw->wiphy), tlen); 1043 tlen);
1048 1044
1049 goto err_telluser; 1045 goto err_telluser;
1050 } 1046 }
@@ -1052,10 +1048,9 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb)
1052 return ; 1048 return ;
1053 1049
1054err_telluser: 1050err_telluser:
1055 printk(KERN_ERR "%s: damaged RX stream data [want:%d, " 1051 wiphy_err(ar->hw->wiphy,
1056 "data:%d, rx:%d, pending:%d ]\n", 1052 "damaged RX stream data [want:%d, data:%d, rx:%d, pending:%d ]\n",
1057 wiphy_name(ar->hw->wiphy), clen, wlen, tlen, 1053 clen, wlen, tlen, ar->rx_failover_missing);
1058 ar->rx_failover_missing);
1059 1054
1060 if (ar->rx_failover_missing) 1055 if (ar->rx_failover_missing)
1061 print_hex_dump_bytes("rxbuf:", DUMP_PREFIX_OFFSET, 1056 print_hex_dump_bytes("rxbuf:", DUMP_PREFIX_OFFSET,
@@ -1065,9 +1060,8 @@ err_telluser:
1065 print_hex_dump_bytes("stream:", DUMP_PREFIX_OFFSET, 1060 print_hex_dump_bytes("stream:", DUMP_PREFIX_OFFSET,
1066 skb->data, skb->len); 1061 skb->data, skb->len);
1067 1062
1068 printk(KERN_ERR "%s: please check your hardware and cables, if " 1063 wiphy_err(ar->hw->wiphy,
1069 "you see this message frequently.\n", 1064 "If you see this message frequently, please check your hardware and cables.\n");
1070 wiphy_name(ar->hw->wiphy));
1071 1065
1072err_silent: 1066err_silent:
1073 if (ar->rx_failover_missing) { 1067 if (ar->rx_failover_missing) {
@@ -1384,10 +1378,10 @@ static void ar9170_tx(struct ar9170 *ar)
1384 1378
1385 if (remaining_space < frames) { 1379 if (remaining_space < frames) {
1386#ifdef AR9170_QUEUE_DEBUG 1380#ifdef AR9170_QUEUE_DEBUG
1387 printk(KERN_DEBUG "%s: tx quota reached queue:%d, " 1381 wiphy_debug(ar->hw->wiphy,
1388 "remaining slots:%d, needed:%d\n", 1382 "tx quota reached queue:%d, "
1389 wiphy_name(ar->hw->wiphy), i, remaining_space, 1383 "remaining slots:%d, needed:%d\n",
1390 frames); 1384 i, remaining_space, frames);
1391#endif /* AR9170_QUEUE_DEBUG */ 1385#endif /* AR9170_QUEUE_DEBUG */
1392 frames = remaining_space; 1386 frames = remaining_space;
1393 } 1387 }
@@ -1396,18 +1390,14 @@ static void ar9170_tx(struct ar9170 *ar)
1396 ar->tx_stats[i].count += frames; 1390 ar->tx_stats[i].count += frames;
1397 if (ar->tx_stats[i].len >= ar->tx_stats[i].limit) { 1391 if (ar->tx_stats[i].len >= ar->tx_stats[i].limit) {
1398#ifdef AR9170_QUEUE_DEBUG 1392#ifdef AR9170_QUEUE_DEBUG
1399 printk(KERN_DEBUG "%s: queue %d full\n", 1393 wiphy_debug(ar->hw->wiphy, "queue %d full\n", i);
1400 wiphy_name(ar->hw->wiphy), i); 1394 wiphy_debug(ar->hw->wiphy, "stuck frames: ===>\n");
1401
1402 printk(KERN_DEBUG "%s: stuck frames: ===>\n",
1403 wiphy_name(ar->hw->wiphy));
1404 ar9170_dump_txqueue(ar, &ar->tx_pending[i]); 1395 ar9170_dump_txqueue(ar, &ar->tx_pending[i]);
1405 ar9170_dump_txqueue(ar, &ar->tx_status[i]); 1396 ar9170_dump_txqueue(ar, &ar->tx_status[i]);
1406#endif /* AR9170_QUEUE_DEBUG */ 1397#endif /* AR9170_QUEUE_DEBUG */
1407 1398
1408#ifdef AR9170_QUEUE_STOP_DEBUG 1399#ifdef AR9170_QUEUE_STOP_DEBUG
1409 printk(KERN_DEBUG "%s: stop queue %d\n", 1400 wiphy_debug(ar->hw->wiphy, "stop queue %d\n", i);
1410 wiphy_name(ar->hw->wiphy), i);
1411 __ar9170_dump_txstats(ar); 1401 __ar9170_dump_txstats(ar);
1412#endif /* AR9170_QUEUE_STOP_DEBUG */ 1402#endif /* AR9170_QUEUE_STOP_DEBUG */
1413 ieee80211_stop_queue(ar->hw, i); 1403 ieee80211_stop_queue(ar->hw, i);
@@ -1435,8 +1425,7 @@ static void ar9170_tx(struct ar9170 *ar)
1435 msecs_to_jiffies(AR9170_TX_TIMEOUT); 1425 msecs_to_jiffies(AR9170_TX_TIMEOUT);
1436 1426
1437#ifdef AR9170_QUEUE_DEBUG 1427#ifdef AR9170_QUEUE_DEBUG
1438 printk(KERN_DEBUG "%s: send frame q:%d =>\n", 1428 wiphy_debug(ar->hw->wiphy, "send frame q:%d =>\n", i);
1439 wiphy_name(ar->hw->wiphy), i);
1440 ar9170_print_txheader(ar, skb); 1429 ar9170_print_txheader(ar, skb);
1441#endif /* AR9170_QUEUE_DEBUG */ 1430#endif /* AR9170_QUEUE_DEBUG */
1442 1431
@@ -1453,26 +1442,25 @@ static void ar9170_tx(struct ar9170 *ar)
1453 } 1442 }
1454 1443
1455#ifdef AR9170_QUEUE_DEBUG 1444#ifdef AR9170_QUEUE_DEBUG
1456 printk(KERN_DEBUG "%s: ar9170_tx report for queue %d\n", 1445 wiphy_debug(ar->hw->wiphy,
1457 wiphy_name(ar->hw->wiphy), i); 1446 "ar9170_tx report for queue %d\n", i);
1458 1447
1459 printk(KERN_DEBUG "%s: unprocessed pending frames left:\n", 1448 wiphy_debug(ar->hw->wiphy,
1460 wiphy_name(ar->hw->wiphy)); 1449 "unprocessed pending frames left:\n");
1461 ar9170_dump_txqueue(ar, &ar->tx_pending[i]); 1450 ar9170_dump_txqueue(ar, &ar->tx_pending[i]);
1462#endif /* AR9170_QUEUE_DEBUG */ 1451#endif /* AR9170_QUEUE_DEBUG */
1463 1452
1464 if (unlikely(frames_failed)) { 1453 if (unlikely(frames_failed)) {
1465#ifdef AR9170_QUEUE_DEBUG 1454#ifdef AR9170_QUEUE_DEBUG
1466 printk(KERN_DEBUG "%s: frames failed %d =>\n", 1455 wiphy_debug(ar->hw->wiphy,
1467 wiphy_name(ar->hw->wiphy), frames_failed); 1456 "frames failed %d =>\n", frames_failed);
1468#endif /* AR9170_QUEUE_DEBUG */ 1457#endif /* AR9170_QUEUE_DEBUG */
1469 1458
1470 spin_lock_irqsave(&ar->tx_stats_lock, flags); 1459 spin_lock_irqsave(&ar->tx_stats_lock, flags);
1471 ar->tx_stats[i].len -= frames_failed; 1460 ar->tx_stats[i].len -= frames_failed;
1472 ar->tx_stats[i].count -= frames_failed; 1461 ar->tx_stats[i].count -= frames_failed;
1473#ifdef AR9170_QUEUE_STOP_DEBUG 1462#ifdef AR9170_QUEUE_STOP_DEBUG
1474 printk(KERN_DEBUG "%s: wake queue %d\n", 1463 wiphy_debug(ar->hw->wiphy, "wake queue %d\n", i);
1475 wiphy_name(ar->hw->wiphy), i);
1476 __ar9170_dump_txstats(ar); 1464 __ar9170_dump_txstats(ar);
1477#endif /* AR9170_QUEUE_STOP_DEBUG */ 1465#endif /* AR9170_QUEUE_STOP_DEBUG */
1478 ieee80211_wake_queue(ar->hw, i); 1466 ieee80211_wake_queue(ar->hw, i);
diff --git a/drivers/net/wireless/ath/ar9170/phy.c b/drivers/net/wireless/ath/ar9170/phy.c
index 45a415ea809a..0dbfcf79ac96 100644
--- a/drivers/net/wireless/ath/ar9170/phy.c
+++ b/drivers/net/wireless/ath/ar9170/phy.c
@@ -670,8 +670,7 @@ static int ar9170_init_rf_banks_0_7(struct ar9170 *ar, bool band5ghz)
670 ar9170_regwrite_finish(); 670 ar9170_regwrite_finish();
671 err = ar9170_regwrite_result(); 671 err = ar9170_regwrite_result();
672 if (err) 672 if (err)
673 printk(KERN_ERR "%s: rf init failed\n", 673 wiphy_err(ar->hw->wiphy, "rf init failed\n");
674 wiphy_name(ar->hw->wiphy));
675 return err; 674 return err;
676} 675}
677 676
@@ -1702,9 +1701,8 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
1702 0x200 | ar->phy_heavy_clip); 1701 0x200 | ar->phy_heavy_clip);
1703 if (err) { 1702 if (err) {
1704 if (ar9170_nag_limiter(ar)) 1703 if (ar9170_nag_limiter(ar))
1705 printk(KERN_ERR "%s: failed to set " 1704 wiphy_err(ar->hw->wiphy,
1706 "heavy clip\n", 1705 "failed to set heavy clip\n");
1707 wiphy_name(ar->hw->wiphy));
1708 } 1706 }
1709 } 1707 }
1710 1708
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 85fdd26039c8..1a984b02e9e5 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -131,11 +131,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
131 131
132 ah = sc->sc_ah; 132 ah = sc->sc_ah;
133 ath9k_hw_name(ah, hw_name, sizeof(hw_name)); 133 ath9k_hw_name(ah, hw_name, sizeof(hw_name));
134 printk(KERN_INFO 134 wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
135 "%s: %s mem=0x%lx, irq=%d\n", 135 hw_name, (unsigned long)mem, irq);
136 wiphy_name(hw->wiphy),
137 hw_name,
138 (unsigned long)mem, irq);
139 136
140 return 0; 137 return 0;
141 138
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 257b10ba6f57..b5b651413e77 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -209,11 +209,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
209 } 209 }
210 210
211 ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name)); 211 ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name));
212 printk(KERN_INFO 212 wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
213 "%s: %s mem=0x%lx, irq=%d\n", 213 hw_name, (unsigned long)mem, pdev->irq);
214 wiphy_name(hw->wiphy),
215 hw_name,
216 (unsigned long)mem, pdev->irq);
217 214
218 return 0; 215 return 0;
219 216
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 9a78189c64f9..35337b1e7cac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -27,6 +27,8 @@
27 * 27 *
28 *****************************************************************************/ 28 *****************************************************************************/
29 29
30#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
31
30#include <linux/kernel.h> 32#include <linux/kernel.h>
31#include <linux/module.h> 33#include <linux/module.h>
32#include <linux/init.h> 34#include <linux/init.h>
@@ -4417,19 +4419,18 @@ static int __init iwl_init(void)
4417{ 4419{
4418 4420
4419 int ret; 4421 int ret;
4420 printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n"); 4422 pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
4421 printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n"); 4423 pr_info(DRV_COPYRIGHT "\n");
4422 4424
4423 ret = iwlagn_rate_control_register(); 4425 ret = iwlagn_rate_control_register();
4424 if (ret) { 4426 if (ret) {
4425 printk(KERN_ERR DRV_NAME 4427 pr_err("Unable to register rate control algorithm: %d\n", ret);
4426 "Unable to register rate control algorithm: %d\n", ret);
4427 return ret; 4428 return ret;
4428 } 4429 }
4429 4430
4430 ret = pci_register_driver(&iwl_driver); 4431 ret = pci_register_driver(&iwl_driver);
4431 if (ret) { 4432 if (ret) {
4432 printk(KERN_ERR DRV_NAME "Unable to initialize PCI module\n"); 4433 pr_err("Unable to initialize PCI module\n");
4433 goto error_register; 4434 goto error_register;
4434 } 4435 }
4435 4436
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index cb2d48a84fb9..8024d44ce4bb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -170,7 +170,7 @@ struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
170 struct ieee80211_hw *hw = 170 struct ieee80211_hw *hw =
171 ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops); 171 ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops);
172 if (hw == NULL) { 172 if (hw == NULL) {
173 printk(KERN_ERR "%s: Can not allocate network device\n", 173 pr_err("%s: Can not allocate network device\n",
174 cfg->name); 174 cfg->name);
175 goto out; 175 goto out;
176 } 176 }
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 45a684575046..d24eb47d3705 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -27,6 +27,8 @@
27 * 27 *
28 *****************************************************************************/ 28 *****************************************************************************/
29 29
30#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
31
30#include <linux/kernel.h> 32#include <linux/kernel.h>
31#include <linux/module.h> 33#include <linux/module.h>
32#include <linux/init.h> 34#include <linux/init.h>
@@ -3933,7 +3935,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
3933 * space for this driver's private structure */ 3935 * space for this driver's private structure */
3934 hw = iwl_alloc_all(cfg, &iwl3945_hw_ops); 3936 hw = iwl_alloc_all(cfg, &iwl3945_hw_ops);
3935 if (hw == NULL) { 3937 if (hw == NULL) {
3936 printk(KERN_ERR DRV_NAME "Can not allocate network device\n"); 3938 pr_err("Can not allocate network device\n");
3937 err = -ENOMEM; 3939 err = -ENOMEM;
3938 goto out; 3940 goto out;
3939 } 3941 }
@@ -4225,19 +4227,18 @@ static int __init iwl3945_init(void)
4225{ 4227{
4226 4228
4227 int ret; 4229 int ret;
4228 printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n"); 4230 pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
4229 printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n"); 4231 pr_info(DRV_COPYRIGHT "\n");
4230 4232
4231 ret = iwl3945_rate_control_register(); 4233 ret = iwl3945_rate_control_register();
4232 if (ret) { 4234 if (ret) {
4233 printk(KERN_ERR DRV_NAME 4235 pr_err("Unable to register rate control algorithm: %d\n", ret);
4234 "Unable to register rate control algorithm: %d\n", ret);
4235 return ret; 4236 return ret;
4236 } 4237 }
4237 4238
4238 ret = pci_register_driver(&iwl3945_driver); 4239 ret = pci_register_driver(&iwl3945_driver);
4239 if (ret) { 4240 if (ret) {
4240 printk(KERN_ERR DRV_NAME "Unable to initialize PCI module\n"); 4241 pr_err("Unable to initialize PCI module\n");
4241 goto error_register; 4242 goto error_register;
4242 } 4243 }
4243 4244
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index e7f299dc9ef5..01ad7f77383a 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -486,8 +486,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
486 struct ieee80211_rx_status rx_status; 486 struct ieee80211_rx_status rx_status;
487 487
488 if (data->idle) { 488 if (data->idle) {
489 printk(KERN_DEBUG "%s: Trying to TX when idle - reject\n", 489 wiphy_debug(hw->wiphy, "trying to tx when idle - reject\n");
490 wiphy_name(hw->wiphy));
491 return false; 490 return false;
492 } 491 }
493 492
@@ -576,7 +575,7 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
576static int mac80211_hwsim_start(struct ieee80211_hw *hw) 575static int mac80211_hwsim_start(struct ieee80211_hw *hw)
577{ 576{
578 struct mac80211_hwsim_data *data = hw->priv; 577 struct mac80211_hwsim_data *data = hw->priv;
579 printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); 578 wiphy_debug(hw->wiphy, "%s\n", __func__);
580 data->started = 1; 579 data->started = 1;
581 return 0; 580 return 0;
582} 581}
@@ -587,16 +586,15 @@ static void mac80211_hwsim_stop(struct ieee80211_hw *hw)
587 struct mac80211_hwsim_data *data = hw->priv; 586 struct mac80211_hwsim_data *data = hw->priv;
588 data->started = 0; 587 data->started = 0;
589 del_timer(&data->beacon_timer); 588 del_timer(&data->beacon_timer);
590 printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); 589 wiphy_debug(hw->wiphy, "%s\n", __func__);
591} 590}
592 591
593 592
594static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw, 593static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
595 struct ieee80211_vif *vif) 594 struct ieee80211_vif *vif)
596{ 595{
597 printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%pM)\n", 596 wiphy_debug(hw->wiphy, "%s (type=%d mac_addr=%pM)\n",
598 wiphy_name(hw->wiphy), __func__, vif->type, 597 __func__, vif->type, vif->addr);
599 vif->addr);
600 hwsim_set_magic(vif); 598 hwsim_set_magic(vif);
601 return 0; 599 return 0;
602} 600}
@@ -605,9 +603,8 @@ static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
605static void mac80211_hwsim_remove_interface( 603static void mac80211_hwsim_remove_interface(
606 struct ieee80211_hw *hw, struct ieee80211_vif *vif) 604 struct ieee80211_hw *hw, struct ieee80211_vif *vif)
607{ 605{
608 printk(KERN_DEBUG "%s:%s (type=%d mac_addr=%pM)\n", 606 wiphy_debug(hw->wiphy, "%s (type=%d mac_addr=%pM)\n",
609 wiphy_name(hw->wiphy), __func__, vif->type, 607 __func__, vif->type, vif->addr);
610 vif->addr);
611 hwsim_check_magic(vif); 608 hwsim_check_magic(vif);
612 hwsim_clear_magic(vif); 609 hwsim_clear_magic(vif);
613} 610}
@@ -670,13 +667,14 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed)
670 [IEEE80211_SMPS_DYNAMIC] = "dynamic", 667 [IEEE80211_SMPS_DYNAMIC] = "dynamic",
671 }; 668 };
672 669
673 printk(KERN_DEBUG "%s:%s (freq=%d/%s idle=%d ps=%d smps=%s)\n", 670 wiphy_debug(hw->wiphy,
674 wiphy_name(hw->wiphy), __func__, 671 "%s (freq=%d/%s idle=%d ps=%d smps=%s)\n",
675 conf->channel->center_freq, 672 __func__,
676 hwsim_chantypes[conf->channel_type], 673 conf->channel->center_freq,
677 !!(conf->flags & IEEE80211_CONF_IDLE), 674 hwsim_chantypes[conf->channel_type],
678 !!(conf->flags & IEEE80211_CONF_PS), 675 !!(conf->flags & IEEE80211_CONF_IDLE),
679 smps_modes[conf->smps_mode]); 676 !!(conf->flags & IEEE80211_CONF_PS),
677 smps_modes[conf->smps_mode]);
680 678
681 data->idle = !!(conf->flags & IEEE80211_CONF_IDLE); 679 data->idle = !!(conf->flags & IEEE80211_CONF_IDLE);
682 680
@@ -696,7 +694,7 @@ static void mac80211_hwsim_configure_filter(struct ieee80211_hw *hw,
696{ 694{
697 struct mac80211_hwsim_data *data = hw->priv; 695 struct mac80211_hwsim_data *data = hw->priv;
698 696
699 printk(KERN_DEBUG "%s:%s\n", wiphy_name(hw->wiphy), __func__); 697 wiphy_debug(hw->wiphy, "%s\n", __func__);
700 698
701 data->rx_filter = 0; 699 data->rx_filter = 0;
702 if (*total_flags & FIF_PROMISC_IN_BSS) 700 if (*total_flags & FIF_PROMISC_IN_BSS)
@@ -717,26 +715,23 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
717 715
718 hwsim_check_magic(vif); 716 hwsim_check_magic(vif);
719 717
720 printk(KERN_DEBUG "%s:%s(changed=0x%x)\n", 718 wiphy_debug(hw->wiphy, "%s(changed=0x%x)\n", __func__, changed);
721 wiphy_name(hw->wiphy), __func__, changed);
722 719
723 if (changed & BSS_CHANGED_BSSID) { 720 if (changed & BSS_CHANGED_BSSID) {
724 printk(KERN_DEBUG "%s:%s: BSSID changed: %pM\n", 721 wiphy_debug(hw->wiphy, "%s: BSSID changed: %pM\n",
725 wiphy_name(hw->wiphy), __func__, 722 __func__, info->bssid);
726 info->bssid);
727 memcpy(vp->bssid, info->bssid, ETH_ALEN); 723 memcpy(vp->bssid, info->bssid, ETH_ALEN);
728 } 724 }
729 725
730 if (changed & BSS_CHANGED_ASSOC) { 726 if (changed & BSS_CHANGED_ASSOC) {
731 printk(KERN_DEBUG " %s: ASSOC: assoc=%d aid=%d\n", 727 wiphy_debug(hw->wiphy, " ASSOC: assoc=%d aid=%d\n",
732 wiphy_name(hw->wiphy), info->assoc, info->aid); 728 info->assoc, info->aid);
733 vp->assoc = info->assoc; 729 vp->assoc = info->assoc;
734 vp->aid = info->aid; 730 vp->aid = info->aid;
735 } 731 }
736 732
737 if (changed & BSS_CHANGED_BEACON_INT) { 733 if (changed & BSS_CHANGED_BEACON_INT) {
738 printk(KERN_DEBUG " %s: BCNINT: %d\n", 734 wiphy_debug(hw->wiphy, " BCNINT: %d\n", info->beacon_int);
739 wiphy_name(hw->wiphy), info->beacon_int);
740 data->beacon_int = 1024 * info->beacon_int / 1000 * HZ / 1000; 735 data->beacon_int = 1024 * info->beacon_int / 1000 * HZ / 1000;
741 if (WARN_ON(!data->beacon_int)) 736 if (WARN_ON(!data->beacon_int))
742 data->beacon_int = 1; 737 data->beacon_int = 1;
@@ -746,31 +741,28 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
746 } 741 }
747 742
748 if (changed & BSS_CHANGED_ERP_CTS_PROT) { 743 if (changed & BSS_CHANGED_ERP_CTS_PROT) {
749 printk(KERN_DEBUG " %s: ERP_CTS_PROT: %d\n", 744 wiphy_debug(hw->wiphy, " ERP_CTS_PROT: %d\n",
750 wiphy_name(hw->wiphy), info->use_cts_prot); 745 info->use_cts_prot);
751 } 746 }
752 747
753 if (changed & BSS_CHANGED_ERP_PREAMBLE) { 748 if (changed & BSS_CHANGED_ERP_PREAMBLE) {
754 printk(KERN_DEBUG " %s: ERP_PREAMBLE: %d\n", 749 wiphy_debug(hw->wiphy, " ERP_PREAMBLE: %d\n",
755 wiphy_name(hw->wiphy), info->use_short_preamble); 750 info->use_short_preamble);
756 } 751 }
757 752
758 if (changed & BSS_CHANGED_ERP_SLOT) { 753 if (changed & BSS_CHANGED_ERP_SLOT) {
759 printk(KERN_DEBUG " %s: ERP_SLOT: %d\n", 754 wiphy_debug(hw->wiphy, " ERP_SLOT: %d\n", info->use_short_slot);
760 wiphy_name(hw->wiphy), info->use_short_slot);
761 } 755 }
762 756
763 if (changed & BSS_CHANGED_HT) { 757 if (changed & BSS_CHANGED_HT) {
764 printk(KERN_DEBUG " %s: HT: op_mode=0x%x, chantype=%s\n", 758 wiphy_debug(hw->wiphy, " HT: op_mode=0x%x, chantype=%s\n",
765 wiphy_name(hw->wiphy), 759 info->ht_operation_mode,
766 info->ht_operation_mode, 760 hwsim_chantypes[info->channel_type]);
767 hwsim_chantypes[info->channel_type]);
768 } 761 }
769 762
770 if (changed & BSS_CHANGED_BASIC_RATES) { 763 if (changed & BSS_CHANGED_BASIC_RATES) {
771 printk(KERN_DEBUG " %s: BASIC_RATES: 0x%llx\n", 764 wiphy_debug(hw->wiphy, " BASIC_RATES: 0x%llx\n",
772 wiphy_name(hw->wiphy), 765 (unsigned long long) info->basic_rates);
773 (unsigned long long) info->basic_rates);
774 } 766 }
775} 767}
776 768
@@ -824,10 +816,11 @@ static int mac80211_hwsim_conf_tx(
824 struct ieee80211_hw *hw, u16 queue, 816 struct ieee80211_hw *hw, u16 queue,
825 const struct ieee80211_tx_queue_params *params) 817 const struct ieee80211_tx_queue_params *params)
826{ 818{
827 printk(KERN_DEBUG "%s:%s (queue=%d txop=%d cw_min=%d cw_max=%d " 819 wiphy_debug(hw->wiphy,
828 "aifs=%d)\n", 820 "%s (queue=%d txop=%d cw_min=%d cw_max=%d aifs=%d)\n",
829 wiphy_name(hw->wiphy), __func__, queue, 821 __func__, queue,
830 params->txop, params->cw_min, params->cw_max, params->aifs); 822 params->txop, params->cw_min,
823 params->cw_max, params->aifs);
831 return 0; 824 return 0;
832} 825}
833 826
@@ -837,8 +830,7 @@ static int mac80211_hwsim_get_survey(
837{ 830{
838 struct ieee80211_conf *conf = &hw->conf; 831 struct ieee80211_conf *conf = &hw->conf;
839 832
840 printk(KERN_DEBUG "%s:%s (idx=%d)\n", 833 wiphy_debug(hw->wiphy, "%s (idx=%d)\n", __func__, idx);
841 wiphy_name(hw->wiphy), __func__, idx);
842 834
843 if (idx != 0) 835 if (idx != 0)
844 return -ENOENT; 836 return -ENOENT;
@@ -1108,8 +1100,9 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
1108 if (!vp->assoc) 1100 if (!vp->assoc)
1109 return; 1101 return;
1110 1102
1111 printk(KERN_DEBUG "%s:%s: send PS-Poll to %pM for aid %d\n", 1103 wiphy_debug(data->hw->wiphy,
1112 wiphy_name(data->hw->wiphy), __func__, vp->bssid, vp->aid); 1104 "%s: send PS-Poll to %pM for aid %d\n",
1105 __func__, vp->bssid, vp->aid);
1113 1106
1114 skb = dev_alloc_skb(sizeof(*pspoll)); 1107 skb = dev_alloc_skb(sizeof(*pspoll));
1115 if (!skb) 1108 if (!skb)
@@ -1137,8 +1130,9 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
1137 if (!vp->assoc) 1130 if (!vp->assoc)
1138 return; 1131 return;
1139 1132
1140 printk(KERN_DEBUG "%s:%s: send data::nullfunc to %pM ps=%d\n", 1133 wiphy_debug(data->hw->wiphy,
1141 wiphy_name(data->hw->wiphy), __func__, vp->bssid, ps); 1134 "%s: send data::nullfunc to %pM ps=%d\n",
1135 __func__, vp->bssid, ps);
1142 1136
1143 skb = dev_alloc_skb(sizeof(*hdr)); 1137 skb = dev_alloc_skb(sizeof(*hdr));
1144 if (!skb) 1138 if (!skb)
@@ -1473,9 +1467,8 @@ static int __init init_mac80211_hwsim(void)
1473 break; 1467 break;
1474 } 1468 }
1475 1469
1476 printk(KERN_DEBUG "%s: hwaddr %pM registered\n", 1470 wiphy_debug(hw->wiphy, "hwaddr %pm registered\n",
1477 wiphy_name(hw->wiphy), 1471 hw->wiphy->perm_addr);
1478 hw->wiphy->perm_addr);
1479 1472
1480 data->debugfs = debugfs_create_dir("hwsim", 1473 data->debugfs = debugfs_create_dir("hwsim",
1481 hw->wiphy->debugfsdir); 1474 hw->wiphy->debugfsdir);
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 0e34260b22b1..28beeaf1f4c6 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -905,16 +905,14 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
905 905
906 rxq->rxd = pci_alloc_consistent(priv->pdev, size, &rxq->rxd_dma); 906 rxq->rxd = pci_alloc_consistent(priv->pdev, size, &rxq->rxd_dma);
907 if (rxq->rxd == NULL) { 907 if (rxq->rxd == NULL) {
908 printk(KERN_ERR "%s: failed to alloc RX descriptors\n", 908 wiphy_err(hw->wiphy, "failed to alloc rx descriptors\n");
909 wiphy_name(hw->wiphy));
910 return -ENOMEM; 909 return -ENOMEM;
911 } 910 }
912 memset(rxq->rxd, 0, size); 911 memset(rxq->rxd, 0, size);
913 912
914 rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL); 913 rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL);
915 if (rxq->buf == NULL) { 914 if (rxq->buf == NULL) {
916 printk(KERN_ERR "%s: failed to alloc RX skbuff list\n", 915 wiphy_err(hw->wiphy, "failed to alloc rx skbuff list\n");
917 wiphy_name(hw->wiphy));
918 pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma); 916 pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma);
919 return -ENOMEM; 917 return -ENOMEM;
920 } 918 }
@@ -1141,16 +1139,14 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index)
1141 1139
1142 txq->txd = pci_alloc_consistent(priv->pdev, size, &txq->txd_dma); 1140 txq->txd = pci_alloc_consistent(priv->pdev, size, &txq->txd_dma);
1143 if (txq->txd == NULL) { 1141 if (txq->txd == NULL) {
1144 printk(KERN_ERR "%s: failed to alloc TX descriptors\n", 1142 wiphy_err(hw->wiphy, "failed to alloc tx descriptors\n");
1145 wiphy_name(hw->wiphy));
1146 return -ENOMEM; 1143 return -ENOMEM;
1147 } 1144 }
1148 memset(txq->txd, 0, size); 1145 memset(txq->txd, 0, size);
1149 1146
1150 txq->skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->skb), GFP_KERNEL); 1147 txq->skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->skb), GFP_KERNEL);
1151 if (txq->skb == NULL) { 1148 if (txq->skb == NULL) {
1152 printk(KERN_ERR "%s: failed to alloc TX skbuff list\n", 1149 wiphy_err(hw->wiphy, "failed to alloc tx skbuff list\n");
1153 wiphy_name(hw->wiphy));
1154 pci_free_consistent(priv->pdev, size, txq->txd, txq->txd_dma); 1150 pci_free_consistent(priv->pdev, size, txq->txd, txq->txd_dma);
1155 return -ENOMEM; 1151 return -ENOMEM;
1156 } 1152 }
@@ -1206,11 +1202,12 @@ static void mwl8k_dump_tx_rings(struct ieee80211_hw *hw)
1206 unused++; 1202 unused++;
1207 } 1203 }
1208 1204
1209 printk(KERN_ERR "%s: txq[%d] len=%d head=%d tail=%d " 1205 wiphy_err(hw->wiphy,
1210 "fw_owned=%d drv_owned=%d unused=%d\n", 1206 "txq[%d] len=%d head=%d tail=%d "
1211 wiphy_name(hw->wiphy), i, 1207 "fw_owned=%d drv_owned=%d unused=%d\n",
1212 txq->len, txq->head, txq->tail, 1208 i,
1213 fw_owned, drv_owned, unused); 1209 txq->len, txq->head, txq->tail,
1210 fw_owned, drv_owned, unused);
1214 } 1211 }
1215} 1212}
1216 1213
@@ -1254,25 +1251,23 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw)
1254 if (timeout) { 1251 if (timeout) {
1255 WARN_ON(priv->pending_tx_pkts); 1252 WARN_ON(priv->pending_tx_pkts);
1256 if (retry) { 1253 if (retry) {
1257 printk(KERN_NOTICE "%s: tx rings drained\n", 1254 wiphy_notice(hw->wiphy, "tx rings drained\n");
1258 wiphy_name(hw->wiphy));
1259 } 1255 }
1260 break; 1256 break;
1261 } 1257 }
1262 1258
1263 if (priv->pending_tx_pkts < oldcount) { 1259 if (priv->pending_tx_pkts < oldcount) {
1264 printk(KERN_NOTICE "%s: waiting for tx rings " 1260 wiphy_notice(hw->wiphy,
1265 "to drain (%d -> %d pkts)\n", 1261 "waiting for tx rings to drain (%d -> %d pkts)\n",
1266 wiphy_name(hw->wiphy), oldcount, 1262 oldcount, priv->pending_tx_pkts);
1267 priv->pending_tx_pkts);
1268 retry = 1; 1263 retry = 1;
1269 continue; 1264 continue;
1270 } 1265 }
1271 1266
1272 priv->tx_wait = NULL; 1267 priv->tx_wait = NULL;
1273 1268
1274 printk(KERN_ERR "%s: tx rings stuck for %d ms\n", 1269 wiphy_err(hw->wiphy, "tx rings stuck for %d ms\n",
1275 wiphy_name(hw->wiphy), MWL8K_TX_WAIT_TIMEOUT_MS); 1270 MWL8K_TX_WAIT_TIMEOUT_MS);
1276 mwl8k_dump_tx_rings(hw); 1271 mwl8k_dump_tx_rings(hw);
1277 1272
1278 rc = -ETIMEDOUT; 1273 rc = -ETIMEDOUT;
@@ -1423,8 +1418,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1423 skb->len, PCI_DMA_TODEVICE); 1418 skb->len, PCI_DMA_TODEVICE);
1424 1419
1425 if (pci_dma_mapping_error(priv->pdev, dma)) { 1420 if (pci_dma_mapping_error(priv->pdev, dma)) {
1426 printk(KERN_DEBUG "%s: failed to dma map skb, " 1421 wiphy_debug(hw->wiphy,
1427 "dropping TX frame.\n", wiphy_name(hw->wiphy)); 1422 "failed to dma map skb, dropping TX frame.\n");
1428 dev_kfree_skb(skb); 1423 dev_kfree_skb(skb);
1429 return NETDEV_TX_OK; 1424 return NETDEV_TX_OK;
1430 } 1425 }
@@ -1572,10 +1567,9 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
1572 PCI_DMA_BIDIRECTIONAL); 1567 PCI_DMA_BIDIRECTIONAL);
1573 1568
1574 if (!timeout) { 1569 if (!timeout) {
1575 printk(KERN_ERR "%s: Command %s timeout after %u ms\n", 1570 wiphy_err(hw->wiphy, "command %s timeout after %u ms\n",
1576 wiphy_name(hw->wiphy), 1571 mwl8k_cmd_name(cmd->code, buf, sizeof(buf)),
1577 mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), 1572 MWL8K_CMD_TIMEOUT_MS);
1578 MWL8K_CMD_TIMEOUT_MS);
1579 rc = -ETIMEDOUT; 1573 rc = -ETIMEDOUT;
1580 } else { 1574 } else {
1581 int ms; 1575 int ms;
@@ -1584,15 +1578,14 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
1584 1578
1585 rc = cmd->result ? -EINVAL : 0; 1579 rc = cmd->result ? -EINVAL : 0;
1586 if (rc) 1580 if (rc)
1587 printk(KERN_ERR "%s: Command %s error 0x%x\n", 1581 wiphy_err(hw->wiphy, "command %s error 0x%x\n",
1588 wiphy_name(hw->wiphy), 1582 mwl8k_cmd_name(cmd->code, buf, sizeof(buf)),
1589 mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), 1583 le16_to_cpu(cmd->result));
1590 le16_to_cpu(cmd->result));
1591 else if (ms > 2000) 1584 else if (ms > 2000)
1592 printk(KERN_NOTICE "%s: Command %s took %d ms\n", 1585 wiphy_notice(hw->wiphy, "command %s took %d ms\n",
1593 wiphy_name(hw->wiphy), 1586 mwl8k_cmd_name(cmd->code,
1594 mwl8k_cmd_name(cmd->code, buf, sizeof(buf)), 1587 buf, sizeof(buf)),
1595 ms); 1588 ms);
1596 } 1589 }
1597 1590
1598 return rc; 1591 return rc;
@@ -3192,8 +3185,8 @@ static int mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
3192 int rc; 3185 int rc;
3193 3186
3194 if (!priv->radio_on) { 3187 if (!priv->radio_on) {
3195 printk(KERN_DEBUG "%s: dropped TX frame since radio " 3188 wiphy_debug(hw->wiphy,
3196 "disabled\n", wiphy_name(hw->wiphy)); 3189 "dropped TX frame since radio disabled\n");
3197 dev_kfree_skb(skb); 3190 dev_kfree_skb(skb);
3198 return NETDEV_TX_OK; 3191 return NETDEV_TX_OK;
3199 } 3192 }
@@ -3211,8 +3204,7 @@ static int mwl8k_start(struct ieee80211_hw *hw)
3211 rc = request_irq(priv->pdev->irq, mwl8k_interrupt, 3204 rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
3212 IRQF_SHARED, MWL8K_NAME, hw); 3205 IRQF_SHARED, MWL8K_NAME, hw);
3213 if (rc) { 3206 if (rc) {
3214 printk(KERN_ERR "%s: failed to register IRQ handler\n", 3207 wiphy_err(hw->wiphy, "failed to register irq handler\n");
3215 wiphy_name(hw->wiphy));
3216 return -EIO; 3208 return -EIO;
3217 } 3209 }
3218 3210
@@ -3299,9 +3291,8 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw,
3299 * mode. (Sniffer mode is only used on STA firmware.) 3291 * mode. (Sniffer mode is only used on STA firmware.)
3300 */ 3292 */
3301 if (priv->sniffer_enabled) { 3293 if (priv->sniffer_enabled) {
3302 printk(KERN_INFO "%s: unable to create STA " 3294 wiphy_info(hw->wiphy,
3303 "interface due to sniffer mode being enabled\n", 3295 "unable to create STA interface because sniffer mode is enabled\n");
3304 wiphy_name(hw->wiphy));
3305 return -EINVAL; 3296 return -EINVAL;
3306 } 3297 }
3307 3298
@@ -3583,9 +3574,8 @@ mwl8k_configure_filter_sniffer(struct ieee80211_hw *hw,
3583 */ 3574 */
3584 if (!list_empty(&priv->vif_list)) { 3575 if (!list_empty(&priv->vif_list)) {
3585 if (net_ratelimit()) 3576 if (net_ratelimit())
3586 printk(KERN_INFO "%s: not enabling sniffer " 3577 wiphy_info(hw->wiphy,
3587 "mode because STA interface is active\n", 3578 "not enabling sniffer mode because STA interface is active\n");
3588 wiphy_name(hw->wiphy));
3589 return 0; 3579 return 0;
3590 } 3580 }
3591 3581
@@ -3913,8 +3903,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
3913 3903
3914 priv->sram = pci_iomap(pdev, 0, 0x10000); 3904 priv->sram = pci_iomap(pdev, 0, 0x10000);
3915 if (priv->sram == NULL) { 3905 if (priv->sram == NULL) {
3916 printk(KERN_ERR "%s: Cannot map device SRAM\n", 3906 wiphy_err(hw->wiphy, "cannot map device sram\n");
3917 wiphy_name(hw->wiphy));
3918 goto err_iounmap; 3907 goto err_iounmap;
3919 } 3908 }
3920 3909
@@ -3926,8 +3915,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
3926 if (priv->regs == NULL) { 3915 if (priv->regs == NULL) {
3927 priv->regs = pci_iomap(pdev, 2, 0x10000); 3916 priv->regs = pci_iomap(pdev, 2, 0x10000);
3928 if (priv->regs == NULL) { 3917 if (priv->regs == NULL) {
3929 printk(KERN_ERR "%s: Cannot map device registers\n", 3918 wiphy_err(hw->wiphy, "cannot map device registers\n");
3930 wiphy_name(hw->wiphy));
3931 goto err_iounmap; 3919 goto err_iounmap;
3932 } 3920 }
3933 } 3921 }
@@ -3939,16 +3927,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
3939 /* Ask userland hotplug daemon for the device firmware */ 3927 /* Ask userland hotplug daemon for the device firmware */
3940 rc = mwl8k_request_firmware(priv); 3928 rc = mwl8k_request_firmware(priv);
3941 if (rc) { 3929 if (rc) {
3942 printk(KERN_ERR "%s: Firmware files not found\n", 3930 wiphy_err(hw->wiphy, "firmware files not found\n");
3943 wiphy_name(hw->wiphy));
3944 goto err_stop_firmware; 3931 goto err_stop_firmware;
3945 } 3932 }
3946 3933
3947 /* Load firmware into hardware */ 3934 /* Load firmware into hardware */
3948 rc = mwl8k_load_firmware(hw); 3935 rc = mwl8k_load_firmware(hw);
3949 if (rc) { 3936 if (rc) {
3950 printk(KERN_ERR "%s: Cannot start firmware\n", 3937 wiphy_err(hw->wiphy, "cannot start firmware\n");
3951 wiphy_name(hw->wiphy));
3952 goto err_stop_firmware; 3938 goto err_stop_firmware;
3953 } 3939 }
3954 3940
@@ -3959,9 +3945,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
3959 if (priv->ap_fw) { 3945 if (priv->ap_fw) {
3960 priv->rxd_ops = priv->device_info->ap_rxd_ops; 3946 priv->rxd_ops = priv->device_info->ap_rxd_ops;
3961 if (priv->rxd_ops == NULL) { 3947 if (priv->rxd_ops == NULL) {
3962 printk(KERN_ERR "%s: Driver does not have AP " 3948 wiphy_err(hw->wiphy,
3963 "firmware image support for this hardware\n", 3949 "Driver does not have AP firmware image support for this hardware\n");
3964 wiphy_name(hw->wiphy));
3965 goto err_stop_firmware; 3950 goto err_stop_firmware;
3966 } 3951 }
3967 } else { 3952 } else {
@@ -4039,8 +4024,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
4039 rc = request_irq(priv->pdev->irq, mwl8k_interrupt, 4024 rc = request_irq(priv->pdev->irq, mwl8k_interrupt,
4040 IRQF_SHARED, MWL8K_NAME, hw); 4025 IRQF_SHARED, MWL8K_NAME, hw);
4041 if (rc) { 4026 if (rc) {
4042 printk(KERN_ERR "%s: failed to register IRQ handler\n", 4027 wiphy_err(hw->wiphy, "failed to register irq handler\n");
4043 wiphy_name(hw->wiphy));
4044 goto err_free_queues; 4028 goto err_free_queues;
4045 } 4029 }
4046 4030
@@ -4060,8 +4044,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
4060 rc = mwl8k_cmd_get_hw_spec_sta(hw); 4044 rc = mwl8k_cmd_get_hw_spec_sta(hw);
4061 } 4045 }
4062 if (rc) { 4046 if (rc) {
4063 printk(KERN_ERR "%s: Cannot initialise firmware\n", 4047 wiphy_err(hw->wiphy, "cannot initialise firmware\n");
4064 wiphy_name(hw->wiphy));
4065 goto err_free_irq; 4048 goto err_free_irq;
4066 } 4049 }
4067 4050
@@ -4075,15 +4058,14 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
4075 /* Turn radio off */ 4058 /* Turn radio off */
4076 rc = mwl8k_cmd_radio_disable(hw); 4059 rc = mwl8k_cmd_radio_disable(hw);
4077 if (rc) { 4060 if (rc) {
4078 printk(KERN_ERR "%s: Cannot disable\n", wiphy_name(hw->wiphy)); 4061 wiphy_err(hw->wiphy, "cannot disable\n");
4079 goto err_free_irq; 4062 goto err_free_irq;
4080 } 4063 }
4081 4064
4082 /* Clear MAC address */ 4065 /* Clear MAC address */
4083 rc = mwl8k_cmd_set_mac_addr(hw, NULL, "\x00\x00\x00\x00\x00\x00"); 4066 rc = mwl8k_cmd_set_mac_addr(hw, NULL, "\x00\x00\x00\x00\x00\x00");
4084 if (rc) { 4067 if (rc) {
4085 printk(KERN_ERR "%s: Cannot clear MAC address\n", 4068 wiphy_err(hw->wiphy, "cannot clear mac address\n");
4086 wiphy_name(hw->wiphy));
4087 goto err_free_irq; 4069 goto err_free_irq;
4088 } 4070 }
4089 4071
@@ -4093,17 +4075,16 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
4093 4075
4094 rc = ieee80211_register_hw(hw); 4076 rc = ieee80211_register_hw(hw);
4095 if (rc) { 4077 if (rc) {
4096 printk(KERN_ERR "%s: Cannot register device\n", 4078 wiphy_err(hw->wiphy, "cannot register device\n");
4097 wiphy_name(hw->wiphy));
4098 goto err_free_queues; 4079 goto err_free_queues;
4099 } 4080 }
4100 4081
4101 printk(KERN_INFO "%s: %s v%d, %pM, %s firmware %u.%u.%u.%u\n", 4082 wiphy_info(hw->wiphy, "%s v%d, %pm, %s firmware %u.%u.%u.%u\n",
4102 wiphy_name(hw->wiphy), priv->device_info->part_name, 4083 priv->device_info->part_name,
4103 priv->hw_rev, hw->wiphy->perm_addr, 4084 priv->hw_rev, hw->wiphy->perm_addr,
4104 priv->ap_fw ? "AP" : "STA", 4085 priv->ap_fw ? "AP" : "STA",
4105 (priv->fw_rev >> 24) & 0xff, (priv->fw_rev >> 16) & 0xff, 4086 (priv->fw_rev >> 24) & 0xff, (priv->fw_rev >> 16) & 0xff,
4106 (priv->fw_rev >> 8) & 0xff, priv->fw_rev & 0xff); 4087 (priv->fw_rev >> 8) & 0xff, priv->fw_rev & 0xff);
4107 4088
4108 return 0; 4089 return 0;
4109 4090
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 8c4169c227ae..09fae2f0ea08 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -117,9 +117,8 @@ static int orinoco_change_vif(struct wiphy *wiphy, struct net_device *dev,
117 117
118 case NL80211_IFTYPE_MONITOR: 118 case NL80211_IFTYPE_MONITOR:
119 if (priv->broken_monitor && !force_monitor) { 119 if (priv->broken_monitor && !force_monitor) {
120 printk(KERN_WARNING "%s: Monitor mode support is " 120 wiphy_warn(wiphy,
121 "buggy in this firmware, not enabling\n", 121 "Monitor mode support is buggy in this firmware, not enabling\n");
122 wiphy_name(wiphy));
123 err = -EINVAL; 122 err = -EINVAL;
124 } 123 }
125 break; 124 break;
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index e51650ed49f2..d687cb7f2a59 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -149,16 +149,15 @@ static int p54_generate_band(struct ieee80211_hw *dev,
149 continue; 149 continue;
150 150
151 if (list->channels[i].data != CHAN_HAS_ALL) { 151 if (list->channels[i].data != CHAN_HAS_ALL) {
152 printk(KERN_ERR "%s:%s%s%s is/are missing for " 152 wiphy_err(dev->wiphy,
153 "channel:%d [%d MHz].\n", 153 "%s%s%s is/are missing for channel:%d [%d MHz].\n",
154 wiphy_name(dev->wiphy), 154 (list->channels[i].data & CHAN_HAS_CAL ? "" :
155 (list->channels[i].data & CHAN_HAS_CAL ? "" : 155 " [iqauto calibration data]"),
156 " [iqauto calibration data]"), 156 (list->channels[i].data & CHAN_HAS_LIMIT ? "" :
157 (list->channels[i].data & CHAN_HAS_LIMIT ? "" : 157 " [output power limits]"),
158 " [output power limits]"), 158 (list->channels[i].data & CHAN_HAS_CURVE ? "" :
159 (list->channels[i].data & CHAN_HAS_CURVE ? "" : 159 " [curve data]"),
160 " [curve data]"), 160 list->channels[i].index, list->channels[i].freq);
161 list->channels[i].index, list->channels[i].freq);
162 continue; 161 continue;
163 } 162 }
164 163
@@ -168,9 +167,8 @@ static int p54_generate_band(struct ieee80211_hw *dev,
168 } 167 }
169 168
170 if (j == 0) { 169 if (j == 0) {
171 printk(KERN_ERR "%s: Disabling totally damaged %s band.\n", 170 wiphy_err(dev->wiphy, "disabling totally damaged %d GHz band\n",
172 wiphy_name(dev->wiphy), (band == IEEE80211_BAND_2GHZ) ? 171 (band == IEEE80211_BAND_2GHZ) ? 2 : 5);
173 "2 GHz" : "5 GHz");
174 172
175 ret = -ENODATA; 173 ret = -ENODATA;
176 goto err_out; 174 goto err_out;
@@ -244,9 +242,9 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
244 242
245 if ((priv->iq_autocal_len != priv->curve_data->entries) || 243 if ((priv->iq_autocal_len != priv->curve_data->entries) ||
246 (priv->iq_autocal_len != priv->output_limit->entries)) 244 (priv->iq_autocal_len != priv->output_limit->entries))
247 printk(KERN_ERR "%s: Unsupported or damaged EEPROM detected. " 245 wiphy_err(dev->wiphy,
248 "You may not be able to use all channels.\n", 246 "Unsupported or damaged EEPROM detected. "
249 wiphy_name(dev->wiphy)); 247 "You may not be able to use all channels.\n");
250 248
251 max_channel_num = max_t(unsigned int, priv->output_limit->entries, 249 max_channel_num = max_t(unsigned int, priv->output_limit->entries,
252 priv->iq_autocal_len); 250 priv->iq_autocal_len);
@@ -419,15 +417,14 @@ static void p54_parse_rssical(struct ieee80211_hw *dev, void *data, int len,
419 int i; 417 int i;
420 418
421 if (len != (entry_size * num_entries)) { 419 if (len != (entry_size * num_entries)) {
422 printk(KERN_ERR "%s: unknown rssi calibration data packing " 420 wiphy_err(dev->wiphy,
423 " type:(%x) len:%d.\n", 421 "unknown rssi calibration data packing type:(%x) len:%d.\n",
424 wiphy_name(dev->wiphy), type, len); 422 type, len);
425 423
426 print_hex_dump_bytes("rssical:", DUMP_PREFIX_NONE, 424 print_hex_dump_bytes("rssical:", DUMP_PREFIX_NONE,
427 data, len); 425 data, len);
428 426
429 printk(KERN_ERR "%s: please report this issue.\n", 427 wiphy_err(dev->wiphy, "please report this issue.\n");
430 wiphy_name(dev->wiphy));
431 return; 428 return;
432 } 429 }
433 430
@@ -445,15 +442,14 @@ static void p54_parse_default_country(struct ieee80211_hw *dev,
445 struct pda_country *country; 442 struct pda_country *country;
446 443
447 if (len != sizeof(*country)) { 444 if (len != sizeof(*country)) {
448 printk(KERN_ERR "%s: found possible invalid default country " 445 wiphy_err(dev->wiphy,
449 "eeprom entry. (entry size: %d)\n", 446 "found possible invalid default country eeprom entry. (entry size: %d)\n",
450 wiphy_name(dev->wiphy), len); 447 len);
451 448
452 print_hex_dump_bytes("country:", DUMP_PREFIX_NONE, 449 print_hex_dump_bytes("country:", DUMP_PREFIX_NONE,
453 data, len); 450 data, len);
454 451
455 printk(KERN_ERR "%s: please report this issue.\n", 452 wiphy_err(dev->wiphy, "please report this issue.\n");
456 wiphy_name(dev->wiphy));
457 return; 453 return;
458 } 454 }
459 455
@@ -478,8 +474,8 @@ static int p54_convert_output_limits(struct ieee80211_hw *dev,
478 return -EINVAL; 474 return -EINVAL;
479 475
480 if (data[0] != 0) { 476 if (data[0] != 0) {
481 printk(KERN_ERR "%s: unknown output power db revision:%x\n", 477 wiphy_err(dev->wiphy, "unknown output power db revision:%x\n",
482 wiphy_name(dev->wiphy), data[0]); 478 data[0]);
483 return -EINVAL; 479 return -EINVAL;
484 } 480 }
485 481
@@ -587,10 +583,9 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
587 err = p54_convert_rev1(dev, curve_data); 583 err = p54_convert_rev1(dev, curve_data);
588 break; 584 break;
589 default: 585 default:
590 printk(KERN_ERR "%s: unknown curve data " 586 wiphy_err(dev->wiphy,
591 "revision %d\n", 587 "unknown curve data revision %d\n",
592 wiphy_name(dev->wiphy), 588 curve_data->cal_method_rev);
593 curve_data->cal_method_rev);
594 err = -ENODEV; 589 err = -ENODEV;
595 break; 590 break;
596 } 591 }
@@ -672,8 +667,8 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
672 667
673 if (!synth || !priv->iq_autocal || !priv->output_limit || 668 if (!synth || !priv->iq_autocal || !priv->output_limit ||
674 !priv->curve_data) { 669 !priv->curve_data) {
675 printk(KERN_ERR "%s: not all required entries found in eeprom!\n", 670 wiphy_err(dev->wiphy,
676 wiphy_name(dev->wiphy)); 671 "not all required entries found in eeprom!\n");
677 err = -EINVAL; 672 err = -EINVAL;
678 goto err; 673 goto err;
679 } 674 }
@@ -699,15 +694,15 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
699 if (!is_valid_ether_addr(dev->wiphy->perm_addr)) { 694 if (!is_valid_ether_addr(dev->wiphy->perm_addr)) {
700 u8 perm_addr[ETH_ALEN]; 695 u8 perm_addr[ETH_ALEN];
701 696
702 printk(KERN_WARNING "%s: Invalid hwaddr! Using randomly generated MAC addr\n", 697 wiphy_warn(dev->wiphy,
703 wiphy_name(dev->wiphy)); 698 "invalid hwaddr! using randomly generated mac addr\n");
704 random_ether_addr(perm_addr); 699 random_ether_addr(perm_addr);
705 SET_IEEE80211_PERM_ADDR(dev, perm_addr); 700 SET_IEEE80211_PERM_ADDR(dev, perm_addr);
706 } 701 }
707 702
708 printk(KERN_INFO "%s: hwaddr %pM, MAC:isl38%02x RF:%s\n", 703 wiphy_info(dev->wiphy, "hwaddr %pm, mac:isl38%02x rf:%s\n",
709 wiphy_name(dev->wiphy), dev->wiphy->perm_addr, priv->version, 704 dev->wiphy->perm_addr, priv->version,
710 p54_rf_chips[priv->rxhw]); 705 p54_rf_chips[priv->rxhw]);
711 706
712 return 0; 707 return 0;
713 708
@@ -719,8 +714,7 @@ err:
719 priv->output_limit = NULL; 714 priv->output_limit = NULL;
720 priv->curve_data = NULL; 715 priv->curve_data = NULL;
721 716
722 printk(KERN_ERR "%s: eeprom parse failed!\n", 717 wiphy_err(dev->wiphy, "eeprom parse failed!\n");
723 wiphy_name(dev->wiphy));
724 return err; 718 return err;
725} 719}
726EXPORT_SYMBOL_GPL(p54_parse_eeprom); 720EXPORT_SYMBOL_GPL(p54_parse_eeprom);
diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c
index c43a5d461ab2..47006bca4852 100644
--- a/drivers/net/wireless/p54/fwio.c
+++ b/drivers/net/wireless/p54/fwio.c
@@ -62,16 +62,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
62 case FW_LM20: 62 case FW_LM20:
63 case FW_LM87: { 63 case FW_LM87: {
64 char *iftype = (char *)bootrec->data; 64 char *iftype = (char *)bootrec->data;
65 printk(KERN_INFO "%s: p54 detected a LM%c%c " 65 wiphy_info(priv->hw->wiphy,
66 "firmware\n", 66 "p54 detected a LM%c%c firmware\n",
67 wiphy_name(priv->hw->wiphy), 67 iftype[2], iftype[3]);
68 iftype[2], iftype[3]);
69 break; 68 break;
70 } 69 }
71 case FW_FMAC: 70 case FW_FMAC:
72 default: 71 default:
73 printk(KERN_ERR "%s: unsupported firmware\n", 72 wiphy_err(priv->hw->wiphy,
74 wiphy_name(priv->hw->wiphy)); 73 "unsupported firmware\n");
75 return -ENODEV; 74 return -ENODEV;
76 } 75 }
77 break; 76 break;
@@ -125,15 +124,15 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
125 } 124 }
126 125
127 if (fw_version) 126 if (fw_version)
128 printk(KERN_INFO "%s: FW rev %s - Softmac protocol %x.%x\n", 127 wiphy_info(priv->hw->wiphy,
129 wiphy_name(priv->hw->wiphy), fw_version, 128 "fw rev %s - softmac protocol %x.%x\n",
130 priv->fw_var >> 8, priv->fw_var & 0xff); 129 fw_version, priv->fw_var >> 8, priv->fw_var & 0xff);
131 130
132 if (priv->fw_var < 0x500) 131 if (priv->fw_var < 0x500)
133 printk(KERN_INFO "%s: you are using an obsolete firmware. " 132 wiphy_info(priv->hw->wiphy,
134 "visit http://wireless.kernel.org/en/users/Drivers/p54 " 133 "you are using an obsolete firmware. "
135 "and grab one for \"kernel >= 2.6.28\"!\n", 134 "visit http://wireless.kernel.org/en/users/Drivers/p54 "
136 wiphy_name(priv->hw->wiphy)); 135 "and grab one for \"kernel >= 2.6.28\"!\n");
137 136
138 if (priv->fw_var >= 0x300) { 137 if (priv->fw_var >= 0x300) {
139 /* Firmware supports QoS, use it! */ 138 /* Firmware supports QoS, use it! */
@@ -152,13 +151,14 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
152 priv->hw->queues = P54_QUEUE_AC_NUM; 151 priv->hw->queues = P54_QUEUE_AC_NUM;
153 } 152 }
154 153
155 printk(KERN_INFO "%s: cryptographic accelerator " 154 wiphy_info(priv->hw->wiphy,
156 "WEP:%s, TKIP:%s, CCMP:%s\n", wiphy_name(priv->hw->wiphy), 155 "cryptographic accelerator WEP:%s, TKIP:%s, CCMP:%s\n",
157 (priv->privacy_caps & BR_DESC_PRIV_CAP_WEP) ? "YES" : 156 (priv->privacy_caps & BR_DESC_PRIV_CAP_WEP) ? "YES" : "no",
158 "no", (priv->privacy_caps & (BR_DESC_PRIV_CAP_TKIP | 157 (priv->privacy_caps &
159 BR_DESC_PRIV_CAP_MICHAEL)) ? "YES" : "no", 158 (BR_DESC_PRIV_CAP_TKIP | BR_DESC_PRIV_CAP_MICHAEL))
160 (priv->privacy_caps & BR_DESC_PRIV_CAP_AESCCMP) ? 159 ? "YES" : "no",
161 "YES" : "no"); 160 (priv->privacy_caps & BR_DESC_PRIV_CAP_AESCCMP)
161 ? "YES" : "no");
162 162
163 if (priv->rx_keycache_size) { 163 if (priv->rx_keycache_size) {
164 /* 164 /*
@@ -247,8 +247,7 @@ int p54_download_eeprom(struct p54_common *priv, void *buf,
247 247
248 if (!wait_for_completion_interruptible_timeout( 248 if (!wait_for_completion_interruptible_timeout(
249 &priv->eeprom_comp, HZ)) { 249 &priv->eeprom_comp, HZ)) {
250 printk(KERN_ERR "%s: device does not respond!\n", 250 wiphy_err(priv->hw->wiphy, "device does not respond!\n");
251 wiphy_name(priv->hw->wiphy));
252 ret = -EBUSY; 251 ret = -EBUSY;
253 } 252 }
254 priv->eeprom = NULL; 253 priv->eeprom = NULL;
@@ -523,9 +522,9 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)
523 return 0; 522 return 0;
524 523
525err: 524err:
526 printk(KERN_ERR "%s: frequency change to channel %d failed.\n", 525 wiphy_err(priv->hw->wiphy, "frequency change to channel %d failed.\n",
527 wiphy_name(priv->hw->wiphy), ieee80211_frequency_to_channel( 526 ieee80211_frequency_to_channel(
528 priv->hw->conf.channel->center_freq)); 527 priv->hw->conf.channel->center_freq));
529 528
530 dev_kfree_skb_any(skb); 529 dev_kfree_skb_any(skb);
531 return -EINVAL; 530 return -EINVAL;
@@ -676,8 +675,8 @@ int p54_upload_key(struct p54_common *priv, u8 algo, int slot, u8 idx, u8 len,
676 break; 675 break;
677 676
678 default: 677 default:
679 printk(KERN_ERR "%s: invalid cryptographic algorithm: %d\n", 678 wiphy_err(priv->hw->wiphy,
680 wiphy_name(priv->hw->wiphy), algo); 679 "invalid cryptographic algorithm: %d\n", algo);
681 dev_kfree_skb(skb); 680 dev_kfree_skb(skb);
682 return -EINVAL; 681 return -EINVAL;
683 } 682 }
diff --git a/drivers/net/wireless/p54/led.c b/drivers/net/wireless/p54/led.c
index 9575ac033630..ea91f5cce6b3 100644
--- a/drivers/net/wireless/p54/led.c
+++ b/drivers/net/wireless/p54/led.c
@@ -57,8 +57,8 @@ static void p54_update_leds(struct work_struct *work)
57 57
58 err = p54_set_leds(priv); 58 err = p54_set_leds(priv);
59 if (err && net_ratelimit()) 59 if (err && net_ratelimit())
60 printk(KERN_ERR "%s: failed to update LEDs (%d).\n", 60 wiphy_err(priv->hw->wiphy,
61 wiphy_name(priv->hw->wiphy), err); 61 "failed to update leds (%d).\n", err);
62 62
63 if (rerun) 63 if (rerun)
64 ieee80211_queue_delayed_work(priv->hw, &priv->led_work, 64 ieee80211_queue_delayed_work(priv->hw, &priv->led_work,
@@ -102,8 +102,8 @@ static int p54_register_led(struct p54_common *priv,
102 102
103 err = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_dev); 103 err = led_classdev_register(wiphy_dev(priv->hw->wiphy), &led->led_dev);
104 if (err) 104 if (err)
105 printk(KERN_ERR "%s: Failed to register %s LED.\n", 105 wiphy_err(priv->hw->wiphy,
106 wiphy_name(priv->hw->wiphy), name); 106 "failed to register %s led.\n", name);
107 else 107 else
108 led->registered = 1; 108 led->registered = 1;
109 109
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index a5ea89cde8c4..822f8dc26e9c 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -466,8 +466,7 @@ static int p54p_open(struct ieee80211_hw *dev)
466 P54P_READ(dev_int); 466 P54P_READ(dev_int);
467 467
468 if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { 468 if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
469 printk(KERN_ERR "%s: Cannot boot firmware!\n", 469 wiphy_err(dev->wiphy, "cannot boot firmware!\n");
470 wiphy_name(dev->wiphy));
471 p54p_stop(dev); 470 p54p_stop(dev);
472 return -ETIMEDOUT; 471 return -ETIMEDOUT;
473 } 472 }
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 4e6891099d43..427b46f558ed 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -38,8 +38,8 @@ static void p54_dump_tx_queue(struct p54_common *priv)
38 u32 largest_hole = 0, free; 38 u32 largest_hole = 0, free;
39 39
40 spin_lock_irqsave(&priv->tx_queue.lock, flags); 40 spin_lock_irqsave(&priv->tx_queue.lock, flags);
41 printk(KERN_DEBUG "%s: / --- tx queue dump (%d entries) ---\n", 41 wiphy_debug(priv->hw->wiphy, "/ --- tx queue dump (%d entries) ---\n",
42 wiphy_name(priv->hw->wiphy), skb_queue_len(&priv->tx_queue)); 42 skb_queue_len(&priv->tx_queue));
43 43
44 prev_addr = priv->rx_start; 44 prev_addr = priv->rx_start;
45 skb_queue_walk(&priv->tx_queue, skb) { 45 skb_queue_walk(&priv->tx_queue, skb) {
@@ -48,21 +48,23 @@ static void p54_dump_tx_queue(struct p54_common *priv)
48 hdr = (void *) skb->data; 48 hdr = (void *) skb->data;
49 49
50 free = range->start_addr - prev_addr; 50 free = range->start_addr - prev_addr;
51 printk(KERN_DEBUG "%s: | [%02d] => [skb:%p skb_len:0x%04x " 51 wiphy_debug(priv->hw->wiphy,
52 "hdr:{flags:%02x len:%04x req_id:%04x type:%02x} " 52 "| [%02d] => [skb:%p skb_len:0x%04x "
53 "mem:{start:%04x end:%04x, free:%d}]\n", 53 "hdr:{flags:%02x len:%04x req_id:%04x type:%02x} "
54 wiphy_name(priv->hw->wiphy), i++, skb, skb->len, 54 "mem:{start:%04x end:%04x, free:%d}]\n",
55 le16_to_cpu(hdr->flags), le16_to_cpu(hdr->len), 55 i++, skb, skb->len,
56 le32_to_cpu(hdr->req_id), le16_to_cpu(hdr->type), 56 le16_to_cpu(hdr->flags), le16_to_cpu(hdr->len),
57 range->start_addr, range->end_addr, free); 57 le32_to_cpu(hdr->req_id), le16_to_cpu(hdr->type),
58 range->start_addr, range->end_addr, free);
58 59
59 prev_addr = range->end_addr; 60 prev_addr = range->end_addr;
60 largest_hole = max(largest_hole, free); 61 largest_hole = max(largest_hole, free);
61 } 62 }
62 free = priv->rx_end - prev_addr; 63 free = priv->rx_end - prev_addr;
63 largest_hole = max(largest_hole, free); 64 largest_hole = max(largest_hole, free);
64 printk(KERN_DEBUG "%s: \\ --- [free: %d], largest free block: %d ---\n", 65 wiphy_debug(priv->hw->wiphy,
65 wiphy_name(priv->hw->wiphy), free, largest_hole); 66 "\\ --- [free: %d], largest free block: %d ---\n",
67 free, largest_hole);
66 spin_unlock_irqrestore(&priv->tx_queue.lock, flags); 68 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
67} 69}
68#endif /* P54_MM_DEBUG */ 70#endif /* P54_MM_DEBUG */
@@ -538,8 +540,7 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb)
538 case P54_TRAP_BEACON_TX: 540 case P54_TRAP_BEACON_TX:
539 break; 541 break;
540 case P54_TRAP_RADAR: 542 case P54_TRAP_RADAR:
541 printk(KERN_INFO "%s: radar (freq:%d MHz)\n", 543 wiphy_info(priv->hw->wiphy, "radar (freq:%d mhz)\n", freq);
542 wiphy_name(priv->hw->wiphy), freq);
543 break; 544 break;
544 case P54_TRAP_NO_BEACON: 545 case P54_TRAP_NO_BEACON:
545 if (priv->vif) 546 if (priv->vif)
@@ -558,8 +559,8 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb)
558 wiphy_rfkill_set_hw_state(priv->hw->wiphy, false); 559 wiphy_rfkill_set_hw_state(priv->hw->wiphy, false);
559 break; 560 break;
560 default: 561 default:
561 printk(KERN_INFO "%s: received event:%x freq:%d\n", 562 wiphy_info(priv->hw->wiphy, "received event:%x freq:%d\n",
562 wiphy_name(priv->hw->wiphy), event, freq); 563 event, freq);
563 break; 564 break;
564 } 565 }
565} 566}
@@ -584,8 +585,9 @@ static int p54_rx_control(struct p54_common *priv, struct sk_buff *skb)
584 p54_rx_eeprom_readback(priv, skb); 585 p54_rx_eeprom_readback(priv, skb);
585 break; 586 break;
586 default: 587 default:
587 printk(KERN_DEBUG "%s: not handling 0x%02x type control frame\n", 588 wiphy_debug(priv->hw->wiphy,
588 wiphy_name(priv->hw->wiphy), le16_to_cpu(hdr->type)); 589 "not handling 0x%02x type control frame\n",
590 le16_to_cpu(hdr->type));
589 break; 591 break;
590 } 592 }
591 return 0; 593 return 0;
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index d8b186a260ed..1d8178563d76 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -361,7 +361,7 @@ static int rtl8180_init_hw(struct ieee80211_hw *dev)
361 361
362 /* check success of reset */ 362 /* check success of reset */
363 if (rtl818x_ioread8(priv, &priv->map->CMD) & RTL818X_CMD_RESET) { 363 if (rtl818x_ioread8(priv, &priv->map->CMD) & RTL818X_CMD_RESET) {
364 printk(KERN_ERR "%s: reset timeout!\n", wiphy_name(dev->wiphy)); 364 wiphy_err(dev->wiphy, "reset timeout!\n");
365 return -ETIMEDOUT; 365 return -ETIMEDOUT;
366 } 366 }
367 367
@@ -445,8 +445,7 @@ static int rtl8180_init_rx_ring(struct ieee80211_hw *dev)
445 &priv->rx_ring_dma); 445 &priv->rx_ring_dma);
446 446
447 if (!priv->rx_ring || (unsigned long)priv->rx_ring & 0xFF) { 447 if (!priv->rx_ring || (unsigned long)priv->rx_ring & 0xFF) {
448 printk(KERN_ERR "%s: Cannot allocate RX ring\n", 448 wiphy_err(dev->wiphy, "cannot allocate rx ring\n");
449 wiphy_name(dev->wiphy));
450 return -ENOMEM; 449 return -ENOMEM;
451 } 450 }
452 451
@@ -503,8 +502,8 @@ static int rtl8180_init_tx_ring(struct ieee80211_hw *dev,
503 502
504 ring = pci_alloc_consistent(priv->pdev, sizeof(*ring) * entries, &dma); 503 ring = pci_alloc_consistent(priv->pdev, sizeof(*ring) * entries, &dma);
505 if (!ring || (unsigned long)ring & 0xFF) { 504 if (!ring || (unsigned long)ring & 0xFF) {
506 printk(KERN_ERR "%s: Cannot allocate TX ring (prio = %d)\n", 505 wiphy_err(dev->wiphy, "cannot allocate tx ring (prio = %d)\n",
507 wiphy_name(dev->wiphy), prio); 506 prio);
508 return -ENOMEM; 507 return -ENOMEM;
509 } 508 }
510 509
@@ -569,8 +568,7 @@ static int rtl8180_start(struct ieee80211_hw *dev)
569 ret = request_irq(priv->pdev->irq, rtl8180_interrupt, 568 ret = request_irq(priv->pdev->irq, rtl8180_interrupt,
570 IRQF_SHARED, KBUILD_MODNAME, dev); 569 IRQF_SHARED, KBUILD_MODNAME, dev);
571 if (ret) { 570 if (ret) {
572 printk(KERN_ERR "%s: failed to register IRQ handler\n", 571 wiphy_err(dev->wiphy, "failed to register irq handler\n");
573 wiphy_name(dev->wiphy));
574 goto err_free_rings; 572 goto err_free_rings;
575 } 573 }
576 574
@@ -1107,9 +1105,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
1107 goto err_iounmap; 1105 goto err_iounmap;
1108 } 1106 }
1109 1107
1110 printk(KERN_INFO "%s: hwaddr %pM, %s + %s\n", 1108 wiphy_info(dev->wiphy, "hwaddr %pm, %s + %s\n",
1111 wiphy_name(dev->wiphy), mac_addr, 1109 mac_addr, chip_name, priv->rf->name);
1112 chip_name, priv->rf->name);
1113 1110
1114 return 0; 1111 return 0;
1115 1112
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index 891b8490e349..5738a55c1b06 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -573,7 +573,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev)
573 } while (--i); 573 } while (--i);
574 574
575 if (!i) { 575 if (!i) {
576 printk(KERN_ERR "%s: Reset timeout!\n", wiphy_name(dev->wiphy)); 576 wiphy_err(dev->wiphy, "reset timeout!\n");
577 return -ETIMEDOUT; 577 return -ETIMEDOUT;
578 } 578 }
579 579
@@ -589,8 +589,7 @@ static int rtl8187_cmd_reset(struct ieee80211_hw *dev)
589 } while (--i); 589 } while (--i);
590 590
591 if (!i) { 591 if (!i) {
592 printk(KERN_ERR "%s: eeprom reset timeout!\n", 592 wiphy_err(dev->wiphy, "eeprom reset timeout!\n");
593 wiphy_name(dev->wiphy));
594 return -ETIMEDOUT; 593 return -ETIMEDOUT;
595 } 594 }
596 595
@@ -1527,9 +1526,9 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1527 mutex_init(&priv->conf_mutex); 1526 mutex_init(&priv->conf_mutex);
1528 skb_queue_head_init(&priv->b_tx_status.queue); 1527 skb_queue_head_init(&priv->b_tx_status.queue);
1529 1528
1530 printk(KERN_INFO "%s: hwaddr %pM, %s V%d + %s, rfkill mask %d\n", 1529 wiphy_info(dev->wiphy, "hwaddr %pm, %s v%d + %s, rfkill mask %d\n",
1531 wiphy_name(dev->wiphy), mac_addr, 1530 mac_addr, chip_name, priv->asic_rev, priv->rf->name,
1532 chip_name, priv->asic_rev, priv->rf->name, priv->rfkill_mask); 1531 priv->rfkill_mask);
1533 1532
1534#ifdef CONFIG_RTL8187_LEDS 1533#ifdef CONFIG_RTL8187_LEDS
1535 eeprom_93cx6_read(&eeprom, 0x3F, &reg); 1534 eeprom_93cx6_read(&eeprom, 0x3F, &reg);
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
index a09819386a1e..fd96f9112322 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c
@@ -366,8 +366,8 @@ static void rtl8225_rf_init(struct ieee80211_hw *dev)
366 rtl8225_write(dev, 0x02, 0x044d); 366 rtl8225_write(dev, 0x02, 0x044d);
367 msleep(100); 367 msleep(100);
368 if (!(rtl8225_read(dev, 6) & (1 << 7))) 368 if (!(rtl8225_read(dev, 6) & (1 << 7)))
369 printk(KERN_WARNING "%s: RF Calibration Failed! %x\n", 369 wiphy_warn(dev->wiphy, "rf calibration failed! %x\n",
370 wiphy_name(dev->wiphy), rtl8225_read(dev, 6)); 370 rtl8225_read(dev, 6));
371 } 371 }
372 372
373 rtl8225_write(dev, 0x0, 0x127); 373 rtl8225_write(dev, 0x0, 0x127);
@@ -735,8 +735,8 @@ static void rtl8225z2_rf_init(struct ieee80211_hw *dev)
735 rtl8225_write(dev, 0x02, 0x044D); 735 rtl8225_write(dev, 0x02, 0x044D);
736 msleep(100); 736 msleep(100);
737 if (!(rtl8225_read(dev, 6) & (1 << 7))) 737 if (!(rtl8225_read(dev, 6) & (1 << 7)))
738 printk(KERN_WARNING "%s: RF Calibration Failed! %x\n", 738 wiphy_warn(dev->wiphy, "rf calibration failed! %x\n",
739 wiphy_name(dev->wiphy), rtl8225_read(dev, 6)); 739 rtl8225_read(dev, 6));
740 } 740 }
741 741
742 msleep(200); 742 msleep(200);