Netdev List
 help / color / mirror / Atom feed
* [PATCH wireless-next 01/20] adm8211: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/adm8211.c |   67 ++++++++++++++++++----------------------
 1 files changed, 30 insertions(+), 37 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..5d2d1b5 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -15,6 +15,8 @@
  * more details.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/if.h>
@@ -151,8 +153,8 @@ static int adm8211_read_eeprom(struct ieee80211_hw *dev)
 		else
 			priv->rf_type = ADM8211_TYPE_AIROHA;
 
-		printk(KERN_WARNING "%s (adm8211): Unknown RFtype %d\n",
-		       pci_name(priv->pdev), (cr49 >> 3) & 0x7);
+		pr_warn("%s: Unknown RFtype %d\n",
+			pci_name(priv->pdev), (cr49 >> 3) & 0x7);
 	}
 
 	priv->bbp_type = cr49 & 0x7;
@@ -169,20 +171,21 @@ static int adm8211_read_eeprom(struct ieee80211_hw *dev)
 		else
 			priv->bbp_type = ADM8211_TYPE_ADMTEK;
 
-		printk(KERN_WARNING "%s (adm8211): Unknown BBPtype: %d\n",
-		       pci_name(priv->pdev), cr49 >> 3);
+		pr_warn("%s: Unknown BBPtype: %d\n",
+			pci_name(priv->pdev), cr49 >> 3);
 	}
 
 	if (priv->eeprom->country_code >= ARRAY_SIZE(cranges)) {
-		printk(KERN_WARNING "%s (adm8211): Invalid country code (%d)\n",
-		       pci_name(priv->pdev), priv->eeprom->country_code);
+		pr_warn("%s: Invalid country code (%d)\n",
+			pci_name(priv->pdev), priv->eeprom->country_code);
 
 		chan_range = cranges[2];
 	} else
 		chan_range = cranges[priv->eeprom->country_code];
 
-	printk(KERN_DEBUG "%s (adm8211): Channel range: %d - %d\n",
-	       pci_name(priv->pdev), (int)chan_range.min, (int)chan_range.max);
+	pr_debug("%s: Channel range: %d - %d\n",
+		 pci_name(priv->pdev),
+		 (int)chan_range.min, (int)chan_range.max);
 
 	BUILD_BUG_ON(sizeof(priv->channels) != sizeof(adm8211_channels));
 
@@ -209,8 +212,8 @@ static int adm8211_read_eeprom(struct ieee80211_hw *dev)
 		else
 			priv->specific_bbptype = ADM8211_BBP_ADM8011;
 
-		printk(KERN_WARNING "%s (adm8211): Unknown specific BBP: %d\n",
-		       pci_name(priv->pdev), priv->eeprom->specific_bbptype);
+		pr_warn("%s: Unknown specific BBP: %d\n",
+			pci_name(priv->pdev), priv->eeprom->specific_bbptype);
 	}
 
 	switch (priv->eeprom->specific_rftype) {
@@ -230,15 +233,16 @@ static int adm8211_read_eeprom(struct ieee80211_hw *dev)
 		else if (priv->pdev->revision == ADM8211_REV_AB)
 			priv->transceiver_type = ADM8211_RFMD2948;
 
-		printk(KERN_WARNING "%s (adm8211): Unknown transceiver: %d\n",
-		       pci_name(priv->pdev), priv->eeprom->specific_rftype);
+		pr_warn("%s: Unknown transceiver: %d\n",
+			pci_name(priv->pdev), priv->eeprom->specific_rftype);
 
 		break;
 	}
 
-	printk(KERN_DEBUG "%s (adm8211): RFtype=%d BBPtype=%d Specific BBP=%d "
-               "Transceiver=%d\n", pci_name(priv->pdev), priv->rf_type,
-	       priv->bbp_type, priv->specific_bbptype, priv->transceiver_type);
+	pr_debug("%s: RFtype=%d BBPtype=%d Specific BBP=%d Transceiver=%d\n",
+		 pci_name(priv->pdev), priv->rf_type,
+		 priv->bbp_type, priv->specific_bbptype,
+		 priv->transceiver_type);
 
 	return 0;
 }
@@ -1773,8 +1777,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR "%s (adm8211): Cannot enable new PCI device\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot enable new PCI device\n", pci_name(pdev));
 		return err;
 	}
 
@@ -1783,8 +1786,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 	mem_addr = pci_resource_start(pdev, 1);
 	mem_len = pci_resource_len(pdev, 1);
 	if (io_len < 256 || mem_len < 1024) {
-		printk(KERN_ERR "%s (adm8211): Too short PCI resources\n",
-		       pci_name(pdev));
+		pr_err("%s: Too short PCI resources\n", pci_name(pdev));
 		goto err_disable_pdev;
 	}
 
@@ -1792,22 +1794,19 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 	/* check signature */
 	pci_read_config_dword(pdev, 0x80 /* CR32 */, &reg);
 	if (reg != ADM8211_SIG1 && reg != ADM8211_SIG2) {
-		printk(KERN_ERR "%s (adm8211): Invalid signature (0x%x)\n",
-		       pci_name(pdev), reg);
+		pr_err("%s: Invalid signature (0x%x)\n", pci_name(pdev), reg);
 		goto err_disable_pdev;
 	}
 
 	err = pci_request_regions(pdev, "adm8211");
 	if (err) {
-		printk(KERN_ERR "%s (adm8211): Cannot obtain PCI resources\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot obtain PCI resources\n", pci_name(pdev));
 		return err; /* someone else grabbed it? don't disable it */
 	}
 
 	if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
 	    pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
-		printk(KERN_ERR "%s (adm8211): No suitable DMA available\n",
-		       pci_name(pdev));
+		pr_err("%s: No suitable DMA available\n", pci_name(pdev));
 		goto err_free_reg;
 	}
 
@@ -1815,8 +1814,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 
 	dev = ieee80211_alloc_hw(sizeof(*priv), &adm8211_ops);
 	if (!dev) {
-		printk(KERN_ERR "%s (adm8211): ieee80211 alloc failed\n",
-		       pci_name(pdev));
+		pr_err("%s: ieee80211 alloc failed\n", pci_name(pdev));
 		err = -ENOMEM;
 		goto err_free_reg;
 	}
@@ -1834,8 +1832,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 		priv->map = pci_iomap(pdev, 0, io_len);
 
 	if (!priv->map) {
-		printk(KERN_ERR "%s (adm8211): Cannot map device memory\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot map device memory\n", pci_name(pdev));
 		goto err_free_dev;
 	}
 
@@ -1843,8 +1840,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 	priv->tx_ring_size = tx_ring_size;
 
 	if (adm8211_alloc_rings(dev)) {
-		printk(KERN_ERR "%s (adm8211): Cannot allocate TX/RX ring\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot allocate TX/RX ring\n", pci_name(pdev));
 		goto err_iounmap;
 	}
 
@@ -1853,8 +1849,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 		cpu_to_le16(ADM8211_CSR_READ(PAR1) & 0xFFFF);
 
 	if (!is_valid_ether_addr(perm_addr)) {
-		printk(KERN_WARNING "%s (adm8211): Invalid hwaddr in EEPROM!\n",
-		       pci_name(pdev));
+		pr_warn("%s: Invalid hwaddr in EEPROM!\n", pci_name(pdev));
 		random_ether_addr(perm_addr);
 	}
 	SET_IEEE80211_PERM_ADDR(dev, perm_addr);
@@ -1887,8 +1882,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 
 	err = adm8211_read_eeprom(dev);
 	if (err) {
-		printk(KERN_ERR "%s (adm8211): Can't alloc eeprom buffer\n",
-		       pci_name(pdev));
+		pr_err("%s: Can't alloc eeprom buffer\n", pci_name(pdev));
 		goto err_free_desc;
 	}
 
@@ -1898,8 +1892,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
 
 	err = ieee80211_register_hw(dev);
 	if (err) {
-		printk(KERN_ERR "%s (adm8211): Cannot register device\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot register device\n", pci_name(pdev));
 		goto err_free_eeprom;
 	}
 
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 02/20] airo_cs: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/airo_cs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 630577d..1a723be 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -20,6 +20,8 @@
 
 ======================================================================*/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #ifdef __IN_PCMCIA_PACKAGE__
 #include <pcmcia/k_compat.h>
 #endif
@@ -70,7 +72,7 @@ static int airo_probe(struct pcmcia_device *p_dev)
 	/* Allocate space for private device-specific data */
 	local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
 	if (!local) {
-		printk(KERN_ERR "airo_cs: no memory for new device\n");
+		pr_err("no memory for new device\n");
 		return -ENOMEM;
 	}
 	p_dev->priv = local;
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 03/20] at76c50x-usb: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/at76c50x-usb.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..817fd7b 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -25,6 +25,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -2120,8 +2122,7 @@ static struct at76_priv *at76_alloc_new_device(struct usb_device *udev)
 
 	hw = ieee80211_alloc_hw(sizeof(struct at76_priv), &at76_ops);
 	if (!hw) {
-		printk(KERN_ERR DRIVER_NAME ": could not register"
-		       " ieee80211_hw\n");
+		pr_err("could not register ieee80211_hw\n");
 		return NULL;
 	}
 
@@ -2301,8 +2302,7 @@ static int at76_init_new_device(struct at76_priv *priv,
 
 	ret = ieee80211_register_hw(priv->hw);
 	if (ret) {
-		printk(KERN_ERR "cannot register mac80211 hw (status %d)!\n",
-		       ret);
+		pr_err("cannot register mac80211 hw (status %d)!\n", ret);
 		goto exit;
 	}
 
@@ -2493,15 +2493,14 @@ static int __init at76_mod_init(void)
 {
 	int result;
 
-	printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " loading\n");
+	pr_info(DRIVER_DESC " " DRIVER_VERSION " loading\n");
 
 	mutex_init(&fw_mutex);
 
 	/* register this driver with the USB subsystem */
 	result = usb_register(&at76_driver);
 	if (result < 0)
-		printk(KERN_ERR DRIVER_NAME
-		       ": usb_register failed (status %d)\n", result);
+		pr_err("usb_register failed (status %d)\n", result);
 
 	led_trigger_register_simple("at76_usb-tx", &ledtrig_tx);
 	return result;
@@ -2511,7 +2510,7 @@ static void __exit at76_mod_exit(void)
 {
 	int i;
 
-	printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION " unloading\n");
+	pr_info(DRIVER_DESC " " DRIVER_VERSION " unloading\n");
 	usb_deregister(&at76_driver);
 	for (i = 0; i < ARRAY_SIZE(firmwares); i++)
 		release_firmware(firmwares[i].fw);
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 04/20] atmel: atmel_cs: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Simon Kelley, John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/atmel.c    |   71 ++++++++++++++++++++-------------------
 drivers/net/wireless/atmel_cs.c |    4 ++-
 2 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index d07c030..2688735 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -39,6 +39,8 @@
 
 ******************************************************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/interrupt.h>
 
@@ -1189,7 +1191,7 @@ static irqreturn_t service_interrupt(int irq, void *dev_id)
 	while (1) {
 		if (!atmel_lock_mac(priv)) {
 			/* failed to contact card */
-			printk(KERN_ALERT "%s: failed to contact MAC.\n", dev->name);
+			pr_alert("%s: failed to contact MAC\n", dev->name);
 			return IRQ_HANDLED;
 		}
 
@@ -1209,7 +1211,7 @@ static irqreturn_t service_interrupt(int irq, void *dev_id)
 
 		if (!atmel_lock_mac(priv)) {
 			/* failed to contact card */
-			printk(KERN_ALERT "%s: failed to contact MAC.\n", dev->name);
+			pr_alert("%s: failed to contact MAC\n", dev->name);
 			return IRQ_HANDLED;
 		}
 
@@ -1240,7 +1242,8 @@ static irqreturn_t service_interrupt(int irq, void *dev_id)
 			break;
 
 		case ISR_FATAL_ERROR:
-			printk(KERN_ALERT "%s: *** FATAL error interrupt ***\n", dev->name);
+			pr_alert("%s: *** FATAL error interrupt ***\n",
+				 dev->name);
 			atmel_enter_state(priv, STATION_STATE_MGMT_ERROR);
 			break;
 
@@ -1256,7 +1259,7 @@ static irqreturn_t service_interrupt(int irq, void *dev_id)
 				build_wpa_mib(priv);
 			break;
 		case ISR_GENERIC_IRQ:
-			printk(KERN_INFO "%s: Generic_irq received.\n", dev->name);
+			pr_info("%s: Generic_irq received\n", dev->name);
 			break;
 		}
 	}
@@ -1355,7 +1358,8 @@ int atmel_open(struct net_device *dev)
 				break;
 		if (i == ARRAY_SIZE(channel_table)) {
 			priv->reg_domain = REG_DOMAIN_MKK1;
-			printk(KERN_ALERT "%s: failed to get regulatory domain: assuming MKK1.\n", dev->name);
+			pr_alert("%s: failed to get regulatory domain: assuming MKK1\n",
+				 dev->name);
 		}
 	}
 
@@ -1536,7 +1540,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
 		return NULL;
 
 	if (dev_alloc_name(dev, dev->name) < 0) {
-		printk(KERN_ERR "atmel: Couldn't get name!\n");
+		pr_err("Couldn't get name!\n");
 		goto err_out_free;
 	}
 
@@ -1611,7 +1615,8 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
 	SET_NETDEV_DEV(dev, sys_dev);
 
 	if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) {
-		printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc);
+		pr_err("%s: register interrupt %d failed, rc %d\n",
+		       dev->name, irq, rc);
 		goto err_out_free;
 	}
 
@@ -1632,10 +1637,10 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
 
 	ent = create_proc_read_entry ("driver/atmel", 0, NULL, atmel_read_proc, priv);
 	if (!ent)
-		printk(KERN_WARNING "atmel: unable to create /proc entry.\n");
+		pr_warn("unable to create /proc entry\n");
 
-	printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %pM\n",
-	       dev->name, DRIVER_MAJOR, DRIVER_MINOR, dev->dev_addr);
+	pr_info("%s: Atmel at76c50x. Version %d.%d. MAC %pM\n",
+		dev->name, DRIVER_MAJOR, DRIVER_MINOR, dev->dev_addr);
 
 	return dev;
 
@@ -3642,12 +3647,12 @@ static int atmel_wakeup_firmware(struct atmel_private *priv)
 	}
 
 	if (i == 0) {
-		printk(KERN_ALERT "%s: MAC failed to boot.\n", priv->dev->name);
+		pr_alert("%s: MAC failed to boot\n", priv->dev->name);
 		return -EIO;
 	}
 
 	if ((priv->host_info_base = atmel_read16(priv->dev, MR2)) == 0xffff) {
-		printk(KERN_ALERT "%s: card missing.\n", priv->dev->name);
+		pr_alert("%s: card missing\n", priv->dev->name);
 		return -ENODEV;
 	}
 
@@ -3670,20 +3675,19 @@ static int atmel_wakeup_firmware(struct atmel_private *priv)
 	}
 
 	if (i == 0) {
-		printk(KERN_ALERT "%s: MAC failed to initialise.\n",
-				priv->dev->name);
+		pr_alert("%s: MAC failed to initialise\n", priv->dev->name);
 		return -EIO;
 	}
 
 	/* Check for MAC_INIT_OK only on the register that the MAC_INIT_OK was set */
 	if ((mr3 & MAC_INIT_COMPLETE) &&
 	    !(atmel_read16(priv->dev, MR3) & MAC_INIT_OK)) {
-		printk(KERN_ALERT "%s: MAC failed MR3 self-test.\n", priv->dev->name);
+		pr_alert("%s: MAC failed MR3 self-test\n", priv->dev->name);
 		return -EIO;
 	}
 	if ((mr1 & MAC_INIT_COMPLETE) &&
 	    !(atmel_read16(priv->dev, MR1) & MAC_INIT_OK)) {
-		printk(KERN_ALERT "%s: MAC failed MR1 self-test.\n", priv->dev->name);
+		pr_alert("%s: MAC failed MR1 self-test\n", priv->dev->name);
 		return -EIO;
 	}
 
@@ -3735,7 +3739,8 @@ static int probe_atmel_card(struct net_device *dev)
 			if (atmel_read16(dev, MR3) & MAC_BOOT_COMPLETE)
 				break;
 		if (i == 0) {
-			printk(KERN_ALERT "%s: MAC failed to boot MAC address reader.\n", dev->name);
+			pr_alert("%s: MAC failed to boot MAC address reader\n",
+				 dev->name);
 		} else {
 			atmel_copy_to_host(dev, dev->dev_addr, atmel_read16(dev, MR2), 6);
 			/* got address, now squash it again until the network
@@ -3773,7 +3778,8 @@ static int probe_atmel_card(struct net_device *dev)
 			static const u8 default_mac[] = {
 				0x00, 0x04, 0x25, 0x00, 0x00, 0x00
 			};
-			printk(KERN_ALERT "%s: *** Invalid MAC address. UPGRADE Firmware ****\n", dev->name);
+			pr_alert("%s: *** Invalid MAC address. UPGRADE Firmware ****\n",
+				 dev->name);
 			memcpy(dev->dev_addr, default_mac, 6);
 		}
 	}
@@ -3926,19 +3932,16 @@ static int reset_atmel_card(struct net_device *dev)
 		if (!(fw = priv->firmware)) {
 			if (priv->firmware_type == ATMEL_FW_TYPE_NONE) {
 				if (strlen(priv->firmware_id) == 0) {
-					printk(KERN_INFO
-					       "%s: card type is unknown: assuming at76c502 firmware is OK.\n",
-					       dev->name);
-					printk(KERN_INFO
-					       "%s: if not, use the firmware= module parameter.\n",
-					       dev->name);
+					pr_info("%s: card type is unknown: assuming at76c502 firmware is OK\n",
+						dev->name);
+					pr_info("%s: if not, use the firmware= module parameter\n",
+						dev->name);
 					strcpy(priv->firmware_id, "atmel_at76c502.bin");
 				}
 				err = request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev);
 				if (err != 0) {
-					printk(KERN_ALERT
-					       "%s: firmware %s is missing, cannot continue.\n",
-					       dev->name, priv->firmware_id);
+					pr_alert("%s: firmware %s is missing, cannot continue\n",
+						 dev->name, priv->firmware_id);
 					return err;
 				}
 			} else {
@@ -3964,9 +3967,8 @@ static int reset_atmel_card(struct net_device *dev)
 					}
 				}
 				if (!success) {
-					printk(KERN_ALERT
-					       "%s: firmware %s is missing, cannot start.\n",
-					       dev->name, priv->firmware_id);
+					pr_alert("%s: firmware %s is missing, cannot start\n",
+						 dev->name, priv->firmware_id);
 					priv->firmware_id[0] = '\0';
 					return -ENOENT;
 				}
@@ -4035,8 +4037,7 @@ static int reset_atmel_card(struct net_device *dev)
 	if (!priv->radio_on_broken) {
 		if (atmel_send_command_wait(priv, CMD_EnableRadio, NULL, 0) ==
 		    CMD_STATUS_REJECTED_RADIO_OFF) {
-			printk(KERN_INFO "%s: cannot turn the radio on.\n",
-			       dev->name);
+			pr_info("%s: cannot turn the radio on\n", dev->name);
 			return -EIO;
 		}
 	}
@@ -4101,7 +4102,7 @@ static int atmel_send_command_wait(struct atmel_private *priv, int command,
 	}
 
 	if (i == 0) {
-		printk(KERN_ALERT "%s: failed to contact MAC.\n", priv->dev->name);
+		pr_alert("%s: failed to contact MAC\n", priv->dev->name);
 		status =  CMD_STATUS_HOST_ERROR;
 	} else {
 		if (command != CMD_EnableRadio)
@@ -4155,7 +4156,7 @@ static void atmel_set_mib(struct atmel_private *priv, u8 type, u8 index,
 	m.index = index;
 
 	if (data_len > MIB_MAX_DATA_BYTES)
-		printk(KERN_ALERT "%s: MIB buffer too small.\n", priv->dev->name);
+		pr_alert("%s: MIB buffer too small\n", priv->dev->name);
 
 	memcpy(m.data, data, data_len);
 	atmel_send_command_wait(priv, CMD_Set_MIB_Vars, &m, MIB_HEADER_SIZE + data_len);
@@ -4170,7 +4171,7 @@ static void atmel_get_mib(struct atmel_private *priv, u8 type, u8 index,
 	m.index = index;
 
 	if (data_len > MIB_MAX_DATA_BYTES)
-		printk(KERN_ALERT "%s: MIB buffer too small.\n", priv->dev->name);
+		pr_alert("%s: MIB buffer too small\n", priv->dev->name);
 
 	atmel_send_command_wait(priv, CMD_Get_MIB_Vars, &m, MIB_HEADER_SIZE + data_len);
 	atmel_copy_to_host(priv->dev, data,
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index ded03d2..2b85420 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -29,6 +29,8 @@
 
 ******************************************************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #ifdef __IN_PCMCIA_PACKAGE__
 #include <pcmcia/k_compat.h>
 #endif
@@ -80,7 +82,7 @@ static int atmel_probe(struct pcmcia_device *p_dev)
 	/* Allocate space for private device-specific data */
 	local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
 	if (!local) {
-		printk(KERN_ERR "atmel_cs: no memory for new device\n");
+		pr_err("no memory for new device\n");
 		return -ENOMEM;
 	}
 	p_dev->priv = local;
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 05/20] b43: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Stefano Brivio
  Cc: John W. Linville, linux-wireless, b43-dev, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/b43/debugfs.c |   20 +++++++++--------
 drivers/net/wireless/b43/main.c    |   41 ++++++++++++++++-------------------
 drivers/net/wireless/b43/pcmcia.c  |    5 ++-
 3 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index e807bd9..1feebd9 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -23,6 +23,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/fs.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>
@@ -61,15 +63,15 @@ struct b43_dfs_file *fops_to_dfs_file(struct b43_wldev *dev,
 }
 
 
-#define fappend(fmt, x...)	\
-	do {							\
-		if (bufsize - count)				\
-			count += snprintf(buf + count,		\
-					  bufsize - count,	\
-					  fmt , ##x);		\
-		else						\
-			printk(KERN_ERR "b43: fappend overflow\n"); \
-	} while (0)
+#define fappend(fmt, x...)					\
+do {								\
+	if (bufsize - count)					\
+		count += snprintf(buf + count,			\
+				  bufsize - count,		\
+				  fmt , ##x);			\
+	else							\
+		pr_err("fappend overflow\n");			\
+} while (0)
 
 
 /* The biggest address values for SHM access from the debugfs files. */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index acd03a4..2bcedce 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -32,6 +32,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/module.h>
@@ -354,8 +356,8 @@ void b43info(struct b43_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_INFO "b43-%s: %pV",
-	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
+	pr_info("%s: %pV",
+		(wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
 }
@@ -375,7 +377,7 @@ void b43err(struct b43_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_ERR "b43-%s ERROR: %pV",
+	pr_err("%s ERROR: %pV",
 	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
@@ -396,8 +398,8 @@ void b43warn(struct b43_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_WARNING "b43-%s warning: %pV",
-	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
+	pr_warn("%s warning: %pV",
+		(wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
 }
@@ -415,7 +417,7 @@ void b43dbg(struct b43_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_DEBUG "b43-%s debug: %pV",
+	printk(KERN_DEBUG pr_fmt("%s debug: %pV"),
 	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
@@ -1069,7 +1071,7 @@ static void b43_dump_keymemory(struct b43_wldev *dev)
 	}
 	for (index = 0; index < count; index++) {
 		key = &(dev->key[index]);
-		printk(KERN_DEBUG "Key slot %02u: %s",
+		printk(KERN_DEBUG pr_fmt("Key slot %02u: %s"),
 		       index, (key->keyconf == NULL) ? " " : "*");
 		offset = dev->ktp + (index * B43_SEC_KEYSIZE);
 		for (i = 0; i < B43_SEC_KEYSIZE; i += 2) {
@@ -1794,7 +1796,7 @@ static void b43_handle_firmware_panic(struct b43_wldev *dev)
 
 static void handle_irq_ucode_debug(struct b43_wldev *dev)
 {
-	unsigned int i, cnt;
+	unsigned int i;
 	u16 reason, marker_id, marker_line;
 	__le16 *buf;
 
@@ -1830,18 +1832,15 @@ static void handle_irq_ucode_debug(struct b43_wldev *dev)
 		if (!B43_DEBUG)
 			break; /* Only with driver debugging enabled. */
 		b43info(dev->wl, "Microcode register dump:\n");
-		for (i = 0, cnt = 0; i < 64; i++) {
+		for (i = 0; i < 64; i++) {
 			u16 tmp = b43_shm_read16(dev, B43_SHM_SCRATCH, i);
-			if (cnt == 0)
-				printk(KERN_INFO);
-			printk("r%02u: 0x%04X  ", i, tmp);
-			cnt++;
-			if (cnt == 6) {
-				printk("\n");
-				cnt = 0;
-			}
+			if (!(i % 6))
+				pr_info("");
+			
+			pr_cont("r%02u: 0x%04X%s",
+				i, tmp, (i % 6) != 5 ? "  " : "\n");
 		}
-		printk("\n");
+		pr_cont("\n");
 		break;
 	case B43_DEBUGIRQ_MARKER:
 		if (!B43_DEBUG)
@@ -5509,10 +5508,8 @@ static void b43_print_driverinfo(void)
 #ifdef CONFIG_B43_SDIO
 	feat_sdio = "S";
 #endif
-	printk(KERN_INFO "Broadcom 43xx driver loaded "
-	       "[ Features: %s%s%s%s%s ]\n",
-	       feat_pci, feat_pcmcia, feat_nphy,
-	       feat_leds, feat_sdio);
+	pr_info("Broadcom 43xx driver loaded [ Features: %s%s%s%s%s ]\n",
+		feat_pci, feat_pcmcia, feat_nphy, feat_leds, feat_sdio);
 }
 
 static int __init b43_init(void)
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 714cad6..0c0751a 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -21,6 +21,8 @@
 
 */
 
+#define pr_fmt(fmt) "b43-pcmcia: " fmt
+
 #include "pcmcia.h"
 
 #include <linux/ssb/ssb.h>
@@ -105,8 +107,7 @@ err_disable:
 err_kfree_ssb:
 	kfree(ssb);
 out_error:
-	printk(KERN_ERR "b43-pcmcia: Initialization failed (%d, %d)\n",
-	       res, err);
+	pr_err("Initialization failed (%d, %d)\n", res, err);
 	return err;
 }
 
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 06/20] b43legacy: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Larry Finger, Stefano Brivio
  Cc: John W. Linville, linux-wireless, b43-dev, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/b43legacy/b43legacy.h |   14 ++++++--------
 drivers/net/wireless/b43legacy/debugfs.c   |    4 +++-
 drivers/net/wireless/b43legacy/dma.c       |    2 ++
 drivers/net/wireless/b43legacy/main.c      |   16 +++++++++-------
 drivers/net/wireless/b43legacy/phy.c       |    2 ++
 drivers/net/wireless/b43legacy/radio.c     |    5 +++--
 drivers/net/wireless/b43legacy/xmit.c      |    2 ++
 7 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index a29da67..e77083e 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -325,20 +325,18 @@ enum {
 #define B43legacy_SBIMSTATE_IB_ERROR		0x20000
 #define B43legacy_SBIMSTATE_TIMEOUT		0x40000
 
-#define PFX		KBUILD_MODNAME ": "
 #ifdef assert
 # undef assert
 #endif
 #ifdef CONFIG_B43LEGACY_DEBUG
 # define B43legacy_WARN_ON(x)	WARN_ON(x)
 # define B43legacy_BUG_ON(expr)						\
-	do {								\
-		if (unlikely((expr))) {					\
-			printk(KERN_INFO PFX "Test (%s) failed\n",	\
-					      #expr);			\
-			BUG_ON(expr);					\
-		}							\
-	} while (0)
+do {									\
+	if (unlikely((expr))) {						\
+		pr_info("Test (%s) failed\n", #expr);			\
+		BUG_ON(expr);						\
+	}								\
+} while (0)
 # define B43legacy_DEBUG	1
 #else
 /* This will evaluate the argument even if debugging is disabled. */
diff --git a/drivers/net/wireless/b43legacy/debugfs.c b/drivers/net/wireless/b43legacy/debugfs.c
index 1965edb..7678005 100644
--- a/drivers/net/wireless/b43legacy/debugfs.c
+++ b/drivers/net/wireless/b43legacy/debugfs.c
@@ -23,6 +23,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/fs.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>
@@ -71,7 +73,7 @@ struct b43legacy_dfs_file * fops_to_dfs_file(struct b43legacy_wldev *dev,
 					  bufsize - count,	\
 					  fmt , ##x);		\
 		else						\
-			printk(KERN_ERR "b43legacy: fappend overflow\n"); \
+			pr_err("fappend overflow\n");		\
 	} while (0)
 
 
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index f1f8bd0..6b42488 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -27,6 +27,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include "b43legacy.h"
 #include "dma.h"
 #include "main.h"
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8b06ca5..b0536a5 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -29,6 +29,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/module.h>
@@ -190,8 +192,8 @@ void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_INFO "b43legacy-%s: %pV",
-	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
+	pr_info("%s: %pV",
+		(wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
 }
@@ -209,7 +211,7 @@ void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_ERR "b43legacy-%s ERROR: %pV",
+	pr_err("%s ERROR: %pV",
 	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
@@ -228,8 +230,8 @@ void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_WARNING "b43legacy-%s warning: %pV",
-	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
+	pr_warn("%s warning: %pV",
+		(wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
 }
@@ -245,7 +247,7 @@ void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...)
 	vaf.fmt = fmt;
 	vaf.va = &args;
 
-	printk(KERN_DEBUG "b43legacy-%s debug: %pV",
+	printk(KERN_DEBUG pr_fmt("%s debug: %pV"),
 	       (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
 
 	va_end(args);
@@ -4001,7 +4003,7 @@ static void b43legacy_print_driverinfo(void)
 #ifdef CONFIG_B43LEGACY_DMA
 	feat_dma = "D";
 #endif
-	printk(KERN_INFO "Broadcom 43xx-legacy driver loaded "
+	pr_info("Broadcom 43xx-legacy driver loaded "
 	       "[ Features: %s%s%s%s ]\n",
 	       feat_pci, feat_leds, feat_pio, feat_dma);
 }
diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c
index 995c7d0..e03851d 100644
--- a/drivers/net/wireless/b43legacy/phy.c
+++ b/drivers/net/wireless/b43legacy/phy.c
@@ -29,6 +29,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/sched.h>
diff --git a/drivers/net/wireless/b43legacy/radio.c b/drivers/net/wireless/b43legacy/radio.c
index 8961776..ff3f996 100644
--- a/drivers/net/wireless/b43legacy/radio.c
+++ b/drivers/net/wireless/b43legacy/radio.c
@@ -29,6 +29,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 
 #include "b43legacy.h"
@@ -78,8 +80,7 @@ u16 channel2freq_bg(u8 channel)
 	};
 
 	if (unlikely(channel < 1 || channel > 14)) {
-		printk(KERN_INFO "b43legacy: Channel %d is out of range\n",
-				  channel);
+		pr_info("Channel %d is out of range\n", channel);
 		dump_stack();
 		return 2412;
 	}
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index a8012f2..385eb72 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -28,6 +28,8 @@
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <net/dst.h>
 
 #include "xmit.h"
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 07/20] hostap: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
Neaten debug logging macros.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/hostap/hostap_80211_rx.c |  125 ++++----
 drivers/net/wireless/hostap/hostap_80211_tx.c |   78 ++---
 drivers/net/wireless/hostap/hostap_ap.c       |   77 ++---
 drivers/net/wireless/hostap/hostap_cs.c       |   53 ++--
 drivers/net/wireless/hostap/hostap_download.c |  143 ++++-----
 drivers/net/wireless/hostap/hostap_hw.c       |  438 +++++++++++--------------
 drivers/net/wireless/hostap/hostap_info.c     |   36 +-
 drivers/net/wireless/hostap/hostap_ioctl.c    |  175 +++++------
 drivers/net/wireless/hostap/hostap_main.c     |  142 ++++-----
 drivers/net/wireless/hostap/hostap_pci.c      |   26 +-
 drivers/net/wireless/hostap/hostap_plx.c      |   69 ++---
 drivers/net/wireless/hostap/hostap_proc.c     |   18 +-
 drivers/net/wireless/hostap/hostap_wlan.h     |   16 +-
 13 files changed, 629 insertions(+), 767 deletions(-)

diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index df7050a..da1149c 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/etherdevice.h>
 #include <linux/slab.h>
 #include <linux/export.h>
@@ -25,35 +27,34 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
 
 	hdr = (struct ieee80211_hdr *) skb->data;
 
-	printk(KERN_DEBUG "%s: RX signal=%d noise=%d rate=%d len=%d "
-	       "jiffies=%ld\n",
-	       name, rx_stats->signal, rx_stats->noise, rx_stats->rate,
-	       skb->len, jiffies);
+	pr_debug("%s: RX signal=%d noise=%d rate=%d len=%d jiffies=%ld\n",
+		 name, rx_stats->signal, rx_stats->noise, rx_stats->rate,
+		 skb->len, jiffies);
 
 	if (skb->len < 2)
 		return;
 
 	fc = le16_to_cpu(hdr->frame_control);
-	printk(KERN_DEBUG "   FC=0x%04x (type=%d:%d)%s%s",
-	       fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
-	       (fc & IEEE80211_FCTL_STYPE) >> 4,
-	       fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
-	       fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
+	pr_debug("   FC=0x%04x (type=%d:%d)%s%s",
+		 fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
+		 (fc & IEEE80211_FCTL_STYPE) >> 4,
+		 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
+		 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
 
 	if (skb->len < IEEE80211_DATA_HDR3_LEN) {
-		printk("\n");
+		pr_cont("\n");
 		return;
 	}
 
-	printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
-	       le16_to_cpu(hdr->seq_ctrl));
+	pr_cont(" dur=0x%04x seq=0x%04x\n",
+		le16_to_cpu(hdr->duration_id), le16_to_cpu(hdr->seq_ctrl));
 
-	printk(KERN_DEBUG "   A1=%pM", hdr->addr1);
-	printk(" A2=%pM", hdr->addr2);
-	printk(" A3=%pM", hdr->addr3);
+	pr_debug("   A1=%pM", hdr->addr1);
+	pr_cont(" A2=%pM", hdr->addr2);
+	pr_cont(" A3=%pM", hdr->addr3);
 	if (skb->len >= 30)
-		printk(" A4=%pM", hdr->addr4);
-	printk("\n");
+		pr_cont(" A4=%pM", hdr->addr4);
+	pr_cont("\n");
 }
 
 
@@ -92,8 +93,8 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
 	fc = le16_to_cpu(fhdr->frame_control);
 
 	if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) {
-		printk(KERN_DEBUG "%s: dropped management frame with header "
-		       "version %d\n", dev->name, fc & IEEE80211_FCTL_VERS);
+		pr_debug("%s: dropped management frame with header version %d\n",
+			 dev->name, fc & IEEE80211_FCTL_VERS);
 		dev_kfree_skb_any(skb);
 		return 0;
 	}
@@ -115,8 +116,8 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
 		if (pskb_expand_head(skb, head_need > 0 ? head_need : 0,
 				     tail_need > 0 ? tail_need : 0,
 				     GFP_ATOMIC)) {
-			printk(KERN_DEBUG "%s: prism2_rx_80211 failed to "
-			       "reallocate skb buffer\n", dev->name);
+			pr_debug("%s: prism2_rx_80211 failed to reallocate skb buffer\n",
+				 dev->name);
 			dev_kfree_skb_any(skb);
 			return 0;
 		}
@@ -229,9 +230,9 @@ prism2_frag_cache_find(local_info_t *local, unsigned int seq,
 		entry = &local->frag_cache[i];
 		if (entry->skb != NULL &&
 		    time_after(jiffies, entry->first_frag_time + 2 * HZ)) {
-			printk(KERN_DEBUG "%s: expiring fragment cache entry "
-			       "seq=%u last_frag=%u\n",
-			       local->dev->name, entry->seq, entry->last_frag);
+			pr_debug("%s: expiring fragment cache entry seq=%u last_frag=%u\n",
+				 local->dev->name, entry->seq,
+				 entry->last_frag);
 			dev_kfree_skb(entry->skb);
 			entry->skb = NULL;
 		}
@@ -313,9 +314,8 @@ static int prism2_frag_cache_invalidate(local_info_t *local,
 	entry = prism2_frag_cache_find(local, seq, -1, hdr->addr2, hdr->addr1);
 
 	if (entry == NULL) {
-		printk(KERN_DEBUG "%s: could not invalidate fragment cache "
-		       "entry (seq=%u)\n",
-		       local->dev->name, seq);
+		pr_debug("%s: could not invalidate fragment cache entry (seq=%u)\n",
+			 local->dev->name, seq);
 		return -1;
 	}
 
@@ -500,9 +500,8 @@ hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb,
 	if (local->iw_mode == IW_MODE_MASTER) {
 		if (type != IEEE80211_FTYPE_MGMT &&
 		    type != IEEE80211_FTYPE_CTL) {
-			printk(KERN_DEBUG "%s: unknown management frame "
-			       "(type=0x%02x, stype=0x%02x) dropped\n",
-			       skb->dev->name, type >> 2, stype >> 4);
+			pr_debug("%s: unknown management frame (type=0x%02x, stype=0x%02x) dropped\n",
+				 skb->dev->name, type >> 2, stype >> 4);
 			return -1;
 		}
 
@@ -521,9 +520,8 @@ hostap_rx_frame_mgmt(local_info_t *local, struct sk_buff *skb,
 		 */
 		return -1;
 	} else {
-		printk(KERN_DEBUG "%s: hostap_rx_frame_mgmt: dropped unhandled"
-		       " management frame in non-Host AP mode (type=%d:%d)\n",
-		       skb->dev->name, type >> 2, stype >> 4);
+		pr_debug("%s: hostap_rx_frame_mgmt: dropped unhandled management frame in non-Host AP mode (type=%d:%d)\n",
+			 skb->dev->name, type >> 2, stype >> 4);
 		return -1;
 	}
 }
@@ -662,9 +660,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
 	if (local->tkip_countermeasures &&
 	    strcmp(crypt->ops->name, "TKIP") == 0) {
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-			       "received packet from %pM\n",
-			       local->dev->name, hdr->addr2);
+			pr_debug("%s: TKIP countermeasures: dropped received packet from %pM\n",
+				 local->dev->name, hdr->addr2);
 		}
 		return -1;
 	}
@@ -673,8 +670,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
 	res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
 	atomic_dec(&crypt->refcnt);
 	if (res < 0) {
-		printk(KERN_DEBUG "%s: decryption failed (SA=%pM) res=%d\n",
-		       local->dev->name, hdr->addr2, res);
+		pr_debug("%s: decryption failed (SA=%pM) res=%d\n",
+			 local->dev->name, hdr->addr2, res);
 		local->comm_tallies.rx_discards_wep_undecryptable++;
 		return -1;
 	}
@@ -701,9 +698,8 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
 	res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv);
 	atomic_dec(&crypt->refcnt);
 	if (res < 0) {
-		printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
-		       " (SA=%pM keyidx=%d)\n",
-		       local->dev->name, hdr->addr2, keyidx);
+		pr_debug("%s: MSDU decryption/MIC verification failed (SA=%pM keyidx=%d)\n",
+			 local->dev->name, hdr->addr2, keyidx);
 		return -1;
 	}
 
@@ -808,9 +804,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 			 * frames from other than current BSS, so just drop the
 			 * frames silently instead of filling system log with
 			 * these reports. */
-			printk(KERN_DEBUG "%s: WEP decryption failed (not set)"
-			       " (SA=%pM)\n",
-			       local->dev->name, hdr->addr2);
+			pr_debug("%s: WEP decryption failed (not set) (SA=%pM)\n",
+				 local->dev->name, hdr->addr2);
 #endif
 			local->comm_tallies.rx_discards_wep_undecryptable++;
 			goto rx_dropped;
@@ -823,8 +818,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 		    fc & IEEE80211_FCTL_PROTECTED && local->host_decrypt &&
 		    (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
 		{
-			printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
-			       "from %pM\n", dev->name, hdr->addr2);
+			pr_debug("%s: failed to decrypt mgmt::auth from %pM\n",
+				 dev->name, hdr->addr2);
 			/* TODO: could inform hostapd about this so that it
 			 * could send auth failure report */
 			goto rx_dropped;
@@ -901,9 +896,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 	    stype != IEEE80211_STYPE_DATA_CFPOLL &&
 	    stype != IEEE80211_STYPE_DATA_CFACKPOLL) {
 		if (stype != IEEE80211_STYPE_NULLFUNC)
-			printk(KERN_DEBUG "%s: RX: dropped data frame "
-			       "with no data (type=0x%02x, subtype=0x%02x)\n",
-			       dev->name, type >> 2, stype >> 4);
+			pr_debug("%s: RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n",
+				 dev->name, type >> 2, stype >> 4);
 		goto rx_dropped;
 	}
 
@@ -922,10 +916,10 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 		struct sk_buff *frag_skb =
 			prism2_frag_cache_get(local, hdr);
 		if (!frag_skb) {
-			printk(KERN_DEBUG "%s: Rx cannot get skb from "
-			       "fragment cache (morefrag=%d seq=%u frag=%u)\n",
-			       dev->name, (fc & IEEE80211_FCTL_MOREFRAGS) != 0,
-			       (sc & IEEE80211_SCTL_SEQ) >> 4, frag);
+			pr_debug("%s: Rx cannot get skb from fragment cache (morefrag=%d seq=%u frag=%u)\n",
+				 dev->name,
+				 (fc & IEEE80211_FCTL_MOREFRAGS) != 0,
+				 (sc & IEEE80211_SCTL_SEQ) >> 4, frag);
 			goto rx_dropped;
 		}
 
@@ -934,9 +928,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 			flen -= hdrlen;
 
 		if (frag_skb->tail + flen > frag_skb->end) {
-			printk(KERN_WARNING "%s: host decrypted and "
-			       "reassembled frame did not fit skb\n",
-			       dev->name);
+			pr_warn("%s: host decrypted and reassembled frame did not fit skb\n",
+				dev->name);
 			prism2_frag_cache_invalidate(local, hdr);
 			goto rx_dropped;
 		}
@@ -986,9 +979,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 			PDEBUG(DEBUG_EXTRA2, "%s: RX: IEEE 802.1X - passing "
 			       "unencrypted EAPOL frame\n", local->dev->name);
 		} else {
-			printk(KERN_DEBUG "%s: encryption configured, but RX "
-			       "frame not encrypted (SA=%pM)\n",
-			       local->dev->name, hdr->addr2);
+			pr_debug("%s: encryption configured, but RX frame not encrypted (SA=%pM)\n",
+				 local->dev->name, hdr->addr2);
 			goto rx_dropped;
 		}
 	}
@@ -996,9 +988,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 	if (local->drop_unencrypted && !(fc & IEEE80211_FCTL_PROTECTED) &&
 	    !hostap_is_eapol_frame(local, skb)) {
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: dropped unencrypted RX data "
-			       "frame from %pM (drop_unencrypted=1)\n",
-			       dev->name, hdr->addr2);
+			pr_debug("%s: dropped unencrypted RX data frame from %pM (drop_unencrypted=1)\n",
+				 dev->name, hdr->addr2);
 		}
 		goto rx_dropped;
 	}
@@ -1024,10 +1015,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 				goto rx_exit;
 			}
 		} else if (!frame_authorized) {
-			printk(KERN_DEBUG "%s: dropped frame from "
-			       "unauthorized port (IEEE 802.1X): "
-			       "ethertype=0x%04x\n",
-			       dev->name, ethertype);
+			pr_debug("%s: dropped frame from unauthorized port (IEEE 802.1X): ethertype=0x%04x\n",
+				 dev->name, ethertype);
 			goto rx_dropped;
 		}
 	}
@@ -1074,8 +1063,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
 			local->ap->bridged_multicast++;
 			skb2 = skb_clone(skb, GFP_ATOMIC);
 			if (skb2 == NULL)
-				printk(KERN_DEBUG "%s: skb_clone failed for "
-				       "multicast frame\n", dev->name);
+				pr_debug("%s: skb_clone failed for multicast frame\n",
+					 dev->name);
 		} else if (hostap_is_sta_authorized(local->ap, dst)) {
 			/* send frame directly to the associated STA using
 			 * wireless media and not passing to higher layers */
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c
index 344a981..141a9bd 100644
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c
@@ -1,3 +1,5 @@
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/slab.h>
 #include <linux/export.h>
 
@@ -23,33 +25,32 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
 
 	hdr = (struct ieee80211_hdr *) skb->data;
 
-	printk(KERN_DEBUG "%s: TX len=%d jiffies=%ld\n",
-	       name, skb->len, jiffies);
+	pr_debug("%s: TX len=%d jiffies=%ld\n", name, skb->len, jiffies);
 
 	if (skb->len < 2)
 		return;
 
 	fc = le16_to_cpu(hdr->frame_control);
-	printk(KERN_DEBUG "   FC=0x%04x (type=%d:%d)%s%s",
-	       fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
-	       (fc & IEEE80211_FCTL_STYPE) >> 4,
-	       fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
-	       fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
+	pr_debug("   FC=0x%04x (type=%d:%d)%s%s",
+		 fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
+		 (fc & IEEE80211_FCTL_STYPE) >> 4,
+		 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
+		 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
 
 	if (skb->len < IEEE80211_DATA_HDR3_LEN) {
-		printk("\n");
+		pr_cont("\n");
 		return;
 	}
 
-	printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
-	       le16_to_cpu(hdr->seq_ctrl));
+	pr_cont(" dur=0x%04x seq=0x%04x\n",
+	       le16_to_cpu(hdr->duration_id), le16_to_cpu(hdr->seq_ctrl));
 
-	printk(KERN_DEBUG "   A1=%pM", hdr->addr1);
-	printk(" A2=%pM", hdr->addr2);
-	printk(" A3=%pM", hdr->addr3);
+	pr_debug("   A1=%pM", hdr->addr1);
+	pr_cont(" A2=%pM", hdr->addr2);
+	pr_cont(" A3=%pM", hdr->addr3);
 	if (skb->len >= 30)
-		printk(" A4=%pM", hdr->addr4);
-	printk("\n");
+		pr_cont(" A4=%pM", hdr->addr4);
+	pr_cont("\n");
 }
 
 
@@ -76,8 +77,8 @@ netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
 	local = iface->local;
 
 	if (skb->len < ETH_HLEN) {
-		printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb "
-		       "(len=%d)\n", dev->name, skb->len);
+		pr_debug("%s: hostap_data_start_xmit: short skb (len=%d)\n",
+			 dev->name, skb->len);
 		kfree_skb(skb);
 		return NETDEV_TX_OK;
 	}
@@ -90,15 +91,15 @@ netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
 			to_assoc_ap = 1;
 			use_wds = WDS_NO;
 		} else if (dev == local->apdev) {
-			printk(KERN_DEBUG "%s: prism2_tx: trying to use "
-			       "AP device with Ethernet net dev\n", dev->name);
+			pr_debug("%s: prism2_tx: trying to use AP device with Ethernet net dev\n",
+				 dev->name);
 			kfree_skb(skb);
 			return NETDEV_TX_OK;
 		}
 	} else {
 		if (local->iw_mode == IW_MODE_REPEAT) {
-			printk(KERN_DEBUG "%s: prism2_tx: trying to use "
-			       "non-WDS link in Repeater mode\n", dev->name);
+			pr_debug("%s: prism2_tx: trying to use non-WDS link in Repeater mode\n",
+				 dev->name);
 			kfree_skb(skb);
 			return NETDEV_TX_OK;
 		} else if (local->iw_mode == IW_MODE_INFRA &&
@@ -278,8 +279,8 @@ netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
 	local = iface->local;
 
 	if (skb->len < 10) {
-		printk(KERN_DEBUG "%s: hostap_mgmt_start_xmit: short skb "
-		       "(len=%d)\n", dev->name, skb->len);
+		pr_debug("%s: hostap_mgmt_start_xmit: short skb (len=%d)\n",
+			 dev->name, skb->len);
 		kfree_skb(skb);
 		return NETDEV_TX_OK;
 	}
@@ -331,9 +332,8 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
 	    strcmp(crypt->ops->name, "TKIP") == 0) {
 		hdr = (struct ieee80211_hdr *) skb->data;
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
-			       "TX packet to %pM\n",
-			       local->dev->name, hdr->addr1);
+			pr_debug("%s: TKIP countermeasures: dropped TX packet to %pM\n",
+				 local->dev->name, hdr->addr1);
 		}
 		kfree_skb(skb);
 		return NULL;
@@ -399,9 +399,8 @@ netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
 
 	meta = (struct hostap_skb_tx_data *) skb->cb;
 	if (meta->magic != HOSTAP_SKB_TX_DATA_MAGIC) {
-		printk(KERN_DEBUG "%s: invalid skb->cb magic (0x%08x, "
-		       "expected 0x%08x)\n",
-		       dev->name, meta->magic, HOSTAP_SKB_TX_DATA_MAGIC);
+		pr_debug("%s: invalid skb->cb magic (0x%08x, expected 0x%08x)\n",
+			 dev->name, meta->magic, HOSTAP_SKB_TX_DATA_MAGIC);
 		ret = NETDEV_TX_OK;
 		iface->stats.tx_dropped++;
 		goto fail;
@@ -418,8 +417,8 @@ netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
 	}
 
 	if (skb->len < 24) {
-		printk(KERN_DEBUG "%s: hostap_master_start_xmit: short skb "
-		       "(len=%d)\n", dev->name, skb->len);
+		pr_debug("%s: hostap_master_start_xmit: short skb (len=%d)\n",
+			 dev->name, skb->len);
 		ret = NETDEV_TX_OK;
 		iface->stats.tx_dropped++;
 		goto fail;
@@ -442,9 +441,8 @@ netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
 		    ieee80211_is_data(hdr->frame_control) &&
 		    meta->ethertype != ETH_P_PAE &&
 		    !(meta->flags & HOSTAP_TX_FLAGS_WDS)) {
-			printk(KERN_DEBUG "%s: dropped frame to unauthorized "
-			       "port (IEEE 802.1X): ethertype=0x%04x\n",
-			       dev->name, meta->ethertype);
+			pr_debug("%s: dropped frame to unauthorized port (IEEE 802.1X): ethertype=0x%04x\n",
+				 dev->name, meta->ethertype);
 			hostap_dump_tx_80211(dev->name, skb);
 
 			ret = NETDEV_TX_OK; /* drop packet */
@@ -503,8 +501,8 @@ netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
 		   ieee80211_is_data(hdr->frame_control) &&
 		   meta->ethertype != ETH_P_PAE) {
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: dropped unencrypted TX data "
-			       "frame (drop_unencrypted=1)\n", dev->name);
+			pr_debug("%s: dropped unencrypted TX data frame (drop_unencrypted=1)\n",
+				 dev->name);
 		}
 		iface->stats.tx_dropped++;
 		ret = NETDEV_TX_OK;
@@ -514,16 +512,14 @@ netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
 	if (tx.crypt) {
 		skb = hostap_tx_encrypt(skb, tx.crypt);
 		if (skb == NULL) {
-			printk(KERN_DEBUG "%s: TX - encryption failed\n",
-			       dev->name);
+			pr_debug("%s: TX - encryption failed\n", dev->name);
 			ret = NETDEV_TX_OK;
 			goto fail;
 		}
 		meta = (struct hostap_skb_tx_data *) skb->cb;
 		if (meta->magic != HOSTAP_SKB_TX_DATA_MAGIC) {
-			printk(KERN_DEBUG "%s: invalid skb->cb magic (0x%08x, "
-			       "expected 0x%08x) after hostap_tx_encrypt\n",
-			       dev->name, meta->magic,
+			pr_debug("%s: invalid skb->cb magic (0x%08x, expected 0x%08x) after hostap_tx_encrypt\n",
+				 dev->name, meta->magic,
 			       HOSTAP_SKB_TX_DATA_MAGIC);
 			ret = NETDEV_TX_OK;
 			iface->stats.tx_dropped++;
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index e1f4102..82b2724 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -16,6 +16,8 @@
  *   (8802.11: 5.5)
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/proc_fs.h>
 #include <linux/delay.h>
 #include <linux/random.h>
@@ -550,7 +552,7 @@ static int prism2_ap_proc_read(char *page, char **start, off_t off,
 		p += sprintf(p, "\n");
 
 		if ((p - page) > PROC_LIMIT) {
-			printk(KERN_DEBUG "hostap: ap proc did not fit\n");
+			pr_debug("ap proc did not fit\n");
 			break;
 		}
 	}
@@ -581,9 +583,8 @@ void hostap_check_sta_fw_version(struct ap_data *ap, int sta_fw_ver)
 		ap->nullfunc_ack = 0;
 
 	if (sta_fw_ver == PRISM2_FW_VER(1,4,2)) {
-		printk(KERN_WARNING "%s: Warning: secondary station firmware "
-		       "version 1.4.2 does not seem to work in Host AP mode\n",
-		       ap->local->dev->name);
+		pr_warn("%s: Warning: secondary station firmware version 1.4.2 does not seem to work in Host AP mode\n",
+			ap->local->dev->name);
 	}
 }
 
@@ -635,8 +636,8 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
 	hdr = (struct ieee80211_hdr *) skb->data;
 	if (!ieee80211_is_auth(hdr->frame_control) ||
 	    skb->len < IEEE80211_MGMT_HDR_LEN + 6) {
-		printk(KERN_DEBUG "%s: hostap_ap_tx_cb_auth received invalid "
-		       "frame\n", dev->name);
+		pr_debug("%s: hostap_ap_tx_cb_auth received invalid frame\n",
+			 dev->name);
 		dev_kfree_skb(skb);
 		return;
 	}
@@ -704,8 +705,8 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
 	if ((!ieee80211_is_assoc_resp(hdr->frame_control) &&
 	     !ieee80211_is_reassoc_resp(hdr->frame_control)) ||
 	    skb->len < IEEE80211_MGMT_HDR_LEN + 4) {
-		printk(KERN_DEBUG "%s: hostap_ap_tx_cb_assoc received invalid "
-		       "frame\n", dev->name);
+		pr_debug("%s: hostap_ap_tx_cb_assoc received invalid frame\n",
+			 dev->name);
 		dev_kfree_skb(skb);
 		return;
 	}
@@ -782,7 +783,7 @@ void hostap_init_data(local_info_t *local)
 	struct ap_data *ap = local->ap;
 
 	if (ap == NULL) {
-		printk(KERN_WARNING "hostap_init_data: ap == NULL\n");
+		pr_warn("%s: ap == NULL\n", __func__);
 		return;
 	}
 	memset(ap, 0, sizeof(struct ap_data));
@@ -803,8 +804,8 @@ void hostap_init_data(local_info_t *local)
 	ap->tx_callback_idx =
 		hostap_tx_callback_register(local, hostap_ap_tx_cb, ap);
 	if (ap->tx_callback_idx == 0)
-		printk(KERN_WARNING "%s: failed to register TX callback for "
-		       "AP\n", local->dev->name);
+		pr_warn("%s: failed to register TX callback for AP\n",
+			local->dev->name);
 #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
 	INIT_WORK(&local->ap->wds_oper_queue, handle_wds_oper_queue);
 
@@ -816,8 +817,8 @@ void hostap_init_data(local_info_t *local)
 		hostap_tx_callback_register(local, hostap_ap_tx_cb_poll, ap);
 	if (ap->tx_callback_auth == 0 || ap->tx_callback_assoc == 0 ||
 		ap->tx_callback_poll == 0)
-		printk(KERN_WARNING "%s: failed to register TX callback for "
-		       "AP\n", local->dev->name);
+		pr_warn("%s: failed to register TX callback for AP\n",
+			local->dev->name);
 
 	spin_lock_init(&ap->mac_restrictions.lock);
 	INIT_LIST_HEAD(&ap->mac_restrictions.mac_list);
@@ -855,8 +856,8 @@ void hostap_free_data(struct ap_data *ap)
 	struct sta_info *n, *sta;
 
 	if (ap == NULL || !ap->initialized) {
-		printk(KERN_DEBUG "hostap_free_data: ap has not yet been "
-		       "initialized - skip resource freeing\n");
+		pr_debug("%s: ap has not yet been initialized - skip resource freeing\n",
+			__func__);
 		return;
 	}
 
@@ -1123,7 +1124,7 @@ static struct sta_info * ap_add_sta(struct ap_data *ap, u8 *addr)
 			ap->add_sta_proc_entries = entry;
 			schedule_work(&ap->add_sta_proc_queue);
 		} else
-			printk(KERN_DEBUG "Failed to add STA proc data\n");
+			pr_debug("Failed to add STA proc data\n");
 	}
 
 #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
@@ -1222,8 +1223,7 @@ static void ap_crypt_init(struct ap_data *ap)
 	}
 
 	if (ap->crypt == NULL) {
-		printk(KERN_WARNING "AP could not initialize WEP: load module "
-		       "lib80211_crypt_wep.ko\n");
+		pr_warn("AP could not initialize WEP: load module lib80211_crypt_wep.ko\n");
 	}
 }
 
@@ -1795,7 +1795,7 @@ static void ap_handle_data_nullfunc(local_info_t *local,
 	 * not send this..
 	 * send control::ACK for the data::nullfunc */
 
-	printk(KERN_DEBUG "Sending control::ACK for data::nullfunc\n");
+	pr_debug("Sending control::ACK for data::nullfunc\n");
 	prism2_send_mgmt(dev, IEEE80211_FTYPE_CTL | IEEE80211_STYPE_ACK,
 			 NULL, 0, hdr->addr2, 0);
 }
@@ -1995,8 +1995,7 @@ static void handle_beacon(local_info_t *local, struct sk_buff *skb,
 	len = skb->len - IEEE80211_MGMT_HDR_LEN;
 
 	if (len < 8 + 2 + 2) {
-		printk(KERN_DEBUG "handle_beacon - too short payload "
-		       "(len=%d)\n", len);
+		pr_debug("handle_beacon - too short payload (len=%d)\n", len);
 		return;
 	}
 
@@ -2089,8 +2088,7 @@ static void handle_beacon(local_info_t *local, struct sk_buff *skb,
 		new_sta = 1;
 		sta = ap_add_sta(local->ap, hdr->addr2);
 		if (sta == NULL) {
-			printk(KERN_INFO "prism2: kmalloc failed for AP "
-			       "data structure\n");
+			pr_info("prism2: kmalloc failed for AP data structure\n");
 			return;
 		}
 		hostap_event_new_sta(local->dev, sta);
@@ -2296,8 +2294,8 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
 
 	skb = dev_alloc_skb(16);
 	if (skb == NULL) {
-		printk(KERN_DEBUG "%s: schedule_packet_send: skb alloc "
-		       "failed\n", local->dev->name);
+		pr_debug("%s: %s: skb alloc failed\n",
+			 local->dev->name, __func__);
 		return;
 	}
 
@@ -2625,8 +2623,7 @@ int prism2_hostapd(struct ap_data *ap, struct prism2_hostapd_param *param)
 	case PRISM2_HOSTAPD_STA_CLEAR_STATS:
 		return prism2_hostapd_sta_clear_stats(ap, param);
 	default:
-		printk(KERN_WARNING "prism2_hostapd: unknown cmd=%d\n",
-		       param->cmd);
+		pr_warn("%s: unknown cmd=%d\n", __func__, param->cmd);
 		return -EOPNOTSUPP;
 	}
 }
@@ -2719,8 +2716,8 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
 		 * ports of the bridge. Since this is a valid scenario, do not
 		 * print out any errors here. */
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "AP: drop packet to non-associated "
-			       "STA %pM\n", hdr->addr1);
+			pr_debug("drop packet to non-associated STA %pM\n",
+				 hdr->addr1);
 		}
 #endif
 		local->ap->tx_drop_nonassoc++;
@@ -2957,11 +2954,9 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
 						PRISM2_RX_NON_ASSOC);
 #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
 			} else {
-				printk(KERN_DEBUG "%s: dropped received packet"
-				       " from non-associated STA %pM"
-				       " (type=0x%02x, subtype=0x%02x)\n",
-				       dev->name, hdr->addr2,
-				       type >> 2, stype >> 4);
+				pr_debug("%s: dropped received packet from non-associated STA %pM (type=0x%02x, subtype=0x%02x)\n",
+					 dev->name, hdr->addr2,
+					 type >> 2, stype >> 4);
 				hostap_rx(dev, skb, rx_stats);
 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
 			}
@@ -2973,8 +2968,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
 			/* FromDS frame - not for us; probably
 			 * broadcast/multicast in another BSS - drop */
 			if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0) {
-				printk(KERN_DEBUG "Odd.. FromDS packet "
-				       "received with own BSSID\n");
+				pr_debug("Odd.. FromDS packet received with own BSSID\n");
 				hostap_dump_rx_80211(dev->name, skb, rx_stats);
 			}
 			ret = AP_RX_DROP;
@@ -2993,9 +2987,8 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
 			 * after being unavailable for some time. Speed up
 			 * re-association by informing the station about it not
 			 * being associated. */
-			printk(KERN_DEBUG "%s: rejected received nullfunc frame"
-			       " without ToDS from not associated STA %pM\n",
-			       dev->name, hdr->addr2);
+			pr_debug("%s: rejected received nullfunc frame without ToDS from not associated STA %pM\n",
+				 dev->name, hdr->addr2);
 			hostap_rx(dev, skb, rx_stats);
 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
 		}
@@ -3011,10 +3004,8 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
 		 * broadcast frame from an IBSS network. Drop it silently.
 		 * If BSSID is own, report the dropping of this frame. */
 		if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) {
-			printk(KERN_DEBUG "%s: dropped received packet from %pM"
-			       " with no ToDS flag "
-			       "(type=0x%02x, subtype=0x%02x)\n", dev->name,
-			       hdr->addr2, type >> 2, stype >> 4);
+			pr_debug("%s: dropped received packet from %pM with no ToDS flag (type=0x%02x, subtype=0x%02x)\n",
+				 dev->name, hdr->addr2, type >> 2, stype >> 4);
 			hostap_dump_rx_80211(dev->name, skb, rx_stats);
 		}
 		ret = AP_RX_DROP;
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 89e9d3a..83e76ce 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -1,5 +1,7 @@
 #define PRISM2_PCCARD
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/if.h>
@@ -228,16 +230,16 @@ static void sandisk_set_iobase(local_info_t *local)
 	res = pcmcia_write_config_byte(hw_priv->link, 0x10,
 				hw_priv->link->resource[0]->start & 0x00ff);
 	if (res != 0) {
-		printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
-		       " res=%d\n", res);
+		pr_debug("Prism3 SanDisk - failed to set I/O base 0 - res=%d\n",
+			 res);
 	}
 	udelay(10);
 
 	res = pcmcia_write_config_byte(hw_priv->link, 0x12,
 				(hw_priv->link->resource[0]->start >> 8) & 0x00ff);
 	if (res != 0) {
-		printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
-		       " res=%d\n", res);
+		pr_debug("Prism3 SanDisk - failed to set I/O base 1 - res=%d\n",
+			 res);
 	}
 }
 
@@ -282,15 +284,15 @@ static int sandisk_enable_wireless(struct net_device *dev)
 		goto done;
 	}
 
-	printk(KERN_DEBUG "%s: Multi-function SanDisk ConnectPlus detected"
-	       " - using vendor-specific initialization\n", dev->name);
+	pr_debug("%s: Multi-function SanDisk ConnectPlus detected - using vendor-specific initialization\n",
+		 dev->name);
 	hw_priv->sandisk_connectplus = 1;
 
 	res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
 				COR_SOFT_RESET);
 	if (res != 0) {
-		printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
-		       dev->name, res);
+		pr_debug("%s: SanDisk - COR sreset failed (%d)\n",
+			 dev->name, res);
 		goto done;
 	}
 	mdelay(5);
@@ -303,8 +305,8 @@ static int sandisk_enable_wireless(struct net_device *dev)
 				(COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE |
 					COR_FUNC_ENA));
 	if (res != 0) {
-		printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
-		       dev->name, res);
+		pr_debug("%s: SanDisk - COR sreset failed (%d)\n",
+			 dev->name, res);
 		goto done;
 	}
 	mdelay(5);
@@ -332,18 +334,15 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
 
 	res = pcmcia_read_config_byte(hw_priv->link, CISREG_COR, &val);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n",
-		       res);
+		pr_debug("%s: failed 1 (%d)\n", __func__, res);
 		return;
 	}
-	printk(KERN_DEBUG "prism2_pccard_cor_sreset: original COR %02x\n",
-		val);
+	pr_debug("%s: original COR %02x\n", __func__, val);
 
 	val |= COR_SOFT_RESET;
 	res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR, val);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n",
-		       res);
+		pr_debug("%s: failed 2 (%d)\n", __func__, res);
 		return;
 	}
 
@@ -354,8 +353,7 @@ static void prism2_pccard_cor_sreset(local_info_t *local)
 		val |= COR_IREQ_ENA;
 	res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR, val);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n",
-		       res);
+		pr_debug("%s: failed 3 (%d)\n", __func__, res);
 		return;
 	}
 
@@ -382,18 +380,15 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
 
 	res = pcmcia_read_config_byte(hw_priv->link, CISREG_COR, &old_cor);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 "
-		       "(%d)\n", res);
+		pr_debug("%s: failed 1 (%d)\n", __func__, res);
 		return;
 	}
-	printk(KERN_DEBUG "prism2_pccard_genesis_sreset: original COR %02x\n",
-		old_cor);
+	pr_debug("%s: original COR %02x\n", __func__, old_cor);
 
 	res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
 				old_cor | COR_SOFT_RESET);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 "
-		       "(%d)\n", res);
+		pr_debug("%s: failed 2 (%d)\n", __func__, res);
 		return;
 	}
 
@@ -402,8 +397,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
 	/* Setup Genesis mode */
 	res = pcmcia_write_config_byte(hw_priv->link, CISREG_CCSR, hcr);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 "
-		       "(%d)\n", res);
+		pr_debug("%s: failed 3 (%d)\n", __func__, res);
 		return;
 	}
 	mdelay(10);
@@ -411,8 +405,7 @@ static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
 	res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
 				old_cor & ~COR_SOFT_RESET);
 	if (res != 0) {
-		printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 "
-		       "(%d)\n", res);
+		pr_debug("%s: failed 4 (%d)\n", __func__, res);
 		return;
 	}
 
@@ -499,9 +492,7 @@ static int prism2_config(struct pcmcia_device *link)
 	ret = pcmcia_loop_config(link, prism2_config_check, NULL);
 	if (ret) {
 		if (!ignore_cis_vcc)
-			printk(KERN_ERR "GetNextTuple(): No matching "
-			       "CIS configuration.  Maybe you need the "
-			       "ignore_cis_vcc=1 parameter.\n");
+			pr_err("GetNextTuple(): No matching CIS configuration.  Maybe you need the ignore_cis_vcc=1 parameter.\n");
 		goto failed;
 	}
 
diff --git a/drivers/net/wireless/hostap/hostap_download.c b/drivers/net/wireless/hostap/hostap_download.c
index e73bf73..8090bc3 100644
--- a/drivers/net/wireless/hostap/hostap_download.c
+++ b/drivers/net/wireless/hostap/hostap_download.c
@@ -228,7 +228,7 @@ static u8 * prism2_read_pda(struct net_device *dev)
 	prism2_enable_aux_port(dev, 0);
 
 	if (!found) {
-		printk(KERN_DEBUG "%s: valid PDA not found\n", dev->name);
+		pr_debug("%s: valid PDA not found\n", dev->name);
 		kfree(buf);
 		buf = NULL;
 	}
@@ -245,8 +245,8 @@ static int prism2_download_volatile(local_info_t *local,
 	u16 param0, param1;
 
 	if (local->hw_downloading) {
-		printk(KERN_WARNING "%s: Already downloading - aborting new "
-		       "request\n", dev->name);
+		pr_warn("%s: Already downloading - aborting new request\n",
+			dev->name);
 		return -1;
 	}
 
@@ -257,16 +257,15 @@ static int prism2_download_volatile(local_info_t *local,
 		prism2_hw_shutdown(dev, 0);
 
 		if (prism2_hw_init(dev, 0)) {
-			printk(KERN_WARNING "%s: Could not initialize card for"
-			       " download\n", dev->name);
+			pr_warn("%s: Could not initialize card for download\n",
+				dev->name);
 			ret = -1;
 			goto out;
 		}
 	}
 
 	if (prism2_enable_aux_port(dev, 1)) {
-		printk(KERN_WARNING "%s: Could not enable AUX port\n",
-		       dev->name);
+		pr_warn("%s: Could not enable AUX port\n", dev->name);
 		ret = -1;
 		goto out;
 	}
@@ -279,8 +278,7 @@ static int prism2_download_volatile(local_info_t *local,
 	if (hfa384x_cmd_wait(dev, HFA384X_CMDCODE_DOWNLOAD |
 			     (HFA384X_PROGMODE_ENABLE_VOLATILE << 8),
 			     param0)) {
-		printk(KERN_WARNING "%s: Download command execution failed\n",
-		       dev->name);
+		pr_warn("%s: Download command execution failed\n", dev->name);
 		ret = -1;
 		goto out;
 	}
@@ -290,8 +288,8 @@ static int prism2_download_volatile(local_info_t *local,
 		       dev->name, param->data[i].len, param->data[i].addr);
 		if (hfa384x_to_aux(dev, param->data[i].addr,
 				   param->data[i].len, param->data[i].data)) {
-			printk(KERN_WARNING "%s: RAM download at 0x%08x "
-			       "(len=%d) failed\n", dev->name,
+			pr_warn("%s: RAM download at 0x%08x (len=%d) failed\n",
+				dev->name,
 			       param->data[i].addr, param->data[i].len);
 			ret = -1;
 			goto out;
@@ -302,8 +300,7 @@ static int prism2_download_volatile(local_info_t *local,
 	HFA384X_OUTW(0, HFA384X_PARAM2_OFF);
 	if (hfa384x_cmd_no_wait(dev, HFA384X_CMDCODE_DOWNLOAD |
 				(HFA384X_PROGMODE_DISABLE << 8), param0)) {
-		printk(KERN_WARNING "%s: Download command execution failed\n",
-		       dev->name);
+		pr_warn("%s: Download command execution failed\n", dev->name);
 		ret = -1;
 		goto out;
 	}
@@ -314,16 +311,15 @@ static int prism2_download_volatile(local_info_t *local,
 	HFA384X_OUTW(HFA384X_EV_CMD, HFA384X_EVACK_OFF);
 
 	if (prism2_enable_aux_port(dev, 0)) {
-		printk(KERN_DEBUG "%s: Disabling AUX port failed\n",
-		       dev->name);
+		pr_debug("%s: Disabling AUX port failed\n", dev->name);
 		/* continue anyway.. restart should have taken care of this */
 	}
 
 	mdelay(5);
 	local->hw_downloading = 0;
 	if (prism2_hw_config(dev, 2)) {
-		printk(KERN_WARNING "%s: Card configuration after RAM "
-		       "download failed\n", dev->name);
+		pr_warn("%s: Card configuration after RAM download failed\n",
+			dev->name);
 		ret = -1;
 		goto out;
 	}
@@ -340,8 +336,7 @@ static int prism2_enable_genesis(local_info_t *local, int hcr)
 	u8 initseq[4] = { 0x00, 0xe1, 0xa1, 0xff };
 	u8 readbuf[4];
 
-	printk(KERN_DEBUG "%s: test Genesis mode with HCR 0x%02x\n",
-	       dev->name, hcr);
+	pr_debug("%s: test Genesis mode with HCR 0x%02x\n", dev->name, hcr);
 	local->func->cor_sreset(local);
 	hfa384x_to_aux(dev, 0x7e0038, sizeof(initseq), initseq);
 	local->func->genesis_reset(local, hcr);
@@ -352,14 +347,12 @@ static int prism2_enable_genesis(local_info_t *local, int hcr)
 	hfa384x_from_aux(dev, 0x7e0038, sizeof(readbuf), readbuf);
 
 	if (memcmp(initseq, readbuf, sizeof(initseq)) == 0) {
-		printk(KERN_DEBUG "Readback test succeeded, HCR 0x%02x\n",
-		       hcr);
+		pr_debug("Readback test succeeded, HCR 0x%02x\n", hcr);
 		return 0;
 	} else {
-		printk(KERN_DEBUG "Readback test failed, HCR 0x%02x "
-		       "write %02x %02x %02x %02x read %02x %02x %02x %02x\n",
-		       hcr, initseq[0], initseq[1], initseq[2], initseq[3],
-		       readbuf[0], readbuf[1], readbuf[2], readbuf[3]);
+		pr_debug("Readback test failed, HCR 0x%02x write %02x %02x %02x %02x read %02x %02x %02x %02x\n",
+			 hcr, initseq[0], initseq[1], initseq[2], initseq[3],
+			 readbuf[0], readbuf[1], readbuf[2], readbuf[3]);
 		return 1;
 	}
 }
@@ -392,22 +385,21 @@ static int prism2_download_genesis(local_info_t *local,
 	int ret = 0;
 
 	if (local->hw_downloading) {
-		printk(KERN_WARNING "%s: Already downloading - aborting new "
-		       "request\n", dev->name);
+		pr_warn("%s: Already downloading - aborting new request\n",
+			dev->name);
 		return -EBUSY;
 	}
 
 	if (!local->func->genesis_reset || !local->func->cor_sreset) {
-		printk(KERN_INFO "%s: Genesis mode downloading not supported "
-		       "with this hwmodel\n", dev->name);
+		pr_info("%s: Genesis mode downloading not supported with this hwmodel\n",
+			dev->name);
 		return -EOPNOTSUPP;
 	}
 
 	local->hw_downloading = 1;
 
 	if (prism2_enable_aux_port(dev, 1)) {
-		printk(KERN_DEBUG "%s: failed to enable AUX port\n",
-		       dev->name);
+		pr_debug("%s: failed to enable AUX port\n", dev->name);
 		ret = -EIO;
 		goto out;
 	}
@@ -423,17 +415,16 @@ static int prism2_download_genesis(local_info_t *local,
 			PDEBUG(DEBUG_EXTRA2, "%s: Genesis mode OK using x16 "
 			       "SRAM\n", dev->name);
 		} else {
-			printk(KERN_DEBUG "%s: Could not initiate genesis "
-			       "mode\n", dev->name);
+			pr_debug("%s: Could not initiate genesis mode\n",
+				 dev->name);
 			ret = -EIO;
 			goto out;
 		}
 	} else {
 		if (prism2_enable_genesis(local, local->sram_type == 8 ?
 					  0x1f : 0x0f)) {
-			printk(KERN_DEBUG "%s: Failed to set Genesis "
-			       "mode (sram_type=%d)\n", dev->name,
-			       local->sram_type);
+			pr_debug("%s: Failed to set Genesis mode (sram_type=%d)\n",
+				 dev->name, local->sram_type);
 			ret = -EIO;
 			goto out;
 		}
@@ -445,9 +436,9 @@ static int prism2_download_genesis(local_info_t *local,
 		       dev->name, param->data[i].len, param->data[i].addr);
 		if (hfa384x_to_aux(dev, param->data[i].addr,
 				   param->data[i].len, param->data[i].data)) {
-			printk(KERN_WARNING "%s: RAM download at 0x%08x "
-			       "(len=%d) failed\n", dev->name,
-			       param->data[i].addr, param->data[i].len);
+			pr_warn("%s: RAM download at 0x%08x (len=%d) failed\n",
+				dev->name,
+				param->data[i].addr, param->data[i].len);
 			ret = -EIO;
 			goto out;
 		}
@@ -456,8 +447,7 @@ static int prism2_download_genesis(local_info_t *local,
 	PDEBUG(DEBUG_EXTRA2, "Disable genesis mode\n");
 	local->func->genesis_reset(local, ram16 ? 0x07 : 0x17);
 	if (prism2_enable_aux_port(dev, 0)) {
-		printk(KERN_DEBUG "%s: Failed to disable AUX port\n",
-		       dev->name);
+		pr_debug("%s: Failed to disable AUX port\n", dev->name);
 	}
 
 	mdelay(5);
@@ -470,16 +460,16 @@ static int prism2_download_genesis(local_info_t *local,
 	 */
 	hfa384x_disable_interrupts(dev);
 	if (prism2_hw_init(dev, 1)) {
-		printk(KERN_DEBUG "%s: Initialization after genesis mode "
-		       "download failed\n", dev->name);
+		pr_debug("%s: Initialization after genesis mode download failed\n",
+			 dev->name);
 		ret = -EIO;
 		goto out;
 	}
 
 	PDEBUG(DEBUG_EXTRA2, "Card initialized - running PRI only\n");
 	if (prism2_hw_init2(dev, 1)) {
-		printk(KERN_DEBUG "%s: Initialization(2) after genesis mode "
-		       "download failed\n", dev->name);
+		pr_debug("%s: Initialization(2) after genesis mode download failed\n",
+			 dev->name);
 		ret = -EIO;
 		goto out;
 	}
@@ -513,14 +503,14 @@ static inline int prism2_download_block(struct net_device *dev,
 	if (hfa384x_cmd_wait(dev, HFA384X_CMDCODE_DOWNLOAD |
 			     (HFA384X_PROGMODE_ENABLE_NON_VOLATILE << 8),
 			     param0)) {
-		printk(KERN_WARNING "%s: Flash download command execution "
-		       "failed\n", dev->name);
+		pr_warn("%s: Flash download command execution failed\n",
+			dev->name);
 		return -1;
 	}
 
 	if (hfa384x_to_aux(dev, bufaddr, block_len, data)) {
-		printk(KERN_WARNING "%s: flash download at 0x%08x "
-		       "(len=%d) failed\n", dev->name, addr, block_len);
+		pr_warn("%s: flash download at 0x%08x (len=%d) failed\n",
+			dev->name, addr, block_len);
 		return -1;
 	}
 
@@ -529,8 +519,8 @@ static inline int prism2_download_block(struct net_device *dev,
 	if (hfa384x_cmd_wait(dev, HFA384X_CMDCODE_DOWNLOAD |
 			     (HFA384X_PROGMODE_PROGRAM_NON_VOLATILE << 8),
 			     0)) {
-		printk(KERN_WARNING "%s: Flash write command execution "
-		       "failed\n", dev->name);
+		pr_warn("%s: Flash write command execution failed\n",
+			dev->name);
 		return -1;
 	}
 
@@ -551,8 +541,8 @@ static int prism2_download_nonvolatile(local_info_t *local,
 	u32 bufaddr;
 
 	if (local->hw_downloading) {
-		printk(KERN_WARNING "%s: Already downloading - aborting new "
-		       "request\n", dev->name);
+		pr_warn("%s: Already downloading - aborting new request\n",
+			dev->name);
 		return -1;
 	}
 
@@ -560,15 +550,14 @@ static int prism2_download_nonvolatile(local_info_t *local,
 				   &dlbuffer, 6, 0);
 
 	if (ret < 0) {
-		printk(KERN_WARNING "%s: Could not read download buffer "
-		       "parameters\n", dev->name);
+		pr_warn("%s: Could not read download buffer parameters\n",
+			dev->name);
 		goto out;
 	}
 
-	printk(KERN_DEBUG "Download buffer: %d bytes at 0x%04x:0x%04x\n",
-	       le16_to_cpu(dlbuffer.len),
-	       le16_to_cpu(dlbuffer.page),
-	       le16_to_cpu(dlbuffer.offset));
+	pr_debug("Download buffer: %d bytes at 0x%04x:0x%04x\n",
+		 le16_to_cpu(dlbuffer.len), le16_to_cpu(dlbuffer.page),
+		 le16_to_cpu(dlbuffer.offset));
 
 	bufaddr = (le16_to_cpu(dlbuffer.page) << 7) + le16_to_cpu(dlbuffer.offset);
 
@@ -578,8 +567,8 @@ static int prism2_download_nonvolatile(local_info_t *local,
 		prism2_hw_shutdown(dev, 0);
 
 		if (prism2_hw_init(dev, 0)) {
-			printk(KERN_WARNING "%s: Could not initialize card for"
-			       " download\n", dev->name);
+			pr_warn("%s: Could not initialize card for download\n",
+				dev->name);
 			ret = -1;
 			goto out;
 		}
@@ -588,13 +577,12 @@ static int prism2_download_nonvolatile(local_info_t *local,
 	hfa384x_disable_interrupts(dev);
 
 	if (prism2_enable_aux_port(dev, 1)) {
-		printk(KERN_WARNING "%s: Could not enable AUX port\n",
-		       dev->name);
+		pr_warn("%s: Could not enable AUX port\n", dev->name);
 		ret = -1;
 		goto out;
 	}
 
-	printk(KERN_DEBUG "%s: starting flash download\n", dev->name);
+	pr_debug("%s: starting flash download\n", dev->name);
 	for (i = 0; i < dl->num_areas; i++) {
 		int rest_len = dl->data[i].len;
 		int data_off = 0;
@@ -621,15 +609,13 @@ static int prism2_download_nonvolatile(local_info_t *local,
 	HFA384X_OUTW(0, HFA384X_PARAM2_OFF);
 	if (hfa384x_cmd_wait(dev, HFA384X_CMDCODE_DOWNLOAD |
 				(HFA384X_PROGMODE_DISABLE << 8), 0)) {
-		printk(KERN_WARNING "%s: Download command execution failed\n",
-		       dev->name);
+		pr_warn("%s: Download command execution failed\n", dev->name);
 		ret = -1;
 		goto out;
 	}
 
 	if (prism2_enable_aux_port(dev, 0)) {
-		printk(KERN_DEBUG "%s: Disabling AUX port failed\n",
-		       dev->name);
+		pr_debug("%s: Disabling AUX port failed\n", dev->name);
 		/* continue anyway.. restart should have taken care of this */
 	}
 
@@ -638,12 +624,12 @@ static int prism2_download_nonvolatile(local_info_t *local,
 	local->func->hw_reset(dev);
 	local->hw_downloading = 0;
 	if (prism2_hw_config(dev, 2)) {
-		printk(KERN_WARNING "%s: Card configuration after flash "
-		       "download failed\n", dev->name);
+		pr_warn("%s: Card configuration after flash download failed\n",
+			dev->name);
 		ret = -1;
 	} else {
-		printk(KERN_INFO "%s: Card initialized successfully after "
-		       "flash download\n", dev->name);
+		pr_info("%s: Card initialized successfully after flash download\n",
+			dev->name);
 	}
 
  out:
@@ -674,9 +660,8 @@ static int prism2_download(local_info_t *local,
 	u32 total_len = 0;
 	struct prism2_download_data *dl = NULL;
 
-	printk(KERN_DEBUG "prism2_download: dl_cmd=%d start_addr=0x%08x "
-	       "num_areas=%d\n",
-	       param->dl_cmd, param->start_addr, param->num_areas);
+	pr_debug("%s: dl_cmd=%d start_addr=0x%08x num_areas=%d\n",
+		 __func__, param->dl_cmd, param->start_addr, param->num_areas);
 
 	if (param->num_areas > 100) {
 		ret = -EINVAL;
@@ -734,14 +719,14 @@ static int prism2_download(local_info_t *local,
 #ifdef PRISM2_NON_VOLATILE_DOWNLOAD
 		ret = prism2_download_nonvolatile(local, dl);
 #else /* PRISM2_NON_VOLATILE_DOWNLOAD */
-		printk(KERN_INFO "%s: non-volatile downloading not enabled\n",
-		       local->dev->name);
+		pr_info("%s: non-volatile downloading not enabled\n",
+			local->dev->name);
 		ret = -EOPNOTSUPP;
 #endif /* PRISM2_NON_VOLATILE_DOWNLOAD */
 		break;
 	default:
-		printk(KERN_DEBUG "%s: unsupported download command %d\n",
-		       local->dev->name, param->dl_cmd);
+		pr_debug("%s: unsupported download command %d\n",
+			 local->dev->name, param->dl_cmd);
 		ret = -EINVAL;
 		break;
 	}
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 50f87b6..04e412d 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -29,8 +29,6 @@
  *   (spin_lock_bh) to prevent concurrent use.
  */
 
-
-
 #include <asm/delay.h>
 #include <asm/uaccess.h>
 
@@ -229,17 +227,16 @@ static void prism2_clear_cmd_queue(local_info_t *local)
 	list_for_each_safe(ptr, n, &local->cmd_queue) {
 		entry = list_entry(ptr, struct hostap_cmd_queue, list);
 		atomic_inc(&entry->usecnt);
-		printk(KERN_DEBUG "%s: removed pending cmd_queue entry "
-		       "(type=%d, cmd=0x%04x, param0=0x%04x)\n",
-		       local->dev->name, entry->type, entry->cmd,
-		       entry->param0);
+		pr_debug("%s: removed pending cmd_queue entry (type=%d, cmd=0x%04x, param0=0x%04x)\n",
+			 local->dev->name, entry->type, entry->cmd,
+			 entry->param0);
 		__hostap_cmd_queue_free(local, entry, 1);
 	}
 	if (local->cmd_queue_len) {
 		/* This should not happen; print debug message and clear
 		 * queue length. */
-		printk(KERN_DEBUG "%s: cmd_queue_len (%d) not zero after "
-		       "flush\n", local->dev->name, local->cmd_queue_len);
+		pr_debug("%s: cmd_queue_len (%d) not zero after flush\n",
+			 local->dev->name, local->cmd_queue_len);
 		local->cmd_queue_len = 0;
 	}
 	spin_unlock_irqrestore(&local->cmdlock, flags);
@@ -267,8 +264,8 @@ static int hfa384x_cmd_issue(struct net_device *dev,
 		return -ENODEV;
 
 	if (entry->issued) {
-		printk(KERN_DEBUG "%s: driver bug - re-issuing command @%p\n",
-		       dev->name, entry);
+		pr_debug("%s: driver bug - re-issuing command @%p\n",
+			 dev->name, entry);
 	}
 
 	/* wait until busy bit is clear; this should always be clear since the
@@ -281,16 +278,15 @@ static int hfa384x_cmd_issue(struct net_device *dev,
 #ifndef final_version
 	if (tries != HFA384X_CMD_BUSY_TIMEOUT) {
 		prism2_io_debug_error(dev, 1);
-		printk(KERN_DEBUG "%s: hfa384x_cmd_issue: cmd reg was busy "
-		       "for %d usec\n", dev->name,
-		       HFA384X_CMD_BUSY_TIMEOUT - tries);
+		pr_debug("%s: %s: cmd reg was busy for %d usec\n",
+			 dev->name, __func__, HFA384X_CMD_BUSY_TIMEOUT - tries);
 	}
 #endif
 	if (tries == 0) {
 		reg = HFA384X_INW(HFA384X_CMD_OFF);
 		prism2_io_debug_error(dev, 2);
-		printk(KERN_DEBUG "%s: hfa384x_cmd_issue - timeout - "
-		       "reg=0x%04x\n", dev->name, reg);
+		pr_debug("%s: %s: timeout - reg=0x%04x\n",
+			 dev->name, __func__, reg);
 		return -ETIMEDOUT;
 	}
 
@@ -332,14 +328,13 @@ static int hfa384x_cmd(struct net_device *dev, u16 cmd, u16 param0,
 	local = iface->local;
 
 	if (in_interrupt()) {
-		printk(KERN_DEBUG "%s: hfa384x_cmd called from interrupt "
-		       "context\n", dev->name);
+		pr_debug("%s: %s called from interrupt context\n",
+			 dev->name, __func__);
 		return -1;
 	}
 
 	if (local->cmd_queue_len >= HOSTAP_CMD_QUEUE_MAX_LEN) {
-		printk(KERN_DEBUG "%s: hfa384x_cmd: cmd_queue full\n",
-		       dev->name);
+		pr_debug("%s: %s: cmd_queue full\n", dev->name, __func__);
 		return -1;
 	}
 
@@ -426,34 +421,32 @@ static int hfa384x_cmd(struct net_device *dev, u16 cmd, u16 param0,
 
 	spin_lock_irqsave(&local->cmdlock, flags);
 	if (!list_empty(&entry->list)) {
-		printk(KERN_DEBUG "%s: hfa384x_cmd: entry still in list? "
-		       "(entry=%p, type=%d, res=%d)\n", dev->name, entry,
-		       entry->type, res);
+		pr_debug("%s: %s: entry still in list? (entry=%p, type=%d, res=%d)\n",
+			 dev->name, __func__, entry, entry->type, res);
 		list_del_init(&entry->list);
 		local->cmd_queue_len--;
 	}
 	spin_unlock_irqrestore(&local->cmdlock, flags);
 
 	if (err) {
-		printk(KERN_DEBUG "%s: hfa384x_cmd: interrupted; err=%d\n",
-		       dev->name, err);
+		pr_debug("%s: %s: interrupted; err=%d\n",
+			 dev->name, __func__, err);
 		res = err;
 		goto done;
 	}
 
 	if (entry->type != CMD_COMPLETED) {
 		u16 reg = HFA384X_INW(HFA384X_EVSTAT_OFF);
-		printk(KERN_DEBUG "%s: hfa384x_cmd: command was not "
-		       "completed (res=%d, entry=%p, type=%d, cmd=0x%04x, "
-		       "param0=0x%04x, EVSTAT=%04x INTEN=%04x)\n", dev->name,
-		       res, entry, entry->type, entry->cmd, entry->param0, reg,
-		       HFA384X_INW(HFA384X_INTEN_OFF));
+		pr_debug("%s: %s: command was not completed (res=%d, entry=%p, type=%d, cmd=0x%04x, param0=0x%04x, EVSTAT=%04x INTEN=%04x)\n",
+			 dev->name, __func__,
+			 res, entry, entry->type, entry->cmd, entry->param0,
+			 reg, HFA384X_INW(HFA384X_INTEN_OFF));
 		if (reg & HFA384X_EV_CMD) {
 			/* Command completion event is pending, but the
 			 * interrupt was not delivered - probably an issue
 			 * with pcmcia-cs configuration. */
-			printk(KERN_WARNING "%s: interrupt delivery does not "
-			       "seem to work\n", dev->name);
+			pr_warn("%s: interrupt delivery does not seem to work\n",
+				dev->name);
 		}
 		prism2_io_debug_error(dev, 3);
 		res = -ETIMEDOUT;
@@ -464,9 +457,8 @@ static int hfa384x_cmd(struct net_device *dev, u16 cmd, u16 param0,
 		*resp0 = entry->resp0;
 #ifndef final_version
 	if (entry->res) {
-		printk(KERN_DEBUG "%s: CMD=0x%04x => res=0x%02x, "
-		       "resp0=0x%04x\n",
-		       dev->name, cmd, entry->res, entry->resp0);
+		pr_debug("%s: CMD=0x%04x => res=0x%02x, resp0=0x%04x\n",
+			 dev->name, cmd, entry->res, entry->resp0);
 	}
 #endif /* final_version */
 
@@ -507,8 +499,7 @@ static int hfa384x_cmd_callback(struct net_device *dev, u16 cmd, u16 param0,
 	local = iface->local;
 
 	if (local->cmd_queue_len >= HOSTAP_CMD_QUEUE_MAX_LEN + 2) {
-		printk(KERN_DEBUG "%s: hfa384x_cmd: cmd_queue full\n",
-		       dev->name);
+		pr_debug("%s: %s: cmd_queue full\n", dev->name, __func__);
 		return -1;
 	}
 
@@ -567,8 +558,8 @@ static int __hfa384x_cmd_no_wait(struct net_device *dev, u16 cmd, u16 param0,
 	if (tries == 0) {
 		reg = HFA384X_INW(HFA384X_CMD_OFF);
 		prism2_io_debug_error(dev, io_debug_num);
-		printk(KERN_DEBUG "%s: __hfa384x_cmd_no_wait(%d) - timeout - "
-		       "reg=0x%04x\n", dev->name, io_debug_num, reg);
+		pr_debug("%s: %s(%d) - timeout - reg=0x%04x\n",
+			 dev->name, __func__, io_debug_num, reg);
 		return -ETIMEDOUT;
 	}
 
@@ -609,8 +600,8 @@ static int hfa384x_cmd_wait(struct net_device *dev, u16 cmd, u16 param0)
         if (tries == 0) {
                 reg = HFA384X_INW(HFA384X_EVSTAT_OFF);
 		prism2_io_debug_error(dev, 5);
-                printk(KERN_DEBUG "%s: hfa384x_cmd_wait - timeout2 - "
-		       "reg=0x%04x\n", dev->name, reg);
+		pr_debug("%s: %s: timeout2 - reg=0x%04x\n",
+			 dev->name, __func__, reg);
                 return -ETIMEDOUT;
         }
 
@@ -619,8 +610,7 @@ static int hfa384x_cmd_wait(struct net_device *dev, u16 cmd, u16 param0)
                 BIT(8))) >> 8;
 #ifndef final_version
 	if (res) {
-		printk(KERN_DEBUG "%s: CMD=0x%04x => res=0x%02x\n",
-		       dev->name, cmd, res);
+		pr_debug("%s: CMD=0x%04x => res=0x%02x\n", dev->name, cmd, res);
 	}
 #endif
 
@@ -671,8 +661,8 @@ static void prism2_cmd_ev(struct net_device *dev)
 		local->cmd_queue_len--;
 
 		if (!entry->issued) {
-			printk(KERN_DEBUG "%s: Command completion event, but "
-			       "cmd not issued\n", dev->name);
+			pr_debug("%s: Command completion event, but cmd not issued\n",
+				 dev->name);
 			__hostap_cmd_queue_free(local, entry, 1);
 			entry = NULL;
 		}
@@ -681,8 +671,8 @@ static void prism2_cmd_ev(struct net_device *dev)
 
 	if (!entry) {
 		HFA384X_OUTW(HFA384X_EV_CMD, HFA384X_EVACK_OFF);
-		printk(KERN_DEBUG "%s: Command completion event, but no "
-		       "pending commands\n", dev->name);
+		pr_debug("%s: Command completion event, but no pending commands\n",
+			 dev->name);
 		return;
 	}
 
@@ -701,8 +691,8 @@ static void prism2_cmd_ev(struct net_device *dev)
 			entry->callback(dev, entry->context, entry->resp0,
 					entry->res);
 	} else {
-		printk(KERN_DEBUG "%s: Invalid command completion type %d\n",
-		       dev->name, entry->type);
+		pr_debug("%s: Invalid command completion type %d\n",
+			 dev->name, entry->type);
 	}
 	hostap_cmd_queue_free(local, entry, 1);
 
@@ -767,8 +757,7 @@ static int hfa384x_setup_bap(struct net_device *dev, u16 bap, u16 id,
 
 	if (hfa384x_wait_offset(dev, o_off)) {
 		prism2_io_debug_error(dev, 7);
-		printk(KERN_DEBUG "%s: hfa384x_setup_bap - timeout before\n",
-		       dev->name);
+		pr_debug("%s: %s: timeout before\n", dev->name, __func__);
 		ret = -ETIMEDOUT;
 		goto out;
 	}
@@ -778,17 +767,16 @@ static int hfa384x_setup_bap(struct net_device *dev, u16 bap, u16 id,
 
 	if (hfa384x_wait_offset(dev, o_off)) {
 		prism2_io_debug_error(dev, 8);
-		printk(KERN_DEBUG "%s: hfa384x_setup_bap - timeout after\n",
-		       dev->name);
+		pr_debug("%s: %s: timeout after\n", dev->name, __func__);
 		ret = -ETIMEDOUT;
 		goto out;
 	}
 #ifndef final_version
 	if (HFA384X_INW(o_off) & HFA384X_OFFSET_ERR) {
 		prism2_io_debug_error(dev, 9);
-		printk(KERN_DEBUG "%s: hfa384x_setup_bap - offset error "
-		       "(%d,0x04%x,%d); reg=0x%04x\n",
-		       dev->name, bap, id, offset, HFA384X_INW(o_off));
+		pr_debug("%s: %s: offset error (%d,0x04%x,%d); reg=0x%04x\n",
+			 dev->name, __func__, bap, id, offset,
+			 HFA384X_INW(o_off));
 		ret = -EINVAL;
 	}
 #endif
@@ -810,8 +798,8 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len,
 	local = iface->local;
 
 	if (local->no_pri) {
-		printk(KERN_DEBUG "%s: cannot get RID %04x (len=%d) - no PRI "
-		       "f/w\n", dev->name, rid, len);
+		pr_debug("%s: cannot get RID %04x (len=%d) - no PRI f/w\n",
+			 dev->name, rid, len);
 		return -ENOTTY; /* Well.. not really correct, but return
 				 * something unique enough.. */
 	}
@@ -826,9 +814,8 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len,
 
 	res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS, rid, NULL, NULL);
 	if (res) {
-		printk(KERN_DEBUG "%s: hfa384x_get_rid: CMDCODE_ACCESS failed "
-		       "(res=%d, rid=%04x, len=%d)\n",
-		       dev->name, res, rid, len);
+		pr_debug("%s: %s: CMDCODE_ACCESS failed (res=%d, rid=%04x, len=%d)\n",
+			 dev->name, __func__, res, rid, len);
 		mutex_unlock(&local->rid_bap_mtx);
 		return res;
 	}
@@ -846,9 +833,8 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len,
 
 	rlen = (le16_to_cpu(rec.len) - 1) * 2;
 	if (!res && exact_len && rlen != len) {
-		printk(KERN_DEBUG "%s: hfa384x_get_rid - RID len mismatch: "
-		       "rid=0x%04x, len=%d (expected %d)\n",
-		       dev->name, rid, rlen, len);
+		pr_debug("%s: %s: RID len mismatch: rid=0x%04x, len=%d (expected %d)\n",
+			 dev->name, __func__, rid, rlen, len);
 		res = -ENODATA;
 	}
 
@@ -860,9 +846,8 @@ static int hfa384x_get_rid(struct net_device *dev, u16 rid, void *buf, int len,
 
 	if (res) {
 		if (res != -ENODATA)
-			printk(KERN_DEBUG "%s: hfa384x_get_rid (rid=%04x, "
-			       "len=%d) - failed - res=%d\n", dev->name, rid,
-			       len, res);
+			pr_debug("%s: %s: (rid=%04x, len=%d) - failed - res=%d\n",
+				 dev->name, __func__, rid, len, res);
 		if (res == -ETIMEDOUT)
 			prism2_hw_reset(dev);
 		return res;
@@ -883,8 +868,8 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)
 	local = iface->local;
 
 	if (local->no_pri) {
-		printk(KERN_DEBUG "%s: cannot set RID %04x (len=%d) - no PRI "
-		       "f/w\n", dev->name, rid, len);
+		pr_debug("%s: cannot set RID %04x (len=%d) - no PRI f/w\n",
+			 dev->name, rid, len);
 		return -ENOTTY; /* Well.. not really correct, but return
 				 * something unique enough.. */
 	}
@@ -910,8 +895,8 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)
 	spin_unlock_bh(&local->baplock);
 
 	if (res) {
-		printk(KERN_DEBUG "%s: hfa384x_set_rid (rid=%04x, len=%d) - "
-		       "failed - res=%d\n", dev->name, rid, len, res);
+		pr_debug("%s: %s: (rid=%04x, len=%d) - failed - res=%d\n",
+			 dev->name, __func__, rid, len, res);
 		mutex_unlock(&local->rid_bap_mtx);
 		return res;
 	}
@@ -920,9 +905,8 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)
 	mutex_unlock(&local->rid_bap_mtx);
 
 	if (res) {
-		printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE "
-		       "failed (res=%d, rid=%04x, len=%d)\n",
-		       dev->name, res, rid, len);
+		pr_debug("%s: %s: CMDCODE_ACCESS_WRITE failed (res=%d, rid=%04x, len=%d)\n",
+			 dev->name, __func__, res, rid, len);
 
 		if (res == -ETIMEDOUT)
 			prism2_hw_reset(dev);
@@ -976,8 +960,7 @@ static u16 hfa384x_allocate_fid(struct net_device *dev, int len)
 	 * below would be handled like CmdCompl event (sleep here, wake up from
 	 * interrupt handler */
 	if (hfa384x_cmd_wait(dev, HFA384X_CMDCODE_ALLOC, len)) {
-		printk(KERN_DEBUG "%s: cannot allocate fid, len=%d\n",
-		       dev->name, len);
+		pr_debug("%s: cannot allocate fid, len=%d\n", dev->name, len);
 		return 0xffff;
 	}
 
@@ -1012,14 +995,13 @@ static int prism2_reset_port(struct net_device *dev)
 	res = hfa384x_cmd(dev, HFA384X_CMDCODE_DISABLE, 0,
 			  NULL, NULL);
 	if (res)
-		printk(KERN_DEBUG "%s: reset port failed to disable port\n",
-		       dev->name);
+		pr_debug("%s: reset port failed to disable port\n", dev->name);
 	else {
 		res = hfa384x_cmd(dev, HFA384X_CMDCODE_ENABLE, 0,
 				  NULL, NULL);
 		if (res)
-			printk(KERN_DEBUG "%s: reset port failed to enable "
-			       "port\n", dev->name);
+			pr_debug("%s: reset port failed to enable port\n",
+				 dev->name);
 	}
 
 	/* It looks like at least some STA firmware versions reset
@@ -1028,9 +1010,8 @@ static int prism2_reset_port(struct net_device *dev)
 	if (local->fragm_threshold != 2346 &&
 	    hostap_set_word(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD,
 			    local->fragm_threshold)) {
-		printk(KERN_DEBUG "%s: failed to restore fragmentation "
-		       "threshold (%d) after Port0 enable\n",
-		       dev->name, local->fragm_threshold);
+		pr_debug("%s: failed to restore fragmentation threshold (%d) after Port0 enable\n",
+			 dev->name, local->fragm_threshold);
 	}
 
 	/* Some firmwares lose antenna selection settings on reset */
@@ -1055,13 +1036,14 @@ static int prism2_get_version_info(struct net_device *dev, u16 rid,
 		return -1;
 	}
 	if (hfa384x_get_rid(dev, rid, &comp, sizeof(comp), 1) < 0) {
-		printk(KERN_DEBUG "Could not get RID for component %s\n", txt);
+		pr_debug("Could not get RID for component %s\n", txt);
 		return -1;
 	}
 
-	printk(KERN_INFO "%s: %s: id=0x%02x v%d.%d.%d\n", dev->name, txt,
-	       __le16_to_cpu(comp.id), __le16_to_cpu(comp.major),
-	       __le16_to_cpu(comp.minor), __le16_to_cpu(comp.variant));
+	pr_info("%s: %s: id=0x%02x v%d.%d.%d\n",
+		dev->name, txt,
+		__le16_to_cpu(comp.id), __le16_to_cpu(comp.major),
+		__le16_to_cpu(comp.minor), __le16_to_cpu(comp.variant));
 	return 0;
 }
 
@@ -1116,8 +1098,8 @@ static int prism2_setup_rids(struct net_device *dev)
 
 	if (local->channel < 1 || local->channel > 14 ||
 	    !(local->channel_mask & (1 << (local->channel - 1)))) {
-		printk(KERN_WARNING "%s: Channel setting out of range "
-		       "(%d)!\n", dev->name, local->channel);
+		pr_warn("%s: Channel setting out of range (%d)!\n",
+			dev->name, local->channel);
 		ret = -EBUSY;
 		goto fail;
 	}
@@ -1152,8 +1134,8 @@ static int prism2_setup_rids(struct net_device *dev)
 	ret = hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE,
 			      local->is_promisc);
 	if (ret)
-		printk(KERN_INFO "%s: Setting promiscuous mode (%d) failed\n",
-		       dev->name, local->is_promisc);
+		pr_info("%s: Setting promiscuous mode (%d) failed\n",
+			dev->name, local->is_promisc);
 
 	if (!local->fw_ap) {
 		ret = hostap_set_string(dev, HFA384X_RID_CNFDESIREDSSID,
@@ -1212,21 +1194,19 @@ static int prism2_setup_rids(struct net_device *dev)
 					 local->name);
 
 	if (hostap_set_encryption(local)) {
-		printk(KERN_INFO "%s: could not configure encryption\n",
-		       dev->name);
+		pr_info("%s: could not configure encryption\n", dev->name);
 	}
 
 	(void) hostap_set_antsel(local);
 
 	if (hostap_set_roaming(local)) {
-		printk(KERN_INFO "%s: could not set host roaming\n",
-		       dev->name);
+		pr_info("%s: could not set host roaming\n", dev->name);
 	}
 
 	if (local->sta_fw_ver >= PRISM2_FW_VER(1,6,3) &&
 	    hostap_set_word(dev, HFA384X_RID_CNFENHSECURITY, local->enh_sec))
-		printk(KERN_INFO "%s: cnfEnhSecurity setting to 0x%x failed\n",
-		       dev->name, local->enh_sec);
+		pr_info("%s: cnfEnhSecurity setting to 0x%x failed\n",
+			dev->name, local->enh_sec);
 
 	/* 32-bit tallies were added in STA f/w 0.8.0, but they were apparently
 	 * not working correctly (last seven counters report bogus values).
@@ -1236,8 +1216,8 @@ static int prism2_setup_rids(struct net_device *dev)
 	 * versions, too? */
 	if (local->sta_fw_ver >= PRISM2_FW_VER(0,8,2)) {
 		if (hostap_set_word(dev, HFA384X_RID_CNFTHIRTY2TALLY, 1)) {
-			printk(KERN_INFO "%s: cnfThirty2Tally setting "
-			       "failed\n", dev->name);
+			pr_info("%s: cnfThirty2Tally setting failed\n",
+				dev->name);
 			local->tallies32 = 0;
 		} else
 			local->tallies32 = 1;
@@ -1248,21 +1228,21 @@ static int prism2_setup_rids(struct net_device *dev)
 
 	if (hostap_set_word(dev, HFA384X_RID_FRAGMENTATIONTHRESHOLD,
 			    local->fragm_threshold)) {
-		printk(KERN_INFO "%s: setting FragmentationThreshold to %d "
-		       "failed\n", dev->name, local->fragm_threshold);
+		pr_info("%s: setting FragmentationThreshold to %d failed\n",
+			dev->name, local->fragm_threshold);
 	}
 
 	if (hostap_set_word(dev, HFA384X_RID_RTSTHRESHOLD,
 			    local->rts_threshold)) {
-		printk(KERN_INFO "%s: setting RTSThreshold to %d failed\n",
-		       dev->name, local->rts_threshold);
+		pr_info("%s: setting RTSThreshold to %d failed\n",
+			dev->name, local->rts_threshold);
 	}
 
 	if (local->manual_retry_count >= 0 &&
 	    hostap_set_word(dev, HFA384X_RID_CNFALTRETRYCOUNT,
 			    local->manual_retry_count)) {
-		printk(KERN_INFO "%s: setting cnfAltRetryCount to %d failed\n",
-		       dev->name, local->manual_retry_count);
+		pr_info("%s: setting cnfAltRetryCount to %d failed\n",
+			dev->name, local->manual_retry_count);
 	}
 
 	if (local->sta_fw_ver >= PRISM2_FW_VER(1,3,1) &&
@@ -1272,15 +1252,13 @@ static int prism2_setup_rids(struct net_device *dev)
 
 	if (local->sta_fw_ver >= PRISM2_FW_VER(1,7,0) && local->wpa &&
 	    hostap_set_word(dev, HFA384X_RID_SSNHANDLINGMODE, 1)) {
-		printk(KERN_INFO "%s: setting ssnHandlingMode to 1 failed\n",
-		       dev->name);
+		pr_info("%s: setting ssnHandlingMode to 1 failed\n", dev->name);
 	}
 
 	if (local->sta_fw_ver >= PRISM2_FW_VER(1,7,0) && local->generic_elem &&
 	    hfa384x_set_rid(dev, HFA384X_RID_GENERICELEMENT,
 			    local->generic_elem, local->generic_elem_len)) {
-		printk(KERN_INFO "%s: setting genericElement failed\n",
-		       dev->name);
+		pr_info("%s: setting genericElement failed\n", dev->name);
 	}
 
  fail:
@@ -1306,16 +1284,15 @@ static int prism2_hw_init(struct net_device *dev, int initial)
 	/* initialize HFA 384x */
 	ret = hfa384x_cmd_no_wait(dev, HFA384X_CMDCODE_INIT, 0);
 	if (ret) {
-		printk(KERN_INFO "%s: first command failed - assuming card "
-		       "does not have primary firmware\n", dev_info);
+		pr_info("first command failed - assuming card does not have primary firmware\n");
 	}
 
 	if (first && (HFA384X_INW(HFA384X_EVSTAT_OFF) & HFA384X_EV_CMD)) {
 		/* EvStat has Cmd bit set in some cases, so retry once if no
 		 * wait was needed */
 		HFA384X_OUTW(HFA384X_EV_CMD, HFA384X_EVACK_OFF);
-		printk(KERN_DEBUG "%s: init command completed too quickly - "
-		       "retrying\n", dev->name);
+		pr_debug("%s: init command completed too quickly - retrying\n",
+			 dev->name);
 		first = 0;
 		goto init;
 	}
@@ -1326,9 +1303,7 @@ static int prism2_hw_init(struct net_device *dev, int initial)
 	       time_before(jiffies, delay))
 		yield();
 	if (!(HFA384X_INW(HFA384X_EVSTAT_OFF) & HFA384X_EV_CMD)) {
-		printk(KERN_DEBUG "%s: assuming no Primary image in "
-		       "flash - card initialization not completed\n",
-		       dev_info);
+		pr_debug("assuming no Primary image in flash - card initialization not completed\n");
 		local->no_pri = 1;
 #ifdef PRISM2_DOWNLOAD_SUPPORT
 			if (local->sram_type == -1)
@@ -1337,8 +1312,8 @@ static int prism2_hw_init(struct net_device *dev, int initial)
 		return 1;
 	}
 	local->no_pri = 0;
-	printk(KERN_DEBUG "prism2_hw_init: initialized in %lu ms\n",
-	       (jiffies - start) * 1000 / HZ);
+	pr_debug("%s: initialized in %lu ms\n",
+		 __func__, (jiffies - start) * 1000 / HZ);
 	HFA384X_OUTW(HFA384X_EV_CMD, HFA384X_EVACK_OFF);
 	return 0;
 }
@@ -1382,8 +1357,8 @@ static int prism2_hw_init2(struct net_device *dev, int initial)
 		}
 
 		if (prism2_get_version_info(dev, HFA384X_RID_STAID, "STA")) {
-			printk(KERN_DEBUG "%s: Failed to read STA f/w version "
-			       "- only Primary f/w present\n", dev->name);
+			pr_debug("%s: Failed to read STA f/w version - only Primary f/w present\n",
+				 dev->name);
 			local->pri_only = 1;
 			return 0;
 		}
@@ -1402,8 +1377,8 @@ static int prism2_hw_init2(struct net_device *dev, int initial)
 		if (local->txfid[i] == 0xffff && local->txfid_len > 1600) {
 			local->txfid[i] = hfa384x_allocate_fid(dev, 1600);
 			if (local->txfid[i] != 0xffff) {
-				printk(KERN_DEBUG "%s: Using shorter TX FID "
-				       "(1600 bytes)\n", dev->name);
+				pr_debug("%s: Using shorter TX FID (1600 bytes)\n",
+					 dev->name);
 				local->txfid_len = 1600;
 			}
 		}
@@ -1437,7 +1412,7 @@ static int prism2_hw_init2(struct net_device *dev, int initial)
 
  failed:
 	if (!local->no_pri)
-		printk(KERN_WARNING "%s: Initialization failed\n", dev_info);
+		pr_warn("Initialization failed\n");
 	return 1;
 }
 
@@ -1530,14 +1505,14 @@ static void prism2_hw_shutdown(struct net_device *dev, int no_disable)
 	local->dev_enabled = 0;
 
 	if (local->func->card_present && !local->func->card_present(local)) {
-		printk(KERN_DEBUG "%s: card already removed or not configured "
-		       "during shutdown\n", dev->name);
+		pr_debug("%s: card already removed or not configured during shutdown\n",
+			 dev->name);
 		return;
 	}
 
 	if ((no_disable & HOSTAP_HW_NO_DISABLE) == 0 &&
 	    hfa384x_cmd(dev, HFA384X_CMDCODE_DISABLE, 0, NULL, NULL))
-		printk(KERN_WARNING "%s: Shutdown failed\n", dev_info);
+		pr_warn("Shutdown failed\n");
 
 	hfa384x_disable_interrupts(dev);
 
@@ -1567,8 +1542,8 @@ static void prism2_hw_reset(struct net_device *dev)
 	local = iface->local;
 
 	if (in_interrupt()) {
-		printk(KERN_DEBUG "%s: driver bug - prism2_hw_reset() called "
-		       "in interrupt context\n", dev->name);
+		pr_debug("%s: driver bug - prism2_hw_reset() called in interrupt context\n",
+			 dev->name);
 		return;
 	}
 
@@ -1576,19 +1551,18 @@ static void prism2_hw_reset(struct net_device *dev)
 		return;
 
 	if (local->hw_resetting) {
-		printk(KERN_WARNING "%s: %s: already resetting card - "
-		       "ignoring reset request\n", dev_info, dev->name);
+		pr_warn("%s: already resetting card - ignoring reset request\n",
+			dev->name);
 		return;
 	}
 
 	local->hw_reset_tries++;
 	if (local->hw_reset_tries > 10) {
-		printk(KERN_WARNING "%s: too many reset tries, skipping\n",
-		       dev->name);
+		pr_warn("%s: too many reset tries, skipping\n", dev->name);
 		return;
 	}
 
-	printk(KERN_WARNING "%s: %s: resetting card\n", dev_info, dev->name);
+	pr_warn("%s: resetting card\n", dev->name);
 	hfa384x_disable_interrupts(dev);
 	local->hw_resetting = 1;
 	if (local->func->cor_sreset) {
@@ -1608,19 +1582,17 @@ static void prism2_hw_reset(struct net_device *dev)
 
 #ifdef PRISM2_DOWNLOAD_SUPPORT
 	if (local->dl_pri) {
-		printk(KERN_DEBUG "%s: persistent download of primary "
-		       "firmware\n", dev->name);
+		pr_debug("%s: persistent download of primary firmware\n",
+			 dev->name);
 		if (prism2_download_genesis(local, local->dl_pri) < 0)
-			printk(KERN_WARNING "%s: download (PRI) failed\n",
-			       dev->name);
+			pr_warn("%s: download (PRI) failed\n", dev->name);
 	}
 
 	if (local->dl_sec) {
-		printk(KERN_DEBUG "%s: persistent download of secondary "
-		       "firmware\n", dev->name);
+		pr_debug("%s: persistent download of secondary firmware\n",
+			 dev->name);
 		if (prism2_download_volatile(local, local->dl_sec) < 0)
-			printk(KERN_WARNING "%s: download (SEC) failed\n",
-			       dev->name);
+			pr_warn("%s: download (SEC) failed\n", dev->name);
 	}
 #endif /* PRISM2_DOWNLOAD_SUPPORT */
 
@@ -1640,7 +1612,7 @@ static void handle_reset_queue(struct work_struct *work)
 {
 	local_info_t *local = container_of(work, local_info_t, reset_queue);
 
-	printk(KERN_DEBUG "%s: scheduled card reset\n", local->dev->name);
+	pr_debug("%s: scheduled card reset\n", local->dev->name);
 	prism2_hw_reset(local->dev);
 
 	if (netif_queue_stopped(local->dev)) {
@@ -1696,20 +1668,19 @@ static void prism2_transmit_cb(struct net_device *dev, long context,
 	local = iface->local;
 
 	if (res) {
-		printk(KERN_DEBUG "%s: prism2_transmit_cb - res=0x%02x\n",
-		       dev->name, res);
+		pr_debug("%s: %s: res=0x%02x\n", dev->name, __func__, res);
 		return;
 	}
 
 	if (idx < 0 || idx >= PRISM2_TXFID_COUNT) {
-		printk(KERN_DEBUG "%s: prism2_transmit_cb called with invalid "
-		       "idx=%d\n", dev->name, idx);
+		pr_debug("%s: %s: called with invalid idx=%d\n",
+			 dev->name, __func__, idx);
 		return;
 	}
 
 	if (!test_and_clear_bit(HOSTAP_BITS_TRANSMIT, &local->bits)) {
-		printk(KERN_DEBUG "%s: driver bug: prism2_transmit_cb called "
-		       "with no pending transmit\n", dev->name);
+		pr_debug("%s: driver bug: %s: called with no pending transmit\n",
+			 dev->name, __func__);
 	}
 
 	if (netif_queue_stopped(dev)) {
@@ -1767,8 +1738,8 @@ static int prism2_transmit(struct net_device *dev, int idx)
 	 * is really the case */
 
 	if (test_and_set_bit(HOSTAP_BITS_TRANSMIT, &local->bits)) {
-		printk(KERN_DEBUG "%s: driver bug - prism2_transmit() called "
-		       "when previous TX was pending\n", dev->name);
+		pr_debug("%s: driver bug - %s() called when previous TX was pending\n",
+			 dev->name, __func__);
 		return -1;
 	}
 
@@ -1783,8 +1754,8 @@ static int prism2_transmit(struct net_device *dev, int idx)
 		prism2_transmit_cb, (long) idx);
 
 	if (res) {
-		printk(KERN_DEBUG "%s: prism2_transmit: CMDCODE_TRANSMIT "
-		       "failed (res=%d)\n", dev->name, res);
+		pr_debug("%s: %s: CMDCODE_TRANSMIT failed (res=%d)\n",
+			 dev->name, __func__, res);
 		dev->stats.tx_dropped++;
 		netif_wake_queue(dev);
 		return -1;
@@ -1821,8 +1792,8 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
 	if ((local->func->card_present && !local->func->card_present(local)) ||
 	    !local->hw_ready || local->hw_downloading || local->pri_only) {
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: prism2_tx_80211: hw not ready -"
-			       " skipping\n", dev->name);
+			pr_debug("%s: %s: hw not ready - skipping\n",
+				 dev->name, __func__);
 		}
 		goto fail;
 	}
@@ -1874,8 +1845,7 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
 	if (!res)
 		res = prism2_transmit(dev, idx);
 	if (res) {
-		printk(KERN_DEBUG "%s: prism2_tx_80211 - to BAP0 failed\n",
-		       dev->name);
+		pr_debug("%s: %s: to BAP0 failed\n", dev->name, __func__);
 		local->intransmitfid[idx] = PRISM2_TXFID_EMPTY;
 		schedule_work(&local->reset_queue);
 		goto fail;
@@ -1910,16 +1880,15 @@ static u16 prism2_read_fid_reg(struct net_device *dev, u16 reg)
 		if (val == val2 && val == val3)
 			return val;
 
-		printk(KERN_DEBUG "%s: detected fid change (try=%d, reg=%04x):"
-		       " %04x %04x %04x\n",
-		       dev->name, i, reg, val, val2, val3);
+		pr_debug("%s: detected fid change (try=%d, reg=%04x): %04x %04x %04x\n",
+			 dev->name, i, reg, val, val2, val3);
 		if ((val == val2 || val == val3) && val != 0)
 			return val;
 		if (val2 == val3 && val2 != 0)
 			return val2;
 	}
-	printk(KERN_WARNING "%s: Uhhuh.. could not read good fid from reg "
-	       "%04x (%04x %04x %04x)\n", dev->name, reg, val, val2, val3);
+	pr_warn("%s: Uhhuh.. could not read good fid from reg %04x (%04x %04x %04x)\n",
+		dev->name, reg, val, val2, val3);
 	return val;
 #else /* EXTRA_FID_READ_TESTS */
 	return HFA384X_INW(reg);
@@ -1942,8 +1911,7 @@ static void prism2_rx(local_info_t *local)
 #ifndef final_version
 	if (rxfid == 0) {
 		rxfid = HFA384X_INW(HFA384X_RXFID_OFF);
-		printk(KERN_DEBUG "prism2_rx: rxfid=0 (next 0x%04x)\n",
-		       rxfid);
+		pr_debug("%s: rxfid=0 (next 0x%04x)\n", __func__, rxfid);
 		if (rxfid == 0) {
 			schedule_work(&local->reset_queue);
 			goto rx_dropped;
@@ -1959,8 +1927,7 @@ static void prism2_rx(local_info_t *local)
 
 	if (res) {
 		spin_unlock(&local->baplock);
-		printk(KERN_DEBUG "%s: copy from BAP0 failed %d\n", dev->name,
-		       res);
+		pr_debug("%s: copy from BAP0 failed %d\n", dev->name, res);
 		if (res == -ETIMEDOUT) {
 			schedule_work(&local->reset_queue);
 		}
@@ -1985,8 +1952,8 @@ static void prism2_rx(local_info_t *local)
 			len = 0;
 		} else {
 			spin_unlock(&local->baplock);
-			printk(KERN_DEBUG "%s: Received frame with invalid "
-			       "length 0x%04x\n", dev->name, len);
+			pr_debug("%s: Received frame with invalid length 0x%04x\n",
+				 dev->name, len);
 			hostap_dump_rx_header(dev->name, &rxdesc);
 			goto rx_dropped;
 		}
@@ -1995,8 +1962,7 @@ static void prism2_rx(local_info_t *local)
 	skb = dev_alloc_skb(len + hdr_len);
 	if (!skb) {
 		spin_unlock(&local->baplock);
-		printk(KERN_DEBUG "%s: RX failed to allocate skb\n",
-		       dev->name);
+		pr_debug("%s: RX failed to allocate skb\n", dev->name);
 		goto rx_dropped;
 	}
 	skb->dev = dev;
@@ -2006,8 +1972,7 @@ static void prism2_rx(local_info_t *local)
 		res = hfa384x_from_bap(dev, BAP0, skb_put(skb, len), len);
 	spin_unlock(&local->baplock);
 	if (res) {
-		printk(KERN_DEBUG "%s: RX failed to read "
-		       "frame data\n", dev->name);
+		pr_debug("%s: RX failed to read frame data\n", dev->name);
 		goto rx_dropped;
 	}
 
@@ -2062,8 +2027,8 @@ static void hostap_rx_skb(local_info_t *local, struct sk_buff *skb)
 		goto drop;
 
 	if (skb->len > PRISM2_DATA_MAXLEN) {
-		printk(KERN_DEBUG "%s: RX: len(%d) > MAX(%d)\n",
-		       dev->name, skb->len, PRISM2_DATA_MAXLEN);
+		pr_debug("%s: RX: len(%d) > MAX(%d)\n",
+			 dev->name, skb->len, PRISM2_DATA_MAXLEN);
 		goto drop;
 	}
 
@@ -2148,13 +2113,12 @@ static void prism2_alloc_ev(struct net_device *dev)
 			idx = 0;
 	} while (idx != local->next_alloc);
 
-	printk(KERN_WARNING "%s: could not find matching txfid (0x%04x, new "
-	       "read 0x%04x) for alloc event\n", dev->name, fid,
-	       HFA384X_INW(HFA384X_ALLOCFID_OFF));
-	printk(KERN_DEBUG "TXFIDs:");
+	pr_warn("%s: could not find matching txfid (0x%04x, new read 0x%04x) for alloc event\n",
+		dev->name, fid, HFA384X_INW(HFA384X_ALLOCFID_OFF));
+	pr_debug("TXFIDs:");
 	for (idx = 0; idx < PRISM2_TXFID_COUNT; idx++)
-		printk(" %04x[%04x]", local->txfid[idx],
-		       local->intransmitfid[idx]);
+		printk(" %04x[%04x]",
+		       local->txfid[idx], local->intransmitfid[idx]);
 	printk("\n");
 	spin_unlock(&local->txfidlock);
 
@@ -2176,8 +2140,7 @@ static void hostap_tx_callback(local_info_t *local,
 
 	/* Make sure that frame was from us. */
 	if (memcmp(txdesc->addr2, local->dev->dev_addr, ETH_ALEN)) {
-		printk(KERN_DEBUG "%s: TX callback - foreign frame\n",
-		       local->dev->name);
+		pr_debug("%s: TX callback - foreign frame\n", local->dev->name);
 		return;
 	}
 
@@ -2190,8 +2153,8 @@ static void hostap_tx_callback(local_info_t *local,
 	spin_unlock(&local->lock);
 
 	if (cb == NULL) {
-		printk(KERN_DEBUG "%s: could not find TX callback (idx %d)\n",
-		       local->dev->name, sw_support);
+		pr_debug("%s: could not find TX callback (idx %d)\n",
+			 local->dev->name, sw_support);
 		return;
 	}
 
@@ -2199,8 +2162,8 @@ static void hostap_tx_callback(local_info_t *local,
 	len = le16_to_cpu(txdesc->data_len);
 	skb = dev_alloc_skb(hdrlen + len);
 	if (skb == NULL) {
-		printk(KERN_DEBUG "%s: hostap_tx_callback failed to allocate "
-		       "skb\n", local->dev->name);
+		pr_debug("%s: %s: failed to allocate skb\n",
+			 local->dev->name, __func__);
 		return;
 	}
 
@@ -2426,8 +2389,7 @@ static void prism2_info(local_info_t *local)
 		res = hfa384x_from_bap(dev, BAP0, &info, sizeof(info));
 	if (res) {
 		spin_unlock(&local->baplock);
-		printk(KERN_DEBUG "Could not get info frame (fid=0x%04x)\n",
-		       fid);
+		pr_debug("Could not get info frame (fid=0x%04x)\n", fid);
 		if (res == -ETIMEDOUT) {
 			schedule_work(&local->reset_queue);
 		}
@@ -2441,17 +2403,17 @@ static void prism2_info(local_info_t *local)
 		 * though busy bit is not set in offset register;
 		 * in addition, length must be at least 1 due to type field */
 		spin_unlock(&local->baplock);
-		printk(KERN_DEBUG "%s: Received info frame with invalid "
-		       "length 0x%04x (type 0x%04x)\n", dev->name,
-		       le16_to_cpu(info.len), le16_to_cpu(info.type));
+		pr_debug("%s: Received info frame with invalid length 0x%04x (type 0x%04x)\n",
+			 dev->name,
+			 le16_to_cpu(info.len), le16_to_cpu(info.type));
 		goto out;
 	}
 
 	skb = dev_alloc_skb(sizeof(info) + left);
 	if (skb == NULL) {
 		spin_unlock(&local->baplock);
-		printk(KERN_DEBUG "%s: Could not allocate skb for info "
-		       "frame\n", dev->name);
+		pr_debug("%s: Could not allocate skb for info frame\n",
+			 dev->name);
 		goto out;
 	}
 
@@ -2459,9 +2421,9 @@ static void prism2_info(local_info_t *local)
 	if (left > 0 && hfa384x_from_bap(dev, BAP0, skb_put(skb, left), left))
 	{
 		spin_unlock(&local->baplock);
-		printk(KERN_WARNING "%s: Info frame read failed (fid=0x%04x, "
-		       "len=0x%04x, type=0x%04x\n", dev->name, fid,
-		       le16_to_cpu(info.len), le16_to_cpu(info.type));
+		pr_warn("%s: Info frame read failed (fid=0x%04x, len=0x%04x, type=0x%04x\n",
+			dev->name, fid,
+			le16_to_cpu(info.len), le16_to_cpu(info.type));
 		dev_kfree_skb(skb);
 		goto out;
 	}
@@ -2549,15 +2511,14 @@ static void prism2_ev_tick(struct net_device *dev)
 		evstat = HFA384X_INW(HFA384X_EVSTAT_OFF);
 		inten = HFA384X_INW(HFA384X_INTEN_OFF);
 		if (!prev_stuck) {
-			printk(KERN_INFO "%s: SW TICK stuck? "
-			       "bits=0x%lx EvStat=%04x IntEn=%04x\n",
-			       dev->name, local->bits, evstat, inten);
+			pr_info("%s: SW TICK stuck? bits=0x%lx EvStat=%04x IntEn=%04x\n",
+				dev->name, local->bits, evstat, inten);
 		}
 		local->sw_tick_stuck++;
 		if ((evstat & HFA384X_BAP0_EVENTS) &&
 		    (inten & HFA384X_BAP0_EVENTS)) {
-			printk(KERN_INFO "%s: trying to recover from IRQ "
-			       "hang\n", dev->name);
+			pr_info("%s: trying to recover from IRQ hang\n",
+				dev->name);
 			hfa384x_events_no_bap0(dev);
 		}
 		prev_stuck = 1;
@@ -2591,10 +2552,10 @@ static void prism2_check_magic(local_info_t *local)
 			       HFA384X_MAGIC);
 			last_magic_err = jiffies;
 		} else if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: interrupt - SWSUPPORT0=%04x "
-			       "MAGIC=%04x\n", dev->name,
-			       HFA384X_INW(HFA384X_SWSUPPORT0_OFF),
-			       HFA384X_MAGIC);
+			pr_debug("%s: interrupt - SWSUPPORT0=%04x MAGIC=%04x\n",
+				 dev->name,
+				 HFA384X_INW(HFA384X_SWSUPPORT0_OFF),
+				 HFA384X_MAGIC);
 		}
 		if (HFA384X_INW(HFA384X_SWSUPPORT0_OFF) != 0xffff)
 			schedule_work(&local->reset_queue);
@@ -2621,8 +2582,8 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
 	spin_lock(&local->irq_init_lock);
 	if (!dev->base_addr) {
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: Interrupt, but dev not configured\n",
-			       dev->name);
+			pr_debug("%s: Interrupt, but dev not configured\n",
+				 dev->name);
 		}
 		spin_unlock(&local->irq_init_lock);
 		return IRQ_HANDLED;
@@ -2633,8 +2594,7 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
 
 	if (local->func->card_present && !local->func->card_present(local)) {
 		if (net_ratelimit()) {
-			printk(KERN_DEBUG "%s: Interrupt, but dev not OK\n",
-			       dev->name);
+			pr_debug("%s: Interrupt, but dev not OK\n", dev->name);
 		}
 		return IRQ_HANDLED;
 	}
@@ -2647,8 +2607,7 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
 			if (local->shutdown)
 				return IRQ_HANDLED;
 			HFA384X_OUTW(0xffff, HFA384X_EVACK_OFF);
-			printk(KERN_DEBUG "%s: prism2_interrupt: ev=0xffff\n",
-			       dev->name);
+			pr_debug("%s: %s: ev=0xffff\n", dev->name, __func__);
 			return IRQ_HANDLED;
 		}
 
@@ -2673,16 +2632,14 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
 				return IRQ_HANDLED;
 			if (local->dev_enabled && (ev & ~HFA384X_EV_TICK) &&
 			    net_ratelimit()) {
-				printk(KERN_DEBUG "%s: prism2_interrupt: hw "
-				       "not ready; skipping events 0x%04x "
-				       "(IntEn=0x%04x)%s%s%s\n",
-				       dev->name, ev,
-				       HFA384X_INW(HFA384X_INTEN_OFF),
-				       !local->hw_ready ? " (!hw_ready)" : "",
-				       local->hw_resetting ?
-				       " (hw_resetting)" : "",
-				       !local->dev_enabled ?
-				       " (!dev_enabled)" : "");
+				pr_debug("%s: %s: hw not ready; skipping events 0x%04x (IntEn=0x%04x)%s%s%s\n",
+					 dev->name, __func__, ev,
+					 HFA384X_INW(HFA384X_INTEN_OFF),
+					 !local->hw_ready ? " (!hw_ready)" : "",
+					 local->hw_resetting
+					 ? " (hw_resetting)" : "",
+					 !local->dev_enabled
+					 ? " (!dev_enabled)" : "");
 			}
 			HFA384X_OUTW(ev, HFA384X_EVACK_OFF);
 			return IRQ_HANDLED;
@@ -2765,9 +2722,8 @@ static void prism2_check_sta_fw_version(local_info_t *local)
 
 	if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt &&
 	    !local->fw_encrypt_ok) {
-		printk(KERN_DEBUG "%s: defaulting to host-based encryption as "
-		       "a workaround for firmware bug in Host AP mode WEP\n",
-		       local->dev->name);
+		pr_debug("%s: defaulting to host-based encryption as a workaround for firmware bug in Host AP mode WEP\n",
+			 local->dev->name);
 		local->host_encrypt = 1;
 	}
 
@@ -2781,9 +2737,8 @@ static void prism2_check_sta_fw_version(local_info_t *local)
 	if (local->sta_fw_ver >= PRISM2_FW_VER(1,5,0))
 		local->wds_type |= HOSTAP_WDS_STANDARD_FRAME;
 	else {
-		printk(KERN_DEBUG "%s: defaulting to bogus WDS frame as a "
-		       "workaround for firmware bug in Host AP mode WDS\n",
-		       local->dev->name);
+		pr_debug("%s: defaulting to bogus WDS frame as a workaround for firmware bug in Host AP mode WDS\n",
+			 local->dev->name);
 	}
 
 	hostap_check_sta_fw_version(local->ap, local->sta_fw_ver);
@@ -2807,8 +2762,8 @@ static void hostap_passive_scan(unsigned long data)
 		 * passive scanning when a host-generated frame is being
 		 * transmitted */
 		if (test_bit(HOSTAP_BITS_TRANSMIT, &local->bits)) {
-			printk(KERN_DEBUG "%s: passive scan detected pending "
-			       "TX - delaying\n", dev->name);
+			pr_debug("%s: passive scan detected pending TX - delaying\n",
+				 dev->name);
 			local->passive_scan_timer.expires = jiffies + HZ / 10;
 			add_timer(&local->passive_scan_timer);
 			return;
@@ -2824,13 +2779,13 @@ static void hostap_passive_scan(unsigned long data)
 			 max_tries > 0);
 
 		if (max_tries == 0) {
-			printk(KERN_INFO "%s: no allowed passive scan channels"
-			       " found\n", dev->name);
+			pr_info("%s: no allowed passive scan channels found\n",
+				dev->name);
 			return;
 		}
 
-		printk(KERN_DEBUG "%s: passive scan channel %d\n",
-		       dev->name, local->passive_scan_channel);
+		pr_debug("%s: passive scan channel %d\n",
+			 dev->name, local->passive_scan_channel);
 		chan = local->passive_scan_channel;
 		local->passive_scan_state = PASSIVE_SCAN_WAIT;
 		local->passive_scan_timer.expires = jiffies + HZ / 10;
@@ -2844,8 +2799,8 @@ static void hostap_passive_scan(unsigned long data)
 	if (hfa384x_cmd_callback(dev, HFA384X_CMDCODE_TEST |
 				 (HFA384X_TEST_CHANGE_CHANNEL << 8),
 				 chan, NULL, 0))
-		printk(KERN_ERR "%s: passive scan channel set %d "
-		       "failed\n", dev->name, chan);
+		pr_err("%s: passive scan channel set %d failed\n",
+		       dev->name, chan);
 
 	add_timer(&local->passive_scan_timer);
 }
@@ -3029,9 +2984,8 @@ static void handle_set_tim_queue(struct work_struct *work)
 		if (entry->set)
 			val |= 0x8000;
 		if (hostap_set_word(local->dev, HFA384X_RID_CNFTIMCTRL, val)) {
-			printk(KERN_DEBUG "%s: set_tim failed (aid=%d "
-			       "set=%d)\n",
-			       local->dev->name, entry->aid, entry->set);
+			pr_debug("%s: set_tim failed (aid=%d set=%d)\n",
+				 local->dev->name, entry->aid, entry->set);
 		}
 
 		kfree(entry);
@@ -3089,8 +3043,7 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
 
 	len = strlen(dev_template);
 	if (len >= IFNAMSIZ || strstr(dev_template, "%d") == NULL) {
-		printk(KERN_WARNING "hostap: Invalid dev_template='%s'\n",
-		       dev_template);
+		pr_warn("Invalid dev_template='%s'\n", dev_template);
 		return NULL;
 	}
 
@@ -3160,8 +3113,8 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
 	    i == IW_MODE_MONITOR) {
 		local->iw_mode = i;
 	} else {
-		printk(KERN_WARNING "prism2: Unknown iw_mode %d; using "
-		       "IW_MODE_MASTER\n", i);
+		pr_warn("prism2: Unknown iw_mode %d; using IW_MODE_MASTER\n",
+			i);
 		local->iw_mode = IW_MODE_MASTER;
 	}
 	local->channel = GET_INT_PARM(channel, card_idx);
@@ -3241,11 +3194,10 @@ while (0)
 	prism2_set_lockdep_class(dev);
 	rtnl_unlock();
 	if (ret < 0) {
-		printk(KERN_WARNING "%s: register netdevice failed!\n",
-		       dev_info);
+		pr_warn("register netdevice failed!\n");
 		goto fail;
 	}
-	printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name);
+	pr_info("Registered netdevice %s\n", dev->name);
 
 	hostap_init_data(local);
 	return dev;
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c
index 47932b2..afdd08d 100644
--- a/drivers/net/wireless/hostap/hostap_info.c
+++ b/drivers/net/wireless/hostap/hostap_info.c
@@ -1,5 +1,7 @@
 /* Host AP driver Info Frame processing (part of hostap.o module) */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/if_arp.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -15,8 +17,8 @@ static void prism2_info_commtallies16(local_info_t *local, unsigned char *buf,
 	struct hfa384x_comm_tallies *tallies;
 
 	if (left < sizeof(struct hfa384x_comm_tallies)) {
-		printk(KERN_DEBUG "%s: too short (len=%d) commtallies "
-		       "info frame\n", local->dev->name, left);
+		pr_debug("%s: too short (len=%d) commtallies info frame\n",
+			 local->dev->name, left);
 		return;
 	}
 
@@ -55,8 +57,8 @@ static void prism2_info_commtallies32(local_info_t *local, unsigned char *buf,
 	struct hfa384x_comm_tallies32 *tallies;
 
 	if (left < sizeof(struct hfa384x_comm_tallies32)) {
-		printk(KERN_DEBUG "%s: too short (len=%d) commtallies32 "
-		       "info frame\n", local->dev->name, left);
+		pr_debug("%s: too short (len=%d) commtallies32 info frame\n",
+			 local->dev->name, left);
 		return;
 	}
 
@@ -135,8 +137,8 @@ static void prism2_info_linkstatus(local_info_t *local, unsigned char *buf,
 	local->last_join_time = 0;
 
 	if (left != 2) {
-		printk(KERN_DEBUG "%s: invalid linkstatus info frame "
-		       "length %d\n", local->dev->name, left);
+		pr_debug("%s: invalid linkstatus info frame length %d\n",
+			 local->dev->name, left);
 		return;
 	}
 
@@ -225,7 +227,7 @@ static void prism2_host_roaming(local_info_t *local)
 	       dev->name, req.bssid, le16_to_cpu(req.channel));
 	if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req,
 				 sizeof(req))) {
-		printk(KERN_DEBUG "%s: JoinRequest failed\n", dev->name);
+		pr_debug("%s: JoinRequest failed\n", dev->name);
 	}
 	local->last_join_time = jiffies;
 }
@@ -258,8 +260,8 @@ static void prism2_info_scanresults(local_info_t *local, unsigned char *buf,
 	struct hfa384x_hostscan_result *results, *prev;
 
 	if (left < 4) {
-		printk(KERN_DEBUG "%s: invalid scanresult info frame "
-		       "length %d\n", local->dev->name, left);
+		pr_debug("%s: invalid scanresult info frame length %d\n",
+			 local->dev->name, left);
 		return;
 	}
 
@@ -311,16 +313,16 @@ static void prism2_info_hostscanresults(local_info_t *local,
 	wake_up_interruptible(&local->hostscan_wq);
 
 	if (left < 4) {
-		printk(KERN_DEBUG "%s: invalid hostscanresult info frame "
-		       "length %d\n", local->dev->name, left);
+		pr_debug("%s: invalid hostscanresult info frame length %d\n",
+			 local->dev->name, left);
 		return;
 	}
 
 	pos = (__le16 *) buf;
 	copy_len = result_size = le16_to_cpu(*pos);
 	if (result_size == 0) {
-		printk(KERN_DEBUG "%s: invalid result_size (0) in "
-		       "hostscanresults\n", local->dev->name);
+		pr_debug("%s: invalid result_size (0) in hostscanresults\n",
+			 local->dev->name);
 		return;
 	}
 	if (copy_len > sizeof(struct hfa384x_hostscan_result))
@@ -344,8 +346,8 @@ static void prism2_info_hostscanresults(local_info_t *local,
 	}
 
 	if (left) {
-		printk(KERN_DEBUG "%s: short HostScan result entry (%d/%d)\n",
-		       local->dev->name, left, result_size);
+		pr_debug("%s: short HostScan result entry (%d/%d)\n",
+			 local->dev->name, left, result_size);
 	}
 
 	spin_lock_irqsave(&local->lock, flags);
@@ -423,8 +425,8 @@ static void handle_info_queue_linkstatus(local_info_t *local)
 
 	if (local->func->get_rid(local->dev, HFA384X_RID_CURRENTBSSID,
 				 local->bssid, ETH_ALEN, 1) < 0) {
-		printk(KERN_DEBUG "%s: could not read CURRENTBSSID after "
-		       "LinkStatus event\n", local->dev->name);
+		pr_debug("%s: could not read CURRENTBSSID after LinkStatus event\n",
+			 local->dev->name);
 	} else {
 		PDEBUG(DEBUG_EXTRA, "%s: LinkStatus: BSSID=%pM\n",
 		       local->dev->name,
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 18054d9..c638047 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1,5 +1,7 @@
 /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/sched.h>
@@ -173,9 +175,8 @@ static int prism2_ioctl_siwencode(struct net_device *dev,
 			kfree(new_crypt);
 			new_crypt = NULL;
 
-			printk(KERN_WARNING "%s: could not initialize WEP: "
-			       "load module hostap_crypt_wep.o\n",
-			       dev->name);
+			pr_warn("%s: could not initialize WEP: load module hostap_crypt_wep.o\n",
+				dev->name);
 			return -EOPNOTSUPP;
 		}
 		*crypt = new_crypt;
@@ -204,7 +205,7 @@ static int prism2_ioctl_siwencode(struct net_device *dev,
 	local->open_wep = erq->flags & IW_ENCODE_OPEN;
 
 	if (hostap_set_encryption(local)) {
-		printk(KERN_DEBUG "%s: set_encryption failed\n", dev->name);
+		pr_debug("%s: set_encryption failed\n", dev->name);
 		return -EINVAL;
 	}
 
@@ -214,7 +215,7 @@ static int prism2_ioctl_siwencode(struct net_device *dev,
 	 * after WEP configuration. However, keys are apparently changed at
 	 * least in Managed mode. */
 	if (local->iw_mode != IW_MODE_INFRA && local->func->reset_port(dev)) {
-		printk(KERN_DEBUG "%s: reset_port failed\n", dev->name);
+		pr_debug("%s: reset_port failed\n", dev->name);
 		return -EINVAL;
 	}
 
@@ -295,17 +296,15 @@ static int hostap_set_rate(struct net_device *dev)
 
 	basic_rates = local->basic_rates & local->tx_rate_control;
 	if (!basic_rates || basic_rates != local->basic_rates) {
-		printk(KERN_INFO "%s: updating basic rate set automatically "
-		       "to match with the new supported rate set\n",
-		       dev->name);
+		pr_info("%s: updating basic rate set automatically to match with the new supported rate set\n",
+			dev->name);
 		if (!basic_rates)
 			basic_rates = local->tx_rate_control;
 
 		local->basic_rates = basic_rates;
 		if (hostap_set_word(dev, HFA384X_RID_CNFBASICRATES,
 				    basic_rates))
-			printk(KERN_WARNING "%s: failed to set "
-			       "cnfBasicRates\n", dev->name);
+			pr_warn("%s: failed to set cnfBasicRates\n", dev->name);
 	}
 
 	ret = (hostap_set_word(dev, HFA384X_RID_TXRATECONTROL,
@@ -315,9 +314,8 @@ static int hostap_set_rate(struct net_device *dev)
 	       local->func->reset_port(dev));
 
 	if (ret) {
-		printk(KERN_WARNING "%s: TXRateControl/cnfSupportedRates "
-		       "setting to 0x%x failed\n",
-		       dev->name, local->tx_rate_control);
+		pr_warn("%s: TXRateControl/cnfSupportedRates setting to 0x%x failed\n",
+			dev->name, local->tx_rate_control);
 	}
 
 	/* Update TX rate configuration for all STAs based on new operational
@@ -505,8 +503,7 @@ static int prism2_ioctl_giwaplist(struct net_device *dev,
 	local = iface->local;
 
 	if (local->iw_mode != IW_MODE_MASTER) {
-		printk(KERN_DEBUG "SIOCGIWAPLIST is currently only supported "
-		       "in Host AP mode\n");
+		pr_debug("SIOCGIWAPLIST is currently only supported in Host AP mode\n");
 		data->length = 0;
 		return -EOPNOTSUPP;
 	}
@@ -663,13 +660,13 @@ static int hostap_join_ap(struct net_device *dev)
 
 	if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req,
 				 sizeof(req))) {
-		printk(KERN_DEBUG "%s: JoinRequest %pM failed\n",
-		       dev->name, local->preferred_ap);
+		pr_debug("%s: JoinRequest %pM failed\n",
+			 dev->name, local->preferred_ap);
 		return -1;
 	}
 
-	printk(KERN_DEBUG "%s: Trying to join BSSID %pM\n",
-	       dev->name, local->preferred_ap);
+	pr_debug("%s: Trying to join BSSID %pM\n",
+		 dev->name, local->preferred_ap);
 
 	return 0;
 }
@@ -698,18 +695,16 @@ static int prism2_ioctl_siwap(struct net_device *dev,
 		scan_req.txrate = cpu_to_le16(HFA384X_RATES_1MBPS);
 		if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST,
 					 &scan_req, sizeof(scan_req))) {
-			printk(KERN_DEBUG "%s: ScanResults request failed - "
-			       "preferred AP delayed to next unsolicited "
-			       "scan\n", dev->name);
+			pr_debug("%s: ScanResults request failed - preferred AP delayed to next unsolicited scan\n",
+				 dev->name);
 		}
 	} else if (local->host_roaming == 2 &&
 		   local->iw_mode == IW_MODE_INFRA) {
 		if (hostap_join_ap(dev))
 			return -EINVAL;
 	} else {
-		printk(KERN_DEBUG "%s: Preferred AP (SIOCSIWAP) is used only "
-		       "in Managed mode when host_roaming is enabled\n",
-		       dev->name);
+		pr_debug("%s: Preferred AP (SIOCSIWAP) is used only in Managed mode when host_roaming is enabled\n",
+			 dev->name);
 	}
 
 	return 0;
@@ -900,8 +895,8 @@ static int prism2_ioctl_siwessid(struct net_device *dev,
 	if (local->iw_mode == IW_MODE_MASTER && ssid[0] == '\0') {
 		/* Setting SSID to empty string seems to kill the card in
 		 * Host AP mode */
-		printk(KERN_DEBUG "%s: Host AP mode does not support "
-		       "'Any' essid\n", dev->name);
+		pr_debug("%s: Host AP mode does not support 'Any' essid\n",
+			 dev->name);
 		return -EINVAL;
 	}
 
@@ -1078,13 +1073,12 @@ static int hostap_monitor_mode_enable(local_info_t *local)
 {
 	struct net_device *dev = local->dev;
 
-	printk(KERN_DEBUG "Enabling monitor mode\n");
+	pr_debug("Enabling monitor mode\n");
 	hostap_monitor_set_type(local);
 
 	if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
 			    HFA384X_PORTTYPE_PSEUDO_IBSS)) {
-		printk(KERN_DEBUG "Port type setting for monitor mode "
-		       "failed\n");
+		pr_debug("Port type setting for monitor mode failed\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -1094,7 +1088,7 @@ static int hostap_monitor_mode_enable(local_info_t *local)
 	if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
 			    HFA384X_WEPFLAGS_HOSTENCRYPT |
 			    HFA384X_WEPFLAGS_HOSTDECRYPT)) {
-		printk(KERN_DEBUG "WEP flags setting failed\n");
+		pr_debug("WEP flags setting failed\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -1102,7 +1096,7 @@ static int hostap_monitor_mode_enable(local_info_t *local)
 	    local->func->cmd(dev, HFA384X_CMDCODE_TEST |
 			     (HFA384X_TEST_MONITOR << 8),
 			     0, NULL, NULL)) {
-		printk(KERN_DEBUG "Setting monitor mode failed\n");
+		pr_debug("Setting monitor mode failed\n");
 		return -EOPNOTSUPP;
 	}
 
@@ -1117,7 +1111,7 @@ static int hostap_monitor_mode_disable(local_info_t *local)
 	if (dev == NULL)
 		return -1;
 
-	printk(KERN_DEBUG "%s: Disabling monitor mode\n", dev->name);
+	pr_debug("%s: Disabling monitor mode\n", dev->name);
 	dev->type = ARPHRD_ETHER;
 
 	if (local->func->cmd(dev, HFA384X_CMDCODE_TEST |
@@ -1153,8 +1147,8 @@ static int prism2_ioctl_siwmode(struct net_device *dev,
 		return 0;
 
 	if (*mode == IW_MODE_MASTER && local->essid[0] == '\0') {
-		printk(KERN_WARNING "%s: empty SSID not allowed in Master "
-		       "mode\n", dev->name);
+		pr_warn("%s: empty SSID not allowed in Master mode\n",
+			dev->name);
 		return -EINVAL;
 	}
 
@@ -1170,17 +1164,16 @@ static int prism2_ioctl_siwmode(struct net_device *dev,
 		double_reset = 1;
 	}
 
-	printk(KERN_DEBUG "prism2: %s: operating mode changed "
-	       "%d -> %d\n", dev->name, local->iw_mode, *mode);
+	pr_debug("prism2: %s: operating mode changed %d -> %d\n",
+		 dev->name, local->iw_mode, *mode);
 	local->iw_mode = *mode;
 
 	if (local->iw_mode == IW_MODE_MONITOR)
 		hostap_monitor_mode_enable(local);
 	else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt &&
 		 !local->fw_encrypt_ok) {
-		printk(KERN_DEBUG "%s: defaulting to host-based encryption as "
-		       "a workaround for firmware bug in Host AP mode WEP\n",
-		       dev->name);
+		pr_debug("%s: defaulting to host-based encryption as a workaround for firmware bug in Host AP mode WEP\n",
+			 dev->name);
 		local->host_encrypt = 1;
 	}
 
@@ -1370,9 +1363,8 @@ static int prism2_ioctl_siwretry(struct net_device *dev,
 		} else {
 			if (hostap_set_word(dev, HFA384X_RID_CNFALTRETRYCOUNT,
 					    rrq->value)) {
-				printk(KERN_DEBUG "%s: Alternate retry count "
-				       "setting to %d failed\n",
-				       dev->name, rrq->value);
+				pr_debug("%s: Alternate retry count setting to %d failed\n",
+					 dev->name, rrq->value);
 				return -EOPNOTSUPP;
 			}
 
@@ -1522,8 +1514,8 @@ static int prism2_ioctl_siwtxpow(struct net_device *dev,
 			ret = local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF,
 					       HFA386X_CR_A_D_TEST_MODES2,
 					       &val, NULL);
-			printk(KERN_DEBUG "%s: Turning radio off: %s\n",
-			       dev->name, ret ? "failed" : "OK");
+			pr_debug("%s: Turning radio off: %s\n",
+				 dev->name, ret ? "failed" : "OK");
 			local->txpower_type = PRISM2_TXPOWER_OFF;
 		}
 		return (ret ? -EOPNOTSUPP : 0);
@@ -1533,14 +1525,14 @@ static int prism2_ioctl_siwtxpow(struct net_device *dev,
 		val = 0; /* disable all standby and sleep modes */
 		ret = local->func->cmd(dev, HFA384X_CMDCODE_WRITEMIF,
 				       HFA386X_CR_A_D_TEST_MODES2, &val, NULL);
-		printk(KERN_DEBUG "%s: Turning radio on: %s\n",
-		       dev->name, ret ? "failed" : "OK");
+		pr_debug("%s: Turning radio on: %s\n",
+			 dev->name, ret ? "failed" : "OK");
 		local->txpower_type = PRISM2_TXPOWER_UNKNOWN;
 	}
 
 #ifdef RAW_TXPOWER_SETTING
 	if (!rrq->fixed && local->txpower_type != PRISM2_TXPOWER_AUTO) {
-		printk(KERN_DEBUG "Setting ALC on\n");
+		pr_debug("Setting ALC on\n");
 		val = HFA384X_TEST_CFG_BIT_ALC;
 		local->func->cmd(dev, HFA384X_CMDCODE_TEST |
 				 (HFA384X_TEST_CFG_BITS << 8), 1, &val, NULL);
@@ -1549,7 +1541,7 @@ static int prism2_ioctl_siwtxpow(struct net_device *dev,
 	}
 
 	if (local->txpower_type != PRISM2_TXPOWER_FIXED) {
-		printk(KERN_DEBUG "Setting ALC off\n");
+		pr_debug("Setting ALC off\n");
 		val = HFA384X_TEST_CFG_BIT_ALC;
 		local->func->cmd(dev, HFA384X_CMDCODE_TEST |
 				 (HFA384X_TEST_CFG_BITS << 8), 0, &val, NULL);
@@ -1562,7 +1554,7 @@ static int prism2_ioctl_siwtxpow(struct net_device *dev,
 		tmp = "mW";
 	else
 		tmp = "UNKNOWN";
-	printk(KERN_DEBUG "Setting TX power to %d %s\n", rrq->value, tmp);
+	pr_debug("Setting TX power to %d %s\n", rrq->value, tmp);
 
 	if (rrq->flags != IW_TXPOW_DBM) {
 		printk("SIOCSIWTXPOW with mW is not supported; use dBm\n");
@@ -1652,7 +1644,7 @@ static int prism2_request_hostscan(struct net_device *dev,
 
 	if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req,
 				 sizeof(scan_req))) {
-		printk(KERN_DEBUG "%s: HOSTSCAN failed\n", dev->name);
+		pr_debug("%s: HOSTSCAN failed\n", dev->name);
 		return -EINVAL;
 	}
 	return 0;
@@ -1689,7 +1681,7 @@ static int prism2_request_scan(struct net_device *dev)
 
 	if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req,
 				 sizeof(scan_req))) {
-		printk(KERN_DEBUG "SCANREQUEST failed\n");
+		pr_debug("SCANREQUEST failed\n");
 		ret = -EINVAL;
 	}
 
@@ -2087,14 +2079,13 @@ static int prism2_ioctl_giwscan(struct net_device *dev,
 		/* Translate to WE format */
 		res = prism2_ap_translate_scan(dev, info, extra);
 		if (res >= 0) {
-			printk(KERN_DEBUG "Scan result translation succeeded "
-			       "(length=%d)\n", res);
+			pr_debug("Scan result translation succeeded (length=%d)\n",
+				 res);
 			data->length = res;
 			return 0;
 		} else {
-			printk(KERN_DEBUG
-			       "Scan result translation failed (res=%d)\n",
-			       res);
+			pr_debug("Scan result translation failed (res=%d)\n",
+				 res);
 			data->length = 0;
 			return res;
 		}
@@ -2349,8 +2340,8 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 			break;
 		}
 
-		printk(KERN_DEBUG "prism2: %s: pseudo IBSS change %d -> %d\n",
-		       dev->name, local->pseudo_adhoc, value);
+		pr_debug("prism2: %s: pseudo IBSS change %d -> %d\n",
+			 dev->name, local->pseudo_adhoc, value);
 		local->pseudo_adhoc = value;
 		if (local->iw_mode != IW_MODE_ADHOC)
 			break;
@@ -2367,8 +2358,8 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 #endif /* PRISM2_NO_STATION_MODES */
 
 	case PRISM2_PARAM_ALC:
-		printk(KERN_DEBUG "%s: %s ALC\n", dev->name,
-		       value == 0 ? "Disabling" : "Enabling");
+		pr_debug("%s: %s ALC\n",
+			 dev->name, value == 0 ? "Disabling" : "Enabling");
 		val = HFA384X_TEST_CFG_BIT_ALC;
 		local->func->cmd(dev, HFA384X_CMDCODE_TEST |
 				 (HFA384X_TEST_CFG_BITS << 8),
@@ -2533,13 +2524,12 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 			if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
 					    HFA384X_PORTTYPE_BSS) ||
 			    local->func->reset_port(dev))
-				printk(KERN_DEBUG "Leaving Host AP mode "
-				       "for HostScan failed\n");
+				pr_debug("Leaving Host AP mode for HostScan failed\n");
 		}
 
 		if (local->func->set_rid(dev, HFA384X_RID_HOSTSCAN, &scan_req,
 					 sizeof(scan_req))) {
-			printk(KERN_DEBUG "HOSTSCAN failed\n");
+			pr_debug("HOSTSCAN failed\n");
 			ret = -EINVAL;
 		}
 		if (local->iw_mode == IW_MODE_MASTER) {
@@ -2556,8 +2546,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 			if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
 					    HFA384X_PORTTYPE_HOSTAP) ||
 			    local->func->reset_port(dev))
-				printk(KERN_DEBUG "Returning to Host AP mode "
-				       "after HostScan failed\n");
+				pr_debug("Returning to Host AP mode after HostScan failed\n");
 		}
 		break;
 	}
@@ -2582,8 +2571,8 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 		if (hostap_set_word(dev, HFA384X_RID_CNFENHSECURITY,
 				    local->enh_sec) ||
 		    local->func->reset_port(dev)) {
-			printk(KERN_INFO "%s: cnfEnhSecurity requires STA f/w "
-			       "1.6.3 or newer\n", dev->name);
+			pr_info("%s: cnfEnhSecurity requires STA f/w 1.6.3 or newer\n",
+				dev->name);
 			ret = -EOPNOTSUPP;
 		}
 		break;
@@ -2596,9 +2585,8 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 
 	case PRISM2_PARAM_BASIC_RATES:
 		if ((value & local->tx_rate_control) != value || value == 0) {
-			printk(KERN_INFO "%s: invalid basic rate set - basic "
-			       "rates must be in supported rate set\n",
-			       dev->name);
+			pr_info("%s: invalid basic rate set - basic rates must be in supported rate set\n",
+				dev->name);
 			ret = -EINVAL;
 			break;
 		}
@@ -2652,8 +2640,8 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
 		break;
 
 	default:
-		printk(KERN_DEBUG "%s: prism2_param: unknown param %d\n",
-		       dev->name, param);
+		pr_debug("%s: prism2_param: unknown param %d\n",
+			 dev->name, param);
 		ret = -EOPNOTSUPP;
 		break;
 	}
@@ -2839,8 +2827,8 @@ static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
 		break;
 
 	default:
-		printk(KERN_DEBUG "%s: get_prism2_param: unknown param %d\n",
-		       dev->name, *param);
+		pr_debug("%s: get_prism2_param: unknown param %d\n",
+			 dev->name, *param);
 		ret = -EOPNOTSUPP;
 		break;
 	}
@@ -2900,9 +2888,8 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
 	iface = netdev_priv(dev);
 	local = iface->local;
 
-	printk(KERN_DEBUG "%s: process %d (%s) used deprecated iwpriv monitor "
-	       "- update software to use iwconfig mode monitor\n",
-	       dev->name, task_pid_nr(current), current->comm);
+	pr_debug("%s: process %d (%s) used deprecated iwpriv monitor - update software to use iwconfig mode monitor\n",
+		 dev->name, task_pid_nr(current), current->comm);
 
 	/* Backward compatibility code - this can be removed at some point */
 
@@ -2944,7 +2931,7 @@ static int prism2_ioctl_priv_reset(struct net_device *dev, int *i)
 	iface = netdev_priv(dev);
 	local = iface->local;
 
-	printk(KERN_DEBUG "%s: manual reset request(%d)\n", dev->name, *i);
+	pr_debug("%s: manual reset request(%d)\n", dev->name, *i);
 	switch (*i) {
 	case 0:
 		/* Disable and enable card */
@@ -2976,7 +2963,7 @@ static int prism2_ioctl_priv_reset(struct net_device *dev, int *i)
 		break;
 
 	default:
-		printk(KERN_DEBUG "Unknown reset request %d\n", *i);
+		pr_debug("Unknown reset request %d\n", *i);
 		return -EOPNOTSUPP;
 	}
 
@@ -2989,7 +2976,7 @@ static int prism2_ioctl_priv_set_rid_word(struct net_device *dev, int *i)
 	int rid = *i;
 	int value = *(i + 1);
 
-	printk(KERN_DEBUG "%s: Set RID[0x%X] = %d\n", dev->name, rid, value);
+	pr_debug("%s: Set RID[0x%X] = %d\n", dev->name, rid, value);
 
 	if (hostap_set_word(dev, rid, value))
 		return -EINVAL;
@@ -3264,8 +3251,8 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
 		module = "lib80211_crypt_ccmp";
 		break;
 	default:
-		printk(KERN_DEBUG "%s: unsupported algorithm %d\n",
-		       local->dev->name, ext->alg);
+		pr_debug("%s: unsupported algorithm %d\n",
+			 local->dev->name, ext->alg);
 		ret = -EOPNOTSUPP;
 		goto done;
 	}
@@ -3276,8 +3263,8 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
 		ops = lib80211_get_crypto_ops(alg);
 	}
 	if (ops == NULL) {
-		printk(KERN_DEBUG "%s: unknown crypto alg '%s'\n",
-		       local->dev->name, alg);
+		pr_debug("%s: unknown crypto alg '%s'\n",
+			 local->dev->name, alg);
 		ret = -EOPNOTSUPP;
 		goto done;
 	}
@@ -3324,8 +3311,7 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
 	    && (*crypt)->ops->set_key &&
 	    (*crypt)->ops->set_key(ext->key, ext->key_len, ext->rx_seq,
 				   (*crypt)->priv) < 0) {
-		printk(KERN_DEBUG "%s: key setting failed\n",
-		       local->dev->name);
+		pr_debug("%s: key setting failed\n", local->dev->name);
 		ret = -EINVAL;
 		goto done;
 	}
@@ -3497,8 +3483,8 @@ static int prism2_ioctl_set_encryption(local_info_t *local,
 		ops = lib80211_get_crypto_ops(param->u.crypt.alg);
 	}
 	if (ops == NULL) {
-		printk(KERN_DEBUG "%s: unknown crypto alg '%s'\n",
-		       local->dev->name, param->u.crypt.alg);
+		pr_debug("%s: unknown crypto alg '%s'\n",
+			 local->dev->name, param->u.crypt.alg);
 		param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ALG;
 		ret = -EINVAL;
 		goto done;
@@ -3537,8 +3523,7 @@ static int prism2_ioctl_set_encryption(local_info_t *local,
 	    (*crypt)->ops->set_key(param->u.crypt.key,
 				   param->u.crypt.key_len, param->u.crypt.seq,
 				   (*crypt)->priv) < 0) {
-		printk(KERN_DEBUG "%s: key setting failed\n",
-		       local->dev->name);
+		pr_debug("%s: key setting failed\n", local->dev->name);
 		param->u.crypt.err = HOSTAP_CRYPT_ERR_KEY_SET_FAILED;
 		ret = -EINVAL;
 		goto done;
@@ -3548,8 +3533,8 @@ static int prism2_ioctl_set_encryption(local_info_t *local,
 		if (!sta_ptr)
 			local->crypt_info.tx_keyidx = param->u.crypt.idx;
 		else if (param->u.crypt.idx) {
-			printk(KERN_DEBUG "%s: TX key idx setting failed\n",
-			       local->dev->name);
+			pr_debug("%s: TX key idx setting failed\n",
+				 local->dev->name);
 			param->u.crypt.err =
 				HOSTAP_CRYPT_ERR_TX_KEY_SET_FAILED;
 			ret = -EINVAL;
@@ -3677,8 +3662,8 @@ static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local,
 					  struct prism2_hostapd_param *param,
 					  int param_len)
 {
-	printk(KERN_DEBUG "%ssta: associated as client with AP %pM\n",
-	       local->dev->name, param->sta_addr);
+	pr_debug("%ssta: associated as client with AP %pM\n",
+		 local->dev->name, param->sta_addr);
 	memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN);
 	return 0;
 }
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 627bc12..643c003 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -12,6 +12,8 @@
  * more details.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -86,14 +88,12 @@ struct net_device * hostap_add_interface(struct local_info *local,
 		rtnl_unlock();
 
 	if (ret < 0) {
-		printk(KERN_WARNING "%s: failed to add new netdevice!\n",
-		       dev->name);
+		pr_warn("%s: failed to add new netdevice!\n", dev->name);
 		free_netdev(dev);
 		return NULL;
 	}
 
-	printk(KERN_DEBUG "%s: registered netdevice %s\n",
-	       mdev->name, dev->name);
+	pr_debug("%s: registered netdevice %s\n", mdev->name, dev->name);
 
 	return dev;
 }
@@ -165,8 +165,8 @@ int prism2_wds_add(local_info_t *local, u8 *remote_addr,
 		/* take pre-allocated entry into use */
 		memcpy(empty->u.wds.remote_addr, remote_addr, ETH_ALEN);
 		read_unlock_bh(&local->iface_lock);
-		printk(KERN_DEBUG "%s: using pre-allocated WDS netdevice %s\n",
-		       local->dev->name, empty->dev->name);
+		pr_debug("%s: using pre-allocated WDS netdevice %s\n",
+			 local->dev->name, empty->dev->name);
 		return 0;
 	}
 	read_unlock_bh(&local->iface_lock);
@@ -182,8 +182,7 @@ int prism2_wds_add(local_info_t *local, u8 *remote_addr,
 
 	/* verify that there is room for wds# postfix in the interface name */
 	if (strlen(local->dev->name) >= IFNAMSIZ - 5) {
-		printk(KERN_DEBUG "'%s' too long base device name\n",
-		       local->dev->name);
+		pr_debug("'%s' too long base device name\n", local->dev->name);
 		return -EINVAL;
 	}
 
@@ -347,7 +346,7 @@ int hostap_set_encryption(local_info_t *local)
 
 	if (local->func->get_rid(local->dev, HFA384X_RID_CNFWEPFLAGS, &val, 2,
 				 1) < 0) {
-		printk(KERN_DEBUG "Could not read current WEP flags.\n");
+		pr_debug("Could not read current WEP flags\n");
 		goto fail;
 	}
 	le16_to_cpus(&val);
@@ -377,8 +376,7 @@ int hostap_set_encryption(local_info_t *local)
 
 	if (val != old_val &&
 	    hostap_set_word(local->dev, HFA384X_RID_CNFWEPFLAGS, val)) {
-		printk(KERN_DEBUG "Could not write new WEP flags (0x%x)\n",
-		       val);
+		pr_debug("Could not write new WEP flags (0x%x)\n", val);
 		goto fail;
 	}
 
@@ -403,20 +401,20 @@ int hostap_set_encryption(local_info_t *local)
 		if (local->func->set_rid(local->dev,
 					 HFA384X_RID_CNFDEFAULTKEY0 + i,
 					 keybuf, keylen)) {
-			printk(KERN_DEBUG "Could not set key %d (len=%d)\n",
-			       i, keylen);
+			pr_debug("Could not set key %d (len=%d)\n",
+				 i, keylen);
 			goto fail;
 		}
 	}
 	if (hostap_set_word(local->dev, HFA384X_RID_CNFWEPDEFAULTKEYID, idx)) {
-		printk(KERN_DEBUG "Could not set default keyid %d\n", idx);
+		pr_debug("Could not set default keyid %d\n", idx);
 		goto fail;
 	}
 
 	return 0;
 
  fail:
-	printk(KERN_DEBUG "%s: encryption setup failed\n", local->dev->name);
+	pr_debug("%s: encryption setup failed\n", local->dev->name);
 	return -1;
 }
 
@@ -444,8 +442,8 @@ int hostap_set_antsel(local_info_t *local)
 
 		if (local->func->cmd(local->dev, HFA384X_CMDCODE_WRITEMIF,
 				     HFA386X_CR_TX_CONFIGURE, &val, NULL)) {
-			printk(KERN_INFO "%s: setting TX AntSel failed\n",
-			       local->dev->name);
+			pr_info("%s: setting TX AntSel failed\n",
+				local->dev->name);
 			ret = -1;
 		}
 	}
@@ -468,8 +466,8 @@ int hostap_set_antsel(local_info_t *local)
 
 		if (local->func->cmd(local->dev, HFA384X_CMDCODE_WRITEMIF,
 				     HFA386X_CR_RX_CONFIGURE, &val, NULL)) {
-			printk(KERN_INFO "%s: setting RX AntSel failed\n",
-			       local->dev->name);
+			pr_info("%s: setting RX AntSel failed\n",
+				local->dev->name);
 			ret = -1;
 		}
 	}
@@ -512,8 +510,8 @@ int hostap_set_auth_algs(local_info_t *local)
 		val = PRISM2_AUTH_OPEN;
 
 	if (hostap_set_word(local->dev, HFA384X_RID_CNFAUTHENTICATION, val)) {
-		printk(KERN_INFO "%s: cnfAuthentication setting to 0x%x "
-		       "failed\n", local->dev->name, local->auth_algs);
+		pr_info("%s: cnfAuthentication setting to 0x%x failed\n",
+			local->dev->name, local->auth_algs);
 		return -EINVAL;
 	}
 
@@ -527,28 +525,24 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
 
 	status = __le16_to_cpu(rx->status);
 
-	printk(KERN_DEBUG "%s: RX status=0x%04x (port=%d, type=%d, "
-	       "fcserr=%d) silence=%d signal=%d rate=%d rxflow=%d; "
-	       "jiffies=%ld\n",
-	       name, status, (status >> 8) & 0x07, status >> 13, status & 1,
-	       rx->silence, rx->signal, rx->rate, rx->rxflow, jiffies);
+	pr_debug("%s: RX status=0x%04x (port=%d, type=%d, fcserr=%d) silence=%d signal=%d rate=%d rxflow=%d; jiffies=%ld\n",
+		 name, status, (status >> 8) & 0x07, status >> 13, status & 1,
+		 rx->silence, rx->signal, rx->rate, rx->rxflow, jiffies);
 
 	fc = __le16_to_cpu(rx->frame_control);
-	printk(KERN_DEBUG "   FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x "
-	       "data_len=%d%s%s\n",
-	       fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
-	       (fc & IEEE80211_FCTL_STYPE) >> 4,
-	       __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl),
-	       __le16_to_cpu(rx->data_len),
-	       fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
-	       fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
-
-	printk(KERN_DEBUG "   A1=%pM A2=%pM A3=%pM A4=%pM\n",
-	       rx->addr1, rx->addr2, rx->addr3, rx->addr4);
-
-	printk(KERN_DEBUG "   dst=%pM src=%pM len=%d\n",
-	       rx->dst_addr, rx->src_addr,
-	       __be16_to_cpu(rx->len));
+	pr_debug("   FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x data_len=%d%s%s\n",
+		 fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
+		 (fc & IEEE80211_FCTL_STYPE) >> 4,
+		 __le16_to_cpu(rx->duration_id), __le16_to_cpu(rx->seq_ctrl),
+		 __le16_to_cpu(rx->data_len),
+		 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
+		 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
+
+	pr_debug("   A1=%pM A2=%pM A3=%pM A4=%pM\n",
+		 rx->addr1, rx->addr2, rx->addr3, rx->addr4);
+
+	pr_debug("   dst=%pM src=%pM len=%d\n",
+		 rx->dst_addr, rx->src_addr, __be16_to_cpu(rx->len));
 }
 
 
@@ -556,27 +550,24 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
 {
 	u16 fc;
 
-	printk(KERN_DEBUG "%s: TX status=0x%04x retry_count=%d tx_rate=%d "
-	       "tx_control=0x%04x; jiffies=%ld\n",
-	       name, __le16_to_cpu(tx->status), tx->retry_count, tx->tx_rate,
-	       __le16_to_cpu(tx->tx_control), jiffies);
+	pr_debug("%s: TX status=0x%04x retry_count=%d tx_rate=%d tx_control=0x%04x; jiffies=%ld\n",
+		 name, __le16_to_cpu(tx->status), tx->retry_count, tx->tx_rate,
+		 __le16_to_cpu(tx->tx_control), jiffies);
 
 	fc = __le16_to_cpu(tx->frame_control);
-	printk(KERN_DEBUG "   FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x "
-	       "data_len=%d%s%s\n",
-	       fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
-	       (fc & IEEE80211_FCTL_STYPE) >> 4,
-	       __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl),
-	       __le16_to_cpu(tx->data_len),
-	       fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
-	       fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
-
-	printk(KERN_DEBUG "   A1=%pM A2=%pM A3=%pM A4=%pM\n",
-	       tx->addr1, tx->addr2, tx->addr3, tx->addr4);
-
-	printk(KERN_DEBUG "   dst=%pM src=%pM len=%d\n",
-	       tx->dst_addr, tx->src_addr,
-	       __be16_to_cpu(tx->len));
+	pr_debug("   FC=0x%04x (type=%d:%d) dur=0x%04x seq=0x%04x data_len=%d%s%s\n",
+		 fc, (fc & IEEE80211_FCTL_FTYPE) >> 2,
+		 (fc & IEEE80211_FCTL_STYPE) >> 4,
+		 __le16_to_cpu(tx->duration_id), __le16_to_cpu(tx->seq_ctrl),
+		 __le16_to_cpu(tx->data_len),
+		 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
+		 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
+
+	pr_debug("   A1=%pM A2=%pM A3=%pM A4=%pM\n",
+		 tx->addr1, tx->addr2, tx->addr3, tx->addr4);
+
+	pr_debug("   dst=%pM src=%pM len=%d\n",
+		 tx->dst_addr, tx->src_addr, __be16_to_cpu(tx->len));
 }
 
 
@@ -665,8 +656,8 @@ static int prism2_open(struct net_device *dev)
 	local = iface->local;
 
 	if (local->no_pri) {
-		printk(KERN_DEBUG "%s: could not set interface UP - no PRI "
-		       "f/w\n", dev->name);
+		pr_debug("%s: could not set interface UP - no PRI f/w\n",
+			 dev->name);
 		return 1;
 	}
 
@@ -679,8 +670,7 @@ static int prism2_open(struct net_device *dev)
 	local->num_dev_open++;
 
 	if (!local->dev_enabled && local->func->hw_enable(dev, 1)) {
-		printk(KERN_WARNING "%s: could not enable MAC port\n",
-		       dev->name);
+		pr_warn("%s: could not enable MAC port\n", dev->name);
 		prism2_close(dev);
 		return 1;
 	}
@@ -738,8 +728,8 @@ void hostap_set_multicast_list_queue(struct work_struct *work)
 
 	if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE,
 			    local->is_promisc)) {
-		printk(KERN_INFO "%s: %sabling promiscuous mode failed\n",
-		       dev->name, local->is_promisc ? "en" : "dis");
+		pr_info("%s: %sabling promiscuous mode failed\n",
+			dev->name, local->is_promisc ? "en" : "dis");
 	}
 }
 
@@ -786,14 +776,13 @@ static void prism2_tx_timeout(struct net_device *dev)
 	iface = netdev_priv(dev);
 	local = iface->local;
 
-	printk(KERN_WARNING "%s Tx timed out! Resetting card\n", dev->name);
+	pr_warn("%s Tx timed out! Resetting card\n", dev->name);
 	netif_stop_queue(local->dev);
 
 	local->func->read_regs(dev, &regs);
-	printk(KERN_DEBUG "%s: CMD=%04x EVSTAT=%04x "
-	       "OFFSET0=%04x OFFSET1=%04x SWSUPPORT0=%04x\n",
-	       dev->name, regs.cmd, regs.evstat, regs.offset0, regs.offset1,
-	       regs.swsupport0);
+	pr_debug("%s: CMD=%04x EVSTAT=%04x OFFSET0=%04x OFFSET1=%04x SWSUPPORT0=%04x\n",
+		 dev->name, regs.cmd, regs.evstat, regs.offset0, regs.offset1,
+		 regs.swsupport0);
 
 	local->func->schedule_reset(local);
 }
@@ -895,7 +884,7 @@ static int hostap_enable_hostapd(local_info_t *local, int rtnl_locked)
 	if (local->apdev)
 		return -EEXIST;
 
-	printk(KERN_DEBUG "%s: enabling hostapd mode\n", dev->name);
+	pr_debug("%s: enabling hostapd mode\n", dev->name);
 
 	local->apdev = hostap_add_interface(local, HOSTAP_INTERFACE_AP,
 					    rtnl_locked, local->ddev->name,
@@ -911,7 +900,7 @@ static int hostap_disable_hostapd(local_info_t *local, int rtnl_locked)
 {
 	struct net_device *dev = local->dev;
 
-	printk(KERN_DEBUG "%s: disabling hostapd mode\n", dev->name);
+	pr_debug("%s: disabling hostapd mode\n", dev->name);
 
 	hostap_remove_interface(local->apdev, rtnl_locked, 1);
 	local->apdev = NULL;
@@ -927,7 +916,7 @@ static int hostap_enable_hostapd_sta(local_info_t *local, int rtnl_locked)
 	if (local->stadev)
 		return -EEXIST;
 
-	printk(KERN_DEBUG "%s: enabling hostapd STA mode\n", dev->name);
+	pr_debug("%s: enabling hostapd STA mode\n", dev->name);
 
 	local->stadev = hostap_add_interface(local, HOSTAP_INTERFACE_STA,
 					     rtnl_locked, local->ddev->name,
@@ -943,7 +932,7 @@ static int hostap_disable_hostapd_sta(local_info_t *local, int rtnl_locked)
 {
 	struct net_device *dev = local->dev;
 
-	printk(KERN_DEBUG "%s: disabling hostapd mode\n", dev->name);
+	pr_debug("%s: disabling hostapd mode\n", dev->name);
 
 	hostap_remove_interface(local->stadev, rtnl_locked, 1);
 	local->stadev = NULL;
@@ -1103,8 +1092,7 @@ static int __init hostap_init(void)
 	if (init_net.proc_net != NULL) {
 		hostap_proc = proc_mkdir("hostap", init_net.proc_net);
 		if (!hostap_proc)
-			printk(KERN_WARNING "Failed to mkdir "
-			       "/proc/net/hostap\n");
+			pr_warn("Failed to mkdir /proc/net/hostap\n");
 	} else
 		hostap_proc = NULL;
 
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c
index 05ca340..e5bd77e 100644
--- a/drivers/net/wireless/hostap/hostap_pci.c
+++ b/drivers/net/wireless/hostap/hostap_pci.c
@@ -4,6 +4,8 @@
  * driver patches from Reyk Floeter <reyk@vantronix.net> and
  * Andy Warner <andyw@pobox.com> */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/if.h>
@@ -20,10 +22,6 @@
 
 #include "hostap_wlan.h"
 
-
-static char *dev_info = "hostap_pci";
-
-
 MODULE_AUTHOR("Jouni Malinen");
 MODULE_DESCRIPTION("Support for Intersil Prism2.5-based 802.11 wireless LAN "
 		   "PCI cards.");
@@ -226,7 +224,7 @@ static void prism2_pci_cor_sreset(local_info_t *local)
 	u16 reg;
 
 	reg = HFA384X_INB(HFA384X_PCICOR_OFF);
-	printk(KERN_DEBUG "%s: Original COR value: 0x%0x\n", dev->name, reg);
+	pr_debug("%s: Original COR value: 0x%0x\n", dev->name, reg);
 
 	/* linux-wlan-ng uses extremely long hold and settle times for
 	 * COR sreset. A comment in the driver code mentions that the long
@@ -260,7 +258,7 @@ static void prism2_pci_cor_sreset(local_info_t *local)
 #endif /* PRISM2_PCI_USE_LONG_DELAYS */
 
 	if (HFA384X_INW(HFA384X_CMD_OFF) & HFA384X_CMD_BUSY) {
-		printk(KERN_DEBUG "%s: COR sreset timeout\n", dev->name);
+		pr_debug("%s: COR sreset timeout\n", dev->name);
 	}
 }
 
@@ -309,13 +307,13 @@ static int prism2_pci_probe(struct pci_dev *pdev,
 	phymem = pci_resource_start(pdev, 0);
 
 	if (!request_mem_region(phymem, pci_resource_len(pdev, 0), "Prism2")) {
-		printk(KERN_ERR "prism2: Cannot reserve PCI memory region\n");
+		pr_err("prism2: Cannot reserve PCI memory region\n");
 		goto err_out_disable;
 	}
 
 	mem = pci_ioremap_bar(pdev, 0);
 	if (mem == NULL) {
-		printk(KERN_ERR "prism2: Cannot remap PCI memory region\n") ;
+		pr_err("prism2: Cannot remap PCI memory region\n") ;
 		goto fail;
 	}
 
@@ -338,19 +336,18 @@ static int prism2_pci_probe(struct pci_dev *pdev,
 
 	if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name,
 			dev)) {
-		printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
+		pr_warn("%s: request_irq failed\n", dev->name);
 		goto fail;
 	} else
 		irq_registered = 1;
 
 	if (!local->pri_only && prism2_hw_config(dev, 1)) {
-		printk(KERN_DEBUG "%s: hardware initialization failed\n",
-		       dev_info);
+		pr_debug("hardware initialization failed\n");
 		goto fail;
 	}
 
-	printk(KERN_INFO "%s: Intersil Prism2.5 PCI: "
-	       "mem=0x%lx, irq=%d\n", dev->name, phymem, dev->irq);
+	pr_info("%s: Intersil Prism2.5 PCI: mem=0x%lx, irq=%d\n",
+		dev->name, phymem, dev->irq);
 
 	return hostap_hw_ready(dev);
 
@@ -428,8 +425,7 @@ static int prism2_pci_resume(struct pci_dev *pdev)
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
-		       dev->name);
+		pr_err("%s: pci_enable_device failed on resume\n", dev->name);
 		return err;
 	}
 	pci_restore_state(pdev);
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c
index c3d067e..4cf0cfa 100644
--- a/drivers/net/wireless/hostap/hostap_plx.c
+++ b/drivers/net/wireless/hostap/hostap_plx.c
@@ -6,6 +6,7 @@
  * - linux-wlan-ng driver, Copyright (C) AbsoluteValue Systems, Inc.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/module.h>
 #include <linux/init.h>
@@ -23,10 +24,6 @@
 
 #include "hostap_wlan.h"
 
-
-static char *dev_info = "hostap_plx";
-
-
 MODULE_AUTHOR("Jouni Malinen");
 MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN "
 		   "cards (PLX).");
@@ -269,8 +266,7 @@ static void prism2_plx_cor_sreset(local_info_t *local)
 	unsigned char corsave;
 	struct hostap_plx_priv *hw_priv = local->hw_priv;
 
-	printk(KERN_DEBUG "%s: Doing reset via direct COR access.\n",
-	       dev_info);
+	pr_debug("Doing reset via direct COR access\n");
 
 	/* Set sreset bit of COR and clear it after hold time */
 
@@ -352,8 +348,8 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
 	/* read CIS; it is in even offsets in the beginning of attr_mem */
 	for (i = 0; i < CIS_MAX_LEN; i++)
 		cis[i] = readb(attr_mem + 2 * i);
-	printk(KERN_DEBUG "%s: CIS: %02x %02x %02x %02x %02x %02x ...\n",
-	       dev_info, cis[0], cis[1], cis[2], cis[3], cis[4], cis[5]);
+	pr_debug("CIS: %02x %02x %02x %02x %02x %02x ...\n",
+		 cis[0], cis[1], cis[2], cis[3], cis[4], cis[5]);
 
 	/* set reasonable defaults for Prism2 cards just in case CIS parsing
 	 * fails */
@@ -378,12 +374,10 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
 			*cor_offset = 0;
 			for (i = 0; i <= rasz; i++)
 				*cor_offset += cis[pos + 4 + i] << (8 * i);
-			printk(KERN_DEBUG "%s: cor_index=0x%x "
-			       "cor_offset=0x%x\n", dev_info,
-			       *cor_index, *cor_offset);
+			pr_debug("cor_index=0x%x cor_offset=0x%x\n",
+				 *cor_index, *cor_offset);
 			if (*cor_offset > attr_len) {
-				printk(KERN_ERR "%s: COR offset not within "
-				       "attr_mem\n", dev_info);
+				pr_err("COR offset not within attr_mem\n");
 				kfree(cis);
 				return -1;
 			}
@@ -394,8 +388,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
 				goto cis_error;
 			manfid1 = cis[pos + 2] + (cis[pos + 3] << 8);
 			manfid2 = cis[pos + 4] + (cis[pos + 5] << 8);
-			printk(KERN_DEBUG "%s: manfid=0x%04x, 0x%04x\n",
-			       dev_info, manfid1, manfid2);
+			pr_debug("manfid=0x%04x, 0x%04x\n", manfid1, manfid2);
 			break;
 		}
 
@@ -411,18 +404,17 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
 			return 0;
 		}
 
-	printk(KERN_INFO "%s: unknown manfid 0x%04x, 0x%04x - assuming this is"
-	       " not supported card\n", dev_info, manfid1, manfid2);
+	pr_info("unknown manfid 0x%04x, 0x%04x - assuming this is not supported card\n",
+		manfid1, manfid2);
 	goto fail;
 
  cis_error:
-	printk(KERN_WARNING "%s: invalid CIS data\n", dev_info);
+	pr_warn("invalid CIS data\n");
 
  fail:
 	kfree(cis);
 	if (ignore_cis) {
-		printk(KERN_INFO "%s: ignore_cis parameter set - ignoring "
-		       "errors during CIS verification\n", dev_info);
+		pr_info("ignore_cis parameter set - ignoring errors during CIS verification\n");
 		return 0;
 	}
 	return -1;
@@ -463,9 +455,8 @@ static int prism2_plx_probe(struct pci_dev *pdev,
 		/* TMD7160 */
 		attr_mem = NULL; /* no access to PC Card attribute memory */
 
-		printk(KERN_INFO "TMD7160 PCI/PCMCIA adapter: io=0x%x, "
-		       "irq=%d, pccard_io=0x%x\n",
-		       plx_ioaddr, pdev->irq, pccard_ioaddr);
+		pr_info("TMD7160 PCI/PCMCIA adapter: io=0x%x, irq=%d, pccard_io=0x%x\n",
+			plx_ioaddr, pdev->irq, pccard_ioaddr);
 
 		cor_offset = plx_ioaddr;
 		cor_index = 0x04;
@@ -474,8 +465,7 @@ static int prism2_plx_probe(struct pci_dev *pdev,
 		mdelay(1);
 		reg = inb(plx_ioaddr);
 		if (reg != (cor_index | COR_LEVLREQ | COR_ENABLE_FUNC)) {
-			printk(KERN_ERR "%s: Error setting COR (expected="
-			       "0x%02x, was=0x%02x)\n", dev_info,
+			pr_err("Error setting COR (expected=0x%02x, was=0x%02x)\n",
 			       cor_index | COR_LEVLREQ | COR_ENABLE_FUNC, reg);
 			goto fail;
 		}
@@ -489,24 +479,20 @@ static int prism2_plx_probe(struct pci_dev *pdev,
 
 		attr_mem = ioremap(pccard_attr_mem, pccard_attr_len);
 		if (attr_mem == NULL) {
-			printk(KERN_ERR "%s: cannot remap attr_mem\n",
-			       dev_info);
+			pr_err("cannot remap attr_mem\n");
 			goto fail;
 		}
 
-		printk(KERN_INFO "PLX9052 PCI/PCMCIA adapter: "
-		       "mem=0x%lx, plx_io=0x%x, irq=%d, pccard_io=0x%x\n",
-		       pccard_attr_mem, plx_ioaddr, pdev->irq, pccard_ioaddr);
+		pr_info("PLX9052 PCI/PCMCIA adapter: mem=0x%lx, plx_io=0x%x, irq=%d, pccard_io=0x%x\n",
+			pccard_attr_mem, plx_ioaddr, pdev->irq, pccard_ioaddr);
 
 		if (prism2_plx_check_cis(attr_mem, pccard_attr_len,
 					 &cor_offset, &cor_index)) {
-			printk(KERN_INFO "Unknown PC Card CIS - not a "
-			       "Prism2/2.5 card?\n");
+			pr_info("Unknown PC Card CIS - not a Prism2/2.5 card?\n");
 			goto fail;
 		}
 
-		printk(KERN_DEBUG "Prism2/2.5 PC Card detected in PLX9052 "
-		       "adapter\n");
+		pr_debug("Prism2/2.5 PC Card detected in PLX9052 adapter\n");
 
 		/* Write COR to enable PC Card */
 		writeb(cor_index | COR_LEVLREQ | COR_ENABLE_FUNC,
@@ -514,22 +500,20 @@ static int prism2_plx_probe(struct pci_dev *pdev,
 
 		/* Enable PCI interrupts if they are not already enabled */
 		reg = inl(plx_ioaddr + PLX_INTCSR);
-		printk(KERN_DEBUG "PLX_INTCSR=0x%x\n", reg);
+		pr_debug("PLX_INTCSR=0x%x\n", reg);
 		if (!(reg & PLX_INTCSR_PCI_INTEN)) {
 			outl(reg | PLX_INTCSR_PCI_INTEN,
 			     plx_ioaddr + PLX_INTCSR);
 			if (!(inl(plx_ioaddr + PLX_INTCSR) &
 			      PLX_INTCSR_PCI_INTEN)) {
-				printk(KERN_WARNING "%s: Could not enable "
-				       "Local Interrupts\n", dev_info);
+				pr_warn("Could not enable Local Interrupts\n");
 				goto fail;
 			}
 		}
 
 		reg = inl(plx_ioaddr + PLX_CNTRL);
-		printk(KERN_DEBUG "PLX_CNTRL=0x%x (Serial EEPROM "
-		       "present=%d)\n",
-		       reg, (reg & PLX_CNTRL_SERIAL_EEPROM_PRESENT) != 0);
+		pr_debug("PLX_CNTRL=0x%x (Serial EEPROM present=%d)\n",
+			 reg, (reg & PLX_CNTRL_SERIAL_EEPROM_PRESENT) != 0);
 		/* should set PLX_PCIIPR to 0x01 (INTA#) if Serial EEPROM is
 		 * not present; but are there really such cards in use(?) */
 	}
@@ -552,14 +536,13 @@ static int prism2_plx_probe(struct pci_dev *pdev,
 
 	if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name,
 			dev)) {
-		printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
+		pr_warn("%s: request_irq failed\n", dev->name);
 		goto fail;
 	} else
 		irq_registered = 1;
 
 	if (prism2_hw_config(dev, 1)) {
-		printk(KERN_DEBUG "%s: hardware initialization failed\n",
-		       dev_info);
+		pr_debug("hardware initialization failed\n");
 		goto fail;
 	}
 
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
index 75ef8f0..eb4bab5 100644
--- a/drivers/net/wireless/hostap/hostap_proc.c
+++ b/drivers/net/wireless/hostap/hostap_proc.c
@@ -1,5 +1,7 @@
 /* /proc routines for Host AP driver */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 #include <linux/export.h>
@@ -123,8 +125,8 @@ static int prism2_wds_proc_read(char *page, char **start, off_t off,
 			     iface->dev->name,
 			     iface->u.wds.remote_addr);
 		if ((p - page) > PROC_LIMIT) {
-			printk(KERN_DEBUG "%s: wds proc did not fit\n",
-			       local->dev->name);
+			pr_debug("%s: wds proc did not fit\n",
+				 local->dev->name);
 			break;
 		}
 	}
@@ -178,8 +180,8 @@ static int prism2_bss_list_proc_read(char *page, char **start, off_t off,
 		}
 		p += sprintf(p, "\n");
 		if ((p - page) > PROC_LIMIT) {
-			printk(KERN_DEBUG "%s: BSS proc did not fit\n",
-			       local->dev->name);
+			pr_debug("%s: BSS proc did not fit\n",
+				 local->dev->name);
 			break;
 		}
 	}
@@ -391,15 +393,15 @@ void hostap_init_proc(local_info_t *local)
 	local->proc = NULL;
 
 	if (hostap_proc == NULL) {
-		printk(KERN_WARNING "%s: hostap proc directory not created\n",
-		       local->dev->name);
+		pr_warn("%s: hostap proc directory not created\n",
+			local->dev->name);
 		return;
 	}
 
 	local->proc = proc_mkdir(local->ddev->name, hostap_proc);
 	if (local->proc == NULL) {
-		printk(KERN_INFO "/proc/net/hostap/%s creation failed\n",
-		       local->ddev->name);
+		pr_info("/proc/net/hostap/%s creation failed\n",
+			local->ddev->name);
 		return;
 	}
 
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h
index 7bb0b4b..738adc7 100644
--- a/drivers/net/wireless/hostap/hostap_wlan.h
+++ b/drivers/net/wireless/hostap/hostap_wlan.h
@@ -946,15 +946,17 @@ struct hostap_skb_tx_data {
 #define DEBUG_EXTRA2 BIT(6)
 #define DEBUG_PS2 BIT(7)
 #define DEBUG_MASK (DEBUG_PS | DEBUG_AP | DEBUG_HW | DEBUG_EXTRA)
-#define PDEBUG(n, args...) \
-do { if ((n) & DEBUG_MASK) printk(KERN_DEBUG args); } while (0)
-#define PDEBUG2(n, args...) \
-do { if ((n) & DEBUG_MASK) printk(args); } while (0)
+#define PDEBUG(n, fmt, ...)						\
+	do { if ((n) & DEBUG_MASK) pr_debug(fmt, ##__VA_ARGS__); } while (0)
+#define PDEBUG2(n, fmt, ...)						\
+	do { if ((n) & DEBUG_MASK) printk(fmt, ##__VA_ARGS__); } while (0)
 
 #else /* PRISM2_NO_DEBUG */
 
-#define PDEBUG(n, args...)
-#define PDEBUG2(n, args...)
+#define PDEBUG(n, fmt, ...)
+	do { if (0) pr_debug(fmt, ##__VA_ARGS__); } while (0)
+#define PDEBUG2(n, fmt, ...)
+	do { if (0) printk(fmt, ##__VA_ARGS__); } while (0)
 
 #endif /* PRISM2_NO_DEBUG */
 
@@ -1006,7 +1008,7 @@ static inline void prism2_io_debug_error(struct net_device *dev, int err)
 	prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_ERROR, 0, err);
 	if (local->io_debug_enabled == 1) {
 		local->io_debug_enabled = 0;
-		printk(KERN_DEBUG "%s: I/O debug stopped\n", dev->name);
+		pr_debug("%s: I/O debug stopped\n", dev->name);
 	}
 	spin_unlock_irqrestore(&local->lock, flags);
 }
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 08/20] ipw2x00: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Stanislav Yakovlev; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/ipw2x00/ipw2100.c       |  225 +++++++++++---------------
 drivers/net/wireless/ipw2x00/ipw2100.h       |    4 +-
 drivers/net/wireless/ipw2x00/ipw2200.c       |   54 +++----
 drivers/net/wireless/ipw2x00/ipw2200.h       |   36 +++--
 drivers/net/wireless/ipw2x00/libipw.h        |   24 ++-
 drivers/net/wireless/ipw2x00/libipw_geo.c    |    3 +
 drivers/net/wireless/ipw2x00/libipw_module.c |    9 +-
 drivers/net/wireless/ipw2x00/libipw_rx.c     |   49 +++---
 drivers/net/wireless/ipw2x00/libipw_tx.c     |   11 +-
 drivers/net/wireless/ipw2x00/libipw_wx.c     |    4 +-
 10 files changed, 197 insertions(+), 222 deletions(-)

diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 95aa8e1..064b16f 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -133,6 +133,8 @@ that only one external action is invoked at a time.
 
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
@@ -212,16 +214,21 @@ MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])");
 static u32 ipw2100_debug_level = IPW_DL_NONE;
 
 #ifdef CONFIG_IPW2100_DEBUG
-#define IPW_DEBUG(level, message...) \
-do { \
-	if (ipw2100_debug_level & (level)) { \
-		printk(KERN_DEBUG "ipw2100: %c %s ", \
-                       in_interrupt() ? 'I' : 'U',  __func__); \
-		printk(message); \
-	} \
+#define IPW_DEBUG(level, fmt, ...)					\
+do {									\
+	if (ipw2100_debug_level & (level))				\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U',  __func__,		\
+			 ##__VA_ARGS__);				\
 } while (0)
 #else
-#define IPW_DEBUG(level, message...) do {} while (0)
+#define IPW_DEBUG(level, fmt, ...)					\
+do {									\
+	if (0)								\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U',  __func__,		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #endif				/* CONFIG_IPW2100_DEBUG */
 
 #ifdef CONFIG_IPW2100_DEBUG
@@ -539,8 +546,7 @@ static int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
 	u32 total_length;
 
 	if (ordinals->table1_addr == 0) {
-		printk(KERN_WARNING DRV_NAME ": attempt to use fw ordinals "
-		       "before they have been loaded.\n");
+		pr_warn("attempt to use fw ordinals before they have been loaded\n");
 		return -EINVAL;
 	}
 
@@ -548,9 +554,8 @@ static int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
 		if (*len < IPW_ORD_TAB_1_ENTRY_SIZE) {
 			*len = IPW_ORD_TAB_1_ENTRY_SIZE;
 
-			printk(KERN_WARNING DRV_NAME
-			       ": ordinal buffer length too small, need %zd\n",
-			       IPW_ORD_TAB_1_ENTRY_SIZE);
+			pr_warn("ordinal buffer length too small, need %zd\n",
+				IPW_ORD_TAB_1_ENTRY_SIZE);
 
 			return -EINVAL;
 		}
@@ -601,8 +606,7 @@ static int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord,
 		return 0;
 	}
 
-	printk(KERN_WARNING DRV_NAME ": ordinal %d neither in table 1 nor "
-	       "in table 2\n", ord);
+	pr_warn("ordinal %d neither in table 1 nor in table 2\n", ord);
 
 	return -EINVAL;
 }
@@ -680,9 +684,9 @@ static void printk_buf(int level, const u8 * data, u32 len)
 		return;
 
 	while (len) {
-		printk(KERN_DEBUG "%s\n",
-		       snprint_line(line, sizeof(line), &data[ofs],
-				    min(len, 16U), ofs));
+		pr_debug("%s\n",
+			 snprint_line(line, sizeof(line), &data[ofs],
+				      min(len, 16U), ofs));
 		ofs += 16;
 		len -= min(len, 16U);
 	}
@@ -820,8 +824,7 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv,
 	}
 
 	if (priv->fatal_error) {
-		printk(KERN_WARNING DRV_NAME ": %s: firmware fatal error\n",
-		       priv->net_dev->name);
+		pr_warn("%s: firmware fatal error\n", priv->net_dev->name);
 		return -EIO;
 	}
 
@@ -1052,7 +1055,7 @@ static int ipw2100_download_firmware(struct ipw2100_priv *priv)
 	/* load microcode */
 	err = ipw2100_ucode_download(priv, &ipw2100_firmware);
 	if (err) {
-		printk(KERN_ERR DRV_NAME ": %s: Error loading microcode: %d\n",
+		pr_err("%s: Error loading microcode: %d\n",
 		       priv->net_dev->name, err);
 		goto fail;
 	}
@@ -1064,8 +1067,7 @@ static int ipw2100_download_firmware(struct ipw2100_priv *priv)
 	/* s/w reset and clock stabilization (again!!!) */
 	err = sw_reset_and_clock(priv);
 	if (err) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: sw_reset_and_clock failed: %d\n",
+		pr_err("%s: sw_reset_and_clock failed: %d\n",
 		       priv->net_dev->name, err);
 		goto fail;
 	}
@@ -1259,8 +1261,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
 	 * fw & dino ucode
 	 */
 	if (ipw2100_download_firmware(priv)) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: Failed to power on the adapter.\n",
+		pr_err("%s: Failed to power on the adapter\n",
 		       priv->net_dev->name);
 		return -EIO;
 	}
@@ -1319,9 +1320,8 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
 		     i ? "SUCCESS" : "FAILED");
 
 	if (!i) {
-		printk(KERN_WARNING DRV_NAME
-		       ": %s: Firmware did not initialize.\n",
-		       priv->net_dev->name);
+		pr_warn("%s: Firmware did not initialize\n",
+			priv->net_dev->name);
 		return -EIO;
 	}
 
@@ -1512,8 +1512,7 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
 
 		err = ipw2100_hw_phy_off(priv);
 		if (err)
-			printk(KERN_WARNING DRV_NAME
-			       ": Error disabling radio %d\n", err);
+			pr_warn("Error disabling radio %d\n", err);
 
 		/*
 		 * If in D0-standby mode going directly to D3 may cause a
@@ -1539,9 +1538,8 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
 
 		err = ipw2100_hw_send_command(priv, &cmd);
 		if (err)
-			printk(KERN_WARNING DRV_NAME ": "
-			       "%s: Power down command failed: Error %d\n",
-			       priv->net_dev->name, err);
+			pr_warn("%s: Power down command failed: Error %d\n",
+				priv->net_dev->name, err);
 		else
 			schedule_timeout_uninterruptible(HW_POWER_DOWN_DELAY);
 	}
@@ -1578,9 +1576,8 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
 	}
 
 	if (i == 0)
-		printk(KERN_WARNING DRV_NAME
-		       ": %s: Could now power down adapter.\n",
-		       priv->net_dev->name);
+		pr_warn("%s: Could now power down adapter\n",
+			priv->net_dev->name);
 
 	/* assert s/w reset */
 	write_register(priv->net_dev, IPW_REG_RESET_REG,
@@ -1617,15 +1614,13 @@ static int ipw2100_disable_adapter(struct ipw2100_priv *priv)
 
 	err = ipw2100_hw_send_command(priv, &cmd);
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       ": exit - failed to send CARD_DISABLE command\n");
+		pr_warn("exit - failed to send CARD_DISABLE command\n");
 		goto fail_up;
 	}
 
 	err = ipw2100_wait_for_card_state(priv, IPW_HW_STATE_DISABLED);
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       ": exit - card failed to change to DISABLED\n");
+		pr_warn("exit - card failed to change to DISABLED\n");
 		goto fail_up;
 	}
 
@@ -1758,9 +1753,8 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 	    (priv->status & STATUS_RESET_PENDING)) {
 		/* Power cycle the card ... */
 		if (ipw2100_power_cycle_adapter(priv)) {
-			printk(KERN_WARNING DRV_NAME
-			       ": %s: Could not cycle adapter.\n",
-			       priv->net_dev->name);
+			pr_warn("%s: Could not cycle adapter\n",
+				priv->net_dev->name);
 			rc = 1;
 			goto exit;
 		}
@@ -1769,8 +1763,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 
 	/* Load the firmware, start the clocks, etc. */
 	if (ipw2100_start_adapter(priv)) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: Failed to start the firmware.\n",
+		pr_err("%s: Failed to start the firmware\n",
 		       priv->net_dev->name);
 		rc = 1;
 		goto exit;
@@ -1780,8 +1773,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 
 	/* Determine capabilities of this particular HW configuration */
 	if (ipw2100_get_hw_features(priv)) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: Failed to determine HW features.\n",
+		pr_err("%s: Failed to determine HW features\n",
 		       priv->net_dev->name);
 		rc = 1;
 		goto exit;
@@ -1789,15 +1781,14 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 
 	/* Initialize the geo */
 	if (libipw_set_geo(priv->ieee, &ipw_geos[0])) {
-		printk(KERN_WARNING DRV_NAME "Could not set geo\n");
+		pr_warn("Could not set geo\n");
 		return 0;
 	}
 	priv->ieee->freq_band = LIBIPW_24GHZ_BAND;
 
 	lock = LOCK_NONE;
 	if (ipw2100_set_ordinal(priv, IPW_ORD_PERS_DB_LOCK, &lock, &ord_len)) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: Failed to clear ordinal lock.\n",
+		pr_err("%s: Failed to clear ordinal lock\n",
 		       priv->net_dev->name);
 		rc = 1;
 		goto exit;
@@ -1806,7 +1797,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 	priv->status &= ~STATUS_SCANNING;
 
 	if (rf_kill_active(priv)) {
-		printk(KERN_INFO "%s: Radio is disabled by RF switch.\n",
+		pr_info("%s: Radio is disabled by RF switch\n",
 		       priv->net_dev->name);
 
 		if (priv->stop_rf_kill) {
@@ -1824,7 +1815,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 	/* Send all of the commands that must be sent prior to
 	 * HOST_COMPLETE */
 	if (ipw2100_adapter_setup(priv)) {
-		printk(KERN_ERR DRV_NAME ": %s: Failed to start the card.\n",
+		pr_err("%s: Failed to start the card\n",
 		       priv->net_dev->name);
 		rc = 1;
 		goto exit;
@@ -1833,8 +1824,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
 	if (!deferred) {
 		/* Enable the adapter - sends HOST_COMPLETE */
 		if (ipw2100_enable_adapter(priv)) {
-			printk(KERN_ERR DRV_NAME ": "
-			       "%s: failed in call to enable adapter.\n",
+			pr_err("%s: failed in call to enable adapter\n",
 			       priv->net_dev->name);
 			ipw2100_hw_stop_adapter(priv);
 			rc = 1;
@@ -1882,8 +1872,7 @@ static void ipw2100_down(struct ipw2100_priv *priv)
 	spin_unlock_irqrestore(&priv->low_lock, flags);
 
 	if (ipw2100_hw_stop_adapter(priv))
-		printk(KERN_ERR DRV_NAME ": %s: Error stopping adapter.\n",
-		       priv->net_dev->name);
+		pr_err("%s: Error stopping adapter\n", priv->net_dev->name);
 
 	/* Do not disable the interrupt until _after_ we disable
 	 * the adaptor.  Otherwise the CARD_DISABLE command will never
@@ -2540,9 +2529,8 @@ static void isr_rx(struct ipw2100_priv *priv, int i,
 
 	/* We need to allocate a new SKB and attach it to the RDB. */
 	if (unlikely(ipw2100_alloc_skb(priv, packet))) {
-		printk(KERN_WARNING DRV_NAME ": "
-		       "%s: Unable to allocate SKB onto RBD ring - disabling "
-		       "adapter.\n", dev->name);
+		pr_warn("%s: Unable to allocate SKB onto RBD ring - disabling adapter\n",
+			dev->name);
 		/* TODO: schedule adapter shutdown */
 		IPW_DEBUG_INFO("TODO: Shutdown adapter...\n");
 	}
@@ -2871,8 +2859,7 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv)
 		break;
 
 	default:
-		printk(KERN_WARNING DRV_NAME ": %s: Bad fw_pend_list entry!\n",
-		       priv->net_dev->name);
+		pr_warn("%s: Bad fw_pend_list entry!\n", priv->net_dev->name);
 		return 0;
 	}
 
@@ -2885,8 +2872,7 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv)
 	read_register(priv->net_dev, IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX,
 		      &w);
 	if (w != txq->next)
-		printk(KERN_WARNING DRV_NAME ": %s: write index mismatch\n",
-		       priv->net_dev->name);
+		pr_warn("%s: write index mismatch\n", priv->net_dev->name);
 
 	/*
 	 * txq->next is the index of the last packet written txq->oldest is
@@ -2942,10 +2928,9 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv)
 	switch (packet->type) {
 	case DATA:
 		if (txq->drv[txq->oldest].status.info.fields.txType != 0)
-			printk(KERN_WARNING DRV_NAME ": %s: Queue mismatch.  "
-			       "Expecting DATA TBD but pulled "
-			       "something else: ids %d=%d.\n",
-			       priv->net_dev->name, txq->oldest, packet->index);
+			pr_warn("%s: Queue mismatch.  Expecting DATA TBD but pulled something else: ids %d=%d\n",
+				priv->net_dev->name,
+				txq->oldest, packet->index);
 
 		/* DATA packet; we have to unmap and free the SKB */
 		for (i = 0; i < frag_num; i++) {
@@ -2979,10 +2964,9 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv)
 
 	case COMMAND:
 		if (txq->drv[txq->oldest].status.info.fields.txType != 1)
-			printk(KERN_WARNING DRV_NAME ": %s: Queue mismatch.  "
-			       "Expecting COMMAND TBD but pulled "
-			       "something else: ids %d=%d.\n",
-			       priv->net_dev->name, txq->oldest, packet->index);
+			pr_warn("%s: Queue mismatch.  Expecting COMMAND TBD but pulled something else: ids %d=%d\n",
+				priv->net_dev->name,
+				txq->oldest, packet->index);
 
 #ifdef CONFIG_IPW2100_DEBUG
 		if (packet->info.c_struct.cmd->host_command_reg <
@@ -3020,9 +3004,8 @@ static inline void __ipw2100_tx_complete(struct ipw2100_priv *priv)
 		i++;
 
 	if (i == 200) {
-		printk(KERN_WARNING DRV_NAME ": "
-		       "%s: Driver is running slow (%d iters).\n",
-		       priv->net_dev->name, i);
+		pr_warn("%s: Driver is running slow (%d iters)\n",
+			priv->net_dev->name, i);
 	}
 }
 
@@ -3258,8 +3241,7 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
 		      (unsigned long)inta & IPW_INTERRUPT_MASK);
 
 	if (inta & IPW2100_INTA_FATAL_ERROR) {
-		printk(KERN_WARNING DRV_NAME
-		       ": Fatal interrupt. Scheduling firmware restart.\n");
+		pr_warn("Fatal interrupt. Scheduling firmware restart.\n");
 		priv->inta_other++;
 		write_register(dev, IPW_REG_INTA, IPW2100_INTA_FATAL_ERROR);
 
@@ -3276,8 +3258,7 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
 	}
 
 	if (inta & IPW2100_INTA_PARITY_ERROR) {
-		printk(KERN_ERR DRV_NAME
-		       ": ***** PARITY ERROR INTERRUPT !!!!\n");
+		pr_err("***** PARITY ERROR INTERRUPT !!!!\n");
 		priv->inta_other++;
 		write_register(dev, IPW_REG_INTA, IPW2100_INTA_PARITY_ERROR);
 	}
@@ -3379,7 +3360,7 @@ static irqreturn_t ipw2100_interrupt(int irq, void *data)
 
 	if (inta == 0xFFFFFFFF) {
 		/* Hardware disappeared */
-		printk(KERN_WARNING DRV_NAME ": IRQ INTA == 0xFFFFFFFF\n");
+		pr_warn("IRQ INTA == 0xFFFFFFFF\n");
 		goto none;
 	}
 
@@ -3468,9 +3449,8 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
 		v = pci_alloc_consistent(priv->pci_dev,
 					 sizeof(struct ipw2100_cmd_header), &p);
 		if (!v) {
-			printk(KERN_ERR DRV_NAME ": "
-			       "%s: PCI alloc failed for msg "
-			       "buffers.\n", priv->net_dev->name);
+			pr_err("%s: PCI alloc failed for msg buffers\n",
+			       priv->net_dev->name);
 			err = -ENOMEM;
 			break;
 		}
@@ -4040,7 +4020,7 @@ static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode)
 
 	err = ipw2100_disable_adapter(priv);
 	if (err) {
-		printk(KERN_ERR DRV_NAME ": %s: Could not disable adapter %d\n",
+		pr_err("%s: Could not disable adapter %d\n",
 		       priv->net_dev->name, err);
 		return err;
 	}
@@ -4068,7 +4048,7 @@ static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode)
 	ipw2100_firmware.version = 0;
 #endif
 
-	printk(KERN_INFO "%s: Resetting on mode change.\n", priv->net_dev->name);
+	pr_info("%s: Resetting on mode change\n", priv->net_dev->name);
 	priv->reset_backoff = 0;
 	schedule_reset(priv);
 
@@ -4486,8 +4466,7 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
 	    kmalloc(TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet),
 		    GFP_ATOMIC);
 	if (!priv->tx_buffers) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: alloc failed form tx buffers.\n",
+		pr_err("%s: alloc failed form tx buffers\n",
 		       priv->net_dev->name);
 		bd_queue_free(priv, &priv->tx_queue);
 		return -ENOMEM;
@@ -4498,8 +4477,7 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
 					 sizeof(struct ipw2100_data_header),
 					 &p);
 		if (!v) {
-			printk(KERN_ERR DRV_NAME
-			       ": %s: PCI alloc failed for tx " "buffers.\n",
+			pr_err("%s: PCI alloc failed for tx buffers\n",
 			       priv->net_dev->name);
 			err = -ENOMEM;
 			break;
@@ -4809,8 +4787,7 @@ static int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type,
 	if (!batch_mode) {
 		err = ipw2100_disable_adapter(priv);
 		if (err) {
-			printk(KERN_ERR DRV_NAME
-			       ": %s: Could not disable adapter %d\n",
+			pr_err("%s: Could not disable adapter %d\n",
 			       priv->net_dev->name, err);
 			return err;
 		}
@@ -5390,8 +5367,7 @@ static int ipw2100_set_wep_flags(struct ipw2100_priv *priv, u32 flags,
 	if (!batch_mode) {
 		err = ipw2100_disable_adapter(priv);
 		if (err) {
-			printk(KERN_ERR DRV_NAME
-			       ": %s: Could not disable adapter %d\n",
+			pr_err("%s: Could not disable adapter %d\n",
 			       priv->net_dev->name, err);
 			return err;
 		}
@@ -5478,8 +5454,7 @@ static int ipw2100_set_key(struct ipw2100_priv *priv,
 		err = ipw2100_disable_adapter(priv);
 		/* FIXME: IPG: shouldn't this prink be in _disable_adapter()? */
 		if (err) {
-			printk(KERN_ERR DRV_NAME
-			       ": %s: Could not disable adapter %d\n",
+			pr_err("%s: Could not disable adapter %d\n",
 			       priv->net_dev->name, err);
 			return err;
 		}
@@ -5515,8 +5490,7 @@ static int ipw2100_set_key_index(struct ipw2100_priv *priv,
 	if (!batch_mode) {
 		err = ipw2100_disable_adapter(priv);
 		if (err) {
-			printk(KERN_ERR DRV_NAME
-			       ": %s: Could not disable adapter %d\n",
+			pr_err("%s: Could not disable adapter %d\n",
 			       priv->net_dev->name, err);
 			return err;
 		}
@@ -6232,8 +6206,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 
 	ioaddr = pci_iomap(pci_dev, 0, 0);
 	if (!ioaddr) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling ioremap_nocache.\n");
+		pr_warn("Error calling ioremap_nocache\n");
 		err = -EIO;
 		goto fail;
 	}
@@ -6241,8 +6214,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 	/* allocate and initialize our net_device */
 	dev = ipw2100_alloc_device(pci_dev, ioaddr);
 	if (!dev) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling ipw2100_alloc_device.\n");
+		pr_warn("Error calling ipw2100_alloc_device\n");
 		err = -ENOMEM;
 		goto fail;
 	}
@@ -6250,8 +6222,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 	/* set up PCI mappings for device */
 	err = pci_enable_device(pci_dev);
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling pci_enable_device.\n");
+		pr_warn("Error calling pci_enable_device\n");
 		return err;
 	}
 
@@ -6262,16 +6233,14 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 
 	err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling pci_set_dma_mask.\n");
+		pr_warn("Error calling pci_set_dma_mask\n");
 		pci_disable_device(pci_dev);
 		return err;
 	}
 
 	err = pci_request_regions(pci_dev, DRV_NAME);
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling pci_request_regions.\n");
+		pr_warn("Error calling pci_request_regions\n");
 		pci_disable_device(pci_dev);
 		return err;
 	}
@@ -6285,8 +6254,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 	pci_set_power_state(pci_dev, PCI_D0);
 
 	if (!ipw2100_hw_is_adapter_in_system(dev)) {
-		printk(KERN_WARNING DRV_NAME
-		       "Device not found via register read.\n");
+		pr_warn("Device not found via register read\n");
 		err = -ENODEV;
 		goto fail;
 	}
@@ -6299,8 +6267,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 
 	/* Allocate and initialize the Tx/Rx queues and lists */
 	if (ipw2100_queues_allocate(priv)) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling ipw2100_queues_allocate.\n");
+		pr_warn("Error calling ipw2100_queues_allocate\n");
 		err = -ENOMEM;
 		goto fail;
 	}
@@ -6309,16 +6276,14 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 	err = request_irq(pci_dev->irq,
 			  ipw2100_interrupt, IRQF_SHARED, dev->name, priv);
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling request_irq: %d.\n", pci_dev->irq);
+		pr_warn("Error calling request_irq: %d\n", pci_dev->irq);
 		goto fail;
 	}
 	dev->irq = pci_dev->irq;
 
 	IPW_DEBUG_INFO("Attempting to register device...\n");
 
-	printk(KERN_INFO DRV_NAME
-	       ": Detected Intel PRO/Wireless 2100 Network Connection\n");
+	pr_info("Detected Intel PRO/Wireless 2100 Network Connection\n");
 
 	err = ipw2100_up(priv, 1);
 	if (err)
@@ -6336,8 +6301,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 	 */
 	err = register_netdev(dev);
 	if (err) {
-		printk(KERN_WARNING DRV_NAME
-		       "Error calling register_netdev.\n");
+		pr_warn("Error calling register_netdev\n");
 		goto fail;
 	}
 	registered = 2;
@@ -6356,9 +6320,8 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
 	if (!(priv->status & STATUS_RF_KILL_MASK)) {
 		/* Enable the adapter - sends HOST_COMPLETE */
 		if (ipw2100_enable_adapter(priv)) {
-			printk(KERN_WARNING DRV_NAME
-			       ": %s: failed in call to enable adapter.\n",
-			       priv->net_dev->name);
+			pr_warn("%s: failed in call to enable adapter\n",
+				priv->net_dev->name);
 			ipw2100_hw_stop_adapter(priv);
 			err = -EIO;
 			goto fail_unlock;
@@ -6509,7 +6472,7 @@ static int ipw2100_resume(struct pci_dev *pci_dev)
 	pci_set_power_state(pci_dev, PCI_D0);
 	err = pci_enable_device(pci_dev);
 	if (err) {
-		printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
+		pr_err("%s: pci_enable_device failed on resume\n",
 		       dev->name);
 		mutex_unlock(&priv->action_mutex);
 		return err;
@@ -6631,8 +6594,8 @@ static int __init ipw2100_init(void)
 {
 	int ret;
 
-	printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
-	printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);
+	pr_info("%s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
+	pr_info("%s\n", DRV_COPYRIGHT);
 
 	pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
 			   PM_QOS_DEFAULT_VALUE);
@@ -8433,10 +8396,8 @@ static int ipw2100_mod_firmware_load(struct ipw2100_fw *fw)
 	    (struct ipw2100_fw_header *)fw->fw_entry->data;
 
 	if (IPW2100_FW_MAJOR(h->version) != IPW2100_FW_MAJOR_VERSION) {
-		printk(KERN_WARNING DRV_NAME ": Firmware image not compatible "
-		       "(detected version id of %u). "
-		       "See Documentation/networking/README.ipw2100\n",
-		       h->version);
+		pr_warn("Firmware image not compatible (detected version id of %u). See Documentation/networking/README.ipw2100\n",
+			h->version);
 		return 1;
 	}
 
@@ -8476,8 +8437,7 @@ static int ipw2100_get_firmware(struct ipw2100_priv *priv,
 	rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev);
 
 	if (rc < 0) {
-		printk(KERN_ERR DRV_NAME ": "
-		       "%s: Firmware '%s' not available or load failed.\n",
+		pr_err("%s: Firmware '%s' not available or load failed\n",
 		       priv->net_dev->name, fw_name);
 		return rc;
 	}
@@ -8562,8 +8522,7 @@ static int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw)
 		firmware_data_left -= 2;
 
 		if (len > 32) {
-			printk(KERN_ERR DRV_NAME ": "
-			       "Invalid firmware run-length of %d bytes\n",
+			pr_err("Invalid firmware run-length of %d bytes\n",
 			       len);
 			return -EINVAL;
 		}
@@ -8674,8 +8633,7 @@ static int ipw2100_ucode_download(struct ipw2100_priv *priv,
 	}
 
 	if (i == 10) {
-		printk(KERN_ERR DRV_NAME ": %s: Error initializing Symbol\n",
-		       dev->name);
+		pr_err("%s: Error initializing Symbol\n", dev->name);
 		return -EIO;
 	}
 
@@ -8692,8 +8650,7 @@ static int ipw2100_ucode_download(struct ipw2100_priv *priv,
 	}
 
 	if (i == 30) {
-		printk(KERN_ERR DRV_NAME
-		       ": %s: No response from Symbol - hw not alive\n",
+		pr_err("%s: No response from Symbol - hw not alive\n",
 		       dev->name);
 		printk_buf(IPW_DL_ERROR, (u8 *) & response, sizeof(response));
 		return -EIO;
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.h b/drivers/net/wireless/ipw2x00/ipw2100.h
index 9731252..a978791 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.h
+++ b/drivers/net/wireless/ipw2x00/ipw2100.h
@@ -108,8 +108,8 @@ struct ipw2100_rx_packet;
 #define IPW_DL_IO            (1<<26)
 #define IPW_DL_TRACE         (1<<28)
 
-#define IPW_DEBUG_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a)
-#define IPW_DEBUG_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a)
+#define IPW_DEBUG_ERROR(f, a...) pr_err(f, ## a)
+#define IPW_DEBUG_WARNING(f, a...) pr_warn(f, ## a)
 #define IPW_DEBUG_INFO(f...)    IPW_DEBUG(IPW_DL_INFO, ## f)
 #define IPW_DEBUG_WX(f...)     IPW_DEBUG(IPW_DL_WX, ## f)
 #define IPW_DEBUG_SCAN(f...)   IPW_DEBUG(IPW_DL_SCAN, ## f)
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 254b892..43e2e51 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -30,6 +30,8 @@
 
 ******************************************************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <net/cfg80211-wext.h>
@@ -1214,8 +1216,7 @@ static ssize_t store_debug_level(struct device_driver *d, const char *buf,
 	} else
 		val = simple_strtoul(p, &p, 10);
 	if (p == buf)
-		printk(KERN_INFO DRV_NAME
-		       ": %s is not in hex or decimal form.\n", buf);
+		pr_info("%s is not in hex or decimal form\n", buf);
 	else
 		ipw_debug_level = val;
 
@@ -5229,8 +5230,8 @@ static void ipw_rx_queue_replenish(void *data)
 		rxb = list_entry(element, struct ipw_rx_mem_buffer, list);
 		rxb->skb = alloc_skb(IPW_RX_BUF_SIZE, GFP_ATOMIC);
 		if (!rxb->skb) {
-			printk(KERN_CRIT "%s: Can not allocate SKB buffers.\n",
-			       priv->net_dev->name);
+			pr_crit("%s: Can not allocate SKB buffers\n",
+				priv->net_dev->name);
 			/* We don't reschedule replenish work here -- we will
 			 * call the restock method and if it still needs
 			 * more buffers it will schedule replenish */
@@ -7795,8 +7796,7 @@ static void ipw_rebuild_decrypted_skb(struct ipw_priv *priv,
 	case SEC_LEVEL_0:
 		break;
 	default:
-		printk(KERN_ERR "Unknown security level %d\n",
-		       priv->ieee->sec.level);
+		pr_err("Unknown security level %d\n", priv->ieee->sec.level);
 		break;
 	}
 }
@@ -8394,7 +8394,7 @@ static void ipw_rx(struct ipw_priv *priv)
 	while (i != r) {
 		rxb = priv->rxq->queue[i];
 		if (unlikely(rxb == NULL)) {
-			printk(KERN_CRIT "Queue not allocated!\n");
+			pr_crit("Queue not allocated!\n");
 			break;
 		}
 		priv->rxq->queue[i] = NULL;
@@ -8666,9 +8666,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
 	if ((priv->pci_dev->device == 0x4223) ||
 	    (priv->pci_dev->device == 0x4224)) {
 		if (option == 1)
-			printk(KERN_INFO DRV_NAME
-			       ": Detected Intel PRO/Wireless 2915ABG Network "
-			       "Connection\n");
+			pr_info("Detected Intel PRO/Wireless 2915ABG Network Connection\n");
 		priv->ieee->abg_true = 1;
 		band = LIBIPW_52GHZ_BAND | LIBIPW_24GHZ_BAND;
 		modulation = LIBIPW_OFDM_MODULATION |
@@ -8677,9 +8675,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option)
 		priv->ieee->mode = IEEE_A | IEEE_G | IEEE_B;
 	} else {
 		if (option == 1)
-			printk(KERN_INFO DRV_NAME
-			       ": Detected Intel PRO/Wireless 2200BG Network "
-			       "Connection\n");
+			pr_info("Detected Intel PRO/Wireless 2200BG Network Connection\n");
 
 		priv->ieee->abg_true = 0;
 		band = LIBIPW_24GHZ_BAND;
@@ -10333,7 +10329,7 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct libipw_txb *txb,
 		case SEC_LEVEL_0:
 			break;
 		default:
-			printk(KERN_ERR "Unknown security level %d\n",
+			pr_err("Unknown security level %d\n",
 			       priv->ieee->sec.level);
 			break;
 		}
@@ -10379,16 +10375,14 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct libipw_txb *txb,
 		for (j = i; j < txb->nr_frags; j++)
 			remaining_bytes += txb->fragments[j]->len - hdr_len;
 
-		printk(KERN_INFO "Trying to reallocate for %d bytes\n",
-		       remaining_bytes);
+		pr_info("Trying to reallocate for %d bytes\n", remaining_bytes);
 		skb = alloc_skb(remaining_bytes, GFP_ATOMIC);
 		if (skb != NULL) {
 			tfd->u.data.chunk_len[i] = cpu_to_le16(remaining_bytes);
 			for (j = i; j < txb->nr_frags; j++) {
 				int size = txb->fragments[j]->len - hdr_len;
 
-				printk(KERN_INFO "Adding frag %d %d...\n",
-				       j, size);
+				pr_info("Adding frag %d %d...\n", j, size);
 				memcpy(skb_put(skb, size),
 				       txb->fragments[j]->data + hdr_len, size);
 			}
@@ -10555,8 +10549,8 @@ static int ipw_net_set_mac_address(struct net_device *dev, void *p)
 	mutex_lock(&priv->mutex);
 	priv->config |= CFG_CUSTOM_MAC;
 	memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN);
-	printk(KERN_INFO "%s: Setting MAC to %pM\n",
-	       priv->net_dev->name, priv->mac_addr);
+	pr_info("%s: Setting MAC to %pM\n",
+		priv->net_dev->name, priv->mac_addr);
 	schedule_work(&priv->adapter_restart);
 	mutex_unlock(&priv->mutex);
 	return 0;
@@ -11770,7 +11764,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
 	if (!err)
 		err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
 	if (err) {
-		printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");
+		pr_warn("No suitable DMA available\n");
 		goto out_pci_disable_device;
 	}
 
@@ -11876,10 +11870,9 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
 	}
 #endif
 
-	printk(KERN_INFO DRV_NAME ": Detected geography %s (%d 802.11bg "
-	       "channels, %d 802.11a channels)\n",
-	       priv->ieee->geo.name, priv->ieee->geo.bg_channels,
-	       priv->ieee->geo.a_channels);
+	pr_info("Detected geography %s (%d 802.11bg channels, %d 802.11a channels)\n",
+		priv->ieee->geo.name, priv->ieee->geo.bg_channels,
+		priv->ieee->geo.a_channels);
 
 	return 0;
 
@@ -11993,7 +11986,7 @@ static int ipw_pci_suspend(struct pci_dev *pdev, pm_message_t state)
 	struct ipw_priv *priv = pci_get_drvdata(pdev);
 	struct net_device *dev = priv->net_dev;
 
-	printk(KERN_INFO "%s: Going into suspend...\n", dev->name);
+	pr_info("%s: Going into suspend...\n", dev->name);
 
 	/* Take down the device; powers it off, etc. */
 	ipw_down(priv);
@@ -12017,13 +12010,12 @@ static int ipw_pci_resume(struct pci_dev *pdev)
 	int err;
 	u32 val;
 
-	printk(KERN_INFO "%s: Coming out of suspend...\n", dev->name);
+	pr_info("%s: Coming out of suspend...\n", dev->name);
 
 	pci_set_power_state(pdev, PCI_D0);
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
-		       dev->name);
+		pr_err("%s: pci_enable_device failed on resume\n", dev->name);
 		return err;
 	}
 	pci_restore_state(pdev);
@@ -12078,8 +12070,8 @@ static int __init ipw_init(void)
 {
 	int ret;
 
-	printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n");
-	printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n");
+	pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
+	pr_info(DRV_COPYRIGHT "\n");
 
 	ret = pci_register_driver(&ipw_driver);
 	if (ret) {
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.h b/drivers/net/wireless/ipw2x00/ipw2200.h
index 570d6fb..4fe0811 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.h
+++ b/drivers/net/wireless/ipw2x00/ipw2200.h
@@ -1395,18 +1395,30 @@ BITC(x,19),BITC(x,18),BITC(x,17),BITC(x,16),\
 BIT_ARG16(x)
 
 
-#define IPW_DEBUG(level, fmt, args...) \
-do { if (ipw_debug_level & (level)) \
-  printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
+#define IPW_DEBUG(level, fmt, ...)					\
+do {									\
+	if (ipw_debug_level & (level))					\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U', __func__,		\
+			 ##__VA_ARGS__);				\
+} while (0)
 
 #ifdef CONFIG_IPW2200_DEBUG
-#define IPW_LL_DEBUG(level, fmt, args...) \
-do { if (ipw_debug_level & (level)) \
-  printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
+#define IPW_LL_DEBUG(level, fmt, ...)					\
+do {									\
+	if (ipw_debug_level & (level))					\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U', __func__,		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #else
-#define IPW_LL_DEBUG(level, fmt, args...) do {} while (0)
+#define IPW_LL_DEBUG(level, fmt, ...)					\
+do {									\
+	if (0)								\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U', __func__,		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #endif				/* CONFIG_IPW2200_DEBUG */
 
 /*
@@ -1470,10 +1482,10 @@ do { if (ipw_debug_level & (level)) \
 #define IPW_DL_MERGE         (1<<30)
 #define IPW_DL_QOS           (1<<31)
 
-#define IPW_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a)
-#define IPW_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a)
-#define IPW_DEBUG_INFO(f, a...)    IPW_DEBUG(IPW_DL_INFO, f, ## a)
+#define IPW_ERROR(fmt, ...)		pr_err(fmt, ##__VA_ARGS__)
+#define IPW_WARNING(fmt, ...)		pr_warn(fmt, ##__VA_ARGS__)
 
+#define IPW_DEBUG_INFO(f, a...)   IPW_DEBUG(IPW_DL_INFO, f, ## a)
 #define IPW_DEBUG_WX(f, a...)     IPW_DEBUG(IPW_DL_WX, f, ## a)
 #define IPW_DEBUG_SCAN(f, a...)   IPW_DEBUG(IPW_DL_SCAN, f, ## a)
 #define IPW_DEBUG_TRACE(f, a...)  IPW_LL_DEBUG(IPW_DL_TRACE, f, ## a)
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h
index 0b22fb4..1b4bfa2 100644
--- a/drivers/net/wireless/ipw2x00/libipw.h
+++ b/drivers/net/wireless/ipw2x00/libipw.h
@@ -62,12 +62,21 @@
 
 #ifdef CONFIG_LIBIPW_DEBUG
 extern u32 libipw_debug_level;
-#define LIBIPW_DEBUG(level, fmt, args...) \
-do { if (libipw_debug_level & (level)) \
-  printk(KERN_DEBUG "libipw: %c %s " fmt, \
-         in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
+#define LIBIPW_DEBUG(level, fmt, ...)					\
+do {									\
+	if (libipw_debug_level & (level))				\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U', __func__ ,		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #else
-#define LIBIPW_DEBUG(level, fmt, args...) do {} while (0)
+#define LIBIPW_DEBUG(level, fmt, ...)					\
+do {									\
+	if (0)								\
+		pr_debug("%c %s " fmt,					\
+			 in_interrupt() ? 'I' : 'U', __func__ ,		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #endif				/* CONFIG_LIBIPW_DEBUG */
 
 /*
@@ -108,8 +117,9 @@ do { if (libipw_debug_level & (level)) \
 #define LIBIPW_DL_RX            (1<<9)
 #define LIBIPW_DL_QOS           (1<<31)
 
-#define LIBIPW_ERROR(f, a...) printk(KERN_ERR "libipw: " f, ## a)
-#define LIBIPW_WARNING(f, a...) printk(KERN_WARNING "libipw: " f, ## a)
+#define LIBIPW_ERROR(f, a...) pr_err(f, ## a)
+#define LIBIPW_WARNING(f, a...) pr_warn(f, ## a)
+
 #define LIBIPW_DEBUG_INFO(f, a...)   LIBIPW_DEBUG(LIBIPW_DL_INFO, f, ## a)
 
 #define LIBIPW_DEBUG_WX(f, a...)     LIBIPW_DEBUG(LIBIPW_DL_WX, f, ## a)
diff --git a/drivers/net/wireless/ipw2x00/libipw_geo.c b/drivers/net/wireless/ipw2x00/libipw_geo.c
index c9fe3c9..c3465a6 100644
--- a/drivers/net/wireless/ipw2x00/libipw_geo.c
+++ b/drivers/net/wireless/ipw2x00/libipw_geo.c
@@ -23,6 +23,9 @@
   Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 
 ******************************************************************************/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c
index 3adb240..854298d 100644
--- a/drivers/net/wireless/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/ipw2x00/libipw_module.c
@@ -30,6 +30,8 @@
 
 *******************************************************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
@@ -269,8 +271,7 @@ static ssize_t debug_level_proc_write(struct file *file,
 		return count;
 	buf[len] = 0;
 	if (sscanf(buf, "%li", &val) != 1)
-		printk(KERN_INFO DRV_NAME
-		       ": %s is not in hex or decimal form.\n", buf);
+		pr_info("%s is not in hex or decimal form\n", buf);
 	else
 		libipw_debug_level = val;
 
@@ -308,8 +309,8 @@ static int __init libipw_init(void)
 	}
 #endif				/* CONFIG_LIBIPW_DEBUG */
 
-	printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n");
-	printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n");
+	pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
+	pr_info(DRV_COPYRIGHT "\n");
 
 	return 0;
 }
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
index 02e0579..9d03758 100644
--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
@@ -13,6 +13,8 @@
  * more details.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
@@ -172,8 +174,8 @@ libipw_rx_frame_mgmt(struct libipw_device *ieee, struct sk_buff *skb,
 			u16 stype)
 {
 	if (ieee->iw_mode == IW_MODE_MASTER) {
-		printk(KERN_DEBUG "%s: Master mode not yet supported.\n",
-		       ieee->dev->name);
+		pr_debug("%s: Master mode not yet supported\n",
+			 ieee->dev->name);
 		return 0;
 /*
   hostap_update_sta_ps(ieee, (struct hostap_libipw_hdr_4addr *)
@@ -201,9 +203,8 @@ libipw_rx_frame_mgmt(struct libipw_device *ieee, struct sk_buff *skb,
 
 	if (ieee->iw_mode == IW_MODE_MASTER) {
 		if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
-			printk(KERN_DEBUG "%s: unknown management frame "
-			       "(type=0x%02x, stype=0x%02x) dropped\n",
-			       skb->dev->name, type, stype);
+			pr_debug("%s: unknown management frame (type=0x%02x, stype=0x%02x) dropped\n",
+				 skb->dev->name, type, stype);
 			return -1;
 		}
 
@@ -211,8 +212,8 @@ libipw_rx_frame_mgmt(struct libipw_device *ieee, struct sk_buff *skb,
 		return 0;
 	}
 
-	printk(KERN_DEBUG "%s: hostap_rx_frame_mgmt: management frame "
-	       "received in non-Host AP mode\n", skb->dev->name);
+	pr_debug("%s: %s: management frame received in non-Host AP mode\n",
+		 __func__, skb->dev->name);
 	return -1;
 }
 #endif
@@ -317,9 +318,8 @@ libipw_rx_frame_decrypt_msdu(struct libipw_device *ieee,
 	res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv);
 	atomic_dec(&crypt->refcnt);
 	if (res < 0) {
-		printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
-		       " (SA=%pM keyidx=%d)\n", ieee->dev->name, hdr->addr2,
-		       keyidx);
+		pr_debug("%s: MSDU decryption/MIC verification failed (SA=%pM keyidx=%d)\n",
+			 ieee->dev->name, hdr->addr2, keyidx);
 		return -1;
 	}
 
@@ -355,7 +355,7 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 
 	hdr = (struct libipw_hdr_4addr *)skb->data;
 	if (skb->len < 10) {
-		printk(KERN_INFO "%s: SKB length < 10\n", dev->name);
+		pr_info("%s: SKB length < 10\n", dev->name);
 		goto rx_dropped;
 	}
 
@@ -367,8 +367,7 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 	hdrlen = libipw_get_hdrlen(fc);
 
 	if (skb->len < hdrlen) {
-		printk(KERN_INFO "%s: invalid SKB length %d\n",
-			dev->name, skb->len);
+		pr_info("%s: invalid SKB length %d\n", dev->name, skb->len);
 		goto rx_dropped;
 	}
 
@@ -469,8 +468,8 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 		if (type == WLAN_FC_TYPE_MGMT && stype == WLAN_FC_STYPE_AUTH &&
 		    fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt &&
 		    (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) {
-			printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
-			       "from %pM\n", dev->name, hdr->addr2);
+			pr_debug("%s: failed to decrypt mgmt::auth from %pM\n",
+				 dev->name, hdr->addr2);
 			/* TODO: could inform hostapd about this so that it
 			 * could send auth failure report */
 			goto rx_dropped;
@@ -598,9 +597,8 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 			flen -= hdrlen;
 
 		if (frag_skb->tail + flen > frag_skb->end) {
-			printk(KERN_WARNING "%s: host decrypted and "
-			       "reassembled frame did not fit skb\n",
-			       dev->name);
+			pr_warn("%s: host decrypted and reassembled frame did not fit skb\n",
+				dev->name);
 			libipw_frag_cache_invalidate(ieee, hdr);
 			goto rx_dropped;
 		}
@@ -715,8 +713,7 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 	 * the received frame. */
 	if (ieee->ieee802_1x && ieee->iw_mode == IW_MODE_MASTER) {
 		if (ethertype == ETH_P_PAE) {
-			printk(KERN_DEBUG "%s: RX: IEEE 802.1X frame\n",
-			       dev->name);
+			pr_debug("%s: RX: IEEE 802.1X frame\n", dev->name);
 			if (ieee->hostapd && ieee->apdev) {
 				/* Send IEEE 802.1X frames to the user
 				 * space daemon for processing */
@@ -727,9 +724,8 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 				goto rx_exit;
 			}
 		} else if (!frame_authorized) {
-			printk(KERN_DEBUG "%s: dropped frame from "
-			       "unauthorized port (IEEE 802.1X): "
-			       "ethertype=0x%04x\n", dev->name, ethertype);
+			pr_debug("%s: dropped frame from unauthorized port (IEEE 802.1X): ethertype=0x%04x\n",
+				 dev->name, ethertype);
 			goto rx_dropped;
 		}
 	}
@@ -778,8 +774,8 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
 			ieee->ap->bridged_multicast++;
 			skb2 = skb_clone(skb, GFP_ATOMIC);
 			if (skb2 == NULL)
-				printk(KERN_DEBUG "%s: skb_clone failed for "
-				       "multicast frame\n", dev->name);
+				pr_debug("%s: skb_clone failed for multicast frame\n",
+					 dev->name);
 		} else if (hostap_is_sta_assoc(ieee->ap, dst)) {
 			/* send frame directly to the associated STA using
 			 * wireless media and not passing to higher layers */
@@ -1277,8 +1273,7 @@ static int libipw_parse_info_param(struct libipw_info_element
 			break;
 
 		case WLAN_EID_QOS_PARAMETER:
-			printk(KERN_ERR
-			       "QoS Error need to parse QOS_PARAMETER IE\n");
+			pr_err("QoS Error need to parse QOS_PARAMETER IE\n");
 			break;
 			/* 802.11h */
 		case WLAN_EID_PWR_CONSTRAINT:
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c
index e8c0398..a06e081 100644
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c
@@ -23,6 +23,9 @@
   Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
 
 ******************************************************************************/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/compiler.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
@@ -168,7 +171,7 @@ static int libipw_encrypt_fragment(struct libipw_device *ieee,
 
 	atomic_dec(&crypt->refcnt);
 	if (res < 0) {
-		printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
+		pr_info("%s: Encryption failed: len=%d.\n",
 		       ieee->dev->name, frag->len);
 		ieee->ieee_stats.tx_discards++;
 		return -1;
@@ -282,12 +285,12 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev)
 	/* If there is no driver handler to take the TXB, dont' bother
 	 * creating it... */
 	if (!ieee->hard_start_xmit) {
-		printk(KERN_WARNING "%s: No xmit handler.\n", ieee->dev->name);
+		pr_warn("%s: No xmit handler.\n", ieee->dev->name);
 		goto success;
 	}
 
 	if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
-		printk(KERN_WARNING "%s: skb too small (%d).\n",
+		pr_warn("%s: skb too small (%d).\n",
 		       ieee->dev->name, skb->len);
 		goto success;
 	}
@@ -426,7 +429,7 @@ netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev)
 	txb = libipw_alloc_txb(nr_frags, frag_size,
 				  ieee->tx_headroom, GFP_ATOMIC);
 	if (unlikely(!txb)) {
-		printk(KERN_WARNING "%s: Could not allocate TXB\n",
+		pr_warn("%s: Could not allocate TXB\n",
 		       ieee->dev->name);
 		goto failed;
 	}
diff --git a/drivers/net/wireless/ipw2x00/libipw_wx.c b/drivers/net/wireless/ipw2x00/libipw_wx.c
index 1571505..631a1a1 100644
--- a/drivers/net/wireless/ipw2x00/libipw_wx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_wx.c
@@ -30,6 +30,8 @@
 
 ******************************************************************************/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/hardirq.h>
 #include <linux/kmod.h>
 #include <linux/slab.h>
@@ -403,7 +405,7 @@ int libipw_wx_set_encode(struct libipw_device *ieee,
 			kfree(new_crypt);
 			new_crypt = NULL;
 
-			printk(KERN_WARNING "%s: could not initialize WEP: "
+			pr_warn("%s: could not initialize WEP: "
 			       "load module lib80211_crypt_wep\n", dev->name);
 			return -EOPNOTSUPP;
 		}
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 09/20] libertas: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Dan Williams
  Cc: John W. Linville, libertas-dev, linux-wireless, netdev,
	linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/libertas/cmd.c     |    2 ++
 drivers/net/wireless/libertas/cmdresp.c |    2 ++
 drivers/net/wireless/libertas/if_cs.c   |   14 ++++++--------
 drivers/net/wireless/libertas/if_sdio.c |    6 +++---
 drivers/net/wireless/libertas/if_spi.c  |    4 ++--
 drivers/net/wireless/libertas/if_usb.c  |    4 ++--
 drivers/net/wireless/libertas/tx.c      |    3 +++
 7 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index d798bcc..7f7da1f 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -3,6 +3,8 @@
  * It prepares command and sends it to firmware when it is ready.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/hardirq.h>
 #include <linux/kfifo.h>
 #include <linux/sched.h>
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 178b222..a15ac8e 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -3,6 +3,8 @@
  * responses as well as events generated by firmware.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/hardirq.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 16beaf3..79ed0d0 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -110,14 +110,14 @@ static inline unsigned int if_cs_read8(struct if_cs_card *card, uint reg)
 {
 	unsigned int val = ioread8(card->iobase + reg);
 	if (debug_output)
-		printk(KERN_INFO "inb %08x<%02x\n", reg, val);
+		pr_info("inb %08x<%02x\n", reg, val);
 	return val;
 }
 static inline unsigned int if_cs_read16(struct if_cs_card *card, uint reg)
 {
 	unsigned int val = ioread16(card->iobase + reg);
 	if (debug_output)
-		printk(KERN_INFO "inw %08x<%04x\n", reg, val);
+		pr_info("inw %08x<%04x\n", reg, val);
 	return val;
 }
 static inline void if_cs_read16_rep(
@@ -127,22 +127,21 @@ static inline void if_cs_read16_rep(
 	unsigned long count)
 {
 	if (debug_output)
-		printk(KERN_INFO "insw %08x<(0x%lx words)\n",
-			reg, count);
+		pr_info("insw %08x<(0x%lx words)\n", reg, count);
 	ioread16_rep(card->iobase + reg, buf, count);
 }
 
 static inline void if_cs_write8(struct if_cs_card *card, uint reg, u8 val)
 {
 	if (debug_output)
-		printk(KERN_INFO "outb %08x>%02x\n", reg, val);
+		pr_info("outb %08x>%02x\n", reg, val);
 	iowrite8(val, card->iobase + reg);
 }
 
 static inline void if_cs_write16(struct if_cs_card *card, uint reg, u16 val)
 {
 	if (debug_output)
-		printk(KERN_INFO "outw %08x>%04x\n", reg, val);
+		pr_info("outw %08x>%04x\n", reg, val);
 	iowrite16(val, card->iobase + reg);
 }
 
@@ -153,8 +152,7 @@ static inline void if_cs_write16_rep(
 	unsigned long count)
 {
 	if (debug_output)
-		printk(KERN_INFO "outsw %08x>(0x%lx words)\n",
-			reg, count);
+		pr_info("outsw %08x>(0x%lx words)\n", reg, count);
 	iowrite16_rep(card->iobase + reg, buf, count);
 }
 
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 76caeba..860555a 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -1063,7 +1063,7 @@ static void if_sdio_reset_card_worker(struct work_struct *work)
 	 * instance for that reason.
 	 */
 
-	pr_info("Resetting card...");
+	pr_info("Resetting card...\n");
 	mmc_remove_host(reset_host);
 	mmc_add_host(reset_host);
 }
@@ -1391,8 +1391,8 @@ static int __init if_sdio_init_module(void)
 
 	lbs_deb_enter(LBS_DEB_SDIO);
 
-	printk(KERN_INFO "libertas_sdio: Libertas SDIO driver\n");
-	printk(KERN_INFO "libertas_sdio: Copyright Pierre Ossman\n");
+	pr_info("Libertas SDIO driver\n");
+	pr_info("Copyright Pierre Ossman\n");
 
 	ret = sdio_register_driver(&if_sdio_driver);
 
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 9604a1c..aca22aa 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -624,7 +624,7 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
 		if (crc_err) {
 			/* Previous transfer failed. */
 			if (++num_crc_errs > MAX_MAIN_FW_LOAD_CRC_ERR) {
-				pr_err("Too many CRC errors encountered in firmware load.\n");
+				pr_err("Too many CRC errors encountered in firmware load\n");
 				err = -EIO;
 				goto out;
 			}
@@ -1301,7 +1301,7 @@ static int __init if_spi_init_module(void)
 {
 	int ret = 0;
 	lbs_deb_enter(LBS_DEB_SPI);
-	printk(KERN_INFO "libertas_spi: Libertas SPI driver\n");
+	pr_info("Libertas SPI driver\n");
 	ret = spi_register_driver(&libertas_spi_driver);
 	lbs_deb_leave(LBS_DEB_SPI);
 	return ret;
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index cd3b0d4..8b5d0f3 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -180,7 +180,7 @@ static void if_usb_fw_timeo(unsigned long priv)
 #ifdef CONFIG_OLPC
 static void if_usb_reset_olpc_card(struct lbs_private *priv)
 {
-	printk(KERN_CRIT "Resetting OLPC wireless via EC...\n");
+	pr_crit("Resetting OLPC wireless via EC...\n");
 	olpc_ec_cmd(0x25, NULL, 0, NULL, 0);
 }
 #endif
@@ -544,7 +544,7 @@ static void if_usb_receive_fwload(struct urb *urb)
 				cardp->bootcmdresp = -1;
 			} else {
 				pr_info("boot cmd response wrong magic number (0x%x)\n",
-					    le32_to_cpu(bootcmdresp.magic));
+					le32_to_cpu(bootcmdresp.magic));
 			}
 		} else if ((bootcmdresp.cmd != BOOT_CMD_FW_BY_USB) &&
 			   (bootcmdresp.cmd != BOOT_CMD_UPDATE_FW) &&
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index c025f9c..cb60fa4 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -1,6 +1,9 @@
 /*
  * This file contains the handling of TX in wlan driver.
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/hardirq.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 10/20] libertas_tf: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: John W. Linville, linux-wireless, netdev
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
Neaten debug logging macros.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/libertas_tf/cmd.c      |   12 ++--
 drivers/net/wireless/libertas_tf/deb_defs.h |  105 ++++++++++++++++++---------
 drivers/net/wireless/libertas_tf/if_usb.c   |    2 +-
 drivers/net/wireless/libertas_tf/main.c     |   14 ++--
 4 files changed, 83 insertions(+), 50 deletions(-)

diff --git a/drivers/net/wireless/libertas_tf/cmd.c b/drivers/net/wireless/libertas_tf/cmd.c
index 909ac36..d72e1a5 100644
--- a/drivers/net/wireless/libertas_tf/cmd.c
+++ b/drivers/net/wireless/libertas_tf/cmd.c
@@ -7,6 +7,7 @@
  *  the Free Software Foundation; either version 2 of the License, or (at
  *  your option) any later version.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/hardirq.h>
@@ -103,7 +104,7 @@ int lbtf_update_hw_spec(struct lbtf_private *priv)
 	priv->fwrelease = (priv->fwrelease << 8) |
 		(priv->fwrelease >> 24 & 0xff);
 
-	printk(KERN_INFO "libertastf: %pM, fw %u.%u.%up%u, cap 0x%08x\n",
+	pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n",
 		cmd.permanentaddr,
 		priv->fwrelease >> 24 & 0xff,
 		priv->fwrelease >> 16 & 0xff,
@@ -686,15 +687,14 @@ int __lbtf_cmd(struct lbtf_private *priv, uint16_t command,
 				       cmdnode->cmdwaitqwoken);
 	if (ret) {
 		pr_info("PREP_CMD: command 0x%04x interrupted by signal: %d\n",
-			    command, ret);
+			command, ret);
 		goto done;
 	}
 
 	spin_lock_irqsave(&priv->driver_lock, flags);
 	ret = cmdnode->result;
 	if (ret)
-		pr_info("PREP_CMD: command 0x%04x failed: %d\n",
-			    command, ret);
+		pr_info("PREP_CMD: command 0x%04x failed: %d\n", command, ret);
 
 	__lbtf_cleanup_and_insert_cmd(priv, cmdnode);
 	spin_unlock_irqrestore(&priv->driver_lock, flags);
@@ -738,7 +738,7 @@ int lbtf_process_rx_command(struct lbtf_private *priv)
 	result = le16_to_cpu(resp->result);
 
 	if (net_ratelimit())
-		pr_info("libertastf: cmd response 0x%04x, seq %d, size %d\n",
+		pr_info("cmd response 0x%04x, seq %d, size %d\n",
 			respcmd, le16_to_cpu(resp->seqnum),
 			le16_to_cpu(resp->size));
 
@@ -775,7 +775,7 @@ int lbtf_process_rx_command(struct lbtf_private *priv)
 		switch (respcmd) {
 		case CMD_RET(CMD_GET_HW_SPEC):
 		case CMD_RET(CMD_802_11_RESET):
-			pr_info("libertastf: reset failed\n");
+			pr_info("reset failed\n");
 			break;
 
 		}
diff --git a/drivers/net/wireless/libertas_tf/deb_defs.h b/drivers/net/wireless/libertas_tf/deb_defs.h
index 4bd3dc5..643c31d 100644
--- a/drivers/net/wireless/libertas_tf/deb_defs.h
+++ b/drivers/net/wireless/libertas_tf/deb_defs.h
@@ -45,45 +45,78 @@ extern unsigned int lbtf_debug;
 
 
 #ifdef DEBUG
-#define LBTF_DEB_LL(grp, grpnam, fmt, args...) \
-do { if ((lbtf_debug & (grp)) == (grp)) \
-  printk(KERN_DEBUG DRV_NAME grpnam "%s: " fmt, \
-         in_interrupt() ? " (INT)" : "", ## args); } while (0)
+#define LBTF_DEB_LL(grp, grpnam, fmt, ...)				\
+do {									\
+	if ((lbtf_debug & (grp)) == (grp))				\
+		pr_debug(grpnam "%s: " fmt,				\
+			 in_interrupt() ? " (INT)" : "",		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #else
-#define LBTF_DEB_LL(grp, grpnam, fmt, args...) do {} while (0)
+#define LBTF_DEB_LL(grp, grpnam, fmt, ...)				\
+do {									\
+	if (0)								\
+		pr_debug(grpnam "%s: " fmt,				\
+			 in_interrupt() ? " (INT)" : "",		\
+			 ##__VA_ARGS__);				\
+} while (0)
 #endif
 
-#define lbtf_deb_enter(grp) \
-  LBTF_DEB_LL(grp | LBTF_DEB_ENTER, " enter", "%s()\n", __func__);
-#define lbtf_deb_enter_args(grp, fmt, args...) \
-  LBTF_DEB_LL(grp | LBTF_DEB_ENTER, " enter", "%s(" fmt ")\n", __func__, ## args);
-#define lbtf_deb_leave(grp) \
-  LBTF_DEB_LL(grp | LBTF_DEB_LEAVE, " leave", "%s()\n", __func__);
-#define lbtf_deb_leave_args(grp, fmt, args...) \
-  LBTF_DEB_LL(grp | LBTF_DEB_LEAVE, " leave", "%s(), " fmt "\n", \
-  __func__, ##args);
-#define lbtf_deb_main(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_MAIN, " main", fmt, ##args)
-#define lbtf_deb_net(fmt, args...)       LBTF_DEB_LL(LBTF_DEB_NET, " net", fmt, ##args)
-#define lbtf_deb_mesh(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_MESH, " mesh", fmt, ##args)
-#define lbtf_deb_wext(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_WEXT, " wext", fmt, ##args)
-#define lbtf_deb_ioctl(fmt, args...)     LBTF_DEB_LL(LBTF_DEB_IOCTL, " ioctl", fmt, ##args)
-#define lbtf_deb_scan(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_SCAN, " scan", fmt, ##args)
-#define lbtf_deb_assoc(fmt, args...)     LBTF_DEB_LL(LBTF_DEB_ASSOC, " assoc", fmt, ##args)
-#define lbtf_deb_join(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_JOIN, " join", fmt, ##args)
-#define lbtf_deb_11d(fmt, args...)       LBTF_DEB_LL(LBTF_DEB_11D, " 11d", fmt, ##args)
-#define lbtf_deb_debugfs(fmt, args...)   LBTF_DEB_LL(LBTF_DEB_DEBUGFS, " debugfs", fmt, ##args)
-#define lbtf_deb_ethtool(fmt, args...)   LBTF_DEB_LL(LBTF_DEB_ETHTOOL, " ethtool", fmt, ##args)
-#define lbtf_deb_host(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_HOST, " host", fmt, ##args)
-#define lbtf_deb_cmd(fmt, args...)       LBTF_DEB_LL(LBTF_DEB_CMD, " cmd", fmt, ##args)
-#define lbtf_deb_rx(fmt, args...)        LBTF_DEB_LL(LBTF_DEB_RX, " rx", fmt, ##args)
-#define lbtf_deb_tx(fmt, args...)        LBTF_DEB_LL(LBTF_DEB_TX, " tx", fmt, ##args)
-#define lbtf_deb_fw(fmt, args...)        LBTF_DEB_LL(LBTF_DEB_FW, " fw", fmt, ##args)
-#define lbtf_deb_usb(fmt, args...)       LBTF_DEB_LL(LBTF_DEB_USB, " usb", fmt, ##args)
-#define lbtf_deb_usbd(dev, fmt, args...) LBTF_DEB_LL(LBTF_DEB_USB, " usbd", "%s:" fmt, dev_name(dev), ##args)
-#define lbtf_deb_cs(fmt, args...)        LBTF_DEB_LL(LBTF_DEB_CS, " cs", fmt, ##args)
-#define lbtf_deb_thread(fmt, args...)    LBTF_DEB_LL(LBTF_DEB_THREAD, " thread", fmt, ##args)
-#define lbtf_deb_sdio(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_SDIO, " thread", fmt, ##args)
-#define lbtf_deb_macops(fmt, args...)      LBTF_DEB_LL(LBTF_DEB_MACOPS, " thread", fmt, ##args)
+#define lbtf_deb_enter(grp)						\
+	LBTF_DEB_LL(grp | LBTF_DEB_ENTER, "enter", "%s()\n", __func__);
+#define lbtf_deb_enter_args(grp, fmt, ...)				\
+	LBTF_DEB_LL(grp | LBTF_DEB_ENTER, "enter", "%s(" fmt ")\n",	\
+		    __func__, ##__VA_ARGS__);
+#define lbtf_deb_leave(grp)						\
+	LBTF_DEB_LL(grp | LBTF_DEB_LEAVE, "leave", "%s()\n", __func__);
+#define lbtf_deb_leave_args(grp, fmt, ...)				\
+	LBTF_DEB_LL(grp | LBTF_DEB_LEAVE, "leave", "%s(), " fmt "\n",	\
+		    __func__, ##__VA_ARGS__);
+#define lbtf_deb_main(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_MAIN, "main", fmt, ##__VA_ARGS__)
+#define lbtf_deb_net(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_NET, "net", fmt, ##__VA_ARGS__)
+#define lbtf_deb_mesh(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_MESH, "mesh", fmt, ##__VA_ARGS__)
+#define lbtf_deb_wext(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_WEXT, "wext", fmt, ##__VA_ARGS__)
+#define lbtf_deb_ioctl(fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_IOCTL, "ioctl", fmt, ##__VA_ARGS__)
+#define lbtf_deb_scan(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_SCAN, "scan", fmt, ##__VA_ARGS__)
+#define lbtf_deb_assoc(fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_ASSOC, "assoc", fmt, ##__VA_ARGS__)
+#define lbtf_deb_join(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_JOIN, "join", fmt, ##__VA_ARGS__)
+#define lbtf_deb_11d(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_11D, "11d", fmt, ##__VA_ARGS__)
+#define lbtf_deb_debugfs(fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_DEBUGFS, "debugfs", fmt, ##__VA_ARGS__)
+#define lbtf_deb_ethtool(fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_ETHTOOL, "ethtool", fmt, ##__VA_ARGS__)
+#define lbtf_deb_host(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_HOST, "host", fmt, ##__VA_ARGS__)
+#define lbtf_deb_cmd(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_CMD, "cmd", fmt, ##__VA_ARGS__)
+#define lbtf_deb_rx(fmt, ...)						\
+        LBTF_DEB_LL(LBTF_DEB_RX, "rx", fmt, ##__VA_ARGS__)
+#define lbtf_deb_tx(fmt, ...)						\
+        LBTF_DEB_LL(LBTF_DEB_TX, "tx", fmt, ##__VA_ARGS__)
+#define lbtf_deb_fw(fmt, ...)						\
+        LBTF_DEB_LL(LBTF_DEB_FW, "fw", fmt, ##__VA_ARGS__)
+#define lbtf_deb_usb(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_USB, "usb", fmt, ##__VA_ARGS__)
+#define lbtf_deb_usbd(dev, fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_USB, "usbd", "%s:" fmt,			\
+		    dev_name(dev), ##__VA_ARGS__)
+#define lbtf_deb_cs(fmt, ...)						\
+        LBTF_DEB_LL(LBTF_DEB_CS, "cs", fmt, ##__VA_ARGS__)
+#define lbtf_deb_thread(fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_THREAD, "thread", fmt, ##__VA_ARGS__)
+#define lbtf_deb_sdio(fmt, ...)						\
+	LBTF_DEB_LL(LBTF_DEB_SDIO, "thread", fmt, ##__VA_ARGS__)
+#define lbtf_deb_macops(fmt, ...)					\
+	LBTF_DEB_LL(LBTF_DEB_MACOPS, "thread", fmt, ##__VA_ARGS__)
 
 #ifdef DEBUG
 static inline void lbtf_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len)
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c
index 19a5a92..eb1e917 100644
--- a/drivers/net/wireless/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/libertas_tf/if_usb.c
@@ -524,7 +524,7 @@ static void if_usb_receive_fwload(struct urb *urb)
 				cardp->bootcmdresp = -1;
 			} else {
 				pr_info("boot cmd response wrong magic number (0x%x)\n",
-					    le32_to_cpu(bcmdresp.magic));
+					le32_to_cpu(bcmdresp.magic));
 			}
 		} else if (bcmdresp.cmd != BOOT_CMD_FW_BY_USB) {
 			pr_info("boot cmd response cmd_tag error (%d)\n",
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..b6ef46c 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -7,6 +7,7 @@
  *  the Free Software Foundation; either version 2 of the License, or (at
  *  your option) any later version.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/hardirq.h>
@@ -181,13 +182,12 @@ static void command_timer_fn(unsigned long data)
 	spin_lock_irqsave(&priv->driver_lock, flags);
 
 	if (!priv->cur_cmd) {
-		printk(KERN_DEBUG "libertastf: command timer expired; "
-				  "no pending command\n");
+		pr_debug("command timer expired; no pending command\n");
 		goto out;
 	}
 
-	printk(KERN_DEBUG "libertas: command %x timed out\n",
-		le16_to_cpu(priv->cur_cmd->cmdbuf->command));
+	pr_debug("command %x timed out\n",
+		 le16_to_cpu(priv->cur_cmd->cmdbuf->command));
 
 	priv->cmd_timed_out = 1;
 	queue_work(lbtf_wq, &priv->cmd_work);
@@ -292,7 +292,7 @@ static void lbtf_tx_work(struct work_struct *work)
 	if (err) {
 		dev_kfree_skb_any(skb);
 		priv->tx_skb = NULL;
-		pr_err("TX error: %d", err);
+		pr_err("TX error: %d\n", err);
 	}
 	lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
 }
@@ -324,7 +324,7 @@ static int lbtf_op_start(struct ieee80211_hw *hw)
 		goto err_prog_firmware;
 	}
 
-	printk(KERN_INFO "libertastf: Marvell WLAN 802.11 thinfirm adapter\n");
+	pr_info("Marvell WLAN 802.11 thinfirm adapter\n");
 	lbtf_deb_leave(LBTF_DEB_MACOPS);
 	return 0;
 
@@ -745,7 +745,7 @@ static int __init lbtf_init_module(void)
 	lbtf_deb_enter(LBTF_DEB_MAIN);
 	lbtf_wq = create_workqueue("libertastf");
 	if (lbtf_wq == NULL) {
-		printk(KERN_ERR "libertastf: couldn't create workqueue\n");
+		pr_err("couldn't create workqueue\n");
 		return -ENOMEM;
 	}
 	lbtf_deb_leave(LBTF_DEB_MAIN);
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 11/20] mac80211_hwsim: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/mac80211_hwsim.c |   61 ++++++++++++++------------------
 1 files changed, 27 insertions(+), 34 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index a0b7cfd..eae77d2 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -15,6 +15,8 @@
  * - RX filtering based on filter configuration (data->rx_filter)
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
@@ -578,7 +580,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
 	msg_head = genlmsg_put(skb, 0, 0, &hwsim_genl_family, 0,
 			       HWSIM_CMD_FRAME);
 	if (msg_head == NULL) {
-		printk(KERN_DEBUG "mac80211_hwsim: problem with msg_head\n");
+		pr_debug("problem with msg_head\n");
 		goto nla_put_failure;
 	}
 
@@ -626,7 +628,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
 	return;
 
 nla_put_failure:
-	printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
+	pr_debug("error occurred in %s\n", __func__);
 }
 
 static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
@@ -1189,12 +1191,10 @@ static int mac80211_hwsim_hw_scan(struct ieee80211_hw *hw,
 	hsd->hw = hw;
 	INIT_DELAYED_WORK(&hsd->w, hw_scan_done);
 
-	printk(KERN_DEBUG "hwsim hw_scan request\n");
+	pr_debug("hw_scan request\n");
 	for (i = 0; i < req->n_channels; i++)
-		printk(KERN_DEBUG "hwsim hw_scan freq %d\n",
-			req->channels[i]->center_freq);
-	print_hex_dump(KERN_DEBUG, "scan IEs: ", DUMP_PREFIX_OFFSET,
-			16, 1, req->ie, req->ie_len, 1);
+		pr_debug("hw_scan freq %d\n", req->channels[i]->center_freq);
+	print_hex_dump_bytes("scan IEs: ", DUMP_PREFIX_OFFSET, req->ie, req->ie_len);
 
 	ieee80211_queue_delayed_work(hw, &hsd->w, 2 * HZ);
 
@@ -1208,11 +1208,11 @@ static void mac80211_hwsim_sw_scan(struct ieee80211_hw *hw)
 	mutex_lock(&hwsim->mutex);
 
 	if (hwsim->scanning) {
-		printk(KERN_DEBUG "two hwsim sw_scans detected!\n");
+		pr_debug("two hwsim sw_scans detected!\n");
 		goto out;
 	}
 
-	printk(KERN_DEBUG "hwsim sw_scan request, prepping stuff\n");
+	pr_debug("sw_scan request, prepping stuff\n");
 	hwsim->scanning = true;
 
 out:
@@ -1225,7 +1225,7 @@ static void mac80211_hwsim_sw_scan_complete(struct ieee80211_hw *hw)
 
 	mutex_lock(&hwsim->mutex);
 
-	printk(KERN_DEBUG "hwsim sw_scan_complete\n");
+	pr_debug("sw_scan_complete\n");
 	hwsim->scanning = false;
 
 	mutex_unlock(&hwsim->mutex);
@@ -1338,7 +1338,7 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
 		return mac80211_hwsim_tx_frame_nl(data->hw, skb, _pid);
 
 	if (!mac80211_hwsim_tx_frame_no_nl(data->hw, skb))
-		printk(KERN_DEBUG "%s: PS-poll frame not ack'ed\n", __func__);
+		pr_debug("%s: PS-poll frame not ack'ed\n", __func__);
 	dev_kfree_skb(skb);
 }
 
@@ -1377,7 +1377,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
 		return mac80211_hwsim_tx_frame_nl(data->hw, skb, _pid);
 
 	if (!mac80211_hwsim_tx_frame_no_nl(data->hw, skb))
-		printk(KERN_DEBUG "%s: nullfunc frame not ack'ed\n", __func__);
+		pr_debug("%s: nullfunc frame not ack'ed\n", __func__);
 	dev_kfree_skb(skb);
 }
 
@@ -1621,7 +1621,7 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2,
 
 	return 0;
 err:
-	printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
+	pr_debug("error occurred in %s\n", __func__);
 	goto out;
 out:
 	dev_kfree_skb(skb);
@@ -1636,12 +1636,12 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2,
 
 	wmediumd_pid = info->snd_pid;
 
-	printk(KERN_DEBUG "mac80211_hwsim: received a REGISTER, "
-	       "switching to wmediumd mode with pid %d\n", info->snd_pid);
+	pr_debug("received a REGISTER, switching to wmediumd mode with pid %d\n",
+		 info->snd_pid);
 
 	return 0;
 out:
-	printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
+	pr_debug("error occurred in %s\n", __func__);
 	return -EINVAL;
 }
 
@@ -1675,8 +1675,7 @@ static int mac80211_hwsim_netlink_notify(struct notifier_block *nb,
 		return NOTIFY_DONE;
 
 	if (notify->pid == wmediumd_pid) {
-		printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink"
-		       " socket, switching to perfect channel medium\n");
+		pr_info("wmediumd released netlink socket, switching to perfect channel medium\n");
 		wmediumd_pid = 0;
 	}
 	return NOTIFY_DONE;
@@ -1690,7 +1689,7 @@ static struct notifier_block hwsim_netlink_notifier = {
 static int hwsim_init_netlink(void)
 {
 	int rc;
-	printk(KERN_INFO "mac80211_hwsim: initializing netlink\n");
+	pr_info("initializing netlink\n");
 
 	rc = genl_register_family_with_ops(&hwsim_genl_family,
 		hwsim_ops, ARRAY_SIZE(hwsim_ops));
@@ -1704,7 +1703,7 @@ static int hwsim_init_netlink(void)
 	return 0;
 
 failure:
-	printk(KERN_DEBUG "mac80211_hwsim: error occurred in %s\n", __func__);
+	pr_debug("error occurred in %s\n", __func__);
 	return -EINVAL;
 }
 
@@ -1712,14 +1711,13 @@ static void hwsim_exit_netlink(void)
 {
 	int ret;
 
-	printk(KERN_INFO "mac80211_hwsim: closing netlink\n");
+	pr_info("closing netlink\n");
 	/* unregister the notifier */
 	netlink_unregister_notifier(&hwsim_netlink_notifier);
 	/* unregister the family */
 	ret = genl_unregister_family(&hwsim_genl_family);
 	if (ret)
-		printk(KERN_DEBUG "mac80211_hwsim: "
-		       "unregister family %i\n", ret);
+		pr_debug("unregister family %i\n", ret);
 }
 
 static const struct ieee80211_iface_limit hwsim_if_limits[] = {
@@ -1768,12 +1766,10 @@ static int __init init_mac80211_hwsim(void)
 	addr[0] = 0x02;
 
 	for (i = 0; i < radios; i++) {
-		printk(KERN_DEBUG "mac80211_hwsim: Initializing radio %d\n",
-		       i);
+		pr_debug("Initializing radio %d\n", i);
 		hw = ieee80211_alloc_hw(sizeof(*data), &mac80211_hwsim_ops);
 		if (!hw) {
-			printk(KERN_DEBUG "mac80211_hwsim: ieee80211_alloc_hw "
-			       "failed\n");
+			pr_debug("ieee80211_alloc_hw failed\n");
 			err = -ENOMEM;
 			goto failed;
 		}
@@ -1783,9 +1779,7 @@ static int __init init_mac80211_hwsim(void)
 		data->dev = device_create(hwsim_class, NULL, 0, hw,
 					  "hwsim%d", i);
 		if (IS_ERR(data->dev)) {
-			printk(KERN_DEBUG
-			       "mac80211_hwsim: device_create "
-			       "failed (%ld)\n", PTR_ERR(data->dev));
+			pr_debug("device_create failed (%ld)\n", PTR_ERR(data->dev));
 			err = -ENOMEM;
 			goto failed_drvdata;
 		}
@@ -1946,8 +1940,7 @@ static int __init init_mac80211_hwsim(void)
 			schedule_timeout_interruptible(1);
 		err = ieee80211_register_hw(hw);
 		if (err < 0) {
-			printk(KERN_DEBUG "mac80211_hwsim: "
-			       "ieee80211_register_hw failed (%d)\n", err);
+			pr_debug("ieee80211_register_hw failed (%d)\n", err);
 			goto failed_hw;
 		}
 
@@ -2039,7 +2032,7 @@ static int __init init_mac80211_hwsim(void)
 	return 0;
 
 failed_nl:
-	printk(KERN_DEBUG "mac_80211_hwsim: failed initializing netlink\n");
+	pr_debug("failed initializing netlink\n");
 	return err;
 
 failed_mon:
@@ -2060,7 +2053,7 @@ failed:
 
 static void __exit exit_mac80211_hwsim(void)
 {
-	printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n");
+	pr_debug("unregister radios\n");
 
 	hwsim_exit_netlink();
 
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 12/20] mwl8k: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Lennert Buytenhek, John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.
Add missing newline terminations.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/mwl8k.c |   53 ++++++++++++++++++++---------------------
 1 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index cf7bdc6..7197e80 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -9,6 +9,8 @@
  * warranty of any kind, whether express or implied.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
@@ -522,7 +524,7 @@ static int mwl8k_request_firmware(struct mwl8k_priv *priv, char *fw_image,
 			rc = mwl8k_request_fw(priv, di->helper_image,
 					      &priv->fw_helper, false);
 		if (rc)
-			printk(KERN_ERR "%s: Error requesting helper fw %s\n",
+			pr_err("%s: Error requesting helper fw %s\n",
 			       pci_name(priv->pdev), di->helper_image);
 
 		if (rc || nowait)
@@ -542,7 +544,7 @@ static int mwl8k_request_firmware(struct mwl8k_priv *priv, char *fw_image,
 		rc = mwl8k_request_fw(priv, fw_image,
 				      &priv->fw_ucode, false);
 	if (rc) {
-		printk(KERN_ERR "%s: Error requesting firmware file %s\n",
+		pr_err("%s: Error requesting firmware file %s\n",
 		       pci_name(priv->pdev), fw_image);
 		mwl8k_release_fw(&priv->fw_helper);
 		return rc;
@@ -712,15 +714,15 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw)
 		const struct firmware *helper = priv->fw_helper;
 
 		if (helper == NULL) {
-			printk(KERN_ERR "%s: helper image needed but none "
-			       "given\n", pci_name(priv->pdev));
+			pr_err("%s: helper image needed but none given\n",
+			       pci_name(priv->pdev));
 			return -EINVAL;
 		}
 
 		rc = mwl8k_load_fw_image(priv, helper->data, helper->size);
 		if (rc) {
-			printk(KERN_ERR "%s: unable to load firmware "
-			       "helper image\n", pci_name(priv->pdev));
+			pr_err("%s: unable to load firmware helper image\n",
+			       pci_name(priv->pdev));
 			return rc;
 		}
 		msleep(20);
@@ -731,7 +733,7 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw)
 	}
 
 	if (rc) {
-		printk(KERN_ERR "%s: unable to load firmware image\n",
+		pr_err("%s: unable to load firmware image\n",
 		       pci_name(priv->pdev));
 		return rc;
 	}
@@ -2425,8 +2427,7 @@ static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw)
 
 		api_version = le32_to_cpu(cmd->fw_api_version);
 		if (priv->device_info->fw_api_ap != api_version) {
-			printk(KERN_ERR "%s: Unsupported fw API version for %s."
-			       "  Expected %d got %d.\n", MWL8K_NAME,
+			pr_err("Unsupported fw API version for %s.  Expected %d got %d.\n",
 			       priv->device_info->part_name,
 			       priv->device_info->fw_api_ap,
 			       api_version);
@@ -5278,12 +5279,12 @@ MODULE_DEVICE_TABLE(pci, mwl8k_pci_id_table);
 static int mwl8k_request_alt_fw(struct mwl8k_priv *priv)
 {
 	int rc;
-	printk(KERN_ERR "%s: Error requesting preferred fw %s.\n"
-	       "Trying alternative firmware %s\n", pci_name(priv->pdev),
-	       priv->fw_pref, priv->fw_alt);
+	pr_err("%s: Error requesting preferred fw %s.\n"
+	       "Trying alternative firmware %s\n",
+	       pci_name(priv->pdev), priv->fw_pref, priv->fw_alt);
 	rc = mwl8k_request_fw(priv, priv->fw_alt, &priv->fw_ucode, true);
 	if (rc) {
-		printk(KERN_ERR "%s: Error requesting alt fw %s\n",
+		pr_err("%s: Error requesting alt fw %s\n",
 		       pci_name(priv->pdev), priv->fw_alt);
 		return rc;
 	}
@@ -5300,7 +5301,7 @@ static void mwl8k_fw_state_machine(const struct firmware *fw, void *context)
 	switch (priv->fw_state) {
 	case FW_STATE_INIT:
 		if (!fw) {
-			printk(KERN_ERR "%s: Error requesting helper fw %s\n",
+			pr_err("%s: Error requesting helper fw %s\n",
 			       pci_name(priv->pdev), di->helper_image);
 			goto fail;
 		}
@@ -5339,7 +5340,7 @@ static void mwl8k_fw_state_machine(const struct firmware *fw, void *context)
 
 	case FW_STATE_LOADING_ALT:
 		if (!fw) {
-			printk(KERN_ERR "%s: Error requesting alt fw %s\n",
+			pr_err("%s: Error requesting alt fw %s\n",
 			       pci_name(priv->pdev), di->helper_image);
 			goto fail;
 		}
@@ -5352,8 +5353,8 @@ static void mwl8k_fw_state_machine(const struct firmware *fw, void *context)
 		break;
 
 	default:
-		printk(KERN_ERR "%s: Unexpected firmware loading state: %d\n",
-		       MWL8K_NAME, priv->fw_state);
+		pr_err("Unexpected firmware loading state: %d\n",
+		       priv->fw_state);
 		BUG_ON(1);
 	}
 
@@ -5607,7 +5608,7 @@ static int mwl8k_reload_firmware(struct ieee80211_hw *hw, char *fw_image)
 	return rc;
 
 fail:
-	printk(KERN_WARNING "mwl8k: Failed to reload firmware image.\n");
+	pr_warn("Failed to reload firmware image\n");
 	return rc;
 }
 
@@ -5725,22 +5726,20 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
 	int rc;
 
 	if (!printed_version) {
-		printk(KERN_INFO "%s version %s\n", MWL8K_DESC, MWL8K_VERSION);
+		pr_info("%s version %s\n", MWL8K_DESC, MWL8K_VERSION);
 		printed_version = 1;
 	}
 
 
 	rc = pci_enable_device(pdev);
 	if (rc) {
-		printk(KERN_ERR "%s: Cannot enable new PCI device\n",
-		       MWL8K_NAME);
+		pr_err("Cannot enable new PCI device\n");
 		return rc;
 	}
 
 	rc = pci_request_regions(pdev, MWL8K_NAME);
 	if (rc) {
-		printk(KERN_ERR "%s: Cannot obtain PCI resources\n",
-		       MWL8K_NAME);
+		pr_err("Cannot obtain PCI resources\n");
 		goto err_disable_device;
 	}
 
@@ -5749,7 +5748,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
 
 	hw = ieee80211_alloc_hw(sizeof(*priv), &mwl8k_ops);
 	if (hw == NULL) {
-		printk(KERN_ERR "%s: ieee80211 alloc failed\n", MWL8K_NAME);
+		pr_err("ieee80211 alloc failed\n");
 		rc = -ENOMEM;
 		goto err_free_reg;
 	}
@@ -5796,10 +5795,10 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
 		priv->fw_pref = di->fw_image_sta;
 		priv->fw_alt = di->fw_image_ap;
 	} else if (ap_mode_default && !di->fw_image_ap && di->fw_image_sta) {
-		printk(KERN_WARNING "AP fw is unavailable.  Using STA fw.");
+		pr_warn("AP fw is unavailable.  Using STA fw.\n");
 		priv->fw_pref = di->fw_image_sta;
 	} else if (!ap_mode_default && !di->fw_image_sta && di->fw_image_ap) {
-		printk(KERN_WARNING "STA fw is unavailable.  Using AP fw.");
+		pr_warn("STA fw is unavailable.  Using AP fw.\n");
 		priv->fw_pref = di->fw_image_ap;
 	}
 	rc = mwl8k_init_firmware(hw, priv->fw_pref, true);
@@ -5834,7 +5833,7 @@ err_disable_device:
 
 static void __devexit mwl8k_shutdown(struct pci_dev *pdev)
 {
-	printk(KERN_ERR "===>%s(%u)\n", __func__, __LINE__);
+	pr_err("===>%s(%u)\n", __func__, __LINE__);
 }
 
 static void __devexit mwl8k_remove(struct pci_dev *pdev)
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 13/20] orinoco: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: John W. Linville, linux-wireless, netdev
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/orinoco/airport.c        |   28 ++--
 drivers/net/wireless/orinoco/cfg.c            |    9 +-
 drivers/net/wireless/orinoco/hermes.c         |   71 +++++-----
 drivers/net/wireless/orinoco/hw.c             |   79 +++++------
 drivers/net/wireless/orinoco/main.c           |  194 +++++++++++-------------
 drivers/net/wireless/orinoco/mic.c            |   13 +-
 drivers/net/wireless/orinoco/orinoco.h        |   13 +-
 drivers/net/wireless/orinoco/orinoco_cs.c     |   11 +-
 drivers/net/wireless/orinoco/orinoco_nortel.c |   40 +++---
 drivers/net/wireless/orinoco/orinoco_pci.c    |   23 ++--
 drivers/net/wireless/orinoco/orinoco_pci.h    |    6 +-
 drivers/net/wireless/orinoco/orinoco_plx.c    |   40 +++---
 drivers/net/wireless/orinoco/orinoco_tmd.c    |   25 ++--
 drivers/net/wireless/orinoco/orinoco_usb.c    |  145 +++++++++----------
 drivers/net/wireless/orinoco/scan.c           |   16 +-
 drivers/net/wireless/orinoco/spectrum_cs.c    |    6 +-
 drivers/net/wireless/orinoco/wext.c           |   28 ++--
 17 files changed, 361 insertions(+), 386 deletions(-)

diff --git a/drivers/net/wireless/orinoco/airport.c b/drivers/net/wireless/orinoco/airport.c
index 0ca8b14..a6cea29 100644
--- a/drivers/net/wireless/orinoco/airport.c
+++ b/drivers/net/wireless/orinoco/airport.c
@@ -11,8 +11,9 @@
  *  0.06 : fix possible hang on powerup, add sleep support
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "airport"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -41,12 +42,11 @@ airport_suspend(struct macio_dev *mdev, pm_message_t state)
 	unsigned long flags;
 	int err;
 
-	printk(KERN_DEBUG "%s: Airport entering sleep mode\n", dev->name);
+	pr_debug("%s: Airport entering sleep mode\n", dev->name);
 
 	err = orinoco_lock(priv, &flags);
 	if (err) {
-		printk(KERN_ERR "%s: hw_unavailable on PBOOK_SLEEP_NOW\n",
-		       dev->name);
+		pr_err("%s: hw_unavailable on PBOOK_SLEEP_NOW\n", dev->name);
 		return 0;
 	}
 
@@ -69,7 +69,7 @@ airport_resume(struct macio_dev *mdev)
 	unsigned long flags;
 	int err;
 
-	printk(KERN_DEBUG "%s: Airport waking up\n", dev->name);
+	pr_debug("%s: Airport waking up\n", dev->name);
 
 	pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
 			  macio_get_of_node(mdev), 0, 1);
@@ -153,7 +153,7 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
 	struct hermes *hw;
 
 	if (macio_resource_count(mdev) < 1 || macio_irq_count(mdev) < 1) {
-		printk(KERN_ERR PFX "Wrong interrupt/addresses in OF tree\n");
+		pr_err("Wrong interrupt/addresses in OF tree\n");
 		return -ENODEV;
 	}
 
@@ -161,7 +161,7 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
 	priv = alloc_orinocodev(sizeof(*card), &mdev->ofdev.dev,
 				airport_hard_reset, NULL);
 	if (!priv) {
-		printk(KERN_ERR PFX "Cannot allocate network device\n");
+		pr_err("Cannot allocate network device\n");
 		return -ENODEV;
 	}
 	card = priv->card;
@@ -170,7 +170,7 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
 	card->mdev = mdev;
 
 	if (macio_request_resource(mdev, 0, DRIVER_NAME)) {
-		printk(KERN_ERR PFX "can't request IO resource !\n");
+		pr_err("can't request IO resource !\n");
 		free_orinocodev(priv);
 		return -EBUSY;
 	}
@@ -180,10 +180,10 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
 	/* Setup interrupts & base address */
 	card->irq = macio_irq(mdev, 0);
 	phys_addr = macio_resource_start(mdev, 0);  /* Physical address */
-	printk(KERN_DEBUG PFX "Physical address %lx\n", phys_addr);
+	pr_debug("Physical address %lx\n", phys_addr);
 	card->vaddr = ioremap(phys_addr, AIRPORT_IO_LEN);
 	if (!card->vaddr) {
-		printk(KERN_ERR PFX "ioremap() failed\n");
+		pr_err("ioremap() failed\n");
 		goto failed;
 	}
 
@@ -198,20 +198,20 @@ airport_attach(struct macio_dev *mdev, const struct of_device_id *match)
 	hw->ops->init(hw);
 
 	if (request_irq(card->irq, orinoco_interrupt, 0, DRIVER_NAME, priv)) {
-		printk(KERN_ERR PFX "Couldn't get IRQ %d\n", card->irq);
+		pr_err("Couldn't get IRQ %d\n", card->irq);
 		goto failed;
 	}
 	card->irq_requested = 1;
 
 	/* Initialise the main driver */
 	if (orinoco_init(priv) != 0) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto failed;
 	}
 
 	/* Register an interface with the stack */
 	if (orinoco_if_add(priv, phys_addr, card->irq, NULL) != 0) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err("orinoco_if_add() failed\n");
 		goto failed;
 	}
 	card->ndev_registered = 1;
@@ -252,7 +252,7 @@ static struct macio_driver airport_driver = {
 static int __init
 init_airport(void)
 {
-	printk(KERN_DEBUG "%s\n", version);
+	pr_debug("%s\n", version);
 
 	return macio_register_driver(&airport_driver);
 }
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index e156755..8d2ad86 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -2,6 +2,9 @@
  *
  * See copyright notice in main.c
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/ieee80211.h>
 #include <net/cfg80211.h>
 #include "hw.h"
@@ -223,10 +226,8 @@ static int orinoco_set_wiphy_params(struct wiphy *wiphy, u32 changed)
 			if (wiphy->frag_threshold < 0)
 				frag_value = 0;
 			else {
-				printk(KERN_WARNING "%s: Fixed fragmentation "
-				       "is not supported on this firmware. "
-				       "Using MWO robust instead.\n",
-				       priv->ndev->name);
+				pr_warn("%s: Fixed fragmentation is not supported on this firmware. Using MWO robust instead.\n",
+					priv->ndev->name);
 				frag_value = 1;
 			}
 		} else {
diff --git a/drivers/net/wireless/orinoco/hermes.c b/drivers/net/wireless/orinoco/hermes.c
index 75c15bc..e6d0246 100644
--- a/drivers/net/wireless/orinoco/hermes.c
+++ b/drivers/net/wireless/orinoco/hermes.c
@@ -38,6 +38,8 @@
  * under either the MPL or the GPL.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -75,18 +77,26 @@
  * Debugging helpers
  */
 
-#define DMSG(stuff...) do {printk(KERN_DEBUG "hermes @ %p: " , hw->iobase); \
-			printk(stuff); } while (0)
+#define DMSG(fmt, ...)						\
+	pr_debug("@ %p: " fmt, hw->iobase, ##__VA_ARGS__)
 
 #undef HERMES_DEBUG
 #ifdef HERMES_DEBUG
 #include <stdarg.h>
 
-#define DEBUG(lvl, stuff...) if ((lvl) <= HERMES_DEBUG) DMSG(stuff)
+#define DEBUG(lvl, fmt, ...)				\
+do {							\
+	if ((lvl) <= HERMES_DEBUG)			\
+		DMSG(fmt, ##__VA_ARGS__);		\
+} while (0)
 
 #else /* ! HERMES_DEBUG */
 
-#define DEBUG(lvl, stuff...) do { } while (0)
+#define DEBUG(lvl, fmt, ...)				\
+do {							\
+	if (0)						\
+		DMSG(fmt, ##__VA_ARGS__);		\
+} while (0)
 
 #endif /* ! HERMES_DEBUG */
 
@@ -155,15 +165,13 @@ static int hermes_doicmd_wait(struct hermes *hw, u16 cmd,
 	hermes_write_regn(hw, SWSUPPORT0, HERMES_MAGIC);
 
 	if (!hermes_present(hw)) {
-		DEBUG(0, "hermes @ 0x%x: Card removed during reset.\n",
-		       hw->iobase);
+		DEBUG(0, "Card removed during reset\n");
 		err = -ENODEV;
 		goto out;
 	}
 
 	if (!(reg & HERMES_EV_CMD)) {
-		printk(KERN_ERR "hermes @ %p: "
-		       "Timeout waiting for card to reset (reg=0x%04x)!\n",
+		pr_err("@ %p: Timeout waiting for card to reset (reg=0x%04x)!\n",
 		       hw->iobase, reg);
 		err = -ETIMEDOUT;
 		goto out;
@@ -262,14 +270,12 @@ static int hermes_docmd_wait(struct hermes *hw, u16 cmd, u16 parm0,
 	if (err) {
 		if (!hermes_present(hw)) {
 			if (net_ratelimit())
-				printk(KERN_WARNING "hermes @ %p: "
-				       "Card removed while issuing command "
-				       "0x%04x.\n", hw->iobase, cmd);
+				pr_warn("@ %p: Card removed while issuing command 0x%04x\n",
+					hw->iobase, cmd);
 			err = -ENODEV;
 		} else
 			if (net_ratelimit())
-				printk(KERN_ERR "hermes @ %p: "
-				       "Error %d issuing command 0x%04x.\n",
+				pr_err("@ %p: Error %d issuing command 0x%04x\n",
 				       hw->iobase, err, cmd);
 		goto out;
 	}
@@ -283,16 +289,15 @@ static int hermes_docmd_wait(struct hermes *hw, u16 cmd, u16 parm0,
 	}
 
 	if (!hermes_present(hw)) {
-		printk(KERN_WARNING "hermes @ %p: Card removed "
-		       "while waiting for command 0x%04x completion.\n",
-		       hw->iobase, cmd);
+		pr_warn("@ %p: Card removed while waiting for command 0x%04x completion\n",
+			hw->iobase, cmd);
 		err = -ENODEV;
 		goto out;
 	}
 
 	if (!(reg & HERMES_EV_CMD)) {
-		printk(KERN_ERR "hermes @ %p: Timeout waiting for "
-		       "command 0x%04x completion.\n", hw->iobase, cmd);
+		pr_err("@ %p: Timeout waiting for command 0x%04x completion\n",
+		       hw->iobase, cmd);
 		err = -ETIMEDOUT;
 		goto out;
 	}
@@ -336,15 +341,13 @@ static int hermes_allocate(struct hermes *hw, u16 size, u16 *fid)
 	}
 
 	if (!hermes_present(hw)) {
-		printk(KERN_WARNING "hermes @ %p: "
-		       "Card removed waiting for frame allocation.\n",
-		       hw->iobase);
+		pr_warn("@ %p: Card removed waiting for frame allocation\n",
+			hw->iobase);
 		return -ENODEV;
 	}
 
 	if (!(reg & HERMES_EV_ALLOC)) {
-		printk(KERN_ERR "hermes @ %p: "
-		       "Timeout waiting for frame allocation\n",
+		pr_err("@ %p: Timeout waiting for frame allocation\n",
 		       hw->iobase);
 		return -ETIMEDOUT;
 	}
@@ -400,8 +403,8 @@ static int hermes_bap_seek(struct hermes *hw, int bap, u16 id, u16 offset)
 	}
 
 	if (reg != offset) {
-		printk(KERN_ERR "hermes @ %p: BAP%d offset %s: "
-		       "reg=0x%x id=0x%x offset=0x%x\n", hw->iobase, bap,
+		pr_err("@ %p: BAP%d offset %s: reg=0x%x id=0x%x offset=0x%x\n",
+		       hw->iobase, bap,
 		       (reg & HERMES_OFFSET_BUSY) ? "timeout" : "error",
 		       reg, id, offset);
 
@@ -509,14 +512,12 @@ static int hermes_read_ltv(struct hermes *hw, int bap, u16 rid,
 		*length = rlength;
 
 	if (rtype != rid)
-		printk(KERN_WARNING "hermes @ %p: %s(): "
-		       "rid (0x%04x) does not match type (0x%04x)\n",
-		       hw->iobase, __func__, rid, rtype);
+		pr_warn("@ %p: %s(): rid (0x%04x) does not match type (0x%04x)\n",
+			hw->iobase, __func__, rid, rtype);
 	if (HERMES_RECLEN_TO_BYTES(rlength) > bufsize)
-		printk(KERN_WARNING "hermes @ %p: "
-		       "Truncating LTV record from %d to %d bytes. "
-		       "(rid=0x%04x, len=0x%04x)\n", hw->iobase,
-		       HERMES_RECLEN_TO_BYTES(rlength), bufsize, rid, rlength);
+		pr_warn("@ %p: Truncating LTV record from %d to %d bytes. (rid=0x%04x, len=0x%04x)\n",
+			hw->iobase,
+			HERMES_RECLEN_TO_BYTES(rlength), bufsize, rid, rlength);
 
 	nwords = min((unsigned)rlength - 1, bufsize / 2);
 	hermes_read_words(hw, dreg, buf, nwords);
@@ -652,8 +653,7 @@ static int hermesi_program_end(struct hermes *hw)
 
 	rc = hw->ops->cmd_wait(hw, HERMES_PROGRAM_DISABLE, 0, &resp);
 
-	pr_debug("PROGRAM_DISABLE returned %d, "
-		 "r0 0x%04x, r1 0x%04x, r2 0x%04x\n",
+	pr_debug("PROGRAM_DISABLE returned %d, r0 0x%04x, r1 0x%04x, r2 0x%04x\n",
 		 rc, resp.resp0, resp.resp1, resp.resp2);
 
 	if ((rc == 0) &&
@@ -727,8 +727,7 @@ static int hermes_read_pda(struct hermes *hw, __le16 *pda, u32 pda_addr,
 
 	/* Check PDA length */
 	pda_size = le16_to_cpu(pda[0]);
-	pr_debug("Actual PDA length %d, Max allowed %d\n",
-		 pda_size, pda_len);
+	pr_debug("Actual PDA length %d, Max allowed %d\n", pda_size, pda_len);
 	if (pda_size > pda_len)
 		return -EINVAL;
 
diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c
index c09c843..5202845 100644
--- a/drivers/net/wireless/orinoco/hw.c
+++ b/drivers/net/wireless/orinoco/hw.c
@@ -2,6 +2,9 @@
  *
  * See copyright notice in main.c
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/device.h>
 #include <linux/if_arp.h>
@@ -467,8 +470,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 				 HERMES_BYTES_TO_RECLEN(ETH_ALEN),
 				 dev->dev_addr);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting MAC address\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting MAC address\n", dev->name, err);
 		return err;
 	}
 
@@ -476,8 +478,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 	err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFPORTTYPE,
 				   priv->port_type);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting port type\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting port type\n", dev->name, err);
 		return err;
 	}
 	/* Set the channel/frequency */
@@ -486,7 +487,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFOWNCHANNEL,
 					   priv->channel);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting channel %d\n",
+			pr_err("%s: Error %d setting channel %d\n",
 			       dev->name, err, priv->channel);
 			return err;
 		}
@@ -496,8 +497,8 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 		u16 createibss;
 
 		if ((strlen(priv->desired_essid) == 0) && (priv->createibss)) {
-			printk(KERN_WARNING "%s: This firmware requires an "
-			       "ESSID in IBSS-Ad-Hoc mode.\n", dev->name);
+			pr_warn("%s: This firmware requires an ESSID in IBSS-Ad-Hoc mode\n",
+				dev->name);
 			/* With wvlan_cs, in this case, we would crash.
 			 * hopefully, this driver will behave better...
 			 * Jean II */
@@ -510,7 +511,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFCREATEIBSS,
 					   createibss);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting CREATEIBSS\n",
+			pr_err("%s: Error %d setting CREATEIBSS\n",
 			       dev->name, err);
 			return err;
 		}
@@ -519,8 +520,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 	/* Set the desired BSSID */
 	err = __orinoco_hw_set_wap(priv);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting AP address\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting AP address\n", dev->name, err);
 		return err;
 	}
 
@@ -532,16 +532,14 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 			HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid) + 2),
 			&idbuf);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting OWNSSID\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting OWNSSID\n", dev->name, err);
 		return err;
 	}
 	err = hw->ops->write_ltv(hw, USER_BAP, HERMES_RID_CNFDESIREDSSID,
 			HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid) + 2),
 			&idbuf);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting DESIREDSSID\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting DESIREDSSID\n", dev->name, err);
 		return err;
 	}
 
@@ -552,8 +550,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 				 HERMES_BYTES_TO_RECLEN(strlen(priv->nick) + 2),
 				 &idbuf);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting nickname\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting nickname\n", dev->name, err);
 		return err;
 	}
 
@@ -563,9 +560,8 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFSYSTEMSCALE,
 					   priv->ap_density);
 		if (err) {
-			printk(KERN_WARNING "%s: Error %d setting SYSTEMSCALE. "
-			       "Disabling sensitivity control\n",
-			       dev->name, err);
+			pr_warn("%s: Error %d setting SYSTEMSCALE. Disabling sensitivity control.\n",
+				dev->name, err);
 
 			priv->has_sensitivity = 0;
 		}
@@ -575,8 +571,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 	err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFRTSTHRESHOLD,
 				   priv->rts_thresh);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting RTS threshold\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting RTS threshold\n", dev->name, err);
 		return err;
 	}
 
@@ -590,16 +585,14 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFFRAGMENTATIONTHRESHOLD,
 					   priv->frag_thresh);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting fragmentation\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting fragmentation\n", dev->name, err);
 		return err;
 	}
 
 	/* Set bitrate */
 	err = __orinoco_hw_set_bitrate(priv);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d setting bitrate\n",
-		       dev->name, err);
+		pr_err("%s: Error %d setting bitrate\n", dev->name, err);
 		return err;
 	}
 
@@ -609,8 +602,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFPMENABLED,
 					   priv->pm_on);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting up PM\n",
-			       dev->name, err);
+			pr_err("%s: Error %d setting up PM\n", dev->name, err);
 			return err;
 		}
 
@@ -618,24 +610,21 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFMULTICASTRECEIVE,
 					   priv->pm_mcast);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting up PM\n",
-			       dev->name, err);
+			pr_err("%s: Error %d setting up PM\n", dev->name, err);
 			return err;
 		}
 		err = hermes_write_wordrec(hw, USER_BAP,
 					   HERMES_RID_CNFMAXSLEEPDURATION,
 					   priv->pm_period);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting up PM\n",
-			       dev->name, err);
+			pr_err("%s: Error %d setting up PM\n", dev->name, err);
 			return err;
 		}
 		err = hermes_write_wordrec(hw, USER_BAP,
 					   HERMES_RID_CNFPMHOLDOVERDURATION,
 					   priv->pm_timeout);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting up PM\n",
-			       dev->name, err);
+			pr_err("%s: Error %d setting up PM\n", dev->name, err);
 			return err;
 		}
 	}
@@ -646,7 +635,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 					   HERMES_RID_CNFPREAMBLE_SYMBOL,
 					   priv->preamble);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting preamble\n",
+			pr_err("%s: Error %d setting preamble\n",
 			       dev->name, err);
 			return err;
 		}
@@ -656,7 +645,7 @@ int orinoco_hw_program_rids(struct orinoco_private *priv)
 	if (priv->has_wep || priv->has_wpa) {
 		err = __orinoco_hw_setup_enc(priv);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d activating encryption\n",
+			pr_err("%s: Error %d activating encryption\n",
 			       dev->name, err);
 			return err;
 		}
@@ -711,7 +700,7 @@ int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
 	int err = 0;
 
 	if (ratemode >= BITRATE_TABLE_SIZE) {
-		printk(KERN_ERR "%s: BUG: Invalid bitrate mode %d\n",
+		pr_err("%s: BUG: Invalid bitrate mode %d\n",
 		       priv->ndev->name, ratemode);
 		return -EINVAL;
 	}
@@ -768,8 +757,8 @@ int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate)
 			}
 
 		if (i >= BITRATE_TABLE_SIZE) {
-			printk(KERN_INFO "%s: Unable to determine current bitrate (0x%04hx)\n",
-			       priv->ndev->name, val);
+			pr_info("%s: Unable to determine current bitrate (0x%04hx)\n",
+				priv->ndev->name, val);
 			err = -EIO;
 		}
 
@@ -862,7 +851,7 @@ int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)
 			keylen = priv->keys[priv->tx_key].key_len;
 
 			if (keylen > LARGE_KEY_SIZE) {
-				printk(KERN_ERR "%s: BUG: Key %d has oversize length %d.\n",
+				pr_err("%s: BUG: Key %d has oversize length %d\n",
 				       priv->ndev->name, priv->tx_key, keylen);
 				return -E2BIG;
 			} else if (keylen > SMALL_KEY_SIZE)
@@ -1059,8 +1048,8 @@ int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx)
 				   HERMES_RID_CNFREMDEFAULTTKIPKEY_AGERE,
 				   key_idx);
 	if (err)
-		printk(KERN_WARNING "%s: Error %d clearing TKIP key %d\n",
-		       priv->ndev->name, err, key_idx);
+		pr_warn("%s: Error %d clearing TKIP key %d\n",
+			priv->ndev->name, err, key_idx);
 	return err;
 }
 
@@ -1076,7 +1065,7 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
 					   HERMES_RID_CNFPROMISCUOUSMODE,
 					   promisc);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d setting PROMISCUOUSMODE to 1.\n",
+			pr_err("%s: Error %d setting PROMISCUOUSMODE to 1\n",
 			       priv->ndev->name, err);
 		} else
 			priv->promiscuous = promisc;
@@ -1101,7 +1090,7 @@ int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
 				   HERMES_BYTES_TO_RECLEN(mc_count * ETH_ALEN),
 				   &mclist);
 		if (err)
-			printk(KERN_ERR "%s: Error %d setting multicast list.\n",
+			pr_err("%s: Error %d setting multicast list\n",
 			       priv->ndev->name, err);
 		else
 			priv->mc_count = mc_count;
@@ -1187,8 +1176,8 @@ int orinoco_hw_get_freq(struct orinoco_private *priv)
 	}
 
 	if ((channel < 1) || (channel > NUM_CHANNELS)) {
-		printk(KERN_WARNING "%s: Channel out of range (%d)!\n",
-		       priv->ndev->name, channel);
+		pr_warn("%s: Channel out of range (%d)!\n",
+			priv->ndev->name, channel);
 		err = -EBUSY;
 		goto out;
 
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index 88e3ad2..b9c2ab9 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -74,6 +74,8 @@
  * hw_unavailable is non-zero).
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco"
 
 #include <linux/module.h>
@@ -245,7 +247,7 @@ void set_port_type(struct orinoco_private *priv)
 		priv->createibss = 0;
 		break;
 	default:
-		printk(KERN_ERR "%s: Invalid priv->iw_mode in set_port_type()\n",
+		pr_err("%s: Invalid priv->iw_mode in set_port_type()\n",
 		       priv->ndev->name);
 	}
 }
@@ -308,8 +310,8 @@ void orinoco_set_multicast_list(struct net_device *dev)
 	unsigned long flags;
 
 	if (orinoco_lock(priv, &flags) != 0) {
-		printk(KERN_DEBUG "%s: orinoco_set_multicast_list() "
-		       "called when hw_unavailable\n", dev->name);
+		pr_debug("%s: orinoco_set_multicast_list() called when hw_unavailable\n",
+			 dev->name);
 		return;
 	}
 
@@ -395,8 +397,7 @@ int orinoco_process_xmit_skb(struct sk_buff *skb,
 
 		if (skb_headroom(skb) < ENCAPS_OVERHEAD) {
 			if (net_ratelimit())
-				printk(KERN_ERR
-				       "%s: Not enough headroom for 802.2 headers %d\n",
+				pr_err("%s: Not enough headroom for 802.2 headers %d\n",
 				       dev->name, skb_headroom(skb));
 			return -ENOMEM;
 		}
@@ -445,19 +446,17 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
 	u8 mic_buf[MICHAEL_MIC_LEN + 1];
 
 	if (!netif_running(dev)) {
-		printk(KERN_ERR "%s: Tx on stopped device!\n",
-		       dev->name);
+		pr_err("%s: Tx on stopped device!\n", dev->name);
 		return NETDEV_TX_BUSY;
 	}
 
 	if (netif_queue_stopped(dev)) {
-		printk(KERN_DEBUG "%s: Tx while transmitter busy!\n",
-		       dev->name);
+		pr_debug("%s: Tx while transmitter busy!\n", dev->name);
 		return NETDEV_TX_BUSY;
 	}
 
 	if (orinoco_lock(priv, &flags) != 0) {
-		printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n",
+		pr_err("%s: orinoco_xmit() called while hw_unavailable\n",
 		       dev->name);
 		return NETDEV_TX_BUSY;
 	}
@@ -496,8 +495,8 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
 					  txfid, 0);
 		if (err) {
 			if (net_ratelimit())
-				printk(KERN_ERR "%s: Error %d writing Tx "
-				       "descriptor to BAP\n", dev->name, err);
+				pr_err("%s: Error %d writing Tx descriptor to BAP\n",
+				       dev->name, err);
 			goto busy;
 		}
 	} else {
@@ -510,8 +509,8 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
 					  txfid, 0);
 		if (err) {
 			if (net_ratelimit())
-				printk(KERN_ERR "%s: Error %d writing Tx "
-				       "descriptor to BAP\n", dev->name, err);
+				pr_err("%s: Error %d writing Tx descriptor to BAP\n",
+				       dev->name, err);
 			goto busy;
 		}
 
@@ -525,8 +524,7 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
 	err = hw->ops->bap_pwrite(hw, USER_BAP, skb->data, skb->len,
 				  txfid, HERMES_802_3_OFFSET);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d writing packet to BAP\n",
-		       dev->name, err);
+		pr_err("%s: Error %d writing packet to BAP\n", dev->name, err);
 		goto busy;
 	}
 
@@ -541,7 +539,7 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
 		err = hw->ops->bap_pwrite(hw, USER_BAP, &mic_buf[0], len,
 					  txfid, offset);
 		if (err) {
-			printk(KERN_ERR "%s: Error %d writing MIC to BAP\n",
+			pr_err("%s: Error %d writing MIC to BAP\n",
 			       dev->name, err);
 			goto busy;
 		}
@@ -555,8 +553,8 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (err) {
 		netif_start_queue(dev);
 		if (net_ratelimit())
-			printk(KERN_ERR "%s: Error %d transmitting packet\n",
-				dev->name, err);
+			pr_err("%s: Error %d transmitting packet\n",
+			       dev->name, err);
 		goto busy;
 	}
 
@@ -586,8 +584,8 @@ static void __orinoco_ev_alloc(struct net_device *dev, struct hermes *hw)
 
 	if (fid != priv->txfid) {
 		if (fid != DUMMY_FID)
-			printk(KERN_WARNING "%s: Allocate event on unexpected fid (%04X)\n",
-			       dev->name, fid);
+			pr_warn("%s: Allocate event on unexpected fid (%04X)\n",
+				dev->name, fid);
 		return;
 	}
 
@@ -627,9 +625,8 @@ static void __orinoco_ev_txexc(struct net_device *dev, struct hermes *hw)
 	stats->tx_errors++;
 
 	if (err) {
-		printk(KERN_WARNING "%s: Unable to read descriptor on Tx error "
-		       "(FID=%04X error %d)\n",
-		       dev->name, fid, err);
+		pr_warn("%s: Unable to read descriptor on Tx error (FID=%04X error %d)\n",
+			dev->name, fid, err);
 		return;
 	}
 
@@ -668,10 +665,9 @@ void orinoco_tx_timeout(struct net_device *dev)
 	struct net_device_stats *stats = &priv->stats;
 	struct hermes *hw = &priv->hw;
 
-	printk(KERN_WARNING "%s: Tx timeout! "
-	       "ALLOCFID=%04x, TXCOMPLFID=%04x, EVSTAT=%04x\n",
-	       dev->name, hermes_read_regn(hw, ALLOCFID),
-	       hermes_read_regn(hw, TXCOMPLFID), hermes_read_regn(hw, EVSTAT));
+	pr_warn("%s: Tx timeout! ALLOCFID=%04x, TXCOMPLFID=%04x, EVSTAT=%04x\n",
+		dev->name, hermes_read_regn(hw, ALLOCFID),
+		hermes_read_regn(hw, TXCOMPLFID), hermes_read_regn(hw, EVSTAT));
 
 	stats->tx_errors++;
 
@@ -793,16 +789,16 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid,
 
 	/* sanity check the length */
 	if (datalen > IEEE80211_MAX_DATA_LEN + 12) {
-		printk(KERN_DEBUG "%s: oversized monitor frame, "
-		       "data length = %d\n", dev->name, datalen);
+		pr_debug("%s: oversized monitor frame, data length = %d\n",
+			 dev->name, datalen);
 		stats->rx_length_errors++;
 		goto update_stats;
 	}
 
 	skb = dev_alloc_skb(hdrlen + datalen);
 	if (!skb) {
-		printk(KERN_WARNING "%s: Cannot allocate skb for monitor frame\n",
-		       dev->name);
+		pr_warn("%s: Cannot allocate skb for monitor frame\n",
+			dev->name);
 		goto update_stats;
 	}
 
@@ -816,7 +812,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid,
 					 ALIGN(datalen, 2), rxfid,
 					 HERMES_802_2_OFFSET);
 		if (err) {
-			printk(KERN_ERR "%s: error %d reading monitor frame\n",
+			pr_err("%s: error %d reading monitor frame\n",
 			       dev->name, err);
 			goto drop;
 		}
@@ -854,9 +850,8 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
 
 	desc = kmalloc(sizeof(*desc), GFP_ATOMIC);
 	if (!desc) {
-		printk(KERN_WARNING
-		       "%s: Can't allocate space for RX descriptor\n",
-		       dev->name);
+		pr_warn("%s: Can't allocate space for RX descriptor\n",
+			dev->name);
 		goto update_stats;
 	}
 
@@ -865,8 +860,8 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
 	err = hw->ops->bap_pread(hw, IRQ_BAP, desc, sizeof(*desc),
 				 rxfid, 0);
 	if (err) {
-		printk(KERN_ERR "%s: error %d reading Rx descriptor. "
-		       "Frame dropped.\n", dev->name, err);
+		pr_err("%s: error %d reading Rx descriptor. Frame dropped.\n",
+		       dev->name, err);
 		goto update_stats;
 	}
 
@@ -902,8 +897,8 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
 		goto out;
 	}
 	if (length > IEEE80211_MAX_DATA_LEN) {
-		printk(KERN_WARNING "%s: Oversized frame received (%d bytes)\n",
-		       dev->name, length);
+		pr_warn("%s: Oversized frame received (%d bytes)\n",
+			dev->name, length);
 		stats->rx_length_errors++;
 		goto update_stats;
 	}
@@ -920,8 +915,7 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
 	   bits */
 	skb = dev_alloc_skb(length + ETH_HLEN + 2 + 1);
 	if (!skb) {
-		printk(KERN_WARNING "%s: Can't allocate skb for Rx\n",
-		       dev->name);
+		pr_warn("%s: Can't allocate skb for Rx\n", dev->name);
 		goto update_stats;
 	}
 
@@ -934,8 +928,8 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
 				 ALIGN(length, 2), rxfid,
 				 HERMES_802_2_OFFSET);
 	if (err) {
-		printk(KERN_ERR "%s: error %d reading frame. "
-		       "Frame dropped.\n", dev->name, err);
+		pr_err("%s: error %d reading frame. Frame dropped.\n",
+		       dev->name, err);
 		goto drop;
 	}
 
@@ -994,9 +988,8 @@ static void orinoco_rx(struct net_device *dev,
 		key = (struct orinoco_tkip_key *) priv->keys[key_id].key;
 
 		if (!key) {
-			printk(KERN_WARNING "%s: Received encrypted frame from "
-			       "%pM using key %i, but key is not installed\n",
-			       dev->name, src, key_id);
+			pr_warn("%s: Received encrypted frame from %pM using key %i, but key is not installed\n",
+				dev->name, src, key_id);
 			goto drop;
 		}
 
@@ -1009,10 +1002,8 @@ static void orinoco_rx(struct net_device *dev,
 			union iwreq_data wrqu;
 			struct iw_michaelmicfailure wxmic;
 
-			printk(KERN_WARNING "%s: "
-			       "Invalid Michael MIC in data frame from %pM, "
-			       "using key %i\n",
-			       dev->name, src, key_id);
+			pr_warn("%s: Invalid Michael MIC in data frame from %pM, using key %i\n",
+				dev->name, src, key_id);
 
 			/* TODO: update stats */
 
@@ -1152,8 +1143,7 @@ static void print_linkstatus(struct net_device *dev, u16 status)
 		s = "UNKNOWN";
 	}
 
-	printk(KERN_DEBUG "%s: New link status: %s (%04x)\n",
-	       dev->name, s, status);
+	pr_debug("%s: New link status: %s (%04x)\n", dev->name, s, status);
 }
 
 /* Search scan results for requested BSSID, join it if found */
@@ -1196,8 +1186,7 @@ static void orinoco_join_ap(struct work_struct *work)
 				HERMES_RID_SCANRESULTSTABLE,
 				MAX_SCAN_LEN, &len, buf);
 	if (err) {
-		printk(KERN_ERR "%s: Cannot read scan results\n",
-		       dev->name);
+		pr_err("%s: Cannot read scan results\n", dev->name);
 		goto out;
 	}
 
@@ -1224,7 +1213,7 @@ static void orinoco_join_ap(struct work_struct *work)
 	err = HERMES_WRITE_RECORD(hw, USER_BAP, HERMES_RID_CNFJOINREQUEST,
 				  &req);
 	if (err)
-		printk(KERN_ERR "%s: Error issuing join request\n", dev->name);
+		pr_err("%s: Error issuing join request\n", dev->name);
 
  out:
 	orinoco_unlock(priv, &flags);
@@ -1337,7 +1326,7 @@ static void qbuf_scan(struct orinoco_private *priv, void *buf,
 
 	sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
 	if (!sd) {
-		printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
+		pr_err("%s: failed to alloc memory\n", __func__);
 		return;
 	}
 	sd->buf = buf;
@@ -1358,7 +1347,7 @@ static void qabort_scan(struct orinoco_private *priv)
 
 	sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
 	if (!sd) {
-		printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
+		pr_err("%s: failed to alloc memory\n", __func__);
 		return;
 	}
 	sd->len = -1; /* Abort */
@@ -1429,8 +1418,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 	err = hw->ops->bap_pread(hw, IRQ_BAP, &info, sizeof(info),
 				 infofid, 0);
 	if (err) {
-		printk(KERN_ERR "%s: error %d reading info frame. "
-		       "Frame dropped.\n", dev->name, err);
+		pr_err("%s: error %d reading info frame. Frame dropped.\n",
+		       dev->name, err);
 		return;
 	}
 
@@ -1443,8 +1432,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 		struct iw_statistics *wstats = &priv->wstats;
 
 		if (len > sizeof(tallies)) {
-			printk(KERN_WARNING "%s: Tallies frame too long (%d bytes)\n",
-			       dev->name, len);
+			pr_warn("%s: Tallies frame too long (%d bytes)\n",
+				dev->name, len);
 			len = sizeof(tallies);
 		}
 
@@ -1479,8 +1468,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 			break;
 
 		if (len != sizeof(linkstatus)) {
-			printk(KERN_WARNING "%s: Unexpected size for linkstatus frame (%d bytes)\n",
-			       dev->name, len);
+			pr_warn("%s: Unexpected size for linkstatus frame (%d bytes)\n",
+				dev->name, len);
 			break;
 		}
 
@@ -1534,8 +1523,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 
 		/* Sanity check */
 		if (len > 4096) {
-			printk(KERN_WARNING "%s: Scan results too large (%d bytes)\n",
-			       dev->name, len);
+			pr_warn("%s: Scan results too large (%d bytes)\n",
+				dev->name, len);
 			qabort_scan(priv);
 			break;
 		}
@@ -1560,10 +1549,10 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 #ifdef ORINOCO_DEBUG
 		{
 			int	i;
-			printk(KERN_DEBUG "Scan result [%02X", buf[0]);
+			pr_debug("Scan result [%02X", buf[0]);
 			for (i = 1; i < (len * 2); i++)
-				printk(":%02X", buf[i]);
-			printk("]\n");
+				pr_cont(":%02X", buf[i]);
+			pr_cont("]\n");
 		}
 #endif	/* ORINOCO_DEBUG */
 
@@ -1575,8 +1564,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 		struct agere_ext_scan_info *bss;
 
 		if (!priv->scan_request) {
-			printk(KERN_DEBUG "%s: Got chaninfo without scan, "
-			       "len=%d\n", dev->name, len);
+			pr_debug("%s: Got chaninfo without scan, len=%d\n",
+				 dev->name, len);
 			break;
 		}
 
@@ -1591,9 +1580,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 					   data) + 2)) {
 			/* Drop this result now so we don't have to
 			 * keep checking later */
-			printk(KERN_WARNING
-			       "%s: Ext scan results too short (%d bytes)\n",
-			       dev->name, len);
+			pr_warn("%s: Ext scan results too short (%d bytes)\n",
+				dev->name, len);
 			break;
 		}
 
@@ -1618,8 +1606,8 @@ void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
 			break;
 		/* fall through */
 	default:
-		printk(KERN_DEBUG "%s: Unknown information frame received: "
-		       "type 0x%04x, length %d\n", dev->name, type, len);
+		pr_debug("%s: Unknown information frame received: type 0x%04x, length %d\n",
+			 dev->name, type, len);
 		/* We don't actually do anything about it */
 		break;
 	}
@@ -1629,7 +1617,7 @@ EXPORT_SYMBOL(__orinoco_ev_info);
 static void __orinoco_ev_infdrop(struct net_device *dev, struct hermes *hw)
 {
 	if (net_ratelimit())
-		printk(KERN_DEBUG "%s: Information frame lost.\n", dev->name);
+		pr_debug("%s: Information frame lost\n", dev->name);
 }
 
 /********************************************************************/
@@ -1646,8 +1634,7 @@ static int __orinoco_up(struct orinoco_private *priv)
 
 	err = __orinoco_commit(priv);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d configuring card\n",
-		       dev->name, err);
+		pr_err("%s: Error %d configuring card\n", dev->name, err);
 		return err;
 	}
 
@@ -1655,8 +1642,7 @@ static int __orinoco_up(struct orinoco_private *priv)
 	hermes_set_irqmask(hw, ORINOCO_INTEN);
 	err = hermes_enable_port(hw, 0);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d enabling MAC port\n",
-		       dev->name, err);
+		pr_err("%s: Error %d enabling MAC port\n", dev->name, err);
 		return err;
 	}
 
@@ -1680,8 +1666,8 @@ static int __orinoco_down(struct orinoco_private *priv)
 				/* Some firmwares (e.g. Intersil 1.3.x) seem
 				 * to have problems disabling the port, oh
 				 * well, too bad. */
-				printk(KERN_WARNING "%s: Error %d disabling MAC port\n",
-				       dev->name, err);
+				pr_warn("%s: Error %d disabling MAC port\n",
+					dev->name, err);
 				priv->broken_disableport = 1;
 			}
 		}
@@ -1774,15 +1760,15 @@ void orinoco_reset(struct work_struct *work)
 	if (priv->hard_reset) {
 		err = (*priv->hard_reset)(priv);
 		if (err) {
-			printk(KERN_ERR "%s: orinoco_reset: Error %d "
-			       "performing hard reset\n", dev->name, err);
+			pr_err("%s: orinoco_reset: Error %d performing hard reset\n",
+			       dev->name, err);
 			goto disable;
 		}
 	}
 
 	err = orinoco_reinit_firmware(priv);
 	if (err) {
-		printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n",
+		pr_err("%s: orinoco_reset: Error %d re-initializing firmware\n",
 		       dev->name, err);
 		goto disable;
 	}
@@ -1797,7 +1783,7 @@ void orinoco_reset(struct work_struct *work)
 	if (priv->open && (!priv->hw_unavailable)) {
 		err = __orinoco_up(priv);
 		if (err) {
-			printk(KERN_ERR "%s: orinoco_reset: Error %d reenabling card\n",
+			pr_err("%s: orinoco_reset: Error %d reenabling card\n",
 			       dev->name, err);
 		} else
 			dev->trans_start = jiffies;
@@ -1809,7 +1795,7 @@ void orinoco_reset(struct work_struct *work)
  disable:
 	hermes_set_irqmask(hw, 0);
 	netif_device_detach(dev);
-	printk(KERN_ERR "%s: Device has been disabled!\n", dev->name);
+	pr_err("%s: Device has been disabled!\n", dev->name);
 }
 
 static int __orinoco_commit(struct orinoco_private *priv)
@@ -1847,29 +1833,28 @@ int orinoco_commit(struct orinoco_private *priv)
 
 	err = hermes_disable_port(hw, 0);
 	if (err) {
-		printk(KERN_WARNING "%s: Unable to disable port "
-		       "while reconfiguring card\n", dev->name);
+		pr_warn("%s: Unable to disable port while reconfiguring card\n",
+			dev->name);
 		priv->broken_disableport = 1;
 		goto out;
 	}
 
 	err = __orinoco_commit(priv);
 	if (err) {
-		printk(KERN_WARNING "%s: Unable to reconfigure card\n",
-		       dev->name);
+		pr_warn("%s: Unable to reconfigure card\n", dev->name);
 		goto out;
 	}
 
 	err = hermes_enable_port(hw, 0);
 	if (err) {
-		printk(KERN_WARNING "%s: Unable to enable port while reconfiguring card\n",
-		       dev->name);
+		pr_warn("%s: Unable to enable port while reconfiguring card\n",
+			dev->name);
 		goto out;
 	}
 
  out:
 	if (err) {
-		printk(KERN_WARNING "%s: Resetting instead...\n", dev->name);
+		pr_warn("%s: Resetting instead...\n", dev->name);
 		schedule_work(&priv->reset_work);
 		err = 0;
 	}
@@ -1882,15 +1867,15 @@ int orinoco_commit(struct orinoco_private *priv)
 
 static void __orinoco_ev_tick(struct net_device *dev, struct hermes *hw)
 {
-	printk(KERN_DEBUG "%s: TICK\n", dev->name);
+	pr_debug("%s: TICK\n", dev->name);
 }
 
 static void __orinoco_ev_wterr(struct net_device *dev, struct hermes *hw)
 {
 	/* This seems to happen a fair bit under load, but ignoring it
 	   seems to work fine...*/
-	printk(KERN_DEBUG "%s: MAC controller error (WTERR). Ignoring.\n",
-	       dev->name);
+	pr_debug("%s: MAC controller error (WTERR). Ignoring.\n",
+		 dev->name);
 }
 
 irqreturn_t orinoco_interrupt(int irq, void *dev_id)
@@ -1929,8 +1914,8 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
 
 	while (events && count--) {
 		if (++loops_this_jiffy > MAX_IRQLOOPS_PER_JIFFY) {
-			printk(KERN_WARNING "%s: IRQ handler is looping too "
-			       "much! Resetting.\n", dev->name);
+			pr_warn("%s: IRQ handler is looping too much! Resetting.\n",
+				dev->name);
 			/* Disable interrupts for now */
 			hermes_set_irqmask(hw, 0);
 			schedule_work(&priv->reset_work);
@@ -2374,7 +2359,7 @@ int orinoco_up(struct orinoco_private *priv)
 
 	err = orinoco_reinit_firmware(priv);
 	if (err) {
-		printk(KERN_ERR "%s: Error %d re-initializing firmware\n",
+		pr_err("%s: Error %d re-initializing firmware\n",
 		       dev->name, err);
 		goto exit;
 	}
@@ -2385,7 +2370,7 @@ int orinoco_up(struct orinoco_private *priv)
 	if (priv->open && !priv->hw_unavailable) {
 		err = __orinoco_up(priv);
 		if (err)
-			printk(KERN_ERR "%s: Error %d restarting card\n",
+			pr_err("%s: Error %d restarting card\n",
 			       dev->name, err);
 	}
 
@@ -2405,8 +2390,7 @@ void orinoco_down(struct orinoco_private *priv)
 	priv->hw.ops->lock_irqsave(&priv->lock, &flags);
 	err = __orinoco_down(priv);
 	if (err)
-		printk(KERN_WARNING "%s: Error %d downing interface\n",
-		       dev->name, err);
+		pr_warn("%s: Error %d downing interface\n", dev->name, err);
 
 	netif_device_detach(dev);
 	priv->hw_unavailable++;
@@ -2426,7 +2410,7 @@ static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
 
 static int __init init_orinoco(void)
 {
-	printk(KERN_DEBUG "%s\n", version);
+	pr_debug("%s\n", version);
 	return 0;
 }
 
diff --git a/drivers/net/wireless/orinoco/mic.c b/drivers/net/wireless/orinoco/mic.c
index fce4a84..2263c14 100644
--- a/drivers/net/wireless/orinoco/mic.c
+++ b/drivers/net/wireless/orinoco/mic.c
@@ -2,6 +2,9 @@
  *
  * See copyright notice in main.c
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/if_ether.h>
@@ -18,16 +21,16 @@ int orinoco_mic_init(struct orinoco_private *priv)
 {
 	priv->tx_tfm_mic = crypto_alloc_hash("michael_mic", 0, 0);
 	if (IS_ERR(priv->tx_tfm_mic)) {
-		printk(KERN_DEBUG "orinoco_mic_init: could not allocate "
-		       "crypto API michael_mic\n");
+		pr_debug("%s: could not allocate crypto API michael_mic\n",
+			 __func__);
 		priv->tx_tfm_mic = NULL;
 		return -ENOMEM;
 	}
 
 	priv->rx_tfm_mic = crypto_alloc_hash("michael_mic", 0, 0);
 	if (IS_ERR(priv->rx_tfm_mic)) {
-		printk(KERN_DEBUG "orinoco_mic_init: could not allocate "
-		       "crypto API michael_mic\n");
+		pr_debug("%s: could not allocate crypto API michael_mic\n",
+			 __func__);
 		priv->rx_tfm_mic = NULL;
 		return -ENOMEM;
 	}
@@ -52,7 +55,7 @@ int orinoco_mic(struct crypto_hash *tfm_michael, u8 *key,
 	u8 hdr[ETH_HLEN + 2]; /* size of header + padding */
 
 	if (tfm_michael == NULL) {
-		printk(KERN_WARNING "orinoco_mic: tfm_michael == NULL\n");
+		pr_warn("%s: tfm_michael == NULL\n", __func__);
 		return -1;
 	}
 
diff --git a/drivers/net/wireless/orinoco/orinoco.h b/drivers/net/wireless/orinoco/orinoco.h
index 3bb936b..b63a71a 100644
--- a/drivers/net/wireless/orinoco/orinoco.h
+++ b/drivers/net/wireless/orinoco/orinoco.h
@@ -170,12 +170,17 @@ struct orinoco_private {
 
 #ifdef ORINOCO_DEBUG
 extern int orinoco_debug;
-#define DEBUG(n, args...) do { \
-	if (orinoco_debug > (n)) \
-		printk(KERN_DEBUG args); \
+#define DEBUG(n, fmt, ...)				\
+do {							\
+	if (orinoco_debug > (n))			\
+		pr_debug(fmt, ##__VA_ARGS__);		\
 } while (0)
 #else
-#define DEBUG(n, args...) do { } while (0)
+#define DEBUG(n, fmt, ...)				\
+do {							\
+	if (0)						\
+		pr_debug(fmt, ##__VA_ARGS__);		\
+} while (0)
 #endif	/* ORINOCO_DEBUG */
 
 /********************************************************************/
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index d7dbc00..ed4b834 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -10,8 +10,9 @@
  * Copyright notice & release notes in file main.c
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco_cs"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -145,9 +146,7 @@ orinoco_cs_config(struct pcmcia_device *link)
 	ret = pcmcia_loop_config(link, orinoco_cs_config_check, NULL);
 	if (ret) {
 		if (!ignore_cis_vcc)
-			printk(KERN_ERR PFX "GetNextTuple(): No matching "
-			       "CIS configuration.  Maybe you need the "
-			       "ignore_cis_vcc=1 parameter.\n");
+			pr_err("GetNextTuple(): No matching CIS configuration.  Maybe you need the ignore_cis_vcc=1 parameter.\n");
 		goto failed;
 	}
 
@@ -171,14 +170,14 @@ orinoco_cs_config(struct pcmcia_device *link)
 
 	/* Initialise the main driver */
 	if (orinoco_init(priv) != 0) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto failed;
 	}
 
 	/* Register an interface with the stack */
 	if (orinoco_if_add(priv, link->resource[0]->start,
 			   link->irq, NULL) != 0) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err("orinoco_if_add() failed\n");
 		goto failed;
 	}
 
diff --git a/drivers/net/wireless/orinoco/orinoco_nortel.c b/drivers/net/wireless/orinoco/orinoco_nortel.c
index 326396b..1a2750f 100644
--- a/drivers/net/wireless/orinoco/orinoco_nortel.c
+++ b/drivers/net/wireless/orinoco/orinoco_nortel.c
@@ -37,8 +37,9 @@
  * under either the MPL or the GPL.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco_nortel"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -94,7 +95,7 @@ static int orinoco_nortel_hw_init(struct orinoco_pci_card *card)
 
 	/* Setup bridge */
 	if (ioread16(card->bridge_io) & 1) {
-		printk(KERN_ERR PFX "brg1 answer1 wrong\n");
+		pr_err("brg1 answer1 wrong\n");
 		return -EBUSY;
 	}
 	iowrite16(0x118, card->bridge_io + 2);
@@ -107,19 +108,19 @@ static int orinoco_nortel_hw_init(struct orinoco_pci_card *card)
 			break;
 	}
 	if (i == 30) {
-		printk(KERN_ERR PFX "brg1 timed out\n");
+		pr_err("brg1 timed out\n");
 		return -EBUSY;
 	}
 	if (ioread16(card->attr_io + COR_OFFSET) & 1) {
-		printk(KERN_ERR PFX "brg2 answer1 wrong\n");
+		pr_err("brg2 answer1 wrong\n");
 		return -EBUSY;
 	}
 	if (ioread16(card->attr_io + COR_OFFSET + 2) & 1) {
-		printk(KERN_ERR PFX "brg2 answer2 wrong\n");
+		pr_err("brg2 answer2 wrong\n");
 		return -EBUSY;
 	}
 	if (ioread16(card->attr_io + COR_OFFSET + 4) & 1) {
-		printk(KERN_ERR PFX "brg2 answer3 wrong\n");
+		pr_err("brg2 answer3 wrong\n");
 		return -EBUSY;
 	}
 
@@ -128,8 +129,7 @@ static int orinoco_nortel_hw_init(struct orinoco_pci_card *card)
 	mdelay(1);
 	reg = ioread16(card->attr_io + COR_OFFSET);
 	if (reg != COR_VALUE) {
-		printk(KERN_ERR PFX "Error setting COR value (reg=%x)\n",
-		       reg);
+		pr_err("Error setting COR value (reg=%x)\n", reg);
 		return -EBUSY;
 	}
 
@@ -148,33 +148,33 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot enable PCI device\n");
+		pr_err("Cannot enable PCI device\n");
 		return err;
 	}
 
 	err = pci_request_regions(pdev, DRIVER_NAME);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
+		pr_err("Cannot obtain PCI resources\n");
 		goto fail_resources;
 	}
 
 	bridge_io = pci_iomap(pdev, 0, 0);
 	if (!bridge_io) {
-		printk(KERN_ERR PFX "Cannot map bridge registers\n");
+		pr_err("Cannot map bridge registers\n");
 		err = -EIO;
 		goto fail_map_bridge;
 	}
 
 	attr_io = pci_iomap(pdev, 1, 0);
 	if (!attr_io) {
-		printk(KERN_ERR PFX "Cannot map PCMCIA attributes\n");
+		pr_err("Cannot map PCMCIA attributes\n");
 		err = -EIO;
 		goto fail_map_attr;
 	}
 
 	hermes_io = pci_iomap(pdev, 2, 0);
 	if (!hermes_io) {
-		printk(KERN_ERR PFX "Cannot map chipset registers\n");
+		pr_err("Cannot map chipset registers\n");
 		err = -EIO;
 		goto fail_map_hermes;
 	}
@@ -183,7 +183,7 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
 	priv = alloc_orinocodev(sizeof(*card), &pdev->dev,
 				orinoco_nortel_cor_reset, NULL);
 	if (!priv) {
-		printk(KERN_ERR PFX "Cannot allocate network device\n");
+		pr_err("Cannot allocate network device\n");
 		err = -ENOMEM;
 		goto fail_alloc;
 	}
@@ -197,32 +197,32 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
 	err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
 			  DRIVER_NAME, priv);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
+		pr_err("Cannot allocate IRQ %d\n", pdev->irq);
 		err = -EBUSY;
 		goto fail_irq;
 	}
 
 	err = orinoco_nortel_hw_init(card);
 	if (err) {
-		printk(KERN_ERR PFX "Hardware initialization failed\n");
+		pr_err("Hardware initialization failed\n");
 		goto fail;
 	}
 
 	err = orinoco_nortel_cor_reset(priv);
 	if (err) {
-		printk(KERN_ERR PFX "Initial reset failed\n");
+		pr_err("Initial reset failed\n");
 		goto fail;
 	}
 
 	err = orinoco_init(priv);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto fail;
 	}
 
 	err = orinoco_if_add(priv, 0, 0, NULL);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err("orinoco_if_add() failed\n");
 		goto fail;
 	}
 
@@ -301,7 +301,7 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 static int __init orinoco_nortel_init(void)
 {
-	printk(KERN_DEBUG "%s\n", version);
+	pr_debug("%s\n", version);
 	return pci_register_driver(&orinoco_nortel_driver);
 }
 
diff --git a/drivers/net/wireless/orinoco/orinoco_pci.c b/drivers/net/wireless/orinoco/orinoco_pci.c
index 6058c66..fd7b0ed 100644
--- a/drivers/net/wireless/orinoco/orinoco_pci.c
+++ b/drivers/net/wireless/orinoco/orinoco_pci.c
@@ -41,8 +41,9 @@
  * under either the MPL or the GPL.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco_pci"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -103,7 +104,7 @@ static int orinoco_pci_cor_reset(struct orinoco_private *priv)
 
 	/* Still busy? */
 	if (reg & HERMES_CMD_BUSY) {
-		printk(KERN_ERR PFX "Busy timeout\n");
+		pr_err("Busy timeout\n");
 		return -ETIMEDOUT;
 	}
 
@@ -120,19 +121,19 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot enable PCI device\n");
+		pr_err("Cannot enable PCI device\n");
 		return err;
 	}
 
 	err = pci_request_regions(pdev, DRIVER_NAME);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
+		pr_err("Cannot obtain PCI resources\n");
 		goto fail_resources;
 	}
 
 	hermes_io = pci_iomap(pdev, 0, 0);
 	if (!hermes_io) {
-		printk(KERN_ERR PFX "Cannot remap chipset registers\n");
+		pr_err("Cannot remap chipset registers\n");
 		err = -EIO;
 		goto fail_map_hermes;
 	}
@@ -141,7 +142,7 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
 	priv = alloc_orinocodev(sizeof(*card), &pdev->dev,
 				orinoco_pci_cor_reset, NULL);
 	if (!priv) {
-		printk(KERN_ERR PFX "Cannot allocate network device\n");
+		pr_err("Cannot allocate network device\n");
 		err = -ENOMEM;
 		goto fail_alloc;
 	}
@@ -153,26 +154,26 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
 	err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
 			  DRIVER_NAME, priv);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
+		pr_err("Cannot allocate IRQ %d\n", pdev->irq);
 		err = -EBUSY;
 		goto fail_irq;
 	}
 
 	err = orinoco_pci_cor_reset(priv);
 	if (err) {
-		printk(KERN_ERR PFX "Initial reset failed\n");
+		pr_err("Initial reset failed\n");
 		goto fail;
 	}
 
 	err = orinoco_init(priv);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto fail;
 	}
 
 	err = orinoco_if_add(priv, 0, 0, NULL);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err("orinoco_if_add() failed\n");
 		goto fail;
 	}
 
@@ -244,7 +245,7 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 static int __init orinoco_pci_init(void)
 {
-	printk(KERN_DEBUG "%s\n", version);
+	pr_debug("%s\n", version);
 	return pci_register_driver(&orinoco_pci_driver);
 }
 
diff --git a/drivers/net/wireless/orinoco/orinoco_pci.h b/drivers/net/wireless/orinoco/orinoco_pci.h
index ea7231a..8985975 100644
--- a/drivers/net/wireless/orinoco/orinoco_pci.h
+++ b/drivers/net/wireless/orinoco/orinoco_pci.h
@@ -41,8 +41,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
 	pci_set_power_state(pdev, 0);
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
-		       dev->name);
+		pr_err("%s: pci_enable_device failed on resume\n", dev->name);
 		return err;
 	}
 	pci_restore_state(pdev);
@@ -50,8 +49,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
 	err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
 			  dev->name, priv);
 	if (err) {
-		printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n",
-		       dev->name);
+		pr_err("%s: cannot re-allocate IRQ on resume\n", dev->name);
 		pci_disable_device(pdev);
 		return -EBUSY;
 	}
diff --git a/drivers/net/wireless/orinoco/orinoco_plx.c b/drivers/net/wireless/orinoco/orinoco_plx.c
index 2bac824..4d20f62 100644
--- a/drivers/net/wireless/orinoco/orinoco_plx.c
+++ b/drivers/net/wireless/orinoco/orinoco_plx.c
@@ -83,8 +83,9 @@
  * radio card's firmware locks up).
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco_plx"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -130,7 +131,7 @@ static int orinoco_plx_cor_reset(struct orinoco_private *priv)
 
 	/* Still busy? */
 	if (reg & HERMES_CMD_BUSY) {
-		printk(KERN_ERR PFX "Busy timeout\n");
+		pr_err("Busy timeout\n");
 		return -ETIMEDOUT;
 	}
 
@@ -145,17 +146,16 @@ static int orinoco_plx_hw_init(struct orinoco_pci_card *card)
 		0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67
 	};
 
-	printk(KERN_DEBUG PFX "CIS: ");
+	pr_debug("CIS: ");
 	for (i = 0; i < 16; i++)
-		printk("%02X:", ioread8(card->attr_io + (i << 1)));
-	printk("\n");
+		pr_cont("%02X:", ioread8(card->attr_io + (i << 1)));
+	pr_cont("\n");
 
 	/* Verify whether a supported PC card is present */
 	/* FIXME: we probably need to be smarted about this */
 	for (i = 0; i < sizeof(cis_magic); i++) {
 		if (cis_magic[i] != ioread8(card->attr_io + (i << 1))) {
-			printk(KERN_ERR PFX "The CIS value of Prism2 PC "
-			       "card is unexpected\n");
+			pr_err("The CIS value of Prism2 PC card is unexpected\n");
 			return -ENODEV;
 		}
 	}
@@ -169,7 +169,7 @@ static int orinoco_plx_hw_init(struct orinoco_pci_card *card)
 		iowrite32(csr_reg, card->bridge_io + PLX_INTCSR);
 		csr_reg = ioread32(card->bridge_io + PLX_INTCSR);
 		if (!(csr_reg & PLX_INTCSR_INTEN)) {
-			printk(KERN_ERR PFX "Cannot enable interrupts\n");
+			pr_err("Cannot enable interrupts\n");
 			return -EIO;
 		}
 	}
@@ -187,33 +187,33 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot enable PCI device\n");
+		pr_err("Cannot enable PCI device\n");
 		return err;
 	}
 
 	err = pci_request_regions(pdev, DRIVER_NAME);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
+		pr_err("Cannot obtain PCI resources\n");
 		goto fail_resources;
 	}
 
 	bridge_io = pci_iomap(pdev, 1, 0);
 	if (!bridge_io) {
-		printk(KERN_ERR PFX "Cannot map bridge registers\n");
+		pr_err("Cannot map bridge registers\n");
 		err = -EIO;
 		goto fail_map_bridge;
 	}
 
 	attr_io = pci_iomap(pdev, 2, 0);
 	if (!attr_io) {
-		printk(KERN_ERR PFX "Cannot map PCMCIA attributes\n");
+		pr_err("Cannot map PCMCIA attributes\n");
 		err = -EIO;
 		goto fail_map_attr;
 	}
 
 	hermes_io = pci_iomap(pdev, 3, 0);
 	if (!hermes_io) {
-		printk(KERN_ERR PFX "Cannot map chipset registers\n");
+		pr_err("Cannot map chipset registers\n");
 		err = -EIO;
 		goto fail_map_hermes;
 	}
@@ -222,7 +222,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
 	priv = alloc_orinocodev(sizeof(*card), &pdev->dev,
 				orinoco_plx_cor_reset, NULL);
 	if (!priv) {
-		printk(KERN_ERR PFX "Cannot allocate network device\n");
+		pr_err("Cannot allocate network device\n");
 		err = -ENOMEM;
 		goto fail_alloc;
 	}
@@ -236,32 +236,32 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
 	err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
 			  DRIVER_NAME, priv);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
+		pr_err("Cannot allocate IRQ %d\n", pdev->irq);
 		err = -EBUSY;
 		goto fail_irq;
 	}
 
 	err = orinoco_plx_hw_init(card);
 	if (err) {
-		printk(KERN_ERR PFX "Hardware initialization failed\n");
+		pr_err("Hardware initialization failed\n");
 		goto fail;
 	}
 
 	err = orinoco_plx_cor_reset(priv);
 	if (err) {
-		printk(KERN_ERR PFX "Initial reset failed\n");
+		pr_err("Initial reset failed\n");
 		goto fail;
 	}
 
 	err = orinoco_init(priv);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto fail;
 	}
 
 	err = orinoco_if_add(priv, 0, 0, NULL);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err("orinoco_if_add() failed\n");
 		goto fail;
 	}
 
@@ -349,7 +349,7 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 static int __init orinoco_plx_init(void)
 {
-	printk(KERN_DEBUG "%s\n", version);
+	pr_debug("%s\n", version);
 	return pci_register_driver(&orinoco_plx_driver);
 }
 
diff --git a/drivers/net/wireless/orinoco/orinoco_tmd.c b/drivers/net/wireless/orinoco/orinoco_tmd.c
index 93159d6..be6883c 100644
--- a/drivers/net/wireless/orinoco/orinoco_tmd.c
+++ b/drivers/net/wireless/orinoco/orinoco_tmd.c
@@ -37,8 +37,9 @@
  * Pheecom sells cards with the TMD chip as "ASIC version"
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco_tmd"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -80,7 +81,7 @@ static int orinoco_tmd_cor_reset(struct orinoco_private *priv)
 
 	/* Still busy? */
 	if (reg & HERMES_CMD_BUSY) {
-		printk(KERN_ERR PFX "Busy timeout\n");
+		pr_err("Busy timeout\n");
 		return -ETIMEDOUT;
 	}
 
@@ -98,26 +99,26 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot enable PCI device\n");
+		pr_err("Cannot enable PCI device\n");
 		return err;
 	}
 
 	err = pci_request_regions(pdev, DRIVER_NAME);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
+		pr_err("Cannot obtain PCI resources\n");
 		goto fail_resources;
 	}
 
 	bridge_io = pci_iomap(pdev, 1, 0);
 	if (!bridge_io) {
-		printk(KERN_ERR PFX "Cannot map bridge registers\n");
+		pr_err("Cannot map bridge registers\n");
 		err = -EIO;
 		goto fail_map_bridge;
 	}
 
 	hermes_io = pci_iomap(pdev, 2, 0);
 	if (!hermes_io) {
-		printk(KERN_ERR PFX "Cannot map chipset registers\n");
+		pr_err("Cannot map chipset registers\n");
 		err = -EIO;
 		goto fail_map_hermes;
 	}
@@ -126,7 +127,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
 	priv = alloc_orinocodev(sizeof(*card), &pdev->dev,
 				orinoco_tmd_cor_reset, NULL);
 	if (!priv) {
-		printk(KERN_ERR PFX "Cannot allocate network device\n");
+		pr_err("Cannot allocate network device\n");
 		err = -ENOMEM;
 		goto fail_alloc;
 	}
@@ -139,26 +140,26 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
 	err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
 			  DRIVER_NAME, priv);
 	if (err) {
-		printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
+		pr_err("Cannot allocate IRQ %d\n", pdev->irq);
 		err = -EBUSY;
 		goto fail_irq;
 	}
 
 	err = orinoco_tmd_cor_reset(priv);
 	if (err) {
-		printk(KERN_ERR PFX "Initial reset failed\n");
+		pr_err("Initial reset failed\n");
 		goto fail;
 	}
 
 	err = orinoco_init(priv);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto fail;
 	}
 
 	err = orinoco_if_add(priv, 0, 0, NULL);
 	if (err) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err("orinoco_if_add() failed\n");
 		goto fail;
 	}
 
@@ -227,7 +228,7 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 static int __init orinoco_tmd_init(void)
 {
-	printk(KERN_DEBUG "%s\n", version);
+	pr_debug("%s\n", version);
 	return pci_register_driver(&orinoco_tmd_driver);
 }
 
diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
index 7f53cea2..99b0972 100644
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -43,8 +43,9 @@
  * gone so MPL/GPL applies.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #define DRIVER_NAME "orinoco_usb"
-#define PFX DRIVER_NAME ": "
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -109,12 +110,12 @@ static int debug;
 
 /* Debugging macros */
 #undef dbg
-#define dbg(format, arg...) \
-	do { if (debug) printk(KERN_DEBUG PFX "%s: " format "\n", \
-			       __func__ , ## arg); } while (0)
-#undef err
-#define err(format, arg...) \
-	do { printk(KERN_ERR PFX format "\n", ## arg); } while (0)
+#define dbg(format, ...)					\
+do {								\
+	if (debug)						\
+		pr_debug("%s: " format,				\
+			 __func__, ##__VA_ARGS__);		\
+} while (0)
 
 /* Module paramaters */
 module_param(debug, int, 0644);
@@ -439,13 +440,13 @@ static void ezusb_ctx_complete(struct request_context *ctx)
 		if (!upriv->udev) {
 			/* This is normal, as all request contexts get flushed
 			 * when the device is disconnected */
-			err("Called, CTX not terminating, but device gone");
+			pr_err("Called, CTX not terminating, but device gone\n");
 			ezusb_complete_all(&ctx->done);
 			ezusb_request_context_put(ctx);
 			break;
 		}
 
-		err("Called, CTX not in terminating state.");
+		pr_err("Called, CTX not in terminating state\n");
 		/* Things are really bad if this happens. Just leak
 		 * the CTX because it may still be linked to the
 		 * queue or the OUT urb may still be active.
@@ -494,8 +495,8 @@ static void ezusb_req_queue_run(struct ezusb_priv *upriv)
 
 			spin_unlock_irqrestore(&upriv->req_lock, flags);
 
-			err("Fatal, failed to submit command urb."
-			    " error=%d\n", result);
+			pr_err("Fatal, failed to submit command urb. error=%d\n",
+			       result);
 
 			ezusb_ctx_complete(ctx);
 			ezusb_request_context_put(ctx);
@@ -549,7 +550,7 @@ static void ezusb_request_out_callback(struct urb *urb)
 
 	if (ctx->killed) {
 		spin_unlock_irqrestore(&upriv->req_lock, flags);
-		pr_warning("interrupt called with dead ctx");
+		pr_warn("interrupt called with dead ctx");
 		goto out;
 	}
 
@@ -577,8 +578,8 @@ static void ezusb_request_out_callback(struct urb *urb)
 
 		default:
 			spin_unlock_irqrestore(&upriv->req_lock, flags);
-			err("Unexpected state(0x%x, %d) in OUT URB",
-			    state, urb->status);
+			pr_err("Unexpected state(0x%x, %d) in OUT URB\n",
+			       state, urb->status);
 			break;
 		}
 	} else {
@@ -601,8 +602,8 @@ static void ezusb_request_out_callback(struct urb *urb)
 		default:
 			spin_unlock_irqrestore(&upriv->req_lock, flags);
 
-			err("Unexpected state(0x%x, %d) in OUT URB",
-			    state, urb->status);
+			pr_err("Unexpected state(0x%x, %d) in OUT URB\n",
+			       state, urb->status);
 			break;
 		}
 	}
@@ -643,8 +644,8 @@ static void ezusb_request_in_callback(struct ezusb_priv *upriv,
 
 	if (ctx == NULL) {
 		spin_unlock_irqrestore(&upriv->req_lock, flags);
-		err("%s: got unexpected RID: 0x%04X", __func__,
-		    le16_to_cpu(ans->hermes_rid));
+		pr_err("%s: got unexpected RID: 0x%04X\n",
+		       __func__, le16_to_cpu(ans->hermes_rid));
 		ezusb_req_queue_run(upriv);
 		return;
 	}
@@ -686,7 +687,7 @@ static void ezusb_request_in_callback(struct ezusb_priv *upriv,
 	default:
 		spin_unlock_irqrestore(&upriv->req_lock, flags);
 
-		pr_warning("Matched IN URB, unexpected context state(0x%x)",
+		pr_warn("Matched IN URB, unexpected context state(0x%x)",
 		     state);
 		/* Throw this CTX away and try submitting another */
 		del_timer(&ctx->timer);
@@ -779,7 +780,7 @@ static int ezusb_submit_in_urb(struct ezusb_priv *upriv)
 	upriv->read_urb->transfer_flags = 0;
 	retval = usb_submit_urb(upriv->read_urb, GFP_ATOMIC);
 	if (retval)
-		err("%s submit failed %d", __func__, retval);
+		pr_err("%s submit failed %d\n", __func__, retval);
 
  exit:
 	return retval;
@@ -790,7 +791,7 @@ static inline int ezusb_8051_cpucs(struct ezusb_priv *upriv, int reset)
 	u8 res_val = reset;	/* avoid argument promotion */
 
 	if (!upriv->udev) {
-		err("%s: !upriv->udev", __func__);
+		pr_err("%s: !upriv->udev\n", __func__);
 		return -EFAULT;
 	}
 	return usb_control_msg(upriv->udev,
@@ -816,8 +817,8 @@ static int ezusb_firmware_download(struct ezusb_priv *upriv,
 	 */
 	variant_offset = be16_to_cpup((__be16 *) &fw->code[FW_VAR_OFFSET_PTR]);
 	if (variant_offset >= fw->size) {
-		printk(KERN_ERR PFX "Invalid firmware variant offset: "
-		       "0x%04x\n", variant_offset);
+		pr_err("Invalid firmware variant offset: 0x%04x\n",
+		       variant_offset);
 		retval = -EINVAL;
 		goto fail;
 	}
@@ -856,8 +857,7 @@ static int ezusb_firmware_download(struct ezusb_priv *upriv,
 
 	goto exit;
  fail:
-	printk(KERN_ERR PFX "Firmware download failed, error %d\n",
-	       retval);
+	pr_err("Firmware download failed, error %d\n", retval);
  exit:
 	return retval;
 }
@@ -879,7 +879,7 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
 	}
 
 	if (upriv->read_urb->status != -EINPROGRESS)
-		err("%s: in urb not pending", __func__);
+		pr_err("%s: in urb not pending\n", __func__);
 
 	/* protect upriv->reply_count, guarantee sequential numbers */
 	spin_lock_bh(&upriv->reply_count_lock);
@@ -910,22 +910,21 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
 		if (!ctx->in_rid)
 			break;
 	default:
-		err("%s: Unexpected context state %d", __func__,
-		    state);
+		pr_err("%s: Unexpected context state %d\n", __func__, state);
 		/* fall though */
 	case EZUSB_CTX_REQ_TIMEOUT:
 	case EZUSB_CTX_REQ_FAILED:
 	case EZUSB_CTX_RESP_TIMEOUT:
 	case EZUSB_CTX_REQSUBMIT_FAIL:
-		printk(KERN_ERR PFX "Access failed, resetting (state %d,"
-		       " reply_count %d)\n", state, upriv->reply_count);
+		pr_err("Access failed, resetting (state %d, reply_count %d)\n",
+		       state, upriv->reply_count);
 		upriv->reply_count = 0;
 		if (state == EZUSB_CTX_REQ_TIMEOUT
 		    || state == EZUSB_CTX_RESP_TIMEOUT) {
-			printk(KERN_ERR PFX "ctx timed out\n");
+			pr_err("ctx timed out\n");
 			retval = -ETIMEDOUT;
 		} else {
-			printk(KERN_ERR PFX "ctx failed\n");
+			pr_err("ctx failed\n");
 			retval = -EFAULT;
 		}
 		goto exit;
@@ -941,9 +940,8 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
 			exp_len = 14;
 
 		if (exp_len != ctx->buf_length) {
-			err("%s: length mismatch for RID 0x%04x: "
-			    "expected %d, got %d", __func__,
-			    ctx->in_rid, exp_len, ctx->buf_length);
+			pr_err("%s: length mismatch for RID 0x%04x: expected %d, got %d\n",
+			       __func__, ctx->in_rid, exp_len, ctx->buf_length);
 			retval = -EIO;
 			goto exit;
 		}
@@ -1058,8 +1056,7 @@ static int ezusb_bap_pread(struct hermes *hw, int bap,
 
 	if (id == EZUSB_RID_RX) {
 		if ((sizeof(*ans) + offset + len) > actual_length) {
-			printk(KERN_ERR PFX "BAP read beyond buffer end "
-			       "in rx frame\n");
+			pr_err("BAP read beyond buffer end in rx frame\n");
 			return -EINVAL;
 		}
 		memcpy(buf, ans->data + offset, len);
@@ -1069,13 +1066,12 @@ static int ezusb_bap_pread(struct hermes *hw, int bap,
 	if (EZUSB_IS_INFO(id)) {
 		/* Include 4 bytes for length/type */
 		if ((sizeof(*ans) + offset + len - 4) > actual_length) {
-			printk(KERN_ERR PFX "BAP read beyond buffer end "
-			       "in info frame\n");
+			pr_err("BAP read beyond buffer end in info frame\n");
 			return -EFAULT;
 		}
 		memcpy(buf, ans->data + offset - 4, len);
 	} else {
-		printk(KERN_ERR PFX "Unexpected fid 0x%04x\n", id);
+		pr_err("Unexpected fid 0x%04x\n", id);
 		return -EINVAL;
 	}
 
@@ -1205,20 +1201,17 @@ static netdev_tx_t ezusb_xmit(struct sk_buff *skb, struct net_device *dev)
 	int tx_size;
 
 	if (!netif_running(dev)) {
-		printk(KERN_ERR "%s: Tx on stopped device!\n",
-		       dev->name);
+		pr_err("%s: Tx on stopped device!\n", dev->name);
 		return NETDEV_TX_BUSY;
 	}
 
 	if (netif_queue_stopped(dev)) {
-		printk(KERN_DEBUG "%s: Tx while transmitter busy!\n",
-		       dev->name);
+		pr_debug("%s: Tx while transmitter busy!\n", dev->name);
 		return NETDEV_TX_BUSY;
 	}
 
 	if (orinoco_lock(priv, &flags) != 0) {
-		printk(KERN_ERR
-		       "%s: ezusb_xmit() called while hw_unavailable\n",
+		pr_err("%s: ezusb_xmit() called while hw_unavailable\n",
 		       dev->name);
 		return NETDEV_TX_BUSY;
 	}
@@ -1281,7 +1274,7 @@ static netdev_tx_t ezusb_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (err) {
 		netif_start_queue(dev);
 		if (net_ratelimit())
-			printk(KERN_ERR "%s: Error %d transmitting packet\n",
+			pr_err("%s: Error %d transmitting packet\n",
 				dev->name, err);
 		goto busy;
 	}
@@ -1317,13 +1310,13 @@ static int ezusb_hard_reset(struct orinoco_private *priv)
 	int retval = ezusb_8051_cpucs(upriv, 1);
 
 	if (retval < 0) {
-		err("Failed to reset");
+		pr_err("Failed to reset\n");
 		return retval;
 	}
 
 	retval = ezusb_8051_cpucs(upriv, 0);
 	if (retval < 0) {
-		err("Failed to unreset");
+		pr_err("Failed to unreset\n");
 		return retval;
 	}
 
@@ -1335,7 +1328,7 @@ static int ezusb_hard_reset(struct orinoco_private *priv)
 				 USB_DIR_OUT, 0x0, 0x0, NULL, 0,
 				 DEF_TIMEOUT);
 	if (retval < 0) {
-		err("EZUSB_REQUEST_TRIGER failed retval %d", retval);
+		pr_err("EZUSB_REQUEST_TRIGER failed retval %d\n", retval);
 		return retval;
 	}
 #if 0
@@ -1347,7 +1340,7 @@ static int ezusb_hard_reset(struct orinoco_private *priv)
 				 USB_DIR_OUT, 0x00FA, 0x0, NULL, 0,
 				 DEF_TIMEOUT);
 	if (retval < 0) {
-		err("EZUSB_REQUEST_TRIG_AC failed retval %d", retval);
+		pr_err("EZUSB_REQUEST_TRIG_AC failed retval %d\n", retval);
 		return retval;
 	}
 #endif
@@ -1376,13 +1369,13 @@ static int ezusb_init(struct hermes *hw)
 	retval = ezusb_write_ltv(hw, 0, EZUSB_RID_INIT1,
 				 HERMES_BYTES_TO_RECLEN(2), "\x10\x00");
 	if (retval < 0) {
-		printk(KERN_ERR PFX "EZUSB_RID_INIT1 error %d\n", retval);
+		pr_err("EZUSB_RID_INIT1 error %d\n", retval);
 		return retval;
 	}
 
 	retval = ezusb_docmd_wait(hw, HERMES_CMD_INIT, 0, NULL);
 	if (retval < 0) {
-		printk(KERN_ERR PFX "HERMES_CMD_INIT error %d\n", retval);
+		pr_err("HERMES_CMD_INIT error %d\n", retval);
 		return retval;
 	}
 
@@ -1405,11 +1398,11 @@ static void ezusb_bulk_in_callback(struct urb *urb)
 		/* When a device gets unplugged we get this every time
 		 * we resubmit, flooding the logs.  Since we don't use
 		 * USB timeouts, it shouldn't happen any other time*/
-		pr_warning("%s: urb timed out, not resubmiting", __func__);
+		pr_warn("%s: urb timed out, not resubmiting", __func__);
 		return;
 	}
 	if (urb->status == -ECONNABORTED) {
-		pr_warning("%s: connection abort, resubmiting urb",
+		pr_warn("%s: connection abort, resubmiting urb",
 		     __func__);
 		goto resubmit;
 	}
@@ -1423,12 +1416,12 @@ static void ezusb_bulk_in_callback(struct urb *urb)
 		dbg("status: %d length: %d",
 		    urb->status, urb->actual_length);
 	if (urb->actual_length < sizeof(*ans)) {
-		err("%s: short read, ignoring", __func__);
+		pr_err("%s: short read, ignoring\n", __func__);
 		goto resubmit;
 	}
 	crc = build_crc(ans);
 	if (le16_to_cpu(ans->crc) != crc) {
-		err("CRC error, ignoring packet");
+		pr_err("CRC error, ignoring packet\n");
 		goto resubmit;
 	}
 
@@ -1502,7 +1495,7 @@ static inline void ezusb_delete(struct ezusb_priv *upriv)
 					  struct request_context, list));
 
 	if (upriv->read_urb && upriv->read_urb->status == -EINPROGRESS)
-		printk(KERN_ERR PFX "Some URB in progress\n");
+		pr_err("Some URB in progress\n");
 
 	mutex_unlock(&upriv->mtx);
 
@@ -1586,7 +1579,7 @@ static int ezusb_probe(struct usb_interface *interface,
 	priv = alloc_orinocodev(sizeof(*upriv), &udev->dev,
 				ezusb_hard_reset, NULL);
 	if (!priv) {
-		err("Couldn't allocate orinocodev");
+		pr_err("Couldn't allocate orinocodev\n");
 		goto exit;
 	}
 
@@ -1621,19 +1614,19 @@ static int ezusb_probe(struct usb_interface *interface,
 		     == USB_ENDPOINT_XFER_BULK)) {
 			/* we found a bulk in endpoint */
 			if (upriv->read_urb != NULL) {
-				pr_warning("Found a second bulk in ep, ignored");
+				pr_warn("Found a second bulk in ep, ignored");
 				continue;
 			}
 
 			upriv->read_urb = usb_alloc_urb(0, GFP_KERNEL);
 			if (!upriv->read_urb) {
-				err("No free urbs available");
+				pr_err("No free urbs available\n");
 				goto error;
 			}
 			if (le16_to_cpu(ep->wMaxPacketSize) != 64)
-				pr_warning("bulk in: wMaxPacketSize!= 64");
+				pr_warn("bulk in: wMaxPacketSize!= 64");
 			if (ep->bEndpointAddress != (2 | USB_DIR_IN))
-				pr_warning("bulk in: bEndpointAddress: %d",
+				pr_warn("bulk in: bEndpointAddress: %d",
 				     ep->bEndpointAddress);
 			upriv->read_pipe = usb_rcvbulkpipe(udev,
 							 ep->
@@ -1641,7 +1634,7 @@ static int ezusb_probe(struct usb_interface *interface,
 			upriv->read_urb->transfer_buffer =
 			    kmalloc(BULK_BUF_SIZE, GFP_KERNEL);
 			if (!upriv->read_urb->transfer_buffer) {
-				err("Couldn't allocate IN buffer");
+				pr_err("Couldn't allocate IN buffer\n");
 				goto error;
 			}
 		}
@@ -1652,27 +1645,27 @@ static int ezusb_probe(struct usb_interface *interface,
 		     == USB_ENDPOINT_XFER_BULK)) {
 			/* we found a bulk out endpoint */
 			if (upriv->bap_buf != NULL) {
-				pr_warning("Found a second bulk out ep, ignored");
+				pr_warn("Found a second bulk out ep, ignored");
 				continue;
 			}
 
 			if (le16_to_cpu(ep->wMaxPacketSize) != 64)
-				pr_warning("bulk out: wMaxPacketSize != 64");
+				pr_warn("bulk out: wMaxPacketSize != 64");
 			if (ep->bEndpointAddress != 2)
-				pr_warning("bulk out: bEndpointAddress: %d",
+				pr_warn("bulk out: bEndpointAddress: %d",
 				     ep->bEndpointAddress);
 			upriv->write_pipe = usb_sndbulkpipe(udev,
 							  ep->
 							  bEndpointAddress);
 			upriv->bap_buf = kmalloc(BULK_BUF_SIZE, GFP_KERNEL);
 			if (!upriv->bap_buf) {
-				err("Couldn't allocate bulk_out_buffer");
+				pr_err("Couldn't allocate bulk_out_buffer\n");
 				goto error;
 			}
 		}
 	}
 	if (!upriv->bap_buf || !upriv->read_urb) {
-		err("Didn't find the required bulk endpoints");
+		pr_err("Didn't find the required bulk endpoints\n");
 		goto error;
 	}
 
@@ -1684,12 +1677,12 @@ static int ezusb_probe(struct usb_interface *interface,
 	if (firmware.size && firmware.code) {
 		ezusb_firmware_download(upriv, &firmware);
 	} else {
-		err("No firmware to download");
+		pr_err("No firmware to download\n");
 		goto error;
 	}
 
 	if (ezusb_hard_reset(priv) < 0) {
-		err("Cannot reset the device");
+		pr_err("Cannot reset the device\n");
 		goto error;
 	}
 
@@ -1698,20 +1691,20 @@ static int ezusb_probe(struct usb_interface *interface,
 	 * the kernel very unstable, so we try initializing here and quit in
 	 * case of error */
 	if (ezusb_init(hw) < 0) {
-		err("Couldn't initialize the device");
-		err("Firmware may not be downloaded or may be wrong.");
+		pr_err("Couldn't initialize the device\n");
+		pr_err("Firmware may not be downloaded or may be wrong\n");
 		goto error;
 	}
 
 	/* Initialise the main driver */
 	if (orinoco_init(priv) != 0) {
-		err("orinoco_init() failed\n");
+		pr_err("orinoco_init() failed\n");
 		goto error;
 	}
 
 	if (orinoco_if_add(priv, 0, 0, &ezusb_netdev_ops) != 0) {
 		upriv->dev = NULL;
-		err("%s: orinoco_if_add() failed", __func__);
+		pr_err("%s: orinoco_if_add() failed\n", __func__);
 		goto error;
 	}
 	upriv->dev = priv->ndev;
@@ -1742,7 +1735,7 @@ static void ezusb_disconnect(struct usb_interface *intf)
 	struct ezusb_priv *upriv = usb_get_intfdata(intf);
 	usb_set_intfdata(intf, NULL);
 	ezusb_delete(upriv);
-	printk(KERN_INFO PFX "Disconnected\n");
+	pr_info("Disconnected\n");
 }
 
 
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c
index 96e39ed..afa6f79 100644
--- a/drivers/net/wireless/orinoco/scan.c
+++ b/drivers/net/wireless/orinoco/scan.c
@@ -3,6 +3,8 @@
  * See copyright notice in main.c
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/gfp.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -113,8 +115,8 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv,
 	freq = ieee80211_dsss_chan_to_freq(le16_to_cpu(bss->a.channel));
 	channel = ieee80211_get_channel(wiphy, freq);
 	if (!channel) {
-		printk(KERN_DEBUG "Invalid channel designation %04X(%04X)",
-			bss->a.channel, freq);
+		pr_debug("Invalid channel designation %04X(%04X)\n",
+			 bss->a.channel, freq);
 		return;	/* Then ignore it for now */
 	}
 	timestamp = 0;
@@ -199,9 +201,8 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv,
 			atom_len = le16_to_cpup((__le16 *)buf);
 			/* Sanity check for atom_len */
 			if (atom_len < sizeof(struct prism2_scan_apinfo)) {
-				printk(KERN_ERR "%s: Invalid atom_len in scan "
-				       "data: %zu\n", priv->ndev->name,
-				       atom_len);
+				pr_err("%s: Invalid atom_len in scan data: %zu\n",
+				       priv->ndev->name, atom_len);
 				abort = true;
 				goto scan_abort;
 			}
@@ -216,9 +217,8 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv,
 
 	/* Check that we got an whole number of atoms */
 	if ((len - offset) % atom_len) {
-		printk(KERN_ERR "%s: Unexpected scan data length %zu, "
-		       "atom_len %zu, offset %d\n", priv->ndev->name, len,
-		       atom_len, offset);
+		pr_err("%s: Unexpected scan data length %zu, atom_len %zu, offset %d\n",
+		       priv->ndev->name, len, atom_len, offset);
 		abort = true;
 		goto scan_abort;
 	}
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 6e28ee4..4722aa5 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -208,7 +208,7 @@ spectrum_cs_config(struct pcmcia_device *link)
 	ret = pcmcia_loop_config(link, spectrum_cs_config_check, NULL);
 	if (ret) {
 		if (!ignore_cis_vcc)
-			printk(KERN_ERR PFX "GetNextTuple(): No matching "
+			pr_err(PFX "GetNextTuple(): No matching "
 			       "CIS configuration.  Maybe you need the "
 			       "ignore_cis_vcc=1 parameter.\n");
 		goto failed;
@@ -239,14 +239,14 @@ spectrum_cs_config(struct pcmcia_device *link)
 
 	/* Initialise the main driver */
 	if (orinoco_init(priv) != 0) {
-		printk(KERN_ERR PFX "orinoco_init() failed\n");
+		pr_err(PFX "orinoco_init() failed\n");
 		goto failed;
 	}
 
 	/* Register an interface with the stack */
 	if (orinoco_if_add(priv, link->resource[0]->start,
 			   link->irq, NULL) != 0) {
-		printk(KERN_ERR PFX "orinoco_if_add() failed\n");
+		pr_err(PFX "orinoco_if_add() failed\n");
 		goto failed;
 	}
 
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c
index 33747e1..b48ec31 100644
--- a/drivers/net/wireless/orinoco/wext.c
+++ b/drivers/net/wireless/orinoco/wext.c
@@ -2,6 +2,9 @@
  *
  * See copyright notice in main.c
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/if_arp.h>
@@ -94,8 +97,8 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
 	unsigned long flags;
 
 	if (!netif_device_present(dev)) {
-		printk(KERN_WARNING "%s: get_wireless_stats() called while device not present\n",
-		       dev->name);
+		pr_warn("%s: get_wireless_stats() called while device not present\n",
+			dev->name);
 		return NULL; /* FIXME: Can we do better than this? */
 	}
 
@@ -180,16 +183,15 @@ static int orinoco_ioctl_setwap(struct net_device *dev,
 	}
 
 	if (priv->firmware_type == FIRMWARE_TYPE_AGERE) {
-		printk(KERN_WARNING "%s: Lucent/Agere firmware doesn't "
-		       "support manual roaming\n",
-		       dev->name);
+		pr_warn("%s: Lucent/Agere firmware doesn't support manual roaming\n",
+			dev->name);
 		err = -EOPNOTSUPP;
 		goto out;
 	}
 
 	if (priv->iw_mode != NL80211_IFTYPE_STATION) {
-		printk(KERN_WARNING "%s: Manual roaming supported only in "
-		       "managed mode\n", dev->name);
+		pr_warn("%s: Manual roaming supported only in managed mode\n",
+			dev->name);
 		err = -EOPNOTSUPP;
 		goto out;
 	}
@@ -197,8 +199,8 @@ static int orinoco_ioctl_setwap(struct net_device *dev,
 	/* Intersil firmware hangs without Desired ESSID */
 	if (priv->firmware_type == FIRMWARE_TYPE_INTERSIL &&
 	    strlen(priv->desired_essid) == 0) {
-		printk(KERN_WARNING "%s: Desired ESSID must be set for "
-		       "manual roaming\n", dev->name);
+		pr_warn("%s: Desired ESSID must be set for manual roaming\n",
+			dev->name);
 		err = -EOPNOTSUPP;
 		goto out;
 	}
@@ -795,8 +797,8 @@ static int orinoco_ioctl_set_encodeext(struct net_device *dev,
 				 priv->keys[idx].key,
 				 tkip_iv, ORINOCO_SEQ_LEN, NULL, 0);
 			if (err)
-				printk(KERN_ERR "%s: Error %d setting TKIP key"
-				       "\n", dev->name, err);
+				pr_err("%s: Error %d setting TKIP key\n",
+				       dev->name, err);
 
 			goto out;
 		}
@@ -1107,12 +1109,12 @@ static int orinoco_ioctl_reset(struct net_device *dev,
 		return -EPERM;
 
 	if (info->cmd == (SIOCIWFIRSTPRIV + 0x1)) {
-		printk(KERN_DEBUG "%s: Forcing reset!\n", dev->name);
+		pr_debug("%s: Forcing reset!\n", dev->name);
 
 		/* Firmware reset */
 		orinoco_reset(&priv->reset_work);
 	} else {
-		printk(KERN_DEBUG "%s: Force scheduling reset!\n", dev->name);
+		pr_debug("%s: Force scheduling reset!\n", dev->name);
 
 		schedule_work(&priv->reset_work);
 	}
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 14/20] p54: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Christian Lamparter
  Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/p54/fwio.c   |    6 ++++--
 drivers/net/wireless/p54/p54spi.c |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c
index 18e82b3..ea64d5d 100644
--- a/drivers/net/wireless/p54/fwio.c
+++ b/drivers/net/wireless/p54/fwio.c
@@ -16,6 +16,8 @@
  * published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/firmware.h>
@@ -100,8 +102,8 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
 				 4 + /* rx alignment */
 				 IEEE80211_MAX_FRAG_THRESHOLD;
 			if (priv->rx_mtu > maxlen && PAGE_SIZE == 4096) {
-				printk(KERN_INFO "p54: rx_mtu reduced from %d "
-				       "to %d\n", priv->rx_mtu, maxlen);
+				pr_info("rx_mtu reduced from %d to %d\n",
+					priv->rx_mtu, maxlen);
 				priv->rx_mtu = maxlen;
 			}
 			break;
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index f792990..8bf4a01 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -20,6 +20,8 @@
  * 02110-1301 USA
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
@@ -719,7 +721,7 @@ static int __init p54spi_init(void)
 
 	ret = spi_register_driver(&p54spi_driver);
 	if (ret < 0) {
-		printk(KERN_ERR "failed to register SPI driver: %d", ret);
+		pr_err("failed to register SPI driver: %d\n", ret);
 		goto out;
 	}
 
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 15/20] prism54: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/prism54/isl_ioctl.c      |   69 +++++++++++------------
 drivers/net/wireless/prism54/islpci_dev.c     |   57 +++++++++----------
 drivers/net/wireless/prism54/islpci_eth.c     |   25 +++-----
 drivers/net/wireless/prism54/islpci_hotplug.c |   34 +++++------
 drivers/net/wireless/prism54/islpci_mgt.c     |   75 +++++++++---------------
 drivers/net/wireless/prism54/islpci_mgt.h     |    9 ++-
 drivers/net/wireless/prism54/oid_mgt.c        |   23 ++++----
 7 files changed, 130 insertions(+), 162 deletions(-)

diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 4e44b1a..0e6cfc8 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -19,6 +19,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/capability.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -71,9 +73,8 @@ prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode)
 
 	/* For now, just catch early the Repeater and Secondary modes here */
 	if (iw_mode == IW_MODE_REPEAT || iw_mode == IW_MODE_SECOND) {
-		printk(KERN_DEBUG
-		       "%s(): Sorry, Repeater mode and Secondary mode "
-		       "are not yet supported by this driver.\n", __func__);
+		pr_debug("%s(): Sorry, Repeater mode and Secondary mode are not yet supported by this driver\n",
+			 __func__);
 		return -EINVAL;
 	}
 
@@ -331,9 +332,8 @@ prism54_set_mode(struct net_device *ndev, struct iw_request_info *info,
 
 	/* Let's see if the user passed a valid Linux Wireless mode */
 	if (*uwrq > IW_MODE_MONITOR || *uwrq < IW_MODE_AUTO) {
-		printk(KERN_DEBUG
-		       "%s: %s() You passed a non-valid init_mode.\n",
-		       priv->ndev->name, __func__);
+		pr_debug("%s: %s() You passed a non-valid init_mode\n",
+			 priv->ndev->name, __func__);
 		return -EINVAL;
 	}
 
@@ -1232,17 +1232,15 @@ prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info,
 	u *= 4;
 	if (vwrq->disabled) {
 		/* don't know how to disable radio */
-		printk(KERN_DEBUG
-		       "%s: %s() disabling radio is not yet supported.\n",
-		       priv->ndev->name, __func__);
+		pr_debug("%s: %s() disabling radio is not yet supported\n",
+			 priv->ndev->name, __func__);
 		return -ENOTSUPP;
 	} else if (vwrq->fixed)
 		/* currently only fixed value is supported */
 		return mgt_set_request(priv, OID_INL_OUTPUTPOWER, 0, &u);
 	else {
-		printk(KERN_DEBUG
-		       "%s: %s() auto power will be implemented later.\n",
-		       priv->ndev->name, __func__);
+		pr_debug("%s: %s() auto power will be implemented later\n",
+			 priv->ndev->name, __func__);
 		return -ENOTSUPP;
 	}
 }
@@ -1287,8 +1285,7 @@ static int prism54_set_genie(struct net_device *ndev,
 		ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach,
 			priv->wpa_ie_len);
 		if (ret == 0)
-			printk(KERN_DEBUG "%s: WPA IE Attachment was set\n",
-				ndev->name);
+			pr_debug("%s: WPA IE Attachment was set\n", ndev->name);
 	}
 
 	kfree(attach);
@@ -2151,8 +2148,7 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
 		bss->wpa_ie_len = wpa_ie_len;
 		bss->last_update = jiffies;
 	} else {
-		printk(KERN_DEBUG "Failed to add BSS WPA entry for "
-		       "%pM\n", bssid);
+		pr_debug("Failed to add BSS WPA entry for %pM\n", bssid);
 	}
 
 	/* expire old entries from WPA list */
@@ -2226,8 +2222,8 @@ prism54_process_bss_data(islpci_private *priv, u32 oid, u8 *addr,
 	end = payload + len;
 	while (pos < end) {
 		if (pos + 2 + pos[1] > end) {
-			printk(KERN_DEBUG "Parsing Beacon/ProbeResp failed "
-			       "for %pM\n", addr);
+			pr_debug("Parsing Beacon/ProbeResp failed for %pM\n",
+				 addr);
 			return;
 		}
 		if (pos[0] == WLAN_EID_GENERIC && pos[1] >= 4 &&
@@ -2354,8 +2350,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
 			break;
 
 		memcpy(&confirm->address, mlmeex->address, ETH_ALEN);
-		printk(KERN_DEBUG "Authenticate from: address:\t%pM\n",
-		       mlmeex->address);
+		pr_debug("Authenticate from: address:\t%pM\n", mlmeex->address);
 		confirm->id = -1; /* or mlmeex->id ? */
 		confirm->state = 0; /* not used */
 		confirm->code = 0;
@@ -2400,8 +2395,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
 		wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie);
 
 		if (!wpa_ie_len) {
-			printk(KERN_DEBUG "No WPA IE found from address:\t%pM\n",
-			       mlmeex->address);
+			pr_debug("No WPA IE found from address:\t%pM\n",
+				 mlmeex->address);
 			kfree(confirm);
 			break;
 		}
@@ -2437,8 +2432,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
 		wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie);
 
 		if (!wpa_ie_len) {
-			printk(KERN_DEBUG "No WPA IE found from address:\t%pM\n",
-			       mlmeex->address);
+			pr_debug("No WPA IE found from address:\t%pM\n",
+				 mlmeex->address);
 			kfree(confirm);
 			break;
 		}
@@ -2521,11 +2516,11 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
 			filter = 0; /* Do not filter un-encrypted data */
 			dot1x = 0;
 			mlme = DOT11_MLME_AUTO;
-			printk("%s: Disabling WPA\n", ndev->name);
+			pr_info("%s: Disabling WPA\n", ndev->name);
 			break;
 		case 2:
 		case 1: /* WPA */
-			printk("%s: Enabling WPA\n", ndev->name);
+			pr_info("%s: Enabling WPA\n", ndev->name);
 			break;
 	}
 	up_write(&priv->mib_sem);
@@ -2577,7 +2572,7 @@ prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
 	islpci_private *priv = netdev_priv(ndev);
 
 	priv->priv_oid = *uwrq;
-	printk("%s: oid 0x%08X\n", ndev->name, *uwrq);
+	pr_debug("%s: oid 0x%08X\n", ndev->name, *uwrq);
 
 	return 0;
 }
@@ -2590,7 +2585,7 @@ prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
 	struct islpci_mgmtframe *response;
 	int ret = -EIO;
 
-	printk("%s: get_oid 0x%08X\n", ndev->name, priv->priv_oid);
+	pr_debug("%s: get_oid 0x%08X\n", ndev->name, priv->priv_oid);
 	data->length = 0;
 
 	if (islpci_get_state(priv) >= PRV_STATE_INIT) {
@@ -2598,20 +2593,20 @@ prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
 		    islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET,
 					   priv->priv_oid, extra, 256,
 					   &response);
-		printk("%s: ret: %i\n", ndev->name, ret);
+		pr_debug("%s: ret: %i\n", ndev->name, ret);
 		if (ret || !response
 		    || response->header->operation == PIMFOR_OP_ERROR) {
 			if (response) {
 				islpci_mgt_release(response);
 			}
-			printk("%s: EIO\n", ndev->name);
+			pr_debug("%s: EIO\n", ndev->name);
 			ret = -EIO;
 		}
 		if (!ret) {
 			data->length = response->header->length;
 			memcpy(extra, response->data, data->length);
 			islpci_mgt_release(response);
-			printk("%s: len: %i\n", ndev->name, data->length);
+			pr_debug("%s: len: %i\n", ndev->name, data->length);
 		}
 	}
 
@@ -2626,27 +2621,27 @@ prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info,
 	struct islpci_mgmtframe *response;
 	int ret = 0, response_op = PIMFOR_OP_ERROR;
 
-	printk("%s: set_oid 0x%08X\tlen: %d\n", ndev->name, priv->priv_oid,
-	       data->length);
+	pr_debug("%s: set_oid 0x%08X\tlen: %d\n",
+		 ndev->name, priv->priv_oid, data->length);
 
 	if (islpci_get_state(priv) >= PRV_STATE_INIT) {
 		ret =
 		    islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET,
 					   priv->priv_oid, extra, data->length,
 					   &response);
-		printk("%s: ret: %i\n", ndev->name, ret);
+		pr_debug("%s: ret: %i\n", ndev->name, ret);
 		if (ret || !response
 		    || response->header->operation == PIMFOR_OP_ERROR) {
 			if (response) {
 				islpci_mgt_release(response);
 			}
-			printk("%s: EIO\n", ndev->name);
+			pr_debug("%s: EIO\n", ndev->name);
 			ret = -EIO;
 		}
 		if (!ret) {
 			response_op = response->header->operation;
-			printk("%s: response_op: %i\n", ndev->name,
-			       response_op);
+			pr_debug("%s: response_op: %i\n",
+				 ndev->name, response_op);
 			islpci_mgt_release(response);
 		}
 	}
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index 5970ff6..df7a164 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -18,6 +18,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/hardirq.h>
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -94,9 +96,8 @@ isl_upload_firmware(islpci_private *priv)
 
 		rc = request_firmware(&fw_entry, priv->firmware, PRISM_FW_PDEV);
 		if (rc) {
-			printk(KERN_ERR
-			       "%s: request_firmware() failed for '%s'\n",
-			       "prism54", priv->firmware);
+			pr_err("request_firmware() failed for '%s'\n",
+			       priv->firmware);
 			return rc;
 		}
 		/* prepare the Direct Memory Base register */
@@ -106,9 +107,8 @@ isl_upload_firmware(islpci_private *priv)
 		fw_len = fw_entry->size;
 
 		if (fw_len % 4) {
-			printk(KERN_ERR
-			       "%s: firmware '%s' size is not multiple of 32bit, aborting!\n",
-			       "prism54", priv->firmware);
+			pr_err("firmware '%s' size is not multiple of 32bit, aborting!\n",
+			       priv->firmware);
 			release_firmware(fw_entry);
 			return -EILSEQ; /* Illegal byte sequence  */;
 		}
@@ -148,8 +148,8 @@ isl_upload_firmware(islpci_private *priv)
 		BUG_ON(fw_len != 0);
 
 		/* Firmware version is at offset 40 (also for "newmac") */
-		printk(KERN_DEBUG "%s: firmware version: %.8s\n",
-		       priv->ndev->name, fw_entry->data + 40);
+		pr_debug("%s: firmware version: %.8s\n",
+			 priv->ndev->name, fw_entry->data + 40);
 
 		release_firmware(fw_entry);
 	}
@@ -411,7 +411,7 @@ islpci_close(struct net_device *ndev)
 {
 	islpci_private *priv = netdev_priv(ndev);
 
-	printk(KERN_DEBUG "%s: islpci_close ()\n", ndev->name);
+	pr_debug("%s: islpci_close ()\n", ndev->name);
 
 	netif_stop_queue(ndev);
 
@@ -465,20 +465,19 @@ islpci_upload_fw(islpci_private *priv)
 
 	old_state = islpci_set_state(priv, PRV_STATE_BOOT);
 
-	printk(KERN_DEBUG "%s: uploading firmware...\n", priv->ndev->name);
+	pr_debug("%s: uploading firmware...\n", priv->ndev->name);
 
 	rc = isl_upload_firmware(priv);
 	if (rc) {
 		/* error uploading the firmware */
-		printk(KERN_ERR "%s: could not upload firmware ('%s')\n",
+		pr_err("%s: could not upload firmware ('%s')\n",
 		       priv->ndev->name, priv->firmware);
 
 		islpci_set_state(priv, old_state);
 		return rc;
 	}
 
-	printk(KERN_DEBUG "%s: firmware upload complete\n",
-	       priv->ndev->name);
+	pr_debug("%s: firmware upload complete\n", priv->ndev->name);
 
 	islpci_set_state(priv, PRV_STATE_POSTBOOT);
 
@@ -513,14 +512,14 @@ islpci_reset_if(islpci_private *priv)
 		/* If we're here it's because our IRQ hasn't yet gone through.
 		 * Retry a bit more...
 		 */
-		printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n",
-			priv->ndev->name);
+		pr_err("%s: no 'reset complete' IRQ seen - retrying\n",
+		       priv->ndev->name);
 	}
 
 	finish_wait(&priv->reset_done, &wait);
 
 	if (result) {
-		printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name);
+		pr_err("%s: interface reset failure\n", priv->ndev->name);
 		return result;
 	}
 
@@ -536,7 +535,7 @@ islpci_reset_if(islpci_private *priv)
 	down_write(&priv->mib_sem);
 	result = mgt_commit(priv);
 	if (result) {
-		printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name);
+		pr_err("%s: interface reset failure\n", priv->ndev->name);
 		up_write(&priv->mib_sem);
 		return result;
 	}
@@ -544,7 +543,7 @@ islpci_reset_if(islpci_private *priv)
 
 	islpci_set_state(priv, PRV_STATE_READY);
 
-	printk(KERN_DEBUG "%s: interface reset complete\n", priv->ndev->name);
+	pr_debug("%s: interface reset complete\n", priv->ndev->name);
 	return 0;
 }
 
@@ -561,7 +560,7 @@ islpci_reset(islpci_private *priv, int reload_firmware)
 	else
 		islpci_set_state(priv, PRV_STATE_POSTBOOT);
 
-	printk(KERN_DEBUG "%s: resetting device...\n", priv->ndev->name);
+	pr_debug("%s: resetting device...\n", priv->ndev->name);
 
 	/* disable all device interrupts in case they weren't */
 	isl38xx_disable_interrupts(priv->device_base);
@@ -606,8 +605,7 @@ islpci_reset(islpci_private *priv, int reload_firmware)
 	 * firmware and reset interface */
 		rc = islpci_upload_fw(priv);
 		if (rc) {
-			printk(KERN_ERR "%s: islpci_reset: failure\n",
-				priv->ndev->name);
+			pr_err("%s: islpci_reset: failure\n", priv->ndev->name);
 			return rc;
 		}
 	}
@@ -615,7 +613,7 @@ islpci_reset(islpci_private *priv, int reload_firmware)
 	/* finally reset interface */
 	rc = islpci_reset_if(priv);
 	if (rc)
-		printk(KERN_ERR "prism54: Your card/socket may be faulty, or IRQ line too busy :(\n");
+		pr_err("Your card/socket may be faulty, or IRQ line too busy :(\n");
 	return rc;
 }
 
@@ -628,7 +626,7 @@ islpci_alloc_memory(islpci_private *priv)
 	int counter;
 
 #if VERBOSE > SHOW_ERROR_MESSAGES
-	printk(KERN_DEBUG "islpci_alloc_memory\n");
+	pr_debug("islpci_alloc_memory\n");
 #endif
 
 	/* remap the PCI device base address to accessible */
@@ -636,7 +634,7 @@ islpci_alloc_memory(islpci_private *priv)
 	      ioremap(pci_resource_start(priv->pdev, 0),
 		      ISL38XX_PCI_MEM_SIZE))) {
 		/* error in remapping the PCI device memory address range */
-		printk(KERN_ERR "PCI memory remapping failed\n");
+		pr_err("PCI memory remapping failed\n");
 		return -1;
 	}
 
@@ -656,8 +654,7 @@ islpci_alloc_memory(islpci_private *priv)
 
 	if (!priv->driver_mem_address) {
 		/* error allocating the block of PCI memory */
-		printk(KERN_ERR "%s: could not allocate DMA memory, aborting!",
-		       "prism54");
+		pr_err("could not allocate DMA memory, aborting!\n");
 		return -1;
 	}
 
@@ -695,7 +692,7 @@ islpci_alloc_memory(islpci_private *priv)
 		 * include any required allignment operations */
 		if (!(skb = dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2))) {
 			/* error allocating an sk_buff structure elements */
-			printk(KERN_ERR "Error allocating skb.\n");
+			pr_err("Error allocating skb\n");
 			skb = NULL;
 			goto out_free;
 		}
@@ -711,7 +708,7 @@ islpci_alloc_memory(islpci_private *priv)
 		if (!priv->pci_map_rx_address[counter]) {
 			/* error mapping the buffer to device
 			   accessible memory address */
-			printk(KERN_ERR "failed to map skb DMA'able\n");
+			pr_err("failed to map skb DMA'able\n");
 			goto out_free;
 		}
 	}
@@ -948,8 +945,8 @@ islpci_set_state(islpci_private *priv, islpci_state_t new_state)
 		break;
 	}
 #if 0
-	printk(KERN_DEBUG "%s: state transition %d -> %d (off#%d)\n",
-	       priv->ndev->name, old_state, new_state, priv->state_off);
+	pr_debug("%s: state transition %d -> %d (off#%d)\n",
+		 priv->ndev->name, old_state, new_state, priv->state_off);
 #endif
 
 	/* invariants */
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index 266d45b..1539077 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -16,6 +16,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/gfp.h>
 
@@ -99,7 +101,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
 	/* check whether the destination queue has enough fragments for the frame */
 	curr_frag = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_TX_DATA_LQ]);
 	if (unlikely(curr_frag - priv->free_data_tx >= ISL38XX_CB_TX_QSIZE)) {
-		printk(KERN_ERR "%s: transmit device queue full when awake\n",
+		pr_err("%s: transmit device queue full when awake\n",
 		       ndev->name);
 		netif_stop_queue(ndev);
 
@@ -132,7 +134,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
 				/* wds requires an additional address field of 6 bytes */
 				skb_put(skb, 6);
 #ifdef ISLPCI_ETH_DEBUG
-				printk("islpci_eth_transmit:wds_mac\n");
+				pr_debug("%s:wds_mac\n", __func__);
 #endif
 				memmove(skb->data + 6, src, skb->len);
 				skb_copy_to_linear_data(skb, wds_mac, 6);
@@ -148,8 +150,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
 			newskb =
 			    dev_alloc_skb(init_wds ? skb->len + 6 : skb->len);
 			if (unlikely(newskb == NULL)) {
-				printk(KERN_ERR "%s: Cannot allocate skb\n",
-				       ndev->name);
+				pr_err("%s: Cannot allocate skb\n", ndev->name);
 				goto drop_free;
 			}
 			newskb_offset = (4 - (long) newskb->data) & 0x03;
@@ -165,7 +166,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
 							  skb->len);
 				skb_copy_to_linear_data(newskb, wds_mac, 6);
 #ifdef ISLPCI_ETH_DEBUG
-				printk("islpci_eth_transmit:wds_mac\n");
+				pr_debug("%s:wds_mac\n", __func__);
 #endif
 			} else
 				skb_copy_from_linear_data(skb, newskb->data,
@@ -192,8 +193,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
 					 (void *) skb->data, skb->len,
 					 PCI_DMA_TODEVICE);
 	if (unlikely(pci_map_address == 0)) {
-		printk(KERN_WARNING "%s: cannot map buffer to PCI\n",
-		       ndev->name);
+		pr_warn("%s: cannot map buffer to PCI\n", ndev->name);
 		goto drop_free;
 	}
 	/* Place the fragment in the control block structure. */
@@ -406,10 +406,7 @@ islpci_eth_receive(islpci_private *priv)
 
 	/* deliver the skb to the network layer */
 #ifdef ISLPCI_ETH_DEBUG
-	printk
-	    ("islpci_eth_receive:netif_rx %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n",
-	     skb->data[0], skb->data[1], skb->data[2], skb->data[3],
-	     skb->data[4], skb->data[5]);
+	pr_debug("%s:netif_rx %pM\n", __func__, skb->data);
 #endif
 	if (unlikely(discard)) {
 		dev_kfree_skb_irq(skb);
@@ -495,13 +492,11 @@ islpci_eth_tx_timeout(struct net_device *ndev)
 	ndev->stats.tx_errors++;
 
 	if (!priv->reset_task_pending) {
-		printk(KERN_WARNING
-			"%s: tx_timeout, scheduling reset", ndev->name);
+		pr_warn("%s: tx_timeout, scheduling reset", ndev->name);
 		netif_stop_queue(ndev);
 		priv->reset_task_pending = 1;
 		schedule_work(&priv->reset_task);
 	} else {
-		printk(KERN_WARNING
-			"%s: tx_timeout, waiting for reset", ndev->name);
+		pr_warn("%s: tx_timeout, waiting for reset", ndev->name);
 	}
 }
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
index 9e68e0c..5336b9a 100644
--- a/drivers/net/wireless/prism54/islpci_hotplug.c
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -17,6 +17,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -103,7 +105,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	/* Enable the pci device */
 	if (pci_enable_device(pdev)) {
-		printk(KERN_ERR "%s: pci_enable_device() failed.\n", DRV_NAME);
+		pr_err("pci_enable_device() failed\n");
 		return -ENODEV;
 	}
 
@@ -120,7 +122,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	/* enable PCI DMA */
 	if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
-		printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME);
+		pr_err("32-bit PCI DMA not supported\n");
 		goto do_pci_disable_device;
         }
 
@@ -141,22 +143,20 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		pci_write_config_byte(pdev, 0x40, (u8)init_pcitm);
 		pci_write_config_byte(pdev, 0x41, (u8)init_pcitm);
 	} else {
-		printk(KERN_INFO "PCI TRDY/RETRY unchanged\n");
+		pr_info("PCI TRDY/RETRY unchanged\n");
 	}
 
 	/* request the pci device I/O regions */
 	rvalue = pci_request_regions(pdev, DRV_NAME);
 	if (rvalue) {
-		printk(KERN_ERR "%s: pci_request_regions failure (rc=%d)\n",
-		       DRV_NAME, rvalue);
+		pr_err("pci_request_regions failure (rc=%d)\n", rvalue);
 		goto do_pci_disable_device;
 	}
 
 	/* check if the memory window is indeed set */
 	rvalue = pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &mem_addr);
 	if (rvalue || !mem_addr) {
-		printk(KERN_ERR "%s: PCI device memory region not configured; fix your BIOS or CardBus bridge/drivers\n",
-		       DRV_NAME);
+		pr_err("PCI device memory region not configured; fix your BIOS or CardBus bridge/drivers\n");
 		goto do_pci_release_regions;
 	}
 
@@ -170,8 +170,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	/* setup the network device interface and its structure */
 	if (!(ndev = islpci_setup(pdev))) {
 		/* error configuring the driver as a network device */
-		printk(KERN_ERR "%s: could not configure network device\n",
-		       DRV_NAME);
+		pr_err("could not configure network device\n");
 		goto do_pci_clear_mwi;
 	}
 
@@ -187,8 +186,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	if (rvalue) {
 		/* error, could not hook the handler to the irq */
-		printk(KERN_ERR "%s: could not install IRQ handler\n",
-		       ndev->name);
+		pr_err("%s: could not install IRQ handler\n", ndev->name);
 		goto do_unregister_netdev;
 	}
 
@@ -223,11 +221,11 @@ prism54_remove(struct pci_dev *pdev)
 	BUG_ON(!priv);
 
 	if (!__in_cleanup_module) {
-		printk(KERN_DEBUG "%s: hot unplug detected\n", ndev->name);
+		pr_debug("%s: hot unplug detected\n", ndev->name);
 		islpci_set_state(priv, PRV_STATE_OFF);
 	}
 
-	printk(KERN_DEBUG "%s: removing device\n", ndev->name);
+	pr_debug("%s: removing device\n", ndev->name);
 
 	unregister_netdev(ndev);
 
@@ -290,12 +288,11 @@ prism54_resume(struct pci_dev *pdev)
 
 	BUG_ON(!priv);
 
-	printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
+	pr_notice("%s: got resume request\n", ndev->name);
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
-		       ndev->name);
+		pr_err("%s: pci_enable_device failed on resume\n", ndev->name);
 		return err;
 	}
 
@@ -313,8 +310,7 @@ prism54_resume(struct pci_dev *pdev)
 static int __init
 prism54_module_init(void)
 {
-	printk(KERN_INFO "Loaded %s driver, version %s\n",
-	       DRV_NAME, DRV_VERSION);
+	pr_info("Loaded %s driver, version %s\n", DRV_NAME, DRV_VERSION);
 
 	__bug_on_wrong_struct_sizes ();
 
@@ -331,7 +327,7 @@ prism54_module_exit(void)
 
 	pci_unregister_driver(&prism54_driver);
 
-	printk(KERN_INFO "Unloaded %s driver\n", DRV_NAME);
+	pr_info("Unloaded %s driver\n", DRV_NAME);
 
 	__in_cleanup_module = 0;
 }
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c
index c5404cb..ef4fe3a 100644
--- a/drivers/net/wireless/prism54/islpci_mgt.c
+++ b/drivers/net/wireless/prism54/islpci_mgt.c
@@ -17,6 +17,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/netdevice.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -50,13 +52,7 @@ display_buffer(char *buffer, int length)
 	if ((pc_debug & SHOW_BUFFER_CONTENTS) == 0)
 		return;
 
-	while (length > 0) {
-		printk("[%02x]", *buffer & 255);
-		length--;
-		buffer++;
-	}
-
-	printk("\n");
+	print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buffer, length);
 }
 #endif
 
@@ -124,8 +120,7 @@ islpci_mgmt_rx_fill(struct net_device *ndev)
 		if (buf->mem == NULL) {
 			buf->mem = kmalloc(MGMT_FRAME_SIZE, GFP_ATOMIC);
 			if (!buf->mem) {
-				printk(KERN_WARNING
-				       "Error allocating management frame.\n");
+				pr_warn("Error allocating management frame\n");
 				return -ENOMEM;
 			}
 			buf->size = MGMT_FRAME_SIZE;
@@ -135,8 +130,7 @@ islpci_mgmt_rx_fill(struct net_device *ndev)
 						       MGMT_FRAME_SIZE,
 						       PCI_DMA_FROMDEVICE);
 			if (!buf->pci_addr) {
-				printk(KERN_WARNING
-				       "Failed to make memory DMA'able.\n");
+				pr_warn("Failed to make memory DMA'able\n");
 				return -ENOMEM;
 			}
 		}
@@ -184,8 +178,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
 #endif
 
 	if (frag_len > MGMT_FRAME_SIZE) {
-		printk(KERN_DEBUG "%s: mgmt frame too large %d\n",
-		       ndev->name, frag_len);
+		pr_debug("%s: mgmt frame too large %d\n", ndev->name, frag_len);
 		goto error;
 	}
 
@@ -222,8 +215,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
 	buf.pci_addr = pci_map_single(priv->pdev, buf.mem, frag_len,
 				      PCI_DMA_TODEVICE);
 	if (!buf.pci_addr) {
-		printk(KERN_WARNING "%s: cannot map PCI memory for mgmt\n",
-		       ndev->name);
+		pr_warn("%s: cannot map PCI memory for mgmt\n", ndev->name);
 		goto error_free;
 	}
 
@@ -231,8 +223,7 @@ islpci_mgt_transmit(struct net_device *ndev, int operation, unsigned long oid,
 	spin_lock_irqsave(&priv->slock, flags);
 	curr_frag = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_TX_MGMTQ]);
 	if (curr_frag - priv->index_mgmt_tx >= ISL38XX_CB_MGMT_QSIZE) {
-		printk(KERN_WARNING "%s: mgmt tx queue is still full\n",
-		       ndev->name);
+		pr_warn("%s: mgmt tx queue is still full\n", ndev->name);
 		goto error_unlock;
 	}
 
@@ -297,9 +288,9 @@ islpci_mgt_receive(struct net_device *ndev)
 		/* I have no idea (and no documentation) if flags != 0
 		 * is possible.  Drop the frame, reuse the buffer. */
 		if (le16_to_cpu(cb->rx_data_mgmt[index].flags) != 0) {
-			printk(KERN_WARNING "%s: unknown flags 0x%04x\n",
-			       ndev->name,
-			       le16_to_cpu(cb->rx_data_mgmt[index].flags));
+			pr_warn("%s: unknown flags 0x%04x\n",
+				ndev->name,
+				le16_to_cpu(cb->rx_data_mgmt[index].flags));
 			continue;
 		}
 
@@ -311,8 +302,7 @@ islpci_mgt_receive(struct net_device *ndev)
 		 * size of a receive buffer.  Thus, if this check
 		 * triggers, we likely have kernel heap corruption. */
 		if (frag_len > MGMT_FRAME_SIZE) {
-			printk(KERN_WARNING
-				"%s: Bogus packet size of %d (%#x).\n",
+			pr_warn("%s: Bogus packet size of %d (%#x)\n",
 				ndev->name, frag_len, frag_len);
 			frag_len = MGMT_FRAME_SIZE;
 		}
@@ -324,8 +314,7 @@ islpci_mgt_receive(struct net_device *ndev)
 		/* Perform endianess conversion for PIMFOR header in-place. */
 		header = pimfor_decode_header(buf->mem, frag_len);
 		if (!header) {
-			printk(KERN_WARNING "%s: no PIMFOR header found\n",
-			       ndev->name);
+			pr_warn("%s: no PIMFOR header found\n", ndev->name);
 			continue;
 		}
 
@@ -348,9 +337,8 @@ islpci_mgt_receive(struct net_device *ndev)
 
 		/* nobody sends these */
 		if (header->flags & PIMFOR_FLAG_APPLIC_ORIGIN) {
-			printk(KERN_DEBUG
-			       "%s: errant PIMFOR application frame\n",
-			       ndev->name);
+			pr_debug("%s: errant PIMFOR application frame\n",
+				 ndev->name);
 			continue;
 		}
 
@@ -359,9 +347,8 @@ islpci_mgt_receive(struct net_device *ndev)
 		frame = kmalloc(sizeof (struct islpci_mgmtframe) + size,
 				GFP_ATOMIC);
 		if (!frame) {
-			printk(KERN_WARNING
-			       "%s: Out of memory, cannot handle oid 0x%08x\n",
-			       ndev->name, header->oid);
+			pr_warn("%s: Out of memory, cannot handle oid 0x%08x\n",
+				ndev->name, header->oid);
 			continue;
 		}
 		frame->ndev = ndev;
@@ -377,10 +364,9 @@ islpci_mgt_receive(struct net_device *ndev)
 
 		if (header->operation == PIMFOR_OP_TRAP) {
 #if VERBOSE > SHOW_ERROR_MESSAGES
-			printk(KERN_DEBUG
-			       "TRAP: oid 0x%x, device %i, flags 0x%x length %i\n",
-			       header->oid, header->device_id, header->flags,
-			       header->length);
+			pr_debug("TRAP: oid 0x%x, device %i, flags 0x%x length %i\n",
+				 header->oid, header->device_id, header->flags,
+				 header->length);
 #endif
 
 			/* Create work to handle trap out of interrupt
@@ -392,9 +378,8 @@ islpci_mgt_receive(struct net_device *ndev)
 			/* Signal the one waiting process that a response
 			 * has been received. */
 			if ((frame = xchg(&priv->mgmt_received, frame)) != NULL) {
-				printk(KERN_WARNING
-				       "%s: mgmt response not collected\n",
-				       ndev->name);
+				pr_warn("%s: mgmt response not collected\n",
+					ndev->name);
 				kfree(frame);
 			}
 #if VERBOSE > SHOW_ERROR_MESSAGES
@@ -480,25 +465,21 @@ islpci_mgt_transaction(struct net_device *ndev,
 				err = 0;
 				goto out;
 			} else {
-				printk(KERN_DEBUG
-				       "%s: expecting oid 0x%x, received 0x%x.\n",
-				       ndev->name, (unsigned int) oid,
-				       frame->header->oid);
+				pr_debug("%s: expecting oid 0x%x, received 0x%x\n",
+					 ndev->name, (unsigned int)oid,
+					 frame->header->oid);
 				kfree(frame);
 				frame = NULL;
 			}
 		}
 		if (timeleft == 0) {
-			printk(KERN_DEBUG
-				"%s: timeout waiting for mgmt response %lu, "
-				"triggering device\n",
-				ndev->name, timeout_left);
+			pr_debug("%s: timeout waiting for mgmt response %lu, triggering device\n",
+				 ndev->name, timeout_left);
 			islpci_trigger(priv);
 		}
 		timeout_left += timeleft - wait_cycle_jiffies;
 	}
-	printk(KERN_WARNING "%s: timeout waiting for mgmt response\n",
-	       ndev->name);
+	pr_warn("%s: timeout waiting for mgmt response\n", ndev->name);
 
 	/* TODO: we should reset the device here */
  out:
diff --git a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h
index 0db93db..4f129c5 100644
--- a/drivers/net/wireless/prism54/islpci_mgt.h
+++ b/drivers/net/wireless/prism54/islpci_mgt.h
@@ -28,8 +28,13 @@
  *  Function definitions
  */
 
-#define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0)
-#define DEBUG(f, args...) K_DEBUG(f, pc_debug, args)
+#define K_DEBUG(f, m, fmt, ...)				\
+do {							\
+	if (f & m)					\
+		pr_debug(fmt, ##__VA_ARGS__);		\
+} while (0)
+#define DEBUG(f, fmt, ...)				\
+	K_DEBUG(f, pc_debug, fmt, ##__VA_ARGS__)
 
 extern int pc_debug;
 #define init_wds 0	/* help compiler optimize away dead code */
diff --git a/drivers/net/wireless/prism54/oid_mgt.c b/drivers/net/wireless/prism54/oid_mgt.c
index a01606b..094baed 100644
--- a/drivers/net/wireless/prism54/oid_mgt.c
+++ b/drivers/net/wireless/prism54/oid_mgt.c
@@ -16,6 +16,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/slab.h>
 
@@ -580,10 +582,8 @@ mgt_get_request(islpci_private *priv, enum oid_num_t n, int extra, void *data,
 		islpci_mgt_release(response);
 
 	if (reslen > isl_oid[n].size)
-		printk(KERN_DEBUG
-		       "mgt_get_request(0x%x): received data length was bigger "
-		       "than expected (%d > %d). Memory is probably corrupted...",
-		       oid, reslen, isl_oid[n].size);
+		pr_debug("mgt_get_request(0x%x): received data length was bigger than expected (%d > %d). Memory is probably corrupted...\n",
+			 oid, reslen, isl_oid[n].size);
 
 	return ret;
 }
@@ -610,9 +610,8 @@ mgt_commit_list(islpci_private *priv, enum oid_num_t *l, int n)
 				islpci_mgt_release(response);
 			}
 			if (r)
-				printk(KERN_ERR "%s: mgt_commit_list: failure. "
-					"oid=%08x err=%d\n",
-					priv->ndev->name, oid, r);
+				pr_err("%s: mgt_commit_list: failure. oid=%08x err=%d\n",
+				       priv->ndev->name, oid, r);
 			ret |= r;
 			j++;
 			oid++;
@@ -689,7 +688,7 @@ mgt_update_addr(islpci_private *priv)
 		islpci_mgt_release(res);
 
 	if (ret)
-		printk(KERN_ERR "%s: mgt_update_addr: failure\n", priv->ndev->name);
+		pr_err("%s: mgt_update_addr: failure\n", priv->ndev->name);
 	return ret;
 }
 
@@ -714,7 +713,7 @@ mgt_commit(islpci_private *priv)
 	if (rvalue) {
 		/* some request have failed. The device might be in an
 		   incoherent state. We should reset it ! */
-		printk(KERN_DEBUG "%s: mgt_commit: failure\n", priv->ndev->name);
+		pr_debug("%s: mgt_commit: failure\n", priv->ndev->name);
 	}
 	return rvalue;
 }
@@ -751,7 +750,7 @@ mgt_unlatch_all(islpci_private *priv)
 #endif
 
 	if (rvalue)
-		printk(KERN_DEBUG "%s: Unlatching OIDs failed\n", priv->ndev->name);
+		pr_debug("%s: Unlatching OIDs failed\n", priv->ndev->name);
 }
 #endif
 
@@ -783,7 +782,7 @@ mgt_oidtonum(u32 oid)
 		if (isl_oid[i].oid == oid)
 			return i;
 
-	printk(KERN_DEBUG "looking for an unknown oid 0x%x", oid);
+	pr_debug("looking for an unknown oid 0x%x\n", oid);
 
 	return OID_NUM_LAST;
 }
@@ -832,7 +831,7 @@ mgt_response_to_str(enum oid_num_t n, union oid_res_t *r, char *str)
 	case OID_TYPE_FREQUENCIES:{
 			struct obj_frequencies *freq = r->ptr;
 			int i, t;
-			printk("nr : %u\n", freq->nr);
+			pr_debug("nr : %u\n", freq->nr);
 			t = snprintf(str, PRIV_STR_SIZE, "nr=%u\n", freq->nr);
 			for (i = 0; i < freq->nr; i++)
 				t += snprintf(str + t, PRIV_STR_SIZE - t,
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 16/20] ray_cs: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/ray_cs.c |  147 +++++++++++++++++++----------------------
 1 files changed, 69 insertions(+), 78 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 86a738b..fc8c59a 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -30,6 +30,8 @@
  *
 =============================================================================*/
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/proc_fs.h>
@@ -364,11 +366,11 @@ static int ray_config(struct pcmcia_device *link)
 	dev_dbg(&link->dev, "ray_config\n");
 
 	/* Determine card type and firmware version */
-	printk(KERN_INFO "ray_cs Detected: %s%s%s%s\n",
-	       link->prod_id[0] ? link->prod_id[0] : " ",
-	       link->prod_id[1] ? link->prod_id[1] : " ",
-	       link->prod_id[2] ? link->prod_id[2] : " ",
-	       link->prod_id[3] ? link->prod_id[3] : " ");
+	pr_info("Detected: %s%s%s%s\n",
+		link->prod_id[0] ? link->prod_id[0] : " ",
+		link->prod_id[1] ? link->prod_id[1] : " ",
+		link->prod_id[2] ? link->prod_id[2] : " ",
+		link->prod_id[3] ? link->prod_id[3] : " ");
 
 	/* Now allocate an interrupt line.  Note that this does not
 	   actually assign a handler to the interrupt.
@@ -439,8 +441,8 @@ static int ray_config(struct pcmcia_device *link)
 		return i;
 	}
 
-	printk(KERN_INFO "%s: RayLink, irq %d, hw_addr %pM\n",
-	       dev->name, dev->irq, dev->dev_addr);
+	pr_info("%s: RayLink, irq %d, hw_addr %pM\n",
+		dev->name, dev->irq, dev->dev_addr);
 
 	return 0;
 
@@ -489,8 +491,8 @@ static int ray_init(struct net_device *dev)
 
 	/* Check Power up test status and get mac address from card */
 	if (local->startup_res.startup_word != 0x80) {
-		printk(KERN_INFO "ray_init ERROR card status = %2x\n",
-		       local->startup_res.startup_word);
+		pr_info("%s: ERROR card status = %2x\n",
+			__func__, local->startup_res.startup_word);
 		local->card_status = CARD_INIT_ERROR;
 		return -1;
 	}
@@ -560,8 +562,7 @@ static int dl_startup_params(struct net_device *dev)
 	      local->dl_param_ccs);
 	/* Interrupt the firmware to process the command */
 	if (interrupt_ecf(local, ccsindex)) {
-		printk(KERN_INFO "ray dl_startup_params failed - "
-		       "ECF not ready for intr\n");
+		pr_info("%s: failed - ECF not ready for intr\n", __func__);
 		local->card_status = CARD_DL_PARAM_ERROR;
 		writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
 		return -2;
@@ -668,9 +669,8 @@ static void verify_dl_startup(u_long data)
 
 	status = readb(&pccs->buffer_status);
 	if (status != CCS_BUFFER_FREE) {
-		printk(KERN_INFO
-		       "Download startup params failed.  Status = %d\n",
-		       status);
+		pr_info("Download startup params failed.  Status = %d\n",
+			status);
 		local->card_status = CARD_DL_PARAM_ERROR;
 		return;
 	}
@@ -794,8 +794,8 @@ static int ray_dev_init(struct net_device *dev)
 #ifdef RAY_IMMEDIATE_INIT
 	/* Download startup parameters */
 	if ((i = dl_startup_params(dev)) < 0) {
-		printk(KERN_INFO "ray_dev_init dl_startup_params failed - "
-		       "returns 0x%x\n", i);
+		pr_info("%s: dl_startup_params failed - returns 0x%x\n",
+			__func__, i);
 		return -1;
 	}
 #else /* RAY_IMMEDIATE_INIT */
@@ -885,17 +885,17 @@ static int ray_hw_xmit(unsigned char *data, int len, struct net_device *dev,
 	struct tx_msg __iomem *ptx;	/* Address of xmit buffer in PC space */
 	short int addr;		/* Address of xmit buffer in card space */
 
-	pr_debug("ray_hw_xmit(data=%p, len=%d, dev=%p)\n", data, len, dev);
+	pr_debug("%s: (data=%p, len=%d, dev=%p)\n", __func__, data, len, dev);
 	if (len + TX_HEADER_LENGTH > TX_BUF_SIZE) {
-		printk(KERN_INFO "ray_hw_xmit packet too large: %d bytes\n",
+		pr_info("ray_hw_xmit packet too large: %d bytes\n",
 		       len);
 		return XMIT_MSG_BAD;
 	}
 	switch (ccsindex = get_free_tx_ccs(local)) {
 	case ECCSBUSY:
-		pr_debug("ray_hw_xmit tx_ccs table busy\n");
+		pr_debug("%s: tx_ccs table busy\n", __func__);
 	case ECCSFULL:
-		pr_debug("ray_hw_xmit No free tx ccs\n");
+		pr_debug("%s: No free tx ccs\n", __func__);
 	case ECARDGONE:
 		netif_stop_queue(dev);
 		return XMIT_NO_CCS;
@@ -932,12 +932,12 @@ static int ray_hw_xmit(unsigned char *data, int len, struct net_device *dev,
 	writeb(PSM_CAM, &pccs->var.tx_request.pow_sav_mode);
 	writeb(local->net_default_tx_rate, &pccs->var.tx_request.tx_rate);
 	writeb(0, &pccs->var.tx_request.antenna);
-	pr_debug("ray_hw_xmit default_tx_rate = 0x%x\n",
-	      local->net_default_tx_rate);
+	pr_debug("%s: default_tx_rate = 0x%x\n",
+		 __func__, local->net_default_tx_rate);
 
 	/* Interrupt the firmware to process the command */
 	if (interrupt_ecf(local, ccsindex)) {
-		pr_debug("ray_hw_xmit failed - ECF not ready for intr\n");
+		pr_debug("%s: failed - ECF not ready for intr\n", __func__);
 /* TBD very inefficient to copy packet to buffer, and then not
    send it, but the alternative is to queue the messages and that
    won't be done for a while.  Maybe set tbusy until a CCS is free?
@@ -954,7 +954,7 @@ static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx,
 {
 	__be16 proto = ((struct ethhdr *)data)->h_proto;
 	if (ntohs(proto) >= 1536) { /* DIX II ethernet frame */
-		pr_debug("ray_cs translate_frame DIX II\n");
+		pr_debug("%s: DIX II\n", __func__);
 		/* Copy LLC header to card buffer */
 		memcpy_toio(&ptx->var, eth2_llc, sizeof(eth2_llc));
 		memcpy_toio(((void __iomem *)&ptx->var) + sizeof(eth2_llc),
@@ -970,9 +970,9 @@ static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx,
 			    len - ETH_HLEN);
 		return (int)sizeof(struct snaphdr_t) - ETH_HLEN;
 	} else { /* already  802 type, and proto is length */
-		pr_debug("ray_cs translate_frame 802\n");
+		pr_debug("%s: 802\n", __func__);
 		if (proto == htons(0xffff)) { /* evil netware IPX 802.3 without LLC */
-			pr_debug("ray_cs translate_frame evil IPX\n");
+			pr_debug("%s: evil IPX\n", __func__);
 			memcpy_toio(&ptx->var, data + ETH_HLEN, len - ETH_HLEN);
 			return 0 - ETH_HLEN;
 		}
@@ -1501,9 +1501,8 @@ static int ray_open(struct net_device *dev)
 
 		/* Download startup parameters */
 		if ((i = dl_startup_params(dev)) < 0) {
-			printk(KERN_INFO
-			       "ray_dev_init dl_startup_params failed - "
-			       "returns 0x%x\n", i);
+			pr_info("ray_dev_init dl_startup_params failed - returns 0x%x\n",
+				i);
 			return -1;
 		}
 	}
@@ -1540,7 +1539,7 @@ static int ray_dev_close(struct net_device *dev)
 /*===========================================================================*/
 static void ray_reset(struct net_device *dev)
 {
-	pr_debug("ray_reset entered\n");
+	pr_debug("%s: entered\n", __func__);
 }
 
 /*===========================================================================*/
@@ -1639,8 +1638,7 @@ static void authenticate_timeout(u_long data)
 {
 	ray_dev_t *local = (ray_dev_t *) data;
 	del_timer(&local->timer);
-	printk(KERN_INFO "ray_cs Authentication with access point failed"
-	       " - timeout\n");
+	pr_info("Authentication with access point failed - timeout\n");
 	join_net((u_long) local);
 }
 
@@ -1800,11 +1798,11 @@ static void set_multicast_list(struct net_device *dev)
 	ray_dev_t *local = netdev_priv(dev);
 	UCHAR promisc;
 
-	pr_debug("ray_cs set_multicast_list(%p)\n", dev);
+	pr_debug("%s: (%p)\n", __func__, dev);
 
 	if (dev->flags & IFF_PROMISC) {
 		if (local->sparm.b5.a_promiscuous_mode == 0) {
-			pr_debug("ray_cs set_multicast_list promisc on\n");
+			pr_debug("%s: promisc on\n", __func__);
 			local->sparm.b5.a_promiscuous_mode = 1;
 			promisc = 1;
 			ray_update_parm(dev, OBJID_promiscuous_mode,
@@ -1812,7 +1810,7 @@ static void set_multicast_list(struct net_device *dev)
 		}
 	} else {
 		if (local->sparm.b5.a_promiscuous_mode == 1) {
-			pr_debug("ray_cs set_multicast_list promisc off\n");
+			pr_debug("%s: promisc off\n", __func__);
 			local->sparm.b5.a_promiscuous_mode = 0;
 			promisc = 0;
 			ray_update_parm(dev, OBJID_promiscuous_mode,
@@ -1846,13 +1844,12 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
 	if (dev == NULL)	/* Note that we want interrupts with dev->start == 0 */
 		return IRQ_NONE;
 
-	pr_debug("ray_cs: interrupt for *dev=%p\n", dev);
+	pr_debug("interrupt for *dev=%p\n", dev);
 
 	local = netdev_priv(dev);
 	link = (struct pcmcia_device *)local->finder;
 	if (!pcmcia_dev_present(link)) {
-		pr_debug(
-			"ray_cs interrupt from device not present or suspended.\n");
+		pr_debug("interrupt from device not present or suspended\n");
 		return IRQ_NONE;
 	}
 	rcsindex = readb(&((struct scb __iomem *)(local->sram))->rcs_index);
@@ -2045,7 +2042,7 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
 	int rx_len;
 	unsigned int pkt_addr;
 	void __iomem *pmsg;
-	pr_debug("ray_rx process rx packet\n");
+	pr_debug("%s: process rx packet\n", __func__);
 
 	/* Calculate address of packet within Rx buffer */
 	pkt_addr = ((readb(&prcs->var.rx_packet.rx_data_ptr[0]) << 8)
@@ -2058,28 +2055,28 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
 	pmsg = local->rmem + pkt_addr;
 	switch (readb(pmsg)) {
 	case DATA_TYPE:
-		pr_debug("ray_rx data type\n");
+		pr_debug("%s: data type\n", __func__);
 		rx_data(dev, prcs, pkt_addr, rx_len);
 		break;
 	case AUTHENTIC_TYPE:
-		pr_debug("ray_rx authentic type\n");
+		pr_debug("%s: authentic type\n", __func__);
 		if (sniffer)
 			rx_data(dev, prcs, pkt_addr, rx_len);
 		else
 			rx_authenticate(local, prcs, pkt_addr, rx_len);
 		break;
 	case DEAUTHENTIC_TYPE:
-		pr_debug("ray_rx deauth type\n");
+		pr_debug("%s: deauth type\n", __func__);
 		if (sniffer)
 			rx_data(dev, prcs, pkt_addr, rx_len);
 		else
 			rx_deauthenticate(local, prcs, pkt_addr, rx_len);
 		break;
 	case NULL_MSG_TYPE:
-		pr_debug("ray_cs rx NULL msg\n");
+		pr_debug("%s: rx NULL msg\n", __func__);
 		break;
 	case BEACON_TYPE:
-		pr_debug("ray_rx beacon type\n");
+		pr_debug("%s: beacon type\n", __func__);
 		if (sniffer)
 			rx_data(dev, prcs, pkt_addr, rx_len);
 
@@ -2092,8 +2089,8 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
 		ray_get_stats(dev);
 		break;
 	default:
-		pr_debug("ray_cs unknown pkt type %2x\n",
-		      (unsigned int)readb(pmsg));
+		pr_debug("%s: unknown pkt type %2x\n",
+			 __func__, (unsigned int)readb(pmsg));
 		break;
 	}
 
@@ -2121,9 +2118,8 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
 			    rx_len >
 			    (dev->mtu + RX_MAC_HEADER_LENGTH + ETH_HLEN +
 			     FCS_LEN)) {
-				pr_debug(
-				      "ray_cs invalid packet length %d received\n",
-				      rx_len);
+				pr_debug("invalid packet length %d received\n",
+					 rx_len);
 				return;
 			}
 		} else { /* encapsulated ethernet */
@@ -2132,17 +2128,16 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
 			    rx_len >
 			    (dev->mtu + RX_MAC_HEADER_LENGTH + ETH_HLEN +
 			     FCS_LEN)) {
-				pr_debug(
-				      "ray_cs invalid packet length %d received\n",
-				      rx_len);
+				pr_debug("invalid packet length %d received\n",
+					 rx_len);
 				return;
 			}
 		}
 	}
-	pr_debug("ray_cs rx_data packet\n");
+	pr_debug("rx_data packet\n");
 	/* If fragmented packet, verify sizes of fragments add up */
 	if (readb(&prcs->var.rx_packet.next_frag_rcs_index) != 0xFF) {
-		pr_debug("ray_cs rx'ed fragment\n");
+		pr_debug("rx'ed fragment\n");
 		tmp = (readb(&prcs->var.rx_packet.totalpacketlength[0]) << 8)
 		    + readb(&prcs->var.rx_packet.totalpacketlength[1]);
 		total_len = tmp;
@@ -2160,8 +2155,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
 		} while (1);
 
 		if (tmp < 0) {
-			pr_debug(
-			      "ray_cs rx_data fragment lengths don't add up\n");
+			pr_debug("rx_data fragment lengths don't add up\n");
 			local->stats.rx_dropped++;
 			release_frag_chain(local, prcs);
 			return;
@@ -2172,7 +2166,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
 
 	skb = dev_alloc_skb(total_len + 5);
 	if (skb == NULL) {
-		pr_debug("ray_cs rx_data could not allocate skb\n");
+		pr_debug("rx_data could not allocate skb\n");
 		local->stats.rx_dropped++;
 		if (readb(&prcs->var.rx_packet.next_frag_rcs_index) != 0xFF)
 			release_frag_chain(local, prcs);
@@ -2180,8 +2174,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
 	}
 	skb_reserve(skb, 2);	/* Align IP on 16 byte (TBD check this) */
 
-	pr_debug("ray_cs rx_data total_len = %x, rx_len = %x\n", total_len,
-	      rx_len);
+	pr_debug("rx_data total_len = %x, rx_len = %x\n", total_len, rx_len);
 
 /************************/
 	/* Reserve enough room for the whole damn packet. */
@@ -2213,7 +2206,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
 	tmp = 17;
 	if (readb(&prcs->var.rx_packet.next_frag_rcs_index) != 0xFF) {
 		prcslink = prcs;
-		pr_debug("ray_cs rx_data in fragment loop\n");
+		pr_debug("rx_data in fragment loop\n");
 		do {
 			prcslink = rcs_base(local)
 			    +
@@ -2300,8 +2293,8 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
 
 	if (psnap->dsap != 0xaa || psnap->ssap != 0xaa || psnap->ctrl != 3) {
 		/* not a snap type so leave it alone */
-		pr_debug("ray_cs untranslate NOT SNAP %02x %02x %02x\n",
-		      psnap->dsap, psnap->ssap, psnap->ctrl);
+		pr_debug("untranslate NOT SNAP %02x %02x %02x\n",
+			 psnap->dsap, psnap->ssap, psnap->ctrl);
 
 		delta = RX_MAC_HEADER_LENGTH - ETH_HLEN;
 		peth = (struct ethhdr *)(skb->data + delta);
@@ -2309,7 +2302,7 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
 	} else { /* Its a SNAP */
 		if (memcmp(psnap->org, org_bridge, 3) == 0) {
 		/* EtherII and nuke the LLC */
-			pr_debug("ray_cs untranslate Bridge encap\n");
+			pr_debug("untranslate Bridge encap\n");
 			delta = RX_MAC_HEADER_LENGTH
 			    + sizeof(struct snaphdr_t) - ETH_HLEN;
 			peth = (struct ethhdr *)(skb->data + delta);
@@ -2318,14 +2311,14 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
 			switch (ntohs(type)) {
 			case ETH_P_IPX:
 			case ETH_P_AARP:
-				pr_debug("ray_cs untranslate RFC IPX/AARP\n");
+				pr_debug("untranslate RFC IPX/AARP\n");
 				delta = RX_MAC_HEADER_LENGTH - ETH_HLEN;
 				peth = (struct ethhdr *)(skb->data + delta);
 				peth->h_proto =
 				    htons(len - RX_MAC_HEADER_LENGTH);
 				break;
 			default:
-				pr_debug("ray_cs untranslate RFC default\n");
+				pr_debug("untranslate RFC default\n");
 				delta = RX_MAC_HEADER_LENGTH +
 				    sizeof(struct snaphdr_t) - ETH_HLEN;
 				peth = (struct ethhdr *)(skb->data + delta);
@@ -2341,8 +2334,8 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
 	}
 /* TBD reserve  skb_reserve(skb, delta); */
 	skb_pull(skb, delta);
-	pr_debug("untranslate after skb_pull(%d), skb->data = %p\n", delta,
-	      skb->data);
+	pr_debug("untranslate after skb_pull(%d), skb->data = %p\n",
+		 delta, skb->data);
 	memcpy(peth->h_dest, destaddr, ADDRLEN);
 	memcpy(peth->h_source, srcaddr, ADDRLEN);
 #if 0
@@ -2388,8 +2381,7 @@ static void release_frag_chain(ray_dev_t *local, struct rcs __iomem *prcs)
 	while (tmp--) {
 		writeb(CCS_BUFFER_FREE, &prcslink->buffer_status);
 		if (rcsindex >= (NUMBER_OF_CCS + NUMBER_OF_RCS)) {
-			pr_debug("ray_cs interrupt bad rcsindex = 0x%x\n",
-			      rcsindex);
+			pr_debug("interrupt bad rcsindex = 0x%x\n", rcsindex);
 			break;
 		}
 		prcslink = rcs_base(local) + rcsindex;
@@ -2432,11 +2424,11 @@ static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs,
 	copy_from_rx_buff(local, buff, pkt_addr, rx_len & 0xff);
 	/* if we are trying to get authenticated */
 	if (local->sparm.b4.a_network_type == ADHOC) {
-		pr_debug("ray_cs rx_auth var= %02x %02x %02x %02x %02x %02x\n",
-		      msg->var[0], msg->var[1], msg->var[2], msg->var[3],
-		      msg->var[4], msg->var[5]);
+		pr_debug("rx_auth var= %02x %02x %02x %02x %02x %02x\n",
+			 msg->var[0], msg->var[1], msg->var[2], msg->var[3],
+			 msg->var[4], msg->var[5]);
 		if (msg->var[2] == 1) {
-			pr_debug("ray_cs Sending authentication response.\n");
+			pr_debug("Sending authentication response\n");
 			if (!build_auth_frame
 			    (local, msg->mac.addr_2, OPEN_AUTH_RESPONSE)) {
 				local->authentication_state = NEED_TO_AUTH;
@@ -2682,7 +2674,7 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type)
 
 	/* If no tx buffers available, return */
 	if ((ccsindex = get_free_tx_ccs(local)) < 0) {
-		pr_debug("ray_cs send authenticate - No free tx ccs\n");
+		pr_debug("send authenticate - No free tx ccs\n");
 		return -1;
 	}
 
@@ -2714,8 +2706,7 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type)
 
 	/* Interrupt the firmware to process the command */
 	if (interrupt_ecf(local, ccsindex)) {
-		pr_debug(
-		      "ray_cs send authentication request failed - ECF not ready for intr\n");
+		pr_debug("send authentication request failed - ECF not ready for intr\n");
 		writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
 		return -1;
 	}
@@ -2804,7 +2795,7 @@ static int __init init_ray_cs(void)
 	pr_debug("%s\n", rcsid);
 	rc = pcmcia_register_driver(&ray_driver);
 	pr_debug("raylink init_module register_pcmcia_driver returns 0x%x\n",
-	      rc);
+		 rc);
 
 #ifdef CONFIG_PROC_FS
 	proc_mkdir("driver/ray_cs", NULL);
@@ -2823,7 +2814,7 @@ static int __init init_ray_cs(void)
 
 static void __exit exit_ray_cs(void)
 {
-	pr_debug("ray_cs: cleanup_module\n");
+	pr_debug("cleanup_module\n");
 
 #ifdef CONFIG_PROC_FS
 	remove_proc_entry("driver/ray_cs/ray_cs", NULL);
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 18/20] ti: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Luciano Coelho, John W. Linville, linux-wireless, netdev
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Add newlines to calls, remove from macros.
Remove unnecessary duplicate newlines from calls.
Remove spaces before newlines.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/ti/wl1251/acx.c      |  151 ++++++++--------
 drivers/net/wireless/ti/wl1251/boot.c     |   51 +++---
 drivers/net/wireless/ti/wl1251/cmd.c      |   76 ++++----
 drivers/net/wireless/ti/wl1251/init.c     |   16 +-
 drivers/net/wireless/ti/wl1251/io.c       |   27 ++--
 drivers/net/wireless/ti/wl1251/main.c     |  103 ++++++------
 drivers/net/wireless/ti/wl1251/ps.c       |   16 +-
 drivers/net/wireless/ti/wl1251/rx.c       |    8 +-
 drivers/net/wireless/ti/wl1251/sdio.c     |   20 +-
 drivers/net/wireless/ti/wl1251/spi.c      |   20 +-
 drivers/net/wireless/ti/wl1251/tx.c       |   21 +--
 drivers/net/wireless/ti/wl1251/wl1251.h   |   20 +-
 drivers/net/wireless/ti/wl12xx/acx.c      |    2 +-
 drivers/net/wireless/ti/wl12xx/cmd.c      |   18 +-
 drivers/net/wireless/ti/wl12xx/main.c     |   39 ++--
 drivers/net/wireless/ti/wl18xx/acx.c      |   12 +-
 drivers/net/wireless/ti/wl18xx/main.c     |   54 +++---
 drivers/net/wireless/ti/wl18xx/tx.c       |   10 +-
 drivers/net/wireless/ti/wlcore/acx.c      |  229 ++++++++++++------------
 drivers/net/wireless/ti/wlcore/boot.c     |   56 +++---
 drivers/net/wireless/ti/wlcore/cmd.c      |  164 +++++++++---------
 drivers/net/wireless/ti/wlcore/debug.h    |   22 ++--
 drivers/net/wireless/ti/wlcore/debugfs.c  |   42 +++---
 drivers/net/wireless/ti/wlcore/event.c    |   16 +-
 drivers/net/wireless/ti/wlcore/main.c     |  281 ++++++++++++++---------------
 drivers/net/wireless/ti/wlcore/ps.c       |   34 ++--
 drivers/net/wireless/ti/wlcore/rx.c       |   33 ++--
 drivers/net/wireless/ti/wlcore/scan.c     |   68 ++++----
 drivers/net/wireless/ti/wlcore/sdio.c     |    3 +-
 drivers/net/wireless/ti/wlcore/testmode.c |   16 +-
 drivers/net/wireless/ti/wlcore/tx.c       |   23 ++--
 31 files changed, 816 insertions(+), 835 deletions(-)

diff --git a/drivers/net/wireless/ti/wl1251/acx.c b/drivers/net/wireless/ti/wl1251/acx.c
index ad87a1a..15f8f6e 100644
--- a/drivers/net/wireless/ti/wl1251/acx.c
+++ b/drivers/net/wireless/ti/wl1251/acx.c
@@ -15,7 +15,7 @@ int wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod,
 	struct acx_fw_gen_frame_rates *rates;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx frame rates");
+	wl1251_debug(DEBUG_ACX, "acx frame rates\n");
 
 	rates = kzalloc(sizeof(*rates), GFP_KERNEL);
 	if (!rates) {
@@ -31,7 +31,7 @@ int wl1251_acx_frame_rates(struct wl1251 *wl, u8 ctrl_rate, u8 ctrl_mod,
 	ret = wl1251_cmd_configure(wl, ACX_FW_GEN_FRAME_RATES,
 				   rates, sizeof(*rates));
 	if (ret < 0) {
-		wl1251_error("Failed to set FW rates and modulation");
+		wl1251_err("Failed to set FW rates and modulation\n");
 		goto out;
 	}
 
@@ -46,7 +46,7 @@ int wl1251_acx_station_id(struct wl1251 *wl)
 	struct acx_dot11_station_id *mac;
 	int ret, i;
 
-	wl1251_debug(DEBUG_ACX, "acx dot11_station_id");
+	wl1251_debug(DEBUG_ACX, "acx dot11_station_id\n");
 
 	mac = kzalloc(sizeof(*mac), GFP_KERNEL);
 	if (!mac) {
@@ -71,7 +71,7 @@ int wl1251_acx_default_key(struct wl1251 *wl, u8 key_id)
 	struct acx_dot11_default_key *default_key;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx dot11_default_key (%d)", key_id);
+	wl1251_debug(DEBUG_ACX, "acx dot11_default_key (%d)\n", key_id);
 
 	default_key = kzalloc(sizeof(*default_key), GFP_KERNEL);
 	if (!default_key) {
@@ -84,7 +84,7 @@ int wl1251_acx_default_key(struct wl1251 *wl, u8 key_id)
 	ret = wl1251_cmd_configure(wl, DOT11_DEFAULT_KEY,
 				   default_key, sizeof(*default_key));
 	if (ret < 0) {
-		wl1251_error("Couldn't set default key");
+		wl1251_err("Couldn't set default key\n");
 		goto out;
 	}
 
@@ -101,7 +101,7 @@ int wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event,
 	struct acx_wake_up_condition *wake_up;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx wake up conditions");
+	wl1251_debug(DEBUG_ACX, "acx wake up conditions\n");
 
 	wake_up = kzalloc(sizeof(*wake_up), GFP_KERNEL);
 	if (!wake_up) {
@@ -115,7 +115,7 @@ int wl1251_acx_wake_up_conditions(struct wl1251 *wl, u8 wake_up_event,
 	ret = wl1251_cmd_configure(wl, ACX_WAKE_UP_CONDITIONS,
 				   wake_up, sizeof(*wake_up));
 	if (ret < 0) {
-		wl1251_warning("could not set wake up conditions: %d", ret);
+		wl1251_warn("could not set wake up conditions: %d\n", ret);
 		goto out;
 	}
 
@@ -129,7 +129,7 @@ int wl1251_acx_sleep_auth(struct wl1251 *wl, u8 sleep_auth)
 	struct acx_sleep_auth *auth;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx sleep auth");
+	wl1251_debug(DEBUG_ACX, "acx sleep auth\n");
 
 	auth = kzalloc(sizeof(*auth), GFP_KERNEL);
 	if (!auth) {
@@ -151,7 +151,7 @@ int wl1251_acx_fw_version(struct wl1251 *wl, char *buf, size_t len)
 	struct acx_revision *rev;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx fw rev");
+	wl1251_debug(DEBUG_ACX, "acx fw rev\n");
 
 	rev = kzalloc(sizeof(*rev), GFP_KERNEL);
 	if (!rev) {
@@ -161,7 +161,7 @@ int wl1251_acx_fw_version(struct wl1251 *wl, char *buf, size_t len)
 
 	ret = wl1251_cmd_interrogate(wl, ACX_FW_REV, rev, sizeof(*rev));
 	if (ret < 0) {
-		wl1251_warning("ACX_FW_REV interrogate failed");
+		wl1251_warn("ACX_FW_REV interrogate failed\n");
 		goto out;
 	}
 
@@ -185,7 +185,7 @@ int wl1251_acx_tx_power(struct wl1251 *wl, int power)
 	struct acx_current_tx_power *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx dot11_cur_tx_pwr");
+	wl1251_debug(DEBUG_ACX, "acx dot11_cur_tx_pwr\n");
 
 	if (power < 0 || power > 25)
 		return -EINVAL;
@@ -200,7 +200,7 @@ int wl1251_acx_tx_power(struct wl1251 *wl, int power)
 
 	ret = wl1251_cmd_configure(wl, DOT11_CUR_TX_PWR, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("configure of tx power failed: %d", ret);
+		wl1251_warn("configure of tx power failed: %d\n", ret);
 		goto out;
 	}
 
@@ -214,7 +214,7 @@ int wl1251_acx_feature_cfg(struct wl1251 *wl)
 	struct acx_feature_config *feature;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx feature cfg");
+	wl1251_debug(DEBUG_ACX, "acx feature cfg\n");
 
 	feature = kzalloc(sizeof(*feature), GFP_KERNEL);
 	if (!feature) {
@@ -229,7 +229,7 @@ int wl1251_acx_feature_cfg(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, ACX_FEATURE_CFG,
 				   feature, sizeof(*feature));
 	if (ret < 0) {
-		wl1251_error("Couldn't set HW encryption");
+		wl1251_err("Couldn't set HW encryption\n");
 		goto out;
 	}
 
@@ -243,7 +243,7 @@ int wl1251_acx_mem_map(struct wl1251 *wl, struct acx_header *mem_map,
 {
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx mem map");
+	wl1251_debug(DEBUG_ACX, "acx mem map\n");
 
 	ret = wl1251_cmd_interrogate(wl, ACX_MEM_MAP, mem_map, len);
 	if (ret < 0)
@@ -258,7 +258,7 @@ int wl1251_acx_data_path_params(struct wl1251 *wl,
 	struct acx_data_path_params *params;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx data path params");
+	wl1251_debug(DEBUG_ACX, "acx data path params\n");
 
 	params = kzalloc(sizeof(*params), GFP_KERNEL);
 	if (!params) {
@@ -288,10 +288,10 @@ int wl1251_acx_data_path_params(struct wl1251 *wl,
 				     resp, sizeof(*resp));
 
 	if (ret < 0) {
-		wl1251_warning("failed to read data path parameters: %d", ret);
+		wl1251_warn("failed to read data path parameters: %d\n", ret);
 		goto out;
 	} else if (resp->header.cmd.status != CMD_STATUS_SUCCESS) {
-		wl1251_warning("data path parameter acx status failed");
+		wl1251_warn("data path parameter acx status failed\n");
 		ret = -EIO;
 		goto out;
 	}
@@ -306,7 +306,7 @@ int wl1251_acx_rx_msdu_life_time(struct wl1251 *wl, u32 life_time)
 	struct acx_rx_msdu_lifetime *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx rx msdu life time");
+	wl1251_debug(DEBUG_ACX, "acx rx msdu life time\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -318,7 +318,7 @@ int wl1251_acx_rx_msdu_life_time(struct wl1251 *wl, u32 life_time)
 	ret = wl1251_cmd_configure(wl, DOT11_RX_MSDU_LIFE_TIME,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("failed to set rx msdu life time: %d", ret);
+		wl1251_warn("failed to set rx msdu life time: %d\n", ret);
 		goto out;
 	}
 
@@ -332,7 +332,7 @@ int wl1251_acx_rx_config(struct wl1251 *wl, u32 config, u32 filter)
 	struct acx_rx_config *rx_config;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx rx config");
+	wl1251_debug(DEBUG_ACX, "acx rx config\n");
 
 	rx_config = kzalloc(sizeof(*rx_config), GFP_KERNEL);
 	if (!rx_config) {
@@ -346,7 +346,7 @@ int wl1251_acx_rx_config(struct wl1251 *wl, u32 config, u32 filter)
 	ret = wl1251_cmd_configure(wl, ACX_RX_CFG,
 				   rx_config, sizeof(*rx_config));
 	if (ret < 0) {
-		wl1251_warning("failed to set rx config: %d", ret);
+		wl1251_warn("failed to set rx config: %d\n", ret);
 		goto out;
 	}
 
@@ -360,7 +360,7 @@ int wl1251_acx_pd_threshold(struct wl1251 *wl)
 	struct acx_packet_detection *pd;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx data pd threshold");
+	wl1251_debug(DEBUG_ACX, "acx data pd threshold\n");
 
 	pd = kzalloc(sizeof(*pd), GFP_KERNEL);
 	if (!pd) {
@@ -372,7 +372,7 @@ int wl1251_acx_pd_threshold(struct wl1251 *wl)
 
 	ret = wl1251_cmd_configure(wl, ACX_PD_THRESHOLD, pd, sizeof(*pd));
 	if (ret < 0) {
-		wl1251_warning("failed to set pd threshold: %d", ret);
+		wl1251_warn("failed to set pd threshold: %d\n", ret);
 		goto out;
 	}
 
@@ -386,7 +386,7 @@ int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time)
 	struct acx_slot *slot;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx slot");
+	wl1251_debug(DEBUG_ACX, "acx slot\n");
 
 	slot = kzalloc(sizeof(*slot), GFP_KERNEL);
 	if (!slot) {
@@ -399,7 +399,7 @@ int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time)
 
 	ret = wl1251_cmd_configure(wl, ACX_SLOT, slot, sizeof(*slot));
 	if (ret < 0) {
-		wl1251_warning("failed to set slot time: %d", ret);
+		wl1251_warn("failed to set slot time: %d\n", ret);
 		goto out;
 	}
 
@@ -413,7 +413,7 @@ int wl1251_acx_group_address_tbl(struct wl1251 *wl)
 	struct acx_dot11_grp_addr_tbl *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx group address tbl");
+	wl1251_debug(DEBUG_ACX, "acx group address tbl\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -429,7 +429,7 @@ int wl1251_acx_group_address_tbl(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, DOT11_GROUP_ADDRESS_TBL,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("failed to set group addr table: %d", ret);
+		wl1251_warn("failed to set group addr table: %d\n", ret);
 		goto out;
 	}
 
@@ -449,7 +449,7 @@ int wl1251_acx_service_period_timeout(struct wl1251 *wl)
 		goto out;
 	}
 
-	wl1251_debug(DEBUG_ACX, "acx service period timeout");
+	wl1251_debug(DEBUG_ACX, "acx service period timeout\n");
 
 	rx_timeout->ps_poll_timeout = RX_TIMEOUT_PS_POLL_DEF;
 	rx_timeout->upsd_timeout = RX_TIMEOUT_UPSD_DEF;
@@ -457,8 +457,8 @@ int wl1251_acx_service_period_timeout(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, ACX_SERVICE_PERIOD_TIMEOUT,
 				   rx_timeout, sizeof(*rx_timeout));
 	if (ret < 0) {
-		wl1251_warning("failed to set service period timeout: %d",
-			       ret);
+		wl1251_warn("failed to set service period timeout: %d\n",
+			    ret);
 		goto out;
 	}
 
@@ -472,7 +472,7 @@ int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold)
 	struct acx_rts_threshold *rts;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx rts threshold");
+	wl1251_debug(DEBUG_ACX, "acx rts threshold\n");
 
 	rts = kzalloc(sizeof(*rts), GFP_KERNEL);
 	if (!rts) {
@@ -484,7 +484,7 @@ int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold)
 
 	ret = wl1251_cmd_configure(wl, DOT11_RTS_THRESHOLD, rts, sizeof(*rts));
 	if (ret < 0) {
-		wl1251_warning("failed to set rts threshold: %d", ret);
+		wl1251_warn("failed to set rts threshold: %d\n", ret);
 		goto out;
 	}
 
@@ -498,7 +498,7 @@ int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter)
 	struct acx_beacon_filter_option *beacon_filter;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx beacon filter opt");
+	wl1251_debug(DEBUG_ACX, "acx beacon filter opt\n");
 
 	beacon_filter = kzalloc(sizeof(*beacon_filter), GFP_KERNEL);
 	if (!beacon_filter) {
@@ -512,7 +512,7 @@ int wl1251_acx_beacon_filter_opt(struct wl1251 *wl, bool enable_filter)
 	ret = wl1251_cmd_configure(wl, ACX_BEACON_FILTER_OPT,
 				   beacon_filter, sizeof(*beacon_filter));
 	if (ret < 0) {
-		wl1251_warning("failed to set beacon filter opt: %d", ret);
+		wl1251_warn("failed to set beacon filter opt: %d\n", ret);
 		goto out;
 	}
 
@@ -527,7 +527,7 @@ int wl1251_acx_beacon_filter_table(struct wl1251 *wl)
 	int idx = 0;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx beacon filter table");
+	wl1251_debug(DEBUG_ACX, "acx beacon filter table\n");
 
 	ie_table = kzalloc(sizeof(*ie_table), GFP_KERNEL);
 	if (!ie_table) {
@@ -543,7 +543,7 @@ int wl1251_acx_beacon_filter_table(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, ACX_BEACON_FILTER_TABLE,
 				   ie_table, sizeof(*ie_table));
 	if (ret < 0) {
-		wl1251_warning("failed to set beacon filter table: %d", ret);
+		wl1251_warn("failed to set beacon filter table: %d\n", ret);
 		goto out;
 	}
 
@@ -557,7 +557,7 @@ int wl1251_acx_conn_monit_params(struct wl1251 *wl)
 	struct acx_conn_monit_params *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx connection monitor parameters");
+	wl1251_debug(DEBUG_ACX, "acx connection monitor parameters\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -571,8 +571,8 @@ int wl1251_acx_conn_monit_params(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("failed to set connection monitor "
-			       "parameters: %d", ret);
+		wl1251_warn("failed to set connection monitor parameters: %d\n",
+			    ret);
 		goto out;
 	}
 
@@ -586,7 +586,7 @@ int wl1251_acx_sg_enable(struct wl1251 *wl)
 	struct acx_bt_wlan_coex *pta;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx sg enable");
+	wl1251_debug(DEBUG_ACX, "acx sg enable\n");
 
 	pta = kzalloc(sizeof(*pta), GFP_KERNEL);
 	if (!pta) {
@@ -598,7 +598,7 @@ int wl1251_acx_sg_enable(struct wl1251 *wl)
 
 	ret = wl1251_cmd_configure(wl, ACX_SG_ENABLE, pta, sizeof(*pta));
 	if (ret < 0) {
-		wl1251_warning("failed to set softgemini enable: %d", ret);
+		wl1251_warn("failed to set softgemini enable: %d\n", ret);
 		goto out;
 	}
 
@@ -612,7 +612,7 @@ int wl1251_acx_sg_cfg(struct wl1251 *wl)
 	struct acx_bt_wlan_coex_param *param;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx sg cfg");
+	wl1251_debug(DEBUG_ACX, "acx sg cfg\n");
 
 	param = kzalloc(sizeof(*param), GFP_KERNEL);
 	if (!param) {
@@ -652,7 +652,7 @@ int wl1251_acx_sg_cfg(struct wl1251 *wl)
 
 	ret = wl1251_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
 	if (ret < 0) {
-		wl1251_warning("failed to set sg config: %d", ret);
+		wl1251_warn("failed to set sg config: %d\n", ret);
 		goto out;
 	}
 
@@ -666,7 +666,7 @@ int wl1251_acx_cca_threshold(struct wl1251 *wl)
 	struct acx_energy_detection *detection;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx cca threshold");
+	wl1251_debug(DEBUG_ACX, "acx cca threshold\n");
 
 	detection = kzalloc(sizeof(*detection), GFP_KERNEL);
 	if (!detection) {
@@ -680,7 +680,7 @@ int wl1251_acx_cca_threshold(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, ACX_CCA_THRESHOLD,
 				   detection, sizeof(*detection));
 	if (ret < 0)
-		wl1251_warning("failed to set cca threshold: %d", ret);
+		wl1251_warn("failed to set cca threshold: %d\n", ret);
 
 out:
 	kfree(detection);
@@ -692,7 +692,7 @@ int wl1251_acx_bcn_dtim_options(struct wl1251 *wl)
 	struct acx_beacon_broadcast *bb;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx bcn dtim options");
+	wl1251_debug(DEBUG_ACX, "acx bcn dtim options\n");
 
 	bb = kzalloc(sizeof(*bb), GFP_KERNEL);
 	if (!bb) {
@@ -707,7 +707,7 @@ int wl1251_acx_bcn_dtim_options(struct wl1251 *wl)
 
 	ret = wl1251_cmd_configure(wl, ACX_BCN_DTIM_OPTIONS, bb, sizeof(*bb));
 	if (ret < 0) {
-		wl1251_warning("failed to set rx config: %d", ret);
+		wl1251_warn("failed to set rx config: %d\n", ret);
 		goto out;
 	}
 
@@ -721,7 +721,7 @@ int wl1251_acx_aid(struct wl1251 *wl, u16 aid)
 	struct acx_aid *acx_aid;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx aid");
+	wl1251_debug(DEBUG_ACX, "acx aid\n");
 
 	acx_aid = kzalloc(sizeof(*acx_aid), GFP_KERNEL);
 	if (!acx_aid) {
@@ -733,7 +733,7 @@ int wl1251_acx_aid(struct wl1251 *wl, u16 aid)
 
 	ret = wl1251_cmd_configure(wl, ACX_AID, acx_aid, sizeof(*acx_aid));
 	if (ret < 0) {
-		wl1251_warning("failed to set aid: %d", ret);
+		wl1251_warn("failed to set aid: %d\n", ret);
 		goto out;
 	}
 
@@ -747,7 +747,7 @@ int wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask)
 	struct acx_event_mask *mask;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx event mbox mask");
+	wl1251_debug(DEBUG_ACX, "acx event mbox mask\n");
 
 	mask = kzalloc(sizeof(*mask), GFP_KERNEL);
 	if (!mask) {
@@ -763,7 +763,7 @@ int wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask)
 	ret = wl1251_cmd_configure(wl, ACX_EVENT_MBOX_MASK,
 				   mask, sizeof(*mask));
 	if (ret < 0) {
-		wl1251_warning("failed to set acx_event_mbox_mask: %d", ret);
+		wl1251_warn("failed to set acx_event_mbox_mask: %d\n", ret);
 		goto out;
 	}
 
@@ -778,7 +778,7 @@ int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight,
 	struct acx_low_rssi *rssi;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx low rssi");
+	wl1251_debug(DEBUG_ACX, "acx low rssi\n");
 
 	rssi = kzalloc(sizeof(*rssi), GFP_KERNEL);
 	if (!rssi)
@@ -791,7 +791,7 @@ int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight,
 
 	ret = wl1251_cmd_configure(wl, ACX_LOW_RSSI, rssi, sizeof(*rssi));
 	if (ret < 0)
-		wl1251_warning("failed to set low rssi threshold: %d", ret);
+		wl1251_warn("failed to set low rssi threshold: %d\n", ret);
 
 	kfree(rssi);
 	return ret;
@@ -802,7 +802,7 @@ int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble)
 	struct acx_preamble *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx_set_preamble");
+	wl1251_debug(DEBUG_ACX, "acx_set_preamble\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -814,7 +814,7 @@ int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble)
 
 	ret = wl1251_cmd_configure(wl, ACX_PREAMBLE_TYPE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("Setting of preamble failed: %d", ret);
+		wl1251_warn("Setting of preamble failed: %d\n", ret);
 		goto out;
 	}
 
@@ -829,7 +829,7 @@ int wl1251_acx_cts_protect(struct wl1251 *wl,
 	struct acx_ctsprotect *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx_set_ctsprotect");
+	wl1251_debug(DEBUG_ACX, "acx_set_ctsprotect\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -841,7 +841,7 @@ int wl1251_acx_cts_protect(struct wl1251 *wl,
 
 	ret = wl1251_cmd_configure(wl, ACX_CTS_PROTECTION, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("Setting of ctsprotect failed: %d", ret);
+		wl1251_warn("Setting of ctsprotect failed: %d\n", ret);
 		goto out;
 	}
 
@@ -864,7 +864,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime)
 	ret = wl1251_cmd_interrogate(wl, ACX_TSF_INFO,
 				     tsf_info, sizeof(*tsf_info));
 	if (ret < 0) {
-		wl1251_warning("ACX_FW_REV interrogate failed");
+		wl1251_warn("ACX_FW_REV interrogate failed\n");
 		goto out;
 	}
 
@@ -880,12 +880,12 @@ int wl1251_acx_statistics(struct wl1251 *wl, struct acx_statistics *stats)
 {
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx statistics");
+	wl1251_debug(DEBUG_ACX, "acx statistics\n");
 
 	ret = wl1251_cmd_interrogate(wl, ACX_STATISTICS, stats,
 				     sizeof(*stats));
 	if (ret < 0) {
-		wl1251_warning("acx statistics failed: %d", ret);
+		wl1251_warn("acx statistics failed: %d\n", ret);
 		return -ENOMEM;
 	}
 
@@ -897,7 +897,7 @@ int wl1251_acx_rate_policies(struct wl1251 *wl)
 	struct acx_rate_policy *acx;
 	int ret = 0;
 
-	wl1251_debug(DEBUG_ACX, "acx rate policies");
+	wl1251_debug(DEBUG_ACX, "acx rate policies\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -915,7 +915,7 @@ int wl1251_acx_rate_policies(struct wl1251 *wl)
 
 	ret = wl1251_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("Setting of rate policies failed: %d", ret);
+		wl1251_warn("Setting of rate policies failed: %d\n", ret);
 		goto out;
 	}
 
@@ -929,7 +929,7 @@ int wl1251_acx_mem_cfg(struct wl1251 *wl)
 	struct wl1251_acx_config_memory *mem_conf;
 	int ret, i;
 
-	wl1251_debug(DEBUG_ACX, "acx mem cfg");
+	wl1251_debug(DEBUG_ACX, "acx mem cfg\n");
 
 	mem_conf = kzalloc(sizeof(*mem_conf), GFP_KERNEL);
 	if (!mem_conf) {
@@ -962,7 +962,7 @@ int wl1251_acx_mem_cfg(struct wl1251 *wl)
 	ret = wl1251_cmd_configure(wl, ACX_MEM_CFG, mem_conf,
 				   sizeof(*mem_conf));
 	if (ret < 0) {
-		wl1251_warning("wl1251 mem config failed: %d", ret);
+		wl1251_warn("wl1251 mem config failed: %d\n", ret);
 		goto out;
 	}
 
@@ -976,7 +976,7 @@ int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim)
 	struct wl1251_acx_wr_tbtt_and_dtim *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx tbtt and dtim");
+	wl1251_debug(DEBUG_ACX, "acx tbtt and dtim\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -990,7 +990,7 @@ int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim)
 	ret = wl1251_cmd_configure(wl, ACX_WR_TBTT_AND_DTIM,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("failed to set tbtt and dtim: %d", ret);
+		wl1251_warn("failed to set tbtt and dtim: %d\n", ret);
 		goto out;
 	}
 
@@ -1005,7 +1005,7 @@ int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode,
 	struct wl1251_acx_bet_enable *acx;
 	int ret;
 
-	wl1251_debug(DEBUG_ACX, "acx bet enable");
+	wl1251_debug(DEBUG_ACX, "acx bet enable\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1018,7 +1018,7 @@ int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode,
 
 	ret = wl1251_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("wl1251 acx bet enable failed: %d", ret);
+		wl1251_warn("wl1251 acx bet enable failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1033,8 +1033,8 @@ int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max,
 	struct wl1251_acx_ac_cfg *acx;
 	int ret = 0;
 
-	wl1251_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d "
-		     "aifs %d txop %d", ac, cw_min, cw_max, aifs, txop);
+	wl1251_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d aifs %d txop %d\n",
+		     ac, cw_min, cw_max, aifs, txop);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -1051,7 +1051,7 @@ int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max,
 
 	ret = wl1251_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("acx ac cfg failed: %d", ret);
+		wl1251_warn("acx ac cfg failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1068,9 +1068,8 @@ int wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue,
 	struct wl1251_acx_tid_cfg *acx;
 	int ret = 0;
 
-	wl1251_debug(DEBUG_ACX, "acx tid cfg %d type %d tsid %d "
-		     "ps_scheme %d ack_policy %d", queue, type, tsid,
-		     ps_scheme, ack_policy);
+	wl1251_debug(DEBUG_ACX, "acx tid cfg %d type %d tsid %d ps_scheme %d ack_policy %d\n",
+		     queue, type, tsid, ps_scheme, ack_policy);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -1087,7 +1086,7 @@ int wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue,
 
 	ret = wl1251_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_warning("acx tid cfg failed: %d", ret);
+		wl1251_warn("acx tid cfg failed: %d\n", ret);
 		goto out;
 	}
 
diff --git a/drivers/net/wireless/ti/wl1251/boot.c b/drivers/net/wireless/ti/wl1251/boot.c
index a2e5241..c30410f 100644
--- a/drivers/net/wireless/ti/wl1251/boot.c
+++ b/drivers/net/wireless/ti/wl1251/boot.c
@@ -46,14 +46,15 @@ int wl1251_boot_soft_reset(struct wl1251 *wl)
 	timeout = jiffies + usecs_to_jiffies(SOFT_RESET_MAX_TIME);
 	while (1) {
 		boot_data = wl1251_reg_read32(wl, ACX_REG_SLV_SOFT_RESET);
-		wl1251_debug(DEBUG_BOOT, "soft reset bootdata 0x%x", boot_data);
+		wl1251_debug(DEBUG_BOOT, "soft reset bootdata 0x%x\n",
+			     boot_data);
 		if ((boot_data & ACX_SLV_SOFT_RESET_BIT) == 0)
 			break;
 
 		if (time_after(jiffies, timeout)) {
 			/* 1.2 check pWhalBus->uSelfClearTime if the
 			 * timeout was reached */
-			wl1251_error("soft reset timeout");
+			wl1251_err("soft reset timeout\n");
 			return -1;
 		}
 
@@ -92,15 +93,15 @@ int wl1251_boot_init_seq(struct wl1251 *wl)
 
 	/* read NVS params */
 	scr_pad6 = wl1251_reg_read32(wl, SCR_PAD6);
-	wl1251_debug(DEBUG_BOOT, "scr_pad6 0x%x", scr_pad6);
+	wl1251_debug(DEBUG_BOOT, "scr_pad6 0x%x\n", scr_pad6);
 
 	/* read ELP_CMD */
 	elp_cmd = wl1251_reg_read32(wl, ELP_CMD);
-	wl1251_debug(DEBUG_BOOT, "elp_cmd 0x%x", elp_cmd);
+	wl1251_debug(DEBUG_BOOT, "elp_cmd 0x%x\n", elp_cmd);
 
 	/* set the BB calibration time to be 300 usec (PLL_CAL_TIME) */
 	ref_freq = scr_pad6 & 0x000000FF;
-	wl1251_debug(DEBUG_BOOT, "ref_freq 0x%x", ref_freq);
+	wl1251_debug(DEBUG_BOOT, "ref_freq 0x%x\n", ref_freq);
 
 	wl1251_reg_write32(wl, PLL_CAL_TIME, 0x9);
 
@@ -228,10 +229,11 @@ int wl1251_boot_run_firmware(struct wl1251 *wl)
 
 	chip_id = wl1251_reg_read32(wl, CHIP_ID_B);
 
-	wl1251_debug(DEBUG_BOOT, "chip id after firmware boot: 0x%x", chip_id);
+	wl1251_debug(DEBUG_BOOT, "chip id after firmware boot: 0x%x\n",
+		     chip_id);
 
 	if (chip_id != wl->chip_id) {
-		wl1251_error("chip id doesn't match after firmware boot");
+		wl1251_err("chip id doesn't match after firmware boot\n");
 		return -EIO;
 	}
 
@@ -242,8 +244,7 @@ int wl1251_boot_run_firmware(struct wl1251 *wl)
 		acx_intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
 
 		if (acx_intr == 0xffffffff) {
-			wl1251_error("error reading hardware complete "
-				     "init indication");
+			wl1251_err("error reading hardware complete init indication\n");
 			return -EIO;
 		}
 		/* check that ACX_INTR_INIT_COMPLETE is enabled */
@@ -255,8 +256,7 @@ int wl1251_boot_run_firmware(struct wl1251 *wl)
 	}
 
 	if (loop > INIT_LOOP) {
-		wl1251_error("timeout waiting for the hardware to "
-			     "complete initialization");
+		wl1251_err("timeout waiting for the hardware to complete initialization\n");
 		return -EIO;
 	}
 
@@ -272,7 +272,7 @@ int wl1251_boot_run_firmware(struct wl1251 *wl)
 			     WL1251_PART_WORK_REG_START,
 			     WL1251_PART_WORK_REG_SIZE);
 
-	wl1251_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x event_box_addr 0x%x",
+	wl1251_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x event_box_addr 0x%x\n",
 		     wl->cmd_box_addr, wl->event_box_addr);
 
 	wl1251_acx_fw_version(wl, wl->fw_ver, sizeof(wl->fw_ver));
@@ -303,7 +303,7 @@ int wl1251_boot_run_firmware(struct wl1251 *wl)
 
 	ret = wl1251_event_unmask(wl);
 	if (ret < 0) {
-		wl1251_error("EVENT mask setting failed");
+		wl1251_err("EVENT mask setting failed\n");
 		return ret;
 	}
 
@@ -321,24 +321,24 @@ static int wl1251_boot_upload_firmware(struct wl1251 *wl)
 
 	/* whal_FwCtrl_LoadFwImageSm() */
 
-	wl1251_debug(DEBUG_BOOT, "chip id before fw upload: 0x%x",
+	wl1251_debug(DEBUG_BOOT, "chip id before fw upload: 0x%x\n",
 		     wl1251_reg_read32(wl, CHIP_ID_B));
 
 	/* 10.0 check firmware length and set partition */
 	fw_data_len =  (wl->fw[4] << 24) | (wl->fw[5] << 16) |
 		(wl->fw[6] << 8) | (wl->fw[7]);
 
-	wl1251_debug(DEBUG_BOOT, "fw_data_len %zu chunk_size %d", fw_data_len,
-		CHUNK_SIZE);
+	wl1251_debug(DEBUG_BOOT, "fw_data_len %zu chunk_size %d\n", fw_data_len,
+		     CHUNK_SIZE);
 
 	if ((fw_data_len % 4) != 0) {
-		wl1251_error("firmware length not multiple of four");
+		wl1251_err("firmware length not multiple of four\n");
 		return -EIO;
 	}
 
 	buf = kmalloc(CHUNK_SIZE, GFP_KERNEL);
 	if (!buf) {
-		wl1251_error("allocation for firmware upload chunk failed");
+		wl1251_err("allocation for firmware upload chunk failed\n");
 		return -ENOMEM;
 	}
 
@@ -370,7 +370,7 @@ static int wl1251_boot_upload_firmware(struct wl1251 *wl)
 		/* 10.3 upload the chunk */
 		addr = WL1251_PART_DOWN_MEM_START + chunk_num * CHUNK_SIZE;
 		p = wl->fw + FW_HDR_SIZE + chunk_num * CHUNK_SIZE;
-		wl1251_debug(DEBUG_BOOT, "uploading fw chunk 0x%p to 0x%x",
+		wl1251_debug(DEBUG_BOOT, "uploading fw chunk 0x%p to 0x%x\n",
 			     p, addr);
 
 		/* need to copy the chunk for dma */
@@ -389,7 +389,7 @@ static int wl1251_boot_upload_firmware(struct wl1251 *wl)
 	len = fw_data_len % CHUNK_SIZE;
 	memcpy(buf, p, len);
 
-	wl1251_debug(DEBUG_BOOT, "uploading fw last chunk (%zu B) 0x%p to 0x%x",
+	wl1251_debug(DEBUG_BOOT, "uploading fw last chunk (%zu B) 0x%p to 0x%x\n",
 		     len, p, addr);
 	wl1251_mem_write(wl, addr, buf, len);
 
@@ -435,7 +435,7 @@ static int wl1251_boot_upload_nvs(struct wl1251 *wl)
 			       | (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));
 
 			wl1251_debug(DEBUG_BOOT,
-				     "nvs burst write 0x%x: 0x%x",
+				     "nvs burst write 0x%x: 0x%x\n",
 				     dest_addr, val);
 			wl1251_mem_write32(wl, dest_addr, val);
 
@@ -465,7 +465,7 @@ static int wl1251_boot_upload_nvs(struct wl1251 *wl)
 		       | (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));
 
 		wl1251_debug(DEBUG_BOOT,
-			     "nvs write table 0x%x: 0x%x",
+			     "nvs write table 0x%x: 0x%x\n",
 			     nvs_start, val);
 		wl1251_mem_write32(wl, nvs_start, val);
 
@@ -517,8 +517,7 @@ int wl1251_boot(struct wl1251 *wl)
 	wl->boot_attr.minor = (tmp & 0x00FF0000) >> 16;
 	minor_minor_e2_ver = (tmp & 0xFF000000) >> 24;
 
-	wl1251_debug(DEBUG_BOOT, "radioType 0x%x majorE2Ver 0x%x "
-		     "minorE2Ver 0x%x minor_minor_e2_ver 0x%x",
+	wl1251_debug(DEBUG_BOOT, "radioType 0x%x majorE2Ver 0x%x minorE2Ver 0x%x minor_minor_e2_ver 0x%x\n",
 		     wl->boot_attr.radio_type, wl->boot_attr.major,
 		     wl->boot_attr.minor, minor_minor_e2_ver);
 
@@ -529,13 +528,13 @@ int wl1251_boot(struct wl1251 *wl)
 	/* 9. NVS processing done */
 	boot_data = wl1251_reg_read32(wl, ACX_REG_ECPU_CONTROL);
 
-	wl1251_debug(DEBUG_BOOT, "halt boot_data 0x%x", boot_data);
+	wl1251_debug(DEBUG_BOOT, "halt boot_data 0x%x\n", boot_data);
 
 	/* 10. check that ECPU_CONTROL_HALT bits are set in
 	 * pWhalBus->uBootData and start uploading firmware
 	 */
 	if ((boot_data & ECPU_CONTROL_HALT) == 0) {
-		wl1251_error("boot failed, ECPU_CONTROL_HALT not set");
+		wl1251_err("boot failed, ECPU_CONTROL_HALT not set\n");
 		ret = -EIO;
 		goto out;
 	}
diff --git a/drivers/net/wireless/ti/wl1251/cmd.c b/drivers/net/wireless/ti/wl1251/cmd.c
index d14d69d..a6a3e6e 100644
--- a/drivers/net/wireless/ti/wl1251/cmd.c
+++ b/drivers/net/wireless/ti/wl1251/cmd.c
@@ -40,7 +40,7 @@ int wl1251_cmd_send(struct wl1251 *wl, u16 id, void *buf, size_t len)
 	intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_NO_CLEAR);
 	while (!(intr & WL1251_ACX_INTR_CMD_COMPLETE)) {
 		if (time_after(jiffies, timeout)) {
-			wl1251_error("command complete timeout");
+			wl1251_err("command complete timeout\n");
 			ret = -ETIMEDOUT;
 			goto out;
 		}
@@ -69,12 +69,12 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
 {
 	int ret;
 
-	wl1251_debug(DEBUG_CMD, "cmd test");
+	wl1251_debug(DEBUG_CMD, "cmd test\n");
 
 	ret = wl1251_cmd_send(wl, CMD_TEST, buf, buf_len);
 
 	if (ret < 0) {
-		wl1251_warning("TEST command failed");
+		wl1251_warn("TEST command failed\n");
 		return ret;
 	}
 
@@ -91,8 +91,8 @@ int wl1251_cmd_test(struct wl1251 *wl, void *buf, size_t buf_len, u8 answer)
 		cmd_answer = buf;
 
 		if (cmd_answer->header.status != CMD_STATUS_SUCCESS)
-			wl1251_error("TEST command answer error: %d",
-				     cmd_answer->header.status);
+			wl1251_err("TEST command answer error: %d\n",
+				   cmd_answer->header.status);
 	}
 
 	return 0;
@@ -111,7 +111,7 @@ int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
 	struct acx_header *acx = buf;
 	int ret;
 
-	wl1251_debug(DEBUG_CMD, "cmd interrogate");
+	wl1251_debug(DEBUG_CMD, "cmd interrogate\n");
 
 	acx->id = id;
 
@@ -120,7 +120,7 @@ int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
 
 	ret = wl1251_cmd_send(wl, CMD_INTERROGATE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1251_error("INTERROGATE command failed");
+		wl1251_err("INTERROGATE command failed\n");
 		goto out;
 	}
 
@@ -129,8 +129,8 @@ int wl1251_cmd_interrogate(struct wl1251 *wl, u16 id, void *buf, size_t len)
 
 	acx = buf;
 	if (acx->cmd.status != CMD_STATUS_SUCCESS)
-		wl1251_error("INTERROGATE command error: %d",
-			     acx->cmd.status);
+		wl1251_err("INTERROGATE command error: %d\n",
+			   acx->cmd.status);
 
 out:
 	return ret;
@@ -149,7 +149,7 @@ int wl1251_cmd_configure(struct wl1251 *wl, u16 id, void *buf, size_t len)
 	struct acx_header *acx = buf;
 	int ret;
 
-	wl1251_debug(DEBUG_CMD, "cmd configure");
+	wl1251_debug(DEBUG_CMD, "cmd configure\n");
 
 	acx->id = id;
 
@@ -158,7 +158,7 @@ int wl1251_cmd_configure(struct wl1251 *wl, u16 id, void *buf, size_t len)
 
 	ret = wl1251_cmd_send(wl, CMD_CONFIGURE, acx, len);
 	if (ret < 0) {
-		wl1251_warning("CONFIGURE command NOK");
+		wl1251_warn("CONFIGURE command NOK\n");
 		return ret;
 	}
 
@@ -171,7 +171,7 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
 	struct wl1251_cmd_vbm_update *vbm;
 	int ret;
 
-	wl1251_debug(DEBUG_CMD, "cmd vbm");
+	wl1251_debug(DEBUG_CMD, "cmd vbm\n");
 
 	vbm = kzalloc(sizeof(*vbm), GFP_KERNEL);
 	if (!vbm) {
@@ -182,8 +182,8 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
 	/* Count and period will be filled by the target */
 	vbm->tim.bitmap_ctrl = bitmap_control;
 	if (bitmap_len > PARTIAL_VBM_MAX) {
-		wl1251_warning("cmd vbm len is %d B, truncating to %d",
-			       bitmap_len, PARTIAL_VBM_MAX);
+		wl1251_warn("cmd vbm len is %d B, truncating to %d\n",
+			    bitmap_len, PARTIAL_VBM_MAX);
 		bitmap_len = PARTIAL_VBM_MAX;
 	}
 	memcpy(vbm->tim.pvb_field, bitmap, bitmap_len);
@@ -194,7 +194,7 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
 
 	ret = wl1251_cmd_send(wl, CMD_VBM, vbm, sizeof(*vbm));
 	if (ret < 0) {
-		wl1251_error("VBM command failed");
+		wl1251_err("VBM command failed\n");
 		goto out;
 	}
 
@@ -209,7 +209,7 @@ int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable)
 	int ret;
 	u16 cmd_rx, cmd_tx;
 
-	wl1251_debug(DEBUG_CMD, "cmd data path");
+	wl1251_debug(DEBUG_CMD, "cmd data path\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -229,22 +229,22 @@ int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable)
 
 	ret = wl1251_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd));
 	if (ret < 0) {
-		wl1251_error("rx %s cmd for channel %d failed",
-			     enable ? "start" : "stop", channel);
+		wl1251_err("rx %s cmd for channel %d failed\n",
+			   enable ? "start" : "stop", channel);
 		goto out;
 	}
 
-	wl1251_debug(DEBUG_BOOT, "rx %s cmd channel %d",
+	wl1251_debug(DEBUG_BOOT, "rx %s cmd channel %d\n",
 		     enable ? "start" : "stop", channel);
 
 	ret = wl1251_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd));
 	if (ret < 0) {
-		wl1251_error("tx %s cmd for channel %d failed",
-			     enable ? "start" : "stop", channel);
+		wl1251_err("tx %s cmd for channel %d failed\n",
+			   enable ? "start" : "stop", channel);
 		goto out;
 	}
 
-	wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d",
+	wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d\n",
 		     enable ? "start" : "stop", channel);
 
 out:
@@ -265,7 +265,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel,
 		goto out;
 	}
 
-	wl1251_debug(DEBUG_CMD, "cmd join%s ch %d %d/%d",
+	wl1251_debug(DEBUG_CMD, "cmd join%s ch %d %d/%d\n",
 		     bss_type == BSS_TYPE_IBSS ? " ibss" : "",
 		     channel, beacon_interval, dtim_interval);
 
@@ -297,7 +297,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel,
 
 	ret = wl1251_cmd_send(wl, CMD_START_JOIN, join, sizeof(*join));
 	if (ret < 0) {
-		wl1251_error("failed to initiate cmd join");
+		wl1251_err("failed to initiate cmd join\n");
 		goto out;
 	}
 
@@ -311,7 +311,7 @@ int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode)
 	struct wl1251_cmd_ps_params *ps_params = NULL;
 	int ret = 0;
 
-	wl1251_debug(DEBUG_CMD, "cmd set ps mode");
+	wl1251_debug(DEBUG_CMD, "cmd set ps mode\n");
 
 	ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL);
 	if (!ps_params) {
@@ -328,7 +328,7 @@ int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode)
 	ret = wl1251_cmd_send(wl, CMD_SET_PS_MODE, ps_params,
 			      sizeof(*ps_params));
 	if (ret < 0) {
-		wl1251_error("cmd set_ps_mode failed");
+		wl1251_err("cmd set_ps_mode failed\n");
 		goto out;
 	}
 
@@ -343,7 +343,7 @@ int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
 	struct cmd_read_write_memory *cmd;
 	int ret = 0;
 
-	wl1251_debug(DEBUG_CMD, "cmd read memory");
+	wl1251_debug(DEBUG_CMD, "cmd read memory\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -359,7 +359,7 @@ int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
 
 	ret = wl1251_cmd_send(wl, CMD_READ_MEMORY, cmd, sizeof(*cmd));
 	if (ret < 0) {
-		wl1251_error("read memory command failed: %d", ret);
+		wl1251_err("read memory command failed: %d\n", ret);
 		goto out;
 	}
 
@@ -367,8 +367,8 @@ int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
 	wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd));
 
 	if (cmd->header.status != CMD_STATUS_SUCCESS)
-		wl1251_error("error in read command result: %d",
-			     cmd->header.status);
+		wl1251_err("error in read command result: %d\n",
+			   cmd->header.status);
 
 	memcpy(answer, cmd->value, len);
 
@@ -384,7 +384,7 @@ int wl1251_cmd_template_set(struct wl1251 *wl, u16 cmd_id,
 	size_t cmd_len;
 	int ret = 0;
 
-	wl1251_debug(DEBUG_CMD, "cmd template %d", cmd_id);
+	wl1251_debug(DEBUG_CMD, "cmd template %d\n", cmd_id);
 
 	WARN_ON(buf_len > WL1251_MAX_TEMPLATE_SIZE);
 	buf_len = min_t(size_t, buf_len, WL1251_MAX_TEMPLATE_SIZE);
@@ -403,7 +403,7 @@ int wl1251_cmd_template_set(struct wl1251 *wl, u16 cmd_id,
 
 	ret = wl1251_cmd_send(wl, cmd_id, cmd, cmd_len);
 	if (ret < 0) {
-		wl1251_warning("cmd set_template failed: %d", ret);
+		wl1251_warn("cmd set_template failed: %d\n", ret);
 		goto out;
 	}
 
@@ -419,7 +419,7 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
 	struct wl1251_cmd_scan *cmd;
 	int i, ret = 0;
 
-	wl1251_debug(DEBUG_CMD, "cmd scan");
+	wl1251_debug(DEBUG_CMD, "cmd scan\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd)
@@ -453,15 +453,15 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
 
 	ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd));
 	if (ret < 0) {
-		wl1251_error("cmd scan failed: %d", ret);
+		wl1251_err("cmd scan failed: %d\n", ret);
 		goto out;
 	}
 
 	wl1251_mem_read(wl, wl->cmd_box_addr, cmd, sizeof(*cmd));
 
 	if (cmd->header.status != CMD_STATUS_SUCCESS) {
-		wl1251_error("cmd scan status wasn't success: %d",
-			     cmd->header.status);
+		wl1251_err("cmd scan status wasn't success: %d\n",
+			   cmd->header.status);
 		ret = -EIO;
 		goto out;
 	}
@@ -476,7 +476,7 @@ int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout)
 	struct wl1251_cmd_trigger_scan_to *cmd;
 	int ret;
 
-	wl1251_debug(DEBUG_CMD, "cmd trigger scan to");
+	wl1251_debug(DEBUG_CMD, "cmd trigger scan to\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd)
@@ -486,7 +486,7 @@ int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout)
 
 	ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd));
 	if (ret < 0) {
-		wl1251_error("cmd trigger scan to failed: %d", ret);
+		wl1251_err("cmd trigger scan to failed: %d\n", ret);
 		goto out;
 	}
 
diff --git a/drivers/net/wireless/ti/wl1251/init.c b/drivers/net/wireless/ti/wl1251/init.c
index 89b43d3..2cdab26 100644
--- a/drivers/net/wireless/ti/wl1251/init.c
+++ b/drivers/net/wireless/ti/wl1251/init.c
@@ -35,13 +35,13 @@ int wl1251_hw_init_hwenc_config(struct wl1251 *wl)
 
 	ret = wl1251_acx_feature_cfg(wl);
 	if (ret < 0) {
-		wl1251_warning("couldn't set feature config");
+		wl1251_warn("couldn't set feature config\n");
 		return ret;
 	}
 
 	ret = wl1251_acx_default_key(wl, wl->default_key);
 	if (ret < 0) {
-		wl1251_warning("couldn't set default key");
+		wl1251_warn("couldn't set default key\n");
 		return ret;
 	}
 
@@ -211,7 +211,7 @@ int wl1251_hw_init_mem_config(struct wl1251 *wl)
 	wl->target_mem_map = kzalloc(sizeof(struct wl1251_acx_mem_map),
 					  GFP_KERNEL);
 	if (!wl->target_mem_map) {
-		wl1251_error("couldn't allocate target memory map");
+		wl1251_err("couldn't allocate target memory map\n");
 		return -ENOMEM;
 	}
 
@@ -219,7 +219,7 @@ int wl1251_hw_init_mem_config(struct wl1251 *wl)
 	ret = wl1251_acx_mem_map(wl, wl->target_mem_map,
 				 sizeof(struct wl1251_acx_mem_map));
 	if (ret < 0) {
-		wl1251_error("couldn't retrieve firmware memory map");
+		wl1251_err("couldn't retrieve firmware memory map\n");
 		kfree(wl->target_mem_map);
 		wl->target_mem_map = NULL;
 		return ret;
@@ -260,7 +260,7 @@ static int wl1251_hw_init_txq_fill(u8 qid,
 			(QOS_TX_LOW_VO_DEF * num_blocks) / 100;
 		break;
 	default:
-		wl1251_error("Invalid TX queue id: %d", qid);
+		wl1251_err("Invalid TX queue id: %d\n", qid);
 		return -EINVAL;
 	}
 
@@ -273,7 +273,7 @@ static int wl1251_hw_init_tx_queue_config(struct wl1251 *wl)
 	struct wl1251_acx_mem_map *wl_mem_map = wl->target_mem_map;
 	int ret, i;
 
-	wl1251_debug(DEBUG_ACX, "acx tx queue config");
+	wl1251_debug(DEBUG_ACX, "acx tx queue config\n");
 
 	config = kzalloc(sizeof(*config), GFP_KERNEL);
 	if (!config) {
@@ -311,7 +311,7 @@ static int wl1251_hw_init_data_path_config(struct wl1251 *wl)
 	wl->data_path = kzalloc(sizeof(struct acx_data_path_params_resp),
 				GFP_KERNEL);
 	if (!wl->data_path) {
-		wl1251_error("Couldnt allocate data path parameters");
+		wl1251_err("Couldnt allocate data path parameters\n");
 		return -ENOMEM;
 	}
 
@@ -405,7 +405,7 @@ int wl1251_hw_init(struct wl1251 *wl)
 		goto out_free_data_path;
 
 	wl_mem_map = wl->target_mem_map;
-	wl1251_info("%d tx blocks at 0x%x, %d rx blocks at 0x%x",
+	wl1251_info("%d tx blocks at 0x%x, %d rx blocks at 0x%x\n",
 		    wl_mem_map->num_tx_mem_blocks,
 		    wl->data_path->tx_control_addr,
 		    wl_mem_map->num_rx_mem_blocks,
diff --git a/drivers/net/wireless/ti/wl1251/io.c b/drivers/net/wireless/ti/wl1251/io.c
index cdcadbf..2561ac2 100644
--- a/drivers/net/wireless/ti/wl1251/io.c
+++ b/drivers/net/wireless/ti/wl1251/io.c
@@ -46,7 +46,7 @@ static int wl1251_translate_reg_addr(struct wl1251 *wl, int addr)
 	if (addr < REGISTERS_BASE) {
 		/* Make sure we don't go over the table */
 		if (addr >= ACX_REG_TABLE_LEN) {
-			wl1251_error("address out of range (%d)", addr);
+			wl1251_err("address out of range (%d)\n", addr);
 			return -EINVAL;
 		}
 		addr = wl1251_io_reg_table[addr];
@@ -137,20 +137,19 @@ void wl1251_set_partition(struct wl1251 *wl,
 {
 	struct wl1251_partition partition[2];
 
-	wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X",
+	wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X\n",
 		     mem_start, mem_size);
-	wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X",
+	wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X\n",
 		     reg_start, reg_size);
 
 	/* Make sure that the two partitions together don't exceed the
 	 * address range */
 	if ((mem_size + reg_size) > HW_ACCESS_MEMORY_MAX_RANGE) {
-		wl1251_debug(DEBUG_SPI, "Total size exceeds maximum virtual"
-			     " address range.  Truncating partition[0].");
+		wl1251_debug(DEBUG_SPI, "Total size exceeds maximum virtual address range.  Truncating partition[0].\n");
 		mem_size = HW_ACCESS_MEMORY_MAX_RANGE - reg_size;
-		wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X",
+		wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X\n",
 			     mem_start, mem_size);
-		wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X",
+		wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X\n",
 			     reg_start, reg_size);
 	}
 
@@ -158,23 +157,21 @@ void wl1251_set_partition(struct wl1251 *wl,
 	    ((mem_start + mem_size) > reg_start)) {
 		/* Guarantee that the memory partition doesn't overlap the
 		 * registers partition */
-		wl1251_debug(DEBUG_SPI, "End of partition[0] is "
-			     "overlapping partition[1].  Adjusted.");
+		wl1251_debug(DEBUG_SPI, "End of partition[0] is overlapping partition[1].  Adjusted.\n");
 		mem_size = reg_start - mem_start;
-		wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X",
+		wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X\n",
 			     mem_start, mem_size);
-		wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X",
+		wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X\n",
 			     reg_start, reg_size);
 	} else if ((reg_start < mem_start) &&
 		   ((reg_start + reg_size) > mem_start)) {
 		/* Guarantee that the register partition doesn't overlap the
 		 * memory partition */
-		wl1251_debug(DEBUG_SPI, "End of partition[1] is"
-			     " overlapping partition[0].  Adjusted.");
+		wl1251_debug(DEBUG_SPI, "End of partition[1] is overlapping partition[0].  Adjusted.\n");
 		reg_size = mem_start - reg_start;
-		wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X",
+		wl1251_debug(DEBUG_SPI, "mem_start %08X mem_size %08X\n",
 			     mem_start, mem_size);
-		wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X",
+		wl1251_debug(DEBUG_SPI, "reg_start %08X reg_size %08X\n",
 			     reg_start, reg_size);
 	}
 
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index d1afb8e..47cb523 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -71,13 +71,13 @@ static int wl1251_fetch_firmware(struct wl1251 *wl)
 	ret = request_firmware(&fw, WL1251_FW_NAME, dev);
 
 	if (ret < 0) {
-		wl1251_error("could not get firmware: %d", ret);
+		wl1251_err("could not get firmware: %d\n", ret);
 		return ret;
 	}
 
 	if (fw->size % 4) {
-		wl1251_error("firmware size is not multiple of 32 bits: %zu",
-			     fw->size);
+		wl1251_err("firmware size is not multiple of 32 bits: %zu\n",
+			   fw->size);
 		ret = -EILSEQ;
 		goto out;
 	}
@@ -86,7 +86,7 @@ static int wl1251_fetch_firmware(struct wl1251 *wl)
 	wl->fw = vmalloc(wl->fw_len);
 
 	if (!wl->fw) {
-		wl1251_error("could not allocate memory for the firmware");
+		wl1251_err("could not allocate memory for the firmware\n");
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -110,13 +110,13 @@ static int wl1251_fetch_nvs(struct wl1251 *wl)
 	ret = request_firmware(&fw, WL1251_NVS_NAME, dev);
 
 	if (ret < 0) {
-		wl1251_error("could not get nvs file: %d", ret);
+		wl1251_err("could not get nvs file: %d\n", ret);
 		return ret;
 	}
 
 	if (fw->size % 4) {
-		wl1251_error("nvs size is not multiple of 32 bits: %zu",
-			     fw->size);
+		wl1251_err("nvs size is not multiple of 32 bits: %zu\n",
+			   fw->size);
 		ret = -EILSEQ;
 		goto out;
 	}
@@ -125,7 +125,7 @@ static int wl1251_fetch_nvs(struct wl1251 *wl)
 	wl->nvs = kmemdup(fw->data, wl->nvs_len, GFP_KERNEL);
 
 	if (!wl->nvs) {
-		wl1251_error("could not allocate memory for the nvs file");
+		wl1251_err("could not allocate memory for the nvs file\n");
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -147,7 +147,7 @@ static void wl1251_fw_wakeup(struct wl1251 *wl)
 	elp_reg = wl1251_read_elp(wl, HW_ACCESS_ELP_CTRL_REG_ADDR);
 
 	if (!(elp_reg & ELPCTRL_WLAN_READY))
-		wl1251_warning("WLAN not ready");
+		wl1251_warn("WLAN not ready\n");
 }
 
 static int wl1251_chip_wakeup(struct wl1251 *wl)
@@ -181,16 +181,16 @@ static int wl1251_chip_wakeup(struct wl1251 *wl)
 
 	switch (wl->chip_id) {
 	case CHIP_ID_1251_PG12:
-		wl1251_debug(DEBUG_BOOT, "chip id 0x%x (1251 PG12)",
+		wl1251_debug(DEBUG_BOOT, "chip id 0x%x (1251 PG12)\n",
 			     wl->chip_id);
 		break;
 	case CHIP_ID_1251_PG11:
-		wl1251_debug(DEBUG_BOOT, "chip id 0x%x (1251 PG11)",
+		wl1251_debug(DEBUG_BOOT, "chip id 0x%x (1251 PG11)\n",
 			     wl->chip_id);
 		break;
 	case CHIP_ID_1251_PG10:
 	default:
-		wl1251_error("unsupported chip id: 0x%x", wl->chip_id);
+		wl1251_err("unsupported chip id: 0x%x\n", wl->chip_id);
 		ret = -ENODEV;
 		goto out;
 	}
@@ -222,7 +222,7 @@ static void wl1251_irq_work(struct work_struct *work)
 
 	mutex_lock(&wl->mutex);
 
-	wl1251_debug(DEBUG_IRQ, "IRQ work");
+	wl1251_debug(DEBUG_IRQ, "IRQ work\n");
 
 	if (wl->state == WL1251_STATE_OFF)
 		goto out;
@@ -234,7 +234,7 @@ static void wl1251_irq_work(struct work_struct *work)
 	wl1251_reg_write32(wl, ACX_REG_INTERRUPT_MASK, WL1251_ACX_INTR_ALL);
 
 	intr = wl1251_reg_read32(wl, ACX_REG_INTERRUPT_CLEAR);
-	wl1251_debug(DEBUG_IRQ, "intr: 0x%x", intr);
+	wl1251_debug(DEBUG_IRQ, "intr: 0x%x\n", intr);
 
 	do {
 		if (wl->data_path) {
@@ -245,68 +245,67 @@ static void wl1251_irq_work(struct work_struct *work)
 			switch ((wl->rx_counter - wl->rx_handled) & 0xf) {
 			case 0:
 				wl1251_debug(DEBUG_IRQ,
-					     "RX: FW and host in sync");
+					     "RX: FW and host in sync\n");
 				intr &= ~WL1251_ACX_INTR_RX0_DATA;
 				intr &= ~WL1251_ACX_INTR_RX1_DATA;
 				break;
 			case 1:
-				wl1251_debug(DEBUG_IRQ, "RX: FW +1");
+				wl1251_debug(DEBUG_IRQ, "RX: FW +1\n");
 				intr |= WL1251_ACX_INTR_RX0_DATA;
 				intr &= ~WL1251_ACX_INTR_RX1_DATA;
 				break;
 			case 2:
-				wl1251_debug(DEBUG_IRQ, "RX: FW +2");
+				wl1251_debug(DEBUG_IRQ, "RX: FW +2\n");
 				intr |= WL1251_ACX_INTR_RX0_DATA;
 				intr |= WL1251_ACX_INTR_RX1_DATA;
 				break;
 			default:
-				wl1251_warning(
-					"RX: FW and host out of sync: %d",
-					wl->rx_counter - wl->rx_handled);
+				wl1251_warn("RX: FW and host out of sync: %d\n",
+					    wl->rx_counter - wl->rx_handled);
 				break;
 			}
 
 			wl->rx_handled = wl->rx_counter;
 
-			wl1251_debug(DEBUG_IRQ, "RX counter: %d",
+			wl1251_debug(DEBUG_IRQ, "RX counter: %d\n",
 				     wl->rx_counter);
 		}
 
 		intr &= wl->intr_mask;
 
 		if (intr == 0) {
-			wl1251_debug(DEBUG_IRQ, "INTR is 0");
+			wl1251_debug(DEBUG_IRQ, "INTR is 0\n");
 			goto out_sleep;
 		}
 
 		if (intr & WL1251_ACX_INTR_RX0_DATA) {
-			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_RX0_DATA");
+			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_RX0_DATA\n");
 			wl1251_rx(wl);
 		}
 
 		if (intr & WL1251_ACX_INTR_RX1_DATA) {
-			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_RX1_DATA");
+			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_RX1_DATA\n");
 			wl1251_rx(wl);
 		}
 
 		if (intr & WL1251_ACX_INTR_TX_RESULT) {
-			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_TX_RESULT");
+			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_TX_RESULT\n");
 			wl1251_tx_complete(wl);
 		}
 
 		if (intr & WL1251_ACX_INTR_EVENT_A) {
-			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_EVENT_A");
+			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_EVENT_A\n");
 			wl1251_event_handle(wl, 0);
 		}
 
 		if (intr & WL1251_ACX_INTR_EVENT_B) {
-			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_EVENT_B");
+			wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_EVENT_B\n");
 			wl1251_event_handle(wl, 1);
 		}
 
 		if (intr & WL1251_ACX_INTR_INIT_COMPLETE)
 			wl1251_debug(DEBUG_IRQ,
-				     "WL1251_ACX_INTR_INIT_COMPLETE");
+				     "WL1251_ACX_INTR_INIT_COMPLETE\n");
 
 		if (--ctr == 0)
 			break;
@@ -342,7 +341,7 @@ static int wl1251_join(struct wl1251 *wl, u8 bss_type, u8 channel,
 
 	ret = wl1251_event_wait(wl, JOIN_EVENT_COMPLETE_ID, 100);
 	if (ret < 0)
-		wl1251_warning("join timeout");
+		wl1251_warn("join timeout\n");
 
 out:
 	return ret;
@@ -394,7 +393,7 @@ static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	 * the queue here, otherwise the queue will get too long.
 	 */
 	if (skb_queue_len(&wl->tx_queue) >= WL1251_TX_QUEUE_HIGH_WATERMARK) {
-		wl1251_debug(DEBUG_TX, "op_tx: tx_queue full, stop queues");
+		wl1251_debug(DEBUG_TX, "op_tx: tx_queue full, stop queues\n");
 
 		spin_lock_irqsave(&wl->wl_lock, flags);
 		ieee80211_stop_queues(wl->hw);
@@ -414,8 +413,8 @@ static int wl1251_op_start(struct ieee80211_hw *hw)
 	mutex_lock(&wl->mutex);
 
 	if (wl->state != WL1251_STATE_OFF) {
-		wl1251_error("cannot start because not in off state: %d",
-			     wl->state);
+		wl1251_err("cannot start because not in off state: %d\n",
+			   wl->state);
 		ret = -EBUSY;
 		goto out;
 	}
@@ -438,7 +437,7 @@ static int wl1251_op_start(struct ieee80211_hw *hw)
 
 	wl->state = WL1251_STATE_ON;
 
-	wl1251_info("firmware booted (%s)", wl->fw_ver);
+	wl1251_info("firmware booted (%s)\n", wl->fw_ver);
 
 	/* update hw/fw version info in wiphy struct */
 	wiphy->hw_version = wl->chip_id;
@@ -457,7 +456,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
 {
 	struct wl1251 *wl = hw->priv;
 
-	wl1251_info("down");
+	wl1251_info("down\n");
 
 	wl1251_debug(DEBUG_MAC80211, "mac80211 stop");
 
@@ -615,7 +614,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 	}
 
 	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) {
-		wl1251_debug(DEBUG_PSM, "psm enabled");
+		wl1251_debug(DEBUG_PSM, "psm enabled\n");
 
 		wl->psm_requested = true;
 
@@ -632,7 +631,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
 			goto out_sleep;
 	} else if (!(conf->flags & IEEE80211_CONF_PS) &&
 		   wl->psm_requested) {
-		wl1251_debug(DEBUG_PSM, "psm disabled");
+		wl1251_debug(DEBUG_PSM, "psm disabled\n");
 
 		wl->psm_requested = false;
 
@@ -765,7 +764,7 @@ static int wl1251_set_key_type(struct wl1251 *wl,
 		mac80211_key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
 		break;
 	default:
-		wl1251_error("Unknown key cipher 0x%x", mac80211_key->cipher);
+		wl1251_err("Unknown key cipher 0x%x\n", mac80211_key->cipher);
 		return -EOPNOTSUPP;
 	}
 
@@ -795,9 +794,9 @@ static int wl1251_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 
 	addr = sta ? sta->addr : bcast_addr;
 
-	wl1251_debug(DEBUG_CRYPT, "CMD: 0x%x", cmd);
+	wl1251_debug(DEBUG_CRYPT, "CMD: 0x%x\n", cmd);
 	wl1251_dump(DEBUG_CRYPT, "ADDR: ", addr, ETH_ALEN);
-	wl1251_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x",
+	wl1251_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x\n",
 		     key->cipher, key->keyidx, key->keylen, key->flags);
 	wl1251_dump(DEBUG_CRYPT, "KEY: ", key->key, key->keylen);
 
@@ -821,13 +820,13 @@ static int wl1251_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 		wl_cmd->key_action = KEY_REMOVE;
 		break;
 	default:
-		wl1251_error("Unsupported key cmd 0x%x", cmd);
+		wl1251_err("Unsupported key cmd 0x%x\n", cmd);
 		break;
 	}
 
 	ret = wl1251_set_key_type(wl, wl_cmd, cmd, key, addr);
 	if (ret < 0) {
-		wl1251_error("Set KEY type failed");
+		wl1251_err("Set KEY type failed\n");
 		goto out_sleep;
 	}
 
@@ -858,7 +857,7 @@ static int wl1251_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 
 	ret = wl1251_cmd_send(wl, CMD_SET_KEYS, wl_cmd, sizeof(*wl_cmd));
 	if (ret < 0) {
-		wl1251_warning("could not set keys");
+		wl1251_warn("could not set keys\n");
 		goto out_sleep;
 	}
 
@@ -894,7 +893,7 @@ static int wl1251_op_hw_scan(struct ieee80211_hw *hw,
 	mutex_lock(&wl->mutex);
 
 	if (wl->scanning) {
-		wl1251_debug(DEBUG_SCAN, "scan already in progress");
+		wl1251_debug(DEBUG_SCAN, "scan already in progress\n");
 		ret = -EINVAL;
 		goto out;
 	}
@@ -951,7 +950,7 @@ static int wl1251_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 
 	ret = wl1251_acx_rts_threshold(wl, (u16) value);
 	if (ret < 0)
-		wl1251_warning("wl1251_op_set_rts_threshold failed: %d", ret);
+		wl1251_warn("wl1251_op_set_rts_threshold failed: %d\n", ret);
 
 	wl1251_ps_elp_sleep(wl);
 
@@ -1043,7 +1042,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 		else
 			ret = wl1251_acx_slot(wl, SLOT_TIME_LONG);
 		if (ret < 0) {
-			wl1251_warning("Set slot time failed %d", ret);
+			wl1251_warn("Set slot time failed %d\n", ret);
 			goto out_sleep;
 		}
 	}
@@ -1061,7 +1060,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
 		else
 			ret = wl1251_acx_cts_protect(wl, CTSPROTECT_DISABLE);
 		if (ret < 0) {
-			wl1251_warning("Set ctsprotect failed %d", ret);
+			wl1251_warn("Set ctsprotect failed %d\n", ret);
 			goto out_sleep;
 		}
 	}
@@ -1295,7 +1294,7 @@ static int wl1251_read_eeprom_mac(struct wl1251 *wl)
 
 	ret = wl1251_read_eeprom(wl, 0x1c, mac, sizeof(mac));
 	if (ret < 0) {
-		wl1251_warning("failed to read MAC address from EEPROM");
+		wl1251_warn("failed to read MAC address from EEPROM\n");
 		return ret;
 	}
 
@@ -1317,13 +1316,13 @@ static int wl1251_register_hw(struct wl1251 *wl)
 
 	ret = ieee80211_register_hw(wl->hw);
 	if (ret < 0) {
-		wl1251_error("unable to register mac80211 hw: %d", ret);
+		wl1251_err("unable to register mac80211 hw: %d\n", ret);
 		return ret;
 	}
 
 	wl->mac80211_registered = true;
 
-	wl1251_notice("loaded");
+	wl1251_notice("loaded\n");
 
 	return 0;
 }
@@ -1359,7 +1358,7 @@ int wl1251_init_ieee80211(struct wl1251 *wl)
 		goto out;
 
 	wl1251_debugfs_init(wl);
-	wl1251_notice("initialized");
+	wl1251_notice("initialized\n");
 
 	ret = 0;
 
@@ -1377,7 +1376,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
 
 	hw = ieee80211_alloc_hw(sizeof(*wl), &wl1251_ops);
 	if (!hw) {
-		wl1251_error("could not alloc ieee80211_hw");
+		wl1251_err("could not alloc ieee80211_hw\n");
 		return ERR_PTR(-ENOMEM);
 	}
 
@@ -1435,7 +1434,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
 
 	wl->rx_descriptor = kmalloc(sizeof(*wl->rx_descriptor), GFP_KERNEL);
 	if (!wl->rx_descriptor) {
-		wl1251_error("could not allocate memory for rx descriptor");
+		wl1251_err("could not allocate memory for rx descriptor\n");
 		ieee80211_free_hw(hw);
 		return ERR_PTR(-ENOMEM);
 	}
diff --git a/drivers/net/wireless/ti/wl1251/ps.c b/drivers/net/wireless/ti/wl1251/ps.c
index db719f7..f784d1e 100644
--- a/drivers/net/wireless/ti/wl1251/ps.c
+++ b/drivers/net/wireless/ti/wl1251/ps.c
@@ -35,14 +35,14 @@ void wl1251_elp_work(struct work_struct *work)
 	dwork = container_of(work, struct delayed_work, work);
 	wl = container_of(dwork, struct wl1251, elp_work);
 
-	wl1251_debug(DEBUG_PSM, "elp work");
+	wl1251_debug(DEBUG_PSM, "elp work\n");
 
 	mutex_lock(&wl->mutex);
 
 	if (wl->elp || wl->station_mode == STATION_ACTIVE_MODE)
 		goto out;
 
-	wl1251_debug(DEBUG_PSM, "chip to elp");
+	wl1251_debug(DEBUG_PSM, "chip to elp\n");
 	wl1251_write_elp(wl, HW_ACCESS_ELP_CTRL_REG_ADDR, ELPCTRL_SLEEP);
 	wl->elp = true;
 
@@ -74,7 +74,7 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl)
 	if (!wl->elp)
 		return 0;
 
-	wl1251_debug(DEBUG_PSM, "waking up chip from elp");
+	wl1251_debug(DEBUG_PSM, "waking up chip from elp\n");
 
 	start = jiffies;
 	timeout = jiffies + msecs_to_jiffies(WL1251_WAKEUP_TIMEOUT);
@@ -89,14 +89,14 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl)
 	 */
 	while (!(elp_reg & ELPCTRL_WLAN_READY)) {
 		if (time_after(jiffies, timeout)) {
-			wl1251_error("elp wakeup timeout");
+			wl1251_err("elp wakeup timeout\n");
 			return -ETIMEDOUT;
 		}
 		msleep(1);
 		elp_reg = wl1251_read_elp(wl, HW_ACCESS_ELP_CTRL_REG_ADDR);
 	}
 
-	wl1251_debug(DEBUG_PSM, "wakeup time: %u ms",
+	wl1251_debug(DEBUG_PSM, "wakeup time: %u ms\n",
 		     jiffies_to_msecs(jiffies - start));
 
 	wl->elp = false;
@@ -110,7 +110,7 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_station_mode mode)
 
 	switch (mode) {
 	case STATION_POWER_SAVE_MODE:
-		wl1251_debug(DEBUG_PSM, "entering psm");
+		wl1251_debug(DEBUG_PSM, "entering psm\n");
 
 		/* enable beacon filtering */
 		ret = wl1251_acx_beacon_filter_opt(wl, true);
@@ -137,7 +137,7 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_station_mode mode)
 			return ret;
 		break;
 	case STATION_IDLE:
-		wl1251_debug(DEBUG_PSM, "entering idle");
+		wl1251_debug(DEBUG_PSM, "entering idle\n");
 
 		ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP);
 		if (ret < 0)
@@ -149,7 +149,7 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_station_mode mode)
 		break;
 	case STATION_ACTIVE_MODE:
 	default:
-		wl1251_debug(DEBUG_PSM, "leaving psm");
+		wl1251_debug(DEBUG_PSM, "leaving psm\n");
 
 		ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_CAM);
 		if (ret < 0)
diff --git a/drivers/net/wireless/ti/wl1251/rx.c b/drivers/net/wireless/ti/wl1251/rx.c
index 6af3526..6ae6026 100644
--- a/drivers/net/wireless/ti/wl1251/rx.c
+++ b/drivers/net/wireless/ti/wl1251/rx.c
@@ -158,8 +158,8 @@ static void wl1251_rx_body(struct wl1251 *wl,
 	last_id_inc = (wl->rx_last_id + 1) % (RX_MAX_PACKET_ID + 1);
 
 	if (last_id_inc != curr_id) {
-		wl1251_warning("curr ID:%d, last ID inc:%d",
-			       curr_id, last_id_inc);
+		wl1251_warn("curr ID:%d, last ID inc:%d\n",
+			    curr_id, last_id_inc);
 		wl->rx_last_id = curr_id;
 	} else {
 		wl->rx_last_id = last_id_inc;
@@ -172,7 +172,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
 
 	skb = __dev_alloc_skb(length, GFP_KERNEL);
 	if (!skb) {
-		wl1251_error("Couldn't allocate RX frame");
+		wl1251_err("Couldn't allocate RX frame\n");
 		return;
 	}
 
@@ -189,7 +189,7 @@ static void wl1251_rx_body(struct wl1251 *wl,
 
 	wl1251_rx_status(wl, desc, &status, beacon);
 
-	wl1251_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len,
+	wl1251_debug(DEBUG_RX, "rx skb 0x%p: %d B %s\n", skb, skb->len,
 		     beacon ? "beacon" : "");
 
 	memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
index e2750a1..234e2d9 100644
--- a/drivers/net/wireless/ti/wl1251/sdio.c
+++ b/drivers/net/wireless/ti/wl1251/sdio.c
@@ -54,7 +54,7 @@ static void wl1251_sdio_interrupt(struct sdio_func *func)
 {
 	struct wl1251 *wl = sdio_get_drvdata(func);
 
-	wl1251_debug(DEBUG_IRQ, "IRQ");
+	wl1251_debug(DEBUG_IRQ, "IRQ\n");
 
 	/* FIXME should be synchronous for sdio */
 	ieee80211_queue_work(wl->hw, &wl->irq_work);
@@ -76,7 +76,7 @@ static void wl1251_sdio_read(struct wl1251 *wl, int addr,
 	sdio_claim_host(func);
 	ret = sdio_memcpy_fromio(func, buf, addr, len);
 	if (ret)
-		wl1251_error("sdio read failed (%d)", ret);
+		wl1251_err("sdio read failed (%d)\n", ret);
 	sdio_release_host(func);
 }
 
@@ -89,7 +89,7 @@ static void wl1251_sdio_write(struct wl1251 *wl, int addr,
 	sdio_claim_host(func);
 	ret = sdio_memcpy_toio(func, addr, buf, len);
 	if (ret)
-		wl1251_error("sdio write failed (%d)", ret);
+		wl1251_err("sdio write failed (%d)\n", ret);
 	sdio_release_host(func);
 }
 
@@ -110,7 +110,7 @@ static void wl1251_sdio_read_elp(struct wl1251 *wl, int addr, u32 *val)
 	sdio_release_host(func);
 
 	if (ret)
-		wl1251_error("sdio_readb failed (%d)", ret);
+		wl1251_err("sdio_readb failed (%d)\n", ret);
 }
 
 static void wl1251_sdio_write_elp(struct wl1251 *wl, int addr, u32 val)
@@ -124,7 +124,7 @@ static void wl1251_sdio_write_elp(struct wl1251 *wl, int addr, u32 val)
 	sdio_release_host(func);
 
 	if (ret)
-		wl1251_error("sdio_writeb failed (%d)", ret);
+		wl1251_err("sdio_writeb failed (%d)\n", ret);
 	else
 		wl_sdio->elp_val = val;
 }
@@ -263,7 +263,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
 		irq_set_status_flags(wl->irq, IRQ_NOAUTOEN);
 		ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl);
 		if (ret < 0) {
-			wl1251_error("request_irq() failed: %d", ret);
+			wl1251_err("request_irq() failed: %d\n", ret);
 			goto disable;
 		}
 
@@ -272,12 +272,12 @@ static int wl1251_sdio_probe(struct sdio_func *func,
 		wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq;
 		wl1251_sdio_ops.disable_irq = wl1251_disable_line_irq;
 
-		wl1251_info("using dedicated interrupt line");
+		wl1251_info("using dedicated interrupt line\n");
 	} else {
 		wl1251_sdio_ops.enable_irq = wl1251_sdio_enable_irq;
 		wl1251_sdio_ops.disable_irq = wl1251_sdio_disable_irq;
 
-		wl1251_info("using SDIO interrupt");
+		wl1251_info("using SDIO interrupt\n");
 	}
 
 	ret = wl1251_init_ieee80211(wl);
@@ -357,14 +357,14 @@ static int __init wl1251_sdio_init(void)
 
 	err = sdio_register_driver(&wl1251_sdio_driver);
 	if (err)
-		wl1251_error("failed to register sdio driver: %d", err);
+		wl1251_err("failed to register sdio driver: %d\n", err);
 	return err;
 }
 
 static void __exit wl1251_sdio_exit(void)
 {
 	sdio_unregister_driver(&wl1251_sdio_driver);
-	wl1251_notice("unloaded");
+	wl1251_notice("unloaded\n");
 }
 
 module_init(wl1251_sdio_init);
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 87f6305..440443e 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -35,7 +35,7 @@ static irqreturn_t wl1251_irq(int irq, void *cookie)
 {
 	struct wl1251 *wl;
 
-	wl1251_debug(DEBUG_IRQ, "IRQ");
+	wl1251_debug(DEBUG_IRQ, "IRQ\n");
 
 	wl = cookie;
 
@@ -57,7 +57,7 @@ static void wl1251_spi_reset(struct wl1251 *wl)
 
 	cmd = kzalloc(WSPI_INIT_CMD_LEN, GFP_KERNEL);
 	if (!cmd) {
-		wl1251_error("could not allocate cmd for spi reset");
+		wl1251_err("could not allocate cmd for spi reset\n");
 		return;
 	}
 
@@ -83,7 +83,7 @@ static void wl1251_spi_wake(struct wl1251 *wl)
 
 	cmd = kzalloc(WSPI_INIT_CMD_LEN, GFP_KERNEL);
 	if (!cmd) {
-		wl1251_error("could not allocate cmd for spi init");
+		wl1251_err("could not allocate cmd for spi init\n");
 		return;
 	}
 
@@ -242,7 +242,7 @@ static int __devinit wl1251_spi_probe(struct spi_device *spi)
 
 	pdata = spi->dev.platform_data;
 	if (!pdata) {
-		wl1251_error("no platform data");
+		wl1251_err("no platform data\n");
 		return -ENODEV;
 	}
 
@@ -263,19 +263,19 @@ static int __devinit wl1251_spi_probe(struct spi_device *spi)
 
 	ret = spi_setup(spi);
 	if (ret < 0) {
-		wl1251_error("spi_setup failed");
+		wl1251_err("spi_setup failed\n");
 		goto out_free;
 	}
 
 	wl->set_power = pdata->set_power;
 	if (!wl->set_power) {
-		wl1251_error("set power function missing in platform data");
+		wl1251_err("set power function missing in platform data\n");
 		return -ENODEV;
 	}
 
 	wl->irq = spi->irq;
 	if (wl->irq < 0) {
-		wl1251_error("irq missing in platform data");
+		wl1251_err("irq missing in platform data\n");
 		return -ENODEV;
 	}
 
@@ -284,7 +284,7 @@ static int __devinit wl1251_spi_probe(struct spi_device *spi)
 	irq_set_status_flags(wl->irq, IRQ_NOAUTOEN);
 	ret = request_irq(wl->irq, wl1251_irq, 0, DRIVER_NAME, wl);
 	if (ret < 0) {
-		wl1251_error("request_irq() failed: %d", ret);
+		wl1251_err("request_irq() failed: %d\n", ret);
 		goto out_free;
 	}
 
@@ -331,7 +331,7 @@ static int __init wl1251_spi_init(void)
 
 	ret = spi_register_driver(&wl1251_spi_driver);
 	if (ret < 0) {
-		wl1251_error("failed to register spi driver: %d", ret);
+		wl1251_err("failed to register spi driver: %d\n", ret);
 		goto out;
 	}
 
@@ -343,7 +343,7 @@ static void __exit wl1251_spi_exit(void)
 {
 	spi_unregister_driver(&wl1251_spi_driver);
 
-	wl1251_notice("unloaded");
+	wl1251_notice("unloaded\n");
 }
 
 module_init(wl1251_spi_init);
diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c
index 28121c5..2a5f586 100644
--- a/drivers/net/wireless/ti/wl1251/tx.c
+++ b/drivers/net/wireless/ti/wl1251/tx.c
@@ -210,7 +210,7 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
 	*/
 	if (unlikely((long)skb->data & 0x03)) {
 		int offset = (4 - (long)skb->data) & 0x03;
-		wl1251_debug(DEBUG_TX, "skb offset %d", offset);
+		wl1251_debug(DEBUG_TX, "skb offset %d\n", offset);
 
 		/* check whether the current skb can be used */
 		if (skb_cloned(skb) || (skb_tailroom(skb) < offset)) {
@@ -218,7 +218,7 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
 								 GFP_KERNEL);
 
 			if (unlikely(newskb == NULL)) {
-				wl1251_error("Can't allocate skb!");
+				wl1251_err("Can't allocate skb!\n");
 				return -EINVAL;
 			}
 
@@ -228,7 +228,7 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
 			wl->tx_frames[tx_hdr->id] = skb = newskb;
 
 			offset = (4 - (long)skb->data) & 0x03;
-			wl1251_debug(DEBUG_TX, "new skb offset %d", offset);
+			wl1251_debug(DEBUG_TX, "new skb offset %d\n", offset);
 		}
 
 		/* align the buffer on a 4-byte boundary */
@@ -251,8 +251,8 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
 
 	wl1251_mem_write(wl, addr, skb->data, len);
 
-	wl1251_debug(DEBUG_TX, "tx id %u skb 0x%p payload %u rate 0x%x "
-		     "queue %d", tx_hdr->id, skb, tx_hdr->length,
+	wl1251_debug(DEBUG_TX, "tx id %u skb 0x%p payload %u rate 0x%x queue %d\n",
+		     tx_hdr->id, skb, tx_hdr->length,
 		     tx_hdr->rate, tx_hdr->xmit_queue);
 
 	return 0;
@@ -387,7 +387,7 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl,
 
 	skb = wl->tx_frames[result->id];
 	if (skb == NULL) {
-		wl1251_error("SKB for packet %d is NULL", result->id);
+		wl1251_err("SKB for packet %d is NULL\n", result->id);
 		return;
 	}
 
@@ -412,8 +412,7 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl,
 		skb_pull(skb, WL1251_TKIP_IV_SPACE);
 	}
 
-	wl1251_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x"
-		     " status 0x%x (%s)",
+	wl1251_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x status 0x%x (%s)\n",
 		     result->id, skb, result->ack_failures, result->rate,
 		     result->status, wl1251_tx_parse_status(result->status));
 
@@ -461,14 +460,14 @@ void wl1251_tx_complete(struct wl1251 *wl)
 
 	if ((num_complete > 0) && (queue_len > 0)) {
 		/* firmware buffer has space, reschedule tx_work */
-		wl1251_debug(DEBUG_TX, "tx_complete: reschedule tx_work");
+		wl1251_debug(DEBUG_TX, "tx_complete: reschedule tx_work\n");
 		ieee80211_queue_work(wl->hw, &wl->tx_work);
 	}
 
 	if (wl->tx_queue_stopped &&
 	    queue_len <= WL1251_TX_QUEUE_LOW_WATERMARK) {
 		/* tx_queue has space, restart queues */
-		wl1251_debug(DEBUG_TX, "tx_complete: waking queues");
+		wl1251_debug(DEBUG_TX, "tx_complete: waking queues\n");
 		spin_lock_irqsave(&wl->wl_lock, flags);
 		ieee80211_wake_queues(wl->hw);
 		wl->tx_queue_stopped = false;
@@ -538,7 +537,7 @@ void wl1251_tx_flush(struct wl1251 *wl)
 	while ((skb = skb_dequeue(&wl->tx_queue))) {
 		info = IEEE80211_SKB_CB(skb);
 
-		wl1251_debug(DEBUG_TX, "flushing skb 0x%p", skb);
+		wl1251_debug(DEBUG_TX, "flushing skb 0x%p\n", skb);
 
 		if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
 				continue;
diff --git a/drivers/net/wireless/ti/wl1251/wl1251.h b/drivers/net/wireless/ti/wl1251/wl1251.h
index 9d8f581..e4d0063 100644
--- a/drivers/net/wireless/ti/wl1251/wl1251.h
+++ b/drivers/net/wireless/ti/wl1251/wl1251.h
@@ -54,22 +54,22 @@ enum {
 
 #define DEBUG_DUMP_LIMIT 1024
 
-#define wl1251_error(fmt, arg...) \
-	printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
+#define wl1251_err(fmt, arg...)				\
+	pr_err(DRIVER_PREFIX "ERROR " fmt, ##arg)
 
-#define wl1251_warning(fmt, arg...) \
-	printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
+#define wl1251_warn(fmt, arg...)				\
+	pr_warn(DRIVER_PREFIX "WARNING " fmt, ##arg)
 
-#define wl1251_notice(fmt, arg...) \
-	printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg)
+#define wl1251_notice(fmt, arg...)		\
+	pr_info(DRIVER_PREFIX fmt, ##arg)
 
-#define wl1251_info(fmt, arg...) \
-	printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg)
+#define wl1251_info(fmt, arg...)				\
+	printk(KERN_DEBUG DRIVER_PREFIX fmt, ##arg)
 
 #define wl1251_debug(level, fmt, arg...) \
-	do { \
+	do {				 \
 		if (level & DEBUG_LEVEL) \
-			printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \
+			printk(KERN_DEBUG DRIVER_PREFIX fmt, ##arg); \
 	} while (0)
 
 #define wl1251_dump(level, prefix, buf, len)	\
diff --git a/drivers/net/wireless/ti/wl12xx/acx.c b/drivers/net/wireless/ti/wl12xx/acx.c
index bea06b2..77a1e21 100644
--- a/drivers/net/wireless/ti/wl12xx/acx.c
+++ b/drivers/net/wireless/ti/wl12xx/acx.c
@@ -42,7 +42,7 @@ int wl1271_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap)
 	ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
 				   bitmap_conf, sizeof(*bitmap_conf));
 	if (ret < 0) {
-		wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
+		wl1271_warn("wl1271 bitmap config opt failed: %d\n", ret);
 		goto out;
 	}
 
diff --git a/drivers/net/wireless/ti/wl12xx/cmd.c b/drivers/net/wireless/ti/wl12xx/cmd.c
index 50ba748..6bbc031 100644
--- a/drivers/net/wireless/ti/wl12xx/cmd.c
+++ b/drivers/net/wireless/ti/wl12xx/cmd.c
@@ -54,7 +54,7 @@ int wl1271_cmd_ext_radio_parms(struct wl1271 *wl)
 
 	ret = wl1271_cmd_test(wl, ext_radio_parms, sizeof(*ext_radio_parms), 0);
 	if (ret < 0)
-		wl1271_warning("TEST_CMD_INI_FILE_RF_EXTENDED_PARAM failed");
+		wl1271_warn("TEST_CMD_INI_FILE_RF_EXTENDED_PARAM failed\n");
 
 	kfree(ext_radio_parms);
 	return ret;
@@ -73,7 +73,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
 		return -ENODEV;
 
 	if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-		wl1271_warning("FEM index from INI out of bounds");
+		wl1271_warn("FEM index from INI out of bounds\n");
 		return -EINVAL;
 	}
 
@@ -93,7 +93,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
 
 	ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer);
 	if (ret < 0) {
-		wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed");
+		wl1271_warn("CMD_INI_FILE_GENERAL_PARAM failed\n");
 		goto out;
 	}
 
@@ -101,7 +101,7 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)
 		gen_parms->general_params.tx_bip_fem_manufacturer;
 
 	if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-		wl1271_warning("FEM index from FW out of bounds");
+		wl1271_warn("FEM index from FW out of bounds\n");
 		ret = -EINVAL;
 		goto out;
 	}
@@ -127,7 +127,7 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
 		return -ENODEV;
 
 	if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-		wl1271_warning("FEM index from ini out of bounds");
+		wl1271_warn("FEM index from ini out of bounds\n");
 		return -EINVAL;
 	}
 
@@ -148,7 +148,7 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
 
 	ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer);
 	if (ret < 0) {
-		wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed");
+		wl1271_warn("CMD_INI_FILE_GENERAL_PARAM failed\n");
 		goto out;
 	}
 
@@ -156,7 +156,7 @@ int wl128x_cmd_general_parms(struct wl1271 *wl)
 		gen_parms->general_params.tx_bip_fem_manufacturer;
 
 	if (gp->tx_bip_fem_manufacturer >= WL1271_INI_FEM_MODULE_COUNT) {
-		wl1271_warning("FEM index from FW out of bounds");
+		wl1271_warn("FEM index from FW out of bounds\n");
 		ret = -EINVAL;
 		goto out;
 	}
@@ -205,7 +205,7 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl)
 
 	ret = wl1271_cmd_test(wl, radio_parms, sizeof(*radio_parms), 0);
 	if (ret < 0)
-		wl1271_warning("CMD_INI_FILE_RADIO_PARAM failed");
+		wl1271_warn("CMD_INI_FILE_RADIO_PARAM failed\n");
 
 	kfree(radio_parms);
 	return ret;
@@ -249,7 +249,7 @@ int wl128x_cmd_radio_parms(struct wl1271 *wl)
 
 	ret = wl1271_cmd_test(wl, radio_parms, sizeof(*radio_parms), 0);
 	if (ret < 0)
-		wl1271_warning("CMD_INI_FILE_RADIO_PARAM failed");
+		wl1271_warn("CMD_INI_FILE_RADIO_PARAM failed\n");
 
 	kfree(radio_parms);
 	return ret;
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 85d1600..64c7fb7 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -626,8 +626,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
 
 	switch (wl->chip.id) {
 	case CHIP_ID_1271_PG10:
-		wl1271_warning("chip id 0x%x (1271 PG10) support is obsolete",
-			       wl->chip.id);
+		wl1271_warn("chip id 0x%x (1271 PG10) support is obsolete\n",
+			    wl->chip.id);
 
 		wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
 			      WLCORE_QUIRK_TKIP_HEADER_SPACE;
@@ -642,7 +642,7 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
 		break;
 
 	case CHIP_ID_1271_PG20:
-		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1271 PG20)",
+		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1271 PG20)\n",
 			     wl->chip.id);
 
 		wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
@@ -659,7 +659,7 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
 		break;
 
 	case CHIP_ID_1283_PG20:
-		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1283 PG20)",
+		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1283 PG20)\n",
 			     wl->chip.id);
 		wl->plt_fw_name = WL128X_PLT_FW_NAME;
 		wl->sr_fw_name = WL128X_FW_NAME_SINGLE;
@@ -672,7 +672,7 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
 		break;
 	case CHIP_ID_1283_PG10:
 	default:
-		wl1271_warning("unsupported chip id: 0x%x", wl->chip.id);
+		wl1271_warn("unsupported chip id: 0x%x\n", wl->chip.id);
 		ret = -ENODEV;
 		goto out;
 	}
@@ -712,7 +712,7 @@ static u16 wl12xx_top_reg_read(struct wl1271 *wl, int addr)
 	} while (!(val & OCP_READY_MASK) && --timeout);
 
 	if (!timeout) {
-		wl1271_warning("Top register access timed out.");
+		wl1271_warn("Top register access timed out\n");
 		return 0xffff;
 	}
 
@@ -720,7 +720,7 @@ static u16 wl12xx_top_reg_read(struct wl1271 *wl, int addr)
 	if ((val & OCP_STATUS_MASK) == OCP_STATUS_OK)
 		return val & 0xffff;
 	else {
-		wl1271_warning("Top register access returned error.");
+		wl1271_warn("Top register access returned error\n");
 		return 0xffff;
 	}
 }
@@ -906,7 +906,7 @@ static int wl127x_boot_clk(struct wl1271 *wl)
 
 	pause = wl1271_read32(wl, WL12XX_PLL_PARAMETERS);
 
-	wl1271_debug(DEBUG_BOOT, "pause1 0x%x", pause);
+	wl1271_debug(DEBUG_BOOT, "pause1 0x%x\n", pause);
 
 	pause &= ~(WU_COUNTER_PAUSE_VAL);
 	pause |= WU_COUNTER_PAUSE_VAL;
@@ -927,14 +927,15 @@ static int wl1271_boot_soft_reset(struct wl1271 *wl)
 	timeout = jiffies + usecs_to_jiffies(SOFT_RESET_MAX_TIME);
 	while (1) {
 		boot_data = wl1271_read32(wl, WL12XX_SLV_SOFT_RESET);
-		wl1271_debug(DEBUG_BOOT, "soft reset bootdata 0x%x", boot_data);
+		wl1271_debug(DEBUG_BOOT, "soft reset bootdata 0x%x\n",
+			     boot_data);
 		if ((boot_data & ACX_SLV_SOFT_RESET_BIT) == 0)
 			break;
 
 		if (time_after(jiffies, timeout)) {
 			/* 1.2 check pWhalBus->uSelfClearTime if the
 			 * timeout was reached */
-			wl1271_error("soft reset timeout");
+			wl1271_err("soft reset timeout\n");
 			return -1;
 		}
 
@@ -979,7 +980,7 @@ static int wl12xx_pre_boot(struct wl1271 *wl)
 
 	clk = wl1271_read32(wl, WL12XX_DRPW_SCRATCH_START);
 
-	wl1271_debug(DEBUG_BOOT, "clk2 0x%x", clk);
+	wl1271_debug(DEBUG_BOOT, "clk2 0x%x\n", clk);
 
 	if (wl->chip.id == CHIP_ID_1283_PG20)
 		clk |= ((selected_clock & 0x3) << 1) << 4;
@@ -1007,13 +1008,13 @@ static void wl12xx_pre_upload(struct wl1271 *wl)
 
 	/* write firmware's last address (ie. it's length) to
 	 * ACX_EEPROMLESS_IND_REG */
-	wl1271_debug(DEBUG_BOOT, "ACX_EEPROMLESS_IND_REG");
+	wl1271_debug(DEBUG_BOOT, "ACX_EEPROMLESS_IND_REG\n");
 
 	wl1271_write32(wl, WL12XX_EEPROMLESS_IND, WL12XX_EEPROMLESS_IND);
 
 	tmp = wlcore_read_reg(wl, REG_CHIP_ID_B);
 
-	wl1271_debug(DEBUG_BOOT, "chip id 0x%x", tmp);
+	wl1271_debug(DEBUG_BOOT, "chip id 0x%x\n", tmp);
 
 	/* 6. read the EEPROM parameters */
 	tmp = wl1271_read32(wl, WL12XX_SCR_PAD2);
@@ -1115,7 +1116,7 @@ wl12xx_set_tx_desc_data_len(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc,
 		desc->length = cpu_to_le16(aligned_len >> 2);
 
 		wl1271_debug(DEBUG_TX,
-			     "tx_fill_hdr: hlid: %d len: %d life: %d mem: %d extra: %d",
+			     "tx_fill_hdr: hlid: %d len: %d life: %d mem: %d extra: %d\n",
 			     desc->hlid,
 			     le16_to_cpu(desc->length),
 			     le16_to_cpu(desc->life_time),
@@ -1131,7 +1132,7 @@ wl12xx_set_tx_desc_data_len(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc,
 		desc->length = cpu_to_le16(aligned_len >> 2);
 
 		wl1271_debug(DEBUG_TX,
-			     "tx_fill_hdr: pad: %d hlid: %d len: %d life: %d mem: %d",
+			     "tx_fill_hdr: pad: %d hlid: %d len: %d life: %d mem: %d\n",
 			     pad, desc->hlid,
 			     le16_to_cpu(desc->length),
 			     le16_to_cpu(desc->life_time),
@@ -1262,7 +1263,7 @@ static bool wl12xx_mac_in_fuse(struct wl1271 *wl)
 	}
 
 	wl1271_debug(DEBUG_PROBE,
-		     "PG Ver major = %d minor = %d, MAC %s present",
+		     "PG Ver major = %d minor = %d, MAC %s present\n",
 		     major, minor, supported ? "is" : "is not");
 
 	return supported;
@@ -1432,7 +1433,7 @@ static int __devinit wl12xx_probe(struct platform_device *pdev)
 
 	hw = wlcore_alloc_hw(sizeof(*priv));
 	if (IS_ERR(hw)) {
-		wl1271_error("can't allocate hw");
+		wl1271_err("can't allocate hw\n");
 		return PTR_ERR(hw);
 	}
 
@@ -1470,7 +1471,7 @@ static int __devinit wl12xx_probe(struct platform_device *pdev)
 		else if (!strcmp(fref_param, "52"))
 			priv->ref_clock = WL12XX_REFCLOCK_52;
 		else
-			wl1271_error("Invalid fref parameter %s", fref_param);
+			wl1271_err("Invalid fref parameter %s\n", fref_param);
 	}
 
 	if (!tcxo_param) {
@@ -1493,7 +1494,7 @@ static int __devinit wl12xx_probe(struct platform_device *pdev)
 		else if (!strcmp(tcxo_param, "33.6"))
 			priv->tcxo_clock = WL12XX_TCXOCLOCK_33_6;
 		else
-			wl1271_error("Invalid tcxo parameter %s", tcxo_param);
+			wl1271_err("Invalid tcxo parameter %s\n", tcxo_param);
 	}
 
 	return wlcore_probe(wl, pdev);
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c
index 72840e2..355c3b9 100644
--- a/drivers/net/wireless/ti/wl18xx/acx.c
+++ b/drivers/net/wireless/ti/wl18xx/acx.c
@@ -32,7 +32,7 @@ int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap,
 	struct wl18xx_acx_host_config_bitmap *bitmap_conf;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx cfg bitmap %d blk %d spare %d field %d",
+	wl1271_debug(DEBUG_ACX, "acx cfg bitmap %d blk %d spare %d field %d\n",
 		     host_cfg_bitmap, sdio_blk_size, extra_mem_blks,
 		     len_field_size);
 
@@ -50,7 +50,7 @@ int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap,
 	ret = wl1271_cmd_configure(wl, ACX_HOST_IF_CFG_BITMAP,
 				   bitmap_conf, sizeof(*bitmap_conf));
 	if (ret < 0) {
-		wl1271_warning("wl1271 bitmap config opt failed: %d", ret);
+		wl1271_warn("wl1271 bitmap config opt failed: %d\n", ret);
 		goto out;
 	}
 
@@ -65,7 +65,7 @@ int wl18xx_acx_set_checksum_state(struct wl1271 *wl)
 	struct wl18xx_acx_checksum_state *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx checksum state");
+	wl1271_debug(DEBUG_ACX, "acx checksum state\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -77,7 +77,7 @@ int wl18xx_acx_set_checksum_state(struct wl1271 *wl)
 
 	ret = wl1271_cmd_configure(wl, ACX_CHECKSUM_CONFIG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("failed to set Tx checksum state: %d", ret);
+		wl1271_warn("failed to set Tx checksum state: %d\n", ret);
 		goto out;
 	}
 
@@ -91,7 +91,7 @@ int wl18xx_acx_clear_statistics(struct wl1271 *wl)
 	struct wl18xx_acx_clear_statistics *acx;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx clear statistics");
+	wl1271_debug(DEBUG_ACX, "acx clear statistics\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -101,7 +101,7 @@ int wl18xx_acx_clear_statistics(struct wl1271 *wl)
 
 	ret = wl1271_cmd_configure(wl, ACX_CLEAR_STATISTICS, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("failed to clear firmware statistics: %d", ret);
+		wl1271_warn("failed to clear firmware statistics: %d\n", ret);
 		goto out;
 	}
 
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
index ed9c365..98118c3 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
@@ -599,8 +599,8 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
 
 	switch (wl->chip.id) {
 	case CHIP_ID_185x_PG20:
-		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (185x PG20)",
-				 wl->chip.id);
+		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (185x PG20)\n",
+			     wl->chip.id);
 		wl->sr_fw_name = WL18XX_FW_NAME;
 		/* wl18xx uses the same firmware for PLT */
 		wl->plt_fw_name = WL18XX_FW_NAME;
@@ -610,7 +610,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
 
 		break;
 	case CHIP_ID_185x_PG10:
-		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (185x PG10)",
+		wl1271_debug(DEBUG_BOOT, "chip id 0x%x (185x PG10)\n",
 			     wl->chip.id);
 		wl->sr_fw_name = WL18XX_FW_NAME;
 		/* wl18xx uses the same firmware for PLT */
@@ -625,7 +625,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
 
 		break;
 	default:
-		wl1271_warning("unsupported chip id: 0x%x", wl->chip.id);
+		wl1271_warn("unsupported chip id: 0x%x\n", wl->chip.id);
 		ret = -ENODEV;
 		goto out;
 	}
@@ -643,7 +643,8 @@ static void wl18xx_set_clk(struct wl1271 *wl)
 	/* TODO: PG2: apparently we need to read the clk type */
 
 	clk_freq = wl18xx_top_reg_read(wl, PRIMARY_CLK_DETECT);
-	wl1271_debug(DEBUG_BOOT, "clock freq %d (%d, %d, %d, %d, %s)", clk_freq,
+	wl1271_debug(DEBUG_BOOT, "clock freq %d (%d, %d, %d, %d, %s)\n",
+		     clk_freq,
 		     wl18xx_clk_table[clk_freq].n, wl18xx_clk_table[clk_freq].m,
 		     wl18xx_clk_table[clk_freq].p, wl18xx_clk_table[clk_freq].q,
 		     wl18xx_clk_table[clk_freq].swallow ? "swallow" : "spit");
@@ -713,7 +714,7 @@ static void wl18xx_pre_upload(struct wl1271 *wl)
 
 	tmp = wlcore_read_reg(wl, REG_CHIP_ID_B);
 
-	wl1271_debug(DEBUG_BOOT, "chip id 0x%x", tmp);
+	wl1271_debug(DEBUG_BOOT, "chip id 0x%x\n", tmp);
 
 	tmp = wl1271_read32(wl, WL18XX_SCR_PAD2);
 }
@@ -821,8 +822,8 @@ wl18xx_set_tx_desc_data_len(struct wl1271 *wl, struct wl1271_tx_hw_descr *desc,
 	else
 		desc->wl18xx_mem.ctrl = 0;
 
-	wl1271_debug(DEBUG_TX, "tx_fill_hdr: hlid: %d "
-		     "len: %d life: %d mem: %d", desc->hlid,
+	wl1271_debug(DEBUG_TX, "tx_fill_hdr: hlid: %d len: %d life: %d mem: %d\n",
+		     desc->hlid,
 		     le16_to_cpu(desc->length),
 		     le16_to_cpu(desc->life_time),
 		     desc->wl18xx_mem.total_mem_blocks);
@@ -954,7 +955,7 @@ static u32 wl18xx_sta_get_ap_rate_mask(struct wl1271 *wl,
 
 	if (wlvif->channel_type == NL80211_CHAN_HT40MINUS ||
 	    wlvif->channel_type == NL80211_CHAN_HT40PLUS) {
-		wl1271_debug(DEBUG_ACX, "using wide channel rate mask");
+		wl1271_debug(DEBUG_ACX, "using wide channel rate mask\n");
 		hw_rate_set |= CONF_TX_RATE_USE_WIDE_CHAN;
 
 		/* we don't support MIMO in wide-channel mode */
@@ -970,10 +971,10 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl,
 	if ((wlvif->channel_type == NL80211_CHAN_HT40MINUS ||
 	     wlvif->channel_type == NL80211_CHAN_HT40PLUS) &&
 	    !strcmp(ht_mode_param, "wide")) {
-		wl1271_debug(DEBUG_ACX, "using wide channel rate mask");
+		wl1271_debug(DEBUG_ACX, "using wide channel rate mask\n");
 		return CONF_TX_RATE_USE_WIDE_CHAN;
 	} else if (!strcmp(ht_mode_param, "mimo")) {
-		wl1271_debug(DEBUG_ACX, "using MIMO rate mask");
+		wl1271_debug(DEBUG_ACX, "using MIMO rate mask\n");
 
 		/*
 		 * PG 1.0 has some problems with MCS_13, so disable it
@@ -1015,15 +1016,14 @@ static int wl18xx_conf_init(struct wl1271 *wl, struct device *dev)
 
 	ret = request_firmware(&fw, WL18XX_CONF_FILE_NAME, dev);
 	if (ret < 0) {
-		wl1271_error("could not get configuration binary %s: %d",
-			     WL18XX_CONF_FILE_NAME, ret);
+		wl1271_err("could not get configuration binary %s: %d\n",
+			   WL18XX_CONF_FILE_NAME, ret);
 		goto out_fallback;
 	}
 
 	if (fw->size != WL18XX_CONF_SIZE) {
-		wl1271_error("configuration binary file size is wrong, "
-			     "expected %ld got %zd",
-			     WL18XX_CONF_SIZE, fw->size);
+		wl1271_err("configuration binary file size is wrong, expected %ld got %zd\n",
+			   (unsigned long)WL18XX_CONF_SIZE, fw->size);
 		ret = -EINVAL;
 		goto out;
 	}
@@ -1031,17 +1031,16 @@ static int wl18xx_conf_init(struct wl1271 *wl, struct device *dev)
 	conf_file = (struct wlcore_conf_file *) fw->data;
 
 	if (conf_file->header.magic != cpu_to_le32(WL18XX_CONF_MAGIC)) {
-		wl1271_error("configuration binary file magic number mismatch, "
-			     "expected 0x%0x got 0x%0x", WL18XX_CONF_MAGIC,
-			     conf_file->header.magic);
+		wl1271_err("configuration binary file magic number mismatch, expected 0x%0x got 0x%0x\n",
+			   WL18XX_CONF_MAGIC,
+			   conf_file->header.magic);
 		ret = -EINVAL;
 		goto out;
 	}
 
 	if (conf_file->header.version != cpu_to_le32(WL18XX_CONF_VERSION)) {
-		wl1271_error("configuration binary file version not supported, "
-			     "expected 0x%08x got 0x%08x",
-			     WL18XX_CONF_VERSION, conf_file->header.version);
+		wl1271_err("configuration binary file version not supported, expected 0x%08x got 0x%08x\n",
+			   WL18XX_CONF_VERSION, conf_file->header.version);
 		ret = -EINVAL;
 		goto out;
 	}
@@ -1052,7 +1051,7 @@ static int wl18xx_conf_init(struct wl1271 *wl, struct device *dev)
 	goto out;
 
 out_fallback:
-	wl1271_warning("falling back to default config");
+	wl1271_warn("falling back to default config\n");
 
 	/* apply driver default configuration */
 	memcpy(&wl->conf, &wl18xx_conf, sizeof(wl18xx_conf));
@@ -1097,7 +1096,8 @@ static int wl18xx_handle_static_data(struct wl1271 *wl,
 	struct wl18xx_static_data_priv *static_data_priv =
 		(struct wl18xx_static_data_priv *) static_data->priv;
 
-	wl1271_info("PHY firmware version: %s", static_data_priv->phy_version);
+	wl1271_info("PHY firmware version: %s\n",
+		    static_data_priv->phy_version);
 
 	return 0;
 }
@@ -1275,7 +1275,7 @@ static int __devinit wl18xx_probe(struct platform_device *pdev)
 
 	hw = wlcore_alloc_hw(sizeof(*priv));
 	if (IS_ERR(hw)) {
-		wl1271_error("can't allocate hw");
+		wl1271_err("can't allocate hw\n");
 		ret = PTR_ERR(hw);
 		goto out;
 	}
@@ -1316,7 +1316,7 @@ static int __devinit wl18xx_probe(struct platform_device *pdev)
 		       &wl18xx_siso20_ht_cap,
 		       sizeof(wl18xx_siso20_ht_cap));
 	} else {
-		wl1271_error("invalid ht_mode '%s'", ht_mode_param);
+		wl1271_err("invalid ht_mode '%s'\n", ht_mode_param);
 		ret = -EINVAL;
 		goto out_free;
 	}
@@ -1340,7 +1340,7 @@ static int __devinit wl18xx_probe(struct platform_device *pdev)
 		/* HACK! Just for now we hardcode COM8 to 0x06 */
 		priv->conf.phy.low_band_component_type = 0x06;
 	} else {
-		wl1271_error("invalid board type '%s'", board_type_param);
+		wl1271_err("invalid board type '%s'\n", board_type_param);
 		ret = -EINVAL;
 		goto out_free;
 	}
diff --git a/drivers/net/wireless/ti/wl18xx/tx.c b/drivers/net/wireless/ti/wl18xx/tx.c
index 5b1fb10..aef7eae 100644
--- a/drivers/net/wireless/ti/wl18xx/tx.c
+++ b/drivers/net/wireless/ti/wl18xx/tx.c
@@ -37,7 +37,7 @@ static void wl18xx_tx_complete_packet(struct wl1271 *wl, u8 tx_stat_byte)
 
 	/* check for id legality */
 	if (unlikely(id >= wl->num_tx_desc || wl->tx_frames[id] == NULL)) {
-		wl1271_warning("illegal id in tx completion: %d", id);
+		wl1271_warn("illegal id in tx completion: %d\n", id);
 		return;
 	}
 
@@ -83,7 +83,7 @@ static void wl18xx_tx_complete_packet(struct wl1271 *wl, u8 tx_stat_byte)
 		skb_pull(skb, WL1271_EXTRA_SPACE_TKIP);
 	}
 
-	wl1271_debug(DEBUG_TX, "tx status id %u skb 0x%p success %d",
+	wl1271_debug(DEBUG_TX, "tx status id %u skb 0x%p success %d\n",
 		     id, skb, tx_success);
 
 	/* return the packet to the stack */
@@ -104,12 +104,12 @@ void wl18xx_tx_immediate_complete(struct wl1271 *wl)
 		return;
 
 	/* freed Tx descriptors */
-	wl1271_debug(DEBUG_TX, "last released desc = %d, current idx = %d",
+	wl1271_debug(DEBUG_TX, "last released desc = %d, current idx = %d\n",
 		     priv->last_fw_rls_idx, status_priv->fw_release_idx);
 
 	if (status_priv->fw_release_idx >= WL18XX_FW_MAX_TX_STATUS_DESC) {
-		wl1271_error("invalid desc release index %d",
-			     status_priv->fw_release_idx);
+		wl1271_err("invalid desc release index %d\n",
+			   status_priv->fw_release_idx);
 		WARN_ON(1);
 		return;
 	}
diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c
index b9ec42c..55172d2 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -40,7 +40,7 @@ int wl1271_acx_wake_up_conditions(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_wake_up_condition *wake_up;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx wake up conditions (wake_up_event %d listen_interval %d)",
+	wl1271_debug(DEBUG_ACX, "acx wake up conditions (wake_up_event %d listen_interval %d)\n",
 		     wake_up_event, listen_interval);
 
 	wake_up = kzalloc(sizeof(*wake_up), GFP_KERNEL);
@@ -56,7 +56,7 @@ int wl1271_acx_wake_up_conditions(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_configure(wl, ACX_WAKE_UP_CONDITIONS,
 				   wake_up, sizeof(*wake_up));
 	if (ret < 0) {
-		wl1271_warning("could not set wake up conditions: %d", ret);
+		wl1271_warn("could not set wake up conditions: %d\n", ret);
 		goto out;
 	}
 
@@ -70,7 +70,7 @@ int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth)
 	struct acx_sleep_auth *auth;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx sleep auth");
+	wl1271_debug(DEBUG_ACX, "acx sleep auth\n");
 
 	auth = kzalloc(sizeof(*auth), GFP_KERNEL);
 	if (!auth) {
@@ -94,7 +94,7 @@ int wl1271_acx_tx_power(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_current_tx_power *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx dot11_cur_tx_pwr %d", power);
+	wl1271_debug(DEBUG_ACX, "acx dot11_cur_tx_pwr %d\n", power);
 
 	if (power < 0 || power > 25)
 		return -EINVAL;
@@ -110,7 +110,7 @@ int wl1271_acx_tx_power(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, DOT11_CUR_TX_PWR, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("configure of tx power failed: %d", ret);
+		wl1271_warn("configure of tx power failed: %d\n", ret);
 		goto out;
 	}
 
@@ -124,7 +124,7 @@ int wl1271_acx_feature_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	struct acx_feature_config *feature;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx feature cfg");
+	wl1271_debug(DEBUG_ACX, "acx feature cfg\n");
 
 	feature = kzalloc(sizeof(*feature), GFP_KERNEL);
 	if (!feature) {
@@ -140,7 +140,7 @@ int wl1271_acx_feature_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	ret = wl1271_cmd_configure(wl, ACX_FEATURE_CFG,
 				   feature, sizeof(*feature));
 	if (ret < 0) {
-		wl1271_error("Couldnt set HW encryption");
+		wl1271_err("Couldnt set HW encryption\n");
 		goto out;
 	}
 
@@ -154,7 +154,7 @@ int wl1271_acx_mem_map(struct wl1271 *wl, struct acx_header *mem_map,
 {
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx mem map");
+	wl1271_debug(DEBUG_ACX, "acx mem map\n");
 
 	ret = wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map, len);
 	if (ret < 0)
@@ -168,7 +168,7 @@ int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl)
 	struct acx_rx_msdu_lifetime *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx rx msdu life time");
+	wl1271_debug(DEBUG_ACX, "acx rx msdu life time\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -180,7 +180,7 @@ int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl)
 	ret = wl1271_cmd_configure(wl, DOT11_RX_MSDU_LIFE_TIME,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("failed to set rx msdu life time: %d", ret);
+		wl1271_warn("failed to set rx msdu life time: %d\n", ret);
 		goto out;
 	}
 
@@ -195,7 +195,7 @@ int wl1271_acx_slot(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_slot *slot;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx slot");
+	wl1271_debug(DEBUG_ACX, "acx slot\n");
 
 	slot = kzalloc(sizeof(*slot), GFP_KERNEL);
 	if (!slot) {
@@ -209,7 +209,7 @@ int wl1271_acx_slot(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_SLOT, slot, sizeof(*slot));
 	if (ret < 0) {
-		wl1271_warning("failed to set slot time: %d", ret);
+		wl1271_warn("failed to set slot time: %d\n", ret);
 		goto out;
 	}
 
@@ -224,7 +224,7 @@ int wl1271_acx_group_address_tbl(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_dot11_grp_addr_tbl *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx group address tbl");
+	wl1271_debug(DEBUG_ACX, "acx group address tbl\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -241,7 +241,7 @@ int wl1271_acx_group_address_tbl(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_configure(wl, DOT11_GROUP_ADDRESS_TBL,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("failed to set group addr table: %d", ret);
+		wl1271_warn("failed to set group addr table: %d\n", ret);
 		goto out;
 	}
 
@@ -262,7 +262,7 @@ int wl1271_acx_service_period_timeout(struct wl1271 *wl,
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_ACX, "acx service period timeout");
+	wl1271_debug(DEBUG_ACX, "acx service period timeout\n");
 
 	rx_timeout->role_id = wlvif->role_id;
 	rx_timeout->ps_poll_timeout = cpu_to_le16(wl->conf.rx.ps_poll_timeout);
@@ -271,8 +271,8 @@ int wl1271_acx_service_period_timeout(struct wl1271 *wl,
 	ret = wl1271_cmd_configure(wl, ACX_SERVICE_PERIOD_TIMEOUT,
 				   rx_timeout, sizeof(*rx_timeout));
 	if (ret < 0) {
-		wl1271_warning("failed to set service period timeout: %d",
-			       ret);
+		wl1271_warn("failed to set service period timeout: %d\n",
+			    ret);
 		goto out;
 	}
 
@@ -294,7 +294,7 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	if (rts_threshold > IEEE80211_MAX_RTS_THRESHOLD)
 		rts_threshold = wl->conf.rx.rts_threshold;
 
-	wl1271_debug(DEBUG_ACX, "acx rts threshold: %d", rts_threshold);
+	wl1271_debug(DEBUG_ACX, "acx rts threshold: %d\n", rts_threshold);
 
 	rts = kzalloc(sizeof(*rts), GFP_KERNEL);
 	if (!rts) {
@@ -307,7 +307,7 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, DOT11_RTS_THRESHOLD, rts, sizeof(*rts));
 	if (ret < 0) {
-		wl1271_warning("failed to set rts threshold: %d", ret);
+		wl1271_warn("failed to set rts threshold: %d\n", ret);
 		goto out;
 	}
 
@@ -322,7 +322,7 @@ int wl1271_acx_dco_itrim_params(struct wl1271 *wl)
 	struct conf_itrim_settings *c = &wl->conf.itrim;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx dco itrim parameters");
+	wl1271_debug(DEBUG_ACX, "acx dco itrim parameters\n");
 
 	dco = kzalloc(sizeof(*dco), GFP_KERNEL);
 	if (!dco) {
@@ -336,7 +336,7 @@ int wl1271_acx_dco_itrim_params(struct wl1271 *wl)
 	ret = wl1271_cmd_configure(wl, ACX_SET_DCO_ITRIM_PARAMS,
 				   dco, sizeof(*dco));
 	if (ret < 0) {
-		wl1271_warning("failed to set dco itrim parameters: %d", ret);
+		wl1271_warn("failed to set dco itrim parameters: %d\n", ret);
 		goto out;
 	}
 
@@ -351,7 +351,7 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_beacon_filter_option *beacon_filter = NULL;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx beacon filter opt");
+	wl1271_debug(DEBUG_ACX, "acx beacon filter opt\n");
 
 	if (enable_filter &&
 	    wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED)
@@ -375,7 +375,7 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_OPT,
 				   beacon_filter, sizeof(*beacon_filter));
 	if (ret < 0) {
-		wl1271_warning("failed to set beacon filter opt: %d", ret);
+		wl1271_warn("failed to set beacon filter opt: %d\n", ret);
 		goto out;
 	}
 
@@ -392,7 +392,7 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl,
 	int ret;
 	bool vendor_spec = false;
 
-	wl1271_debug(DEBUG_ACX, "acx beacon filter table");
+	wl1271_debug(DEBUG_ACX, "acx beacon filter table\n");
 
 	ie_table = kzalloc(sizeof(*ie_table), GFP_KERNEL);
 	if (!ie_table) {
@@ -431,7 +431,7 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl,
 	ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_TABLE,
 				   ie_table, sizeof(*ie_table));
 	if (ret < 0) {
-		wl1271_warning("failed to set beacon filter table: %d", ret);
+		wl1271_warn("failed to set beacon filter table: %d\n", ret);
 		goto out;
 	}
 
@@ -450,7 +450,7 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	u32 timeout = ACX_CONN_MONIT_DISABLE_VALUE;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx connection monitor parameters: %s",
+	wl1271_debug(DEBUG_ACX, "acx connection monitor parameters: %s\n",
 		     enable ? "enabled" : "disabled");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
@@ -471,8 +471,8 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("failed to set connection monitor "
-			       "parameters: %d", ret);
+		wl1271_warn("failed to set connection monitor parameters: %d\n",
+			    ret);
 		goto out;
 	}
 
@@ -487,7 +487,7 @@ int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable)
 	struct acx_bt_wlan_coex *pta;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx sg enable");
+	wl1271_debug(DEBUG_ACX, "acx sg enable\n");
 
 	pta = kzalloc(sizeof(*pta), GFP_KERNEL);
 	if (!pta) {
@@ -502,7 +502,7 @@ int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable)
 
 	ret = wl1271_cmd_configure(wl, ACX_SG_ENABLE, pta, sizeof(*pta));
 	if (ret < 0) {
-		wl1271_warning("failed to set softgemini enable: %d", ret);
+		wl1271_warn("failed to set softgemini enable: %d\n", ret);
 		goto out;
 	}
 
@@ -517,7 +517,7 @@ int wl12xx_acx_sg_cfg(struct wl1271 *wl)
 	struct conf_sg_settings *c = &wl->conf.sg;
 	int i, ret;
 
-	wl1271_debug(DEBUG_ACX, "acx sg cfg");
+	wl1271_debug(DEBUG_ACX, "acx sg cfg\n");
 
 	param = kzalloc(sizeof(*param), GFP_KERNEL);
 	if (!param) {
@@ -532,7 +532,7 @@ int wl12xx_acx_sg_cfg(struct wl1271 *wl)
 
 	ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
 	if (ret < 0) {
-		wl1271_warning("failed to set sg config: %d", ret);
+		wl1271_warn("failed to set sg config: %d\n", ret);
 		goto out;
 	}
 
@@ -546,7 +546,7 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)
 	struct acx_energy_detection *detection;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx cca threshold");
+	wl1271_debug(DEBUG_ACX, "acx cca threshold\n");
 
 	detection = kzalloc(sizeof(*detection), GFP_KERNEL);
 	if (!detection) {
@@ -560,7 +560,7 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)
 	ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD,
 				   detection, sizeof(*detection));
 	if (ret < 0)
-		wl1271_warning("failed to set cca threshold: %d", ret);
+		wl1271_warn("failed to set cca threshold: %d\n", ret);
 
 out:
 	kfree(detection);
@@ -572,7 +572,7 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	struct acx_beacon_broadcast *bb;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx bcn dtim options");
+	wl1271_debug(DEBUG_ACX, "acx bcn dtim options\n");
 
 	bb = kzalloc(sizeof(*bb), GFP_KERNEL);
 	if (!bb) {
@@ -588,7 +588,7 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
 	ret = wl1271_cmd_configure(wl, ACX_BCN_DTIM_OPTIONS, bb, sizeof(*bb));
 	if (ret < 0) {
-		wl1271_warning("failed to set rx config: %d", ret);
+		wl1271_warn("failed to set rx config: %d\n", ret);
 		goto out;
 	}
 
@@ -602,7 +602,7 @@ int wl1271_acx_aid(struct wl1271 *wl, struct wl12xx_vif *wlvif, u16 aid)
 	struct acx_aid *acx_aid;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx aid");
+	wl1271_debug(DEBUG_ACX, "acx aid\n");
 
 	acx_aid = kzalloc(sizeof(*acx_aid), GFP_KERNEL);
 	if (!acx_aid) {
@@ -615,7 +615,7 @@ int wl1271_acx_aid(struct wl1271 *wl, struct wl12xx_vif *wlvif, u16 aid)
 
 	ret = wl1271_cmd_configure(wl, ACX_AID, acx_aid, sizeof(*acx_aid));
 	if (ret < 0) {
-		wl1271_warning("failed to set aid: %d", ret);
+		wl1271_warn("failed to set aid: %d\n", ret);
 		goto out;
 	}
 
@@ -629,7 +629,7 @@ int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask)
 	struct acx_event_mask *mask;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx event mbox mask");
+	wl1271_debug(DEBUG_ACX, "acx event mbox mask\n");
 
 	mask = kzalloc(sizeof(*mask), GFP_KERNEL);
 	if (!mask) {
@@ -644,7 +644,7 @@ int wl1271_acx_event_mbox_mask(struct wl1271 *wl, u32 event_mask)
 	ret = wl1271_cmd_configure(wl, ACX_EVENT_MBOX_MASK,
 				   mask, sizeof(*mask));
 	if (ret < 0) {
-		wl1271_warning("failed to set acx_event_mbox_mask: %d", ret);
+		wl1271_warn("failed to set acx_event_mbox_mask: %d\n", ret);
 		goto out;
 	}
 
@@ -659,7 +659,7 @@ int wl1271_acx_set_preamble(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_preamble *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx_set_preamble");
+	wl1271_debug(DEBUG_ACX, "acx_set_preamble\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -672,7 +672,7 @@ int wl1271_acx_set_preamble(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_PREAMBLE_TYPE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of preamble failed: %d", ret);
+		wl1271_warn("Setting of preamble failed: %d\n", ret);
 		goto out;
 	}
 
@@ -687,7 +687,7 @@ int wl1271_acx_cts_protect(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_ctsprotect *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx_set_ctsprotect");
+	wl1271_debug(DEBUG_ACX, "acx_set_ctsprotect\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -700,7 +700,7 @@ int wl1271_acx_cts_protect(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_CTS_PROTECTION, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of ctsprotect failed: %d", ret);
+		wl1271_warn("Setting of ctsprotect failed: %d\n", ret);
 		goto out;
 	}
 
@@ -713,12 +713,12 @@ int wl1271_acx_statistics(struct wl1271 *wl, void *stats)
 {
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx statistics");
+	wl1271_debug(DEBUG_ACX, "acx statistics\n");
 
 	ret = wl1271_cmd_interrogate(wl, ACX_STATISTICS, stats,
 				     wl->stats.fw_stats_len);
 	if (ret < 0) {
-		wl1271_warning("acx statistics failed: %d", ret);
+		wl1271_warn("acx statistics failed: %d\n", ret);
 		return -ENOMEM;
 	}
 
@@ -731,7 +731,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	struct conf_tx_rate_class *c = &wl->conf.tx.sta_rc_conf;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx rate policies");
+	wl1271_debug(DEBUG_ACX, "acx rate policies\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -740,8 +740,8 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_ACX, "basic_rate: 0x%x, full_rate: 0x%x",
-		wlvif->basic_rate, wlvif->rate_set);
+	wl1271_debug(DEBUG_ACX, "basic_rate: 0x%x, full_rate: 0x%x\n",
+		     wlvif->basic_rate, wlvif->rate_set);
 
 	/* configure one basic rate class */
 	acx->rate_policy_idx = cpu_to_le32(wlvif->sta.basic_rate_idx);
@@ -752,7 +752,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
 	ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of rate policies failed: %d", ret);
+		wl1271_warn("Setting of rate policies failed: %d\n", ret);
 		goto out;
 	}
 
@@ -768,7 +768,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
 	ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of rate policies failed: %d", ret);
+		wl1271_warn("Setting of rate policies failed: %d\n", ret);
 		goto out;
 	}
 
@@ -786,7 +786,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
 	ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of rate policies failed: %d", ret);
+		wl1271_warn("Setting of rate policies failed: %d\n", ret);
 		goto out;
 	}
 
@@ -801,7 +801,7 @@ int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
 	struct acx_rate_policy *acx;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx ap rate policy %d rates 0x%x",
+	wl1271_debug(DEBUG_ACX, "acx ap rate policy %d rates 0x%x\n",
 		     idx, c->enabled_rates);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
@@ -819,7 +819,7 @@ int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
 
 	ret = wl1271_cmd_configure(wl, ACX_RATE_POLICY, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of ap rate policy failed: %d", ret);
+		wl1271_warn("Setting of ap rate policy failed: %d\n", ret);
 		goto out;
 	}
 
@@ -834,8 +834,8 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_ac_cfg *acx;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d "
-		     "aifs %d txop %d", ac, cw_min, cw_max, aifsn, txop);
+	wl1271_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d aifs %d txop %d\n",
+		     ac, cw_min, cw_max, aifsn, txop);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -853,7 +853,7 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx ac cfg failed: %d", ret);
+		wl1271_warn("acx ac cfg failed: %d\n", ret);
 		goto out;
 	}
 
@@ -870,7 +870,7 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct acx_tid_config *acx;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx tid config");
+	wl1271_debug(DEBUG_ACX, "acx tid config\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -890,7 +890,7 @@ int wl1271_acx_tid_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_TID_CFG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of tid config failed: %d", ret);
+		wl1271_warn("Setting of tid config failed: %d\n", ret);
 		goto out;
 	}
 
@@ -911,7 +911,7 @@ int wl1271_acx_frag_threshold(struct wl1271 *wl, u32 frag_threshold)
 	if (frag_threshold > IEEE80211_MAX_FRAG_THRESHOLD)
 		frag_threshold = wl->conf.tx.frag_threshold;
 
-	wl1271_debug(DEBUG_ACX, "acx frag threshold: %d", frag_threshold);
+	wl1271_debug(DEBUG_ACX, "acx frag threshold: %d\n", frag_threshold);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -923,7 +923,7 @@ int wl1271_acx_frag_threshold(struct wl1271 *wl, u32 frag_threshold)
 	acx->frag_threshold = cpu_to_le16((u16)frag_threshold);
 	ret = wl1271_cmd_configure(wl, ACX_FRAG_CFG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of frag threshold failed: %d", ret);
+		wl1271_warn("Setting of frag threshold failed: %d\n", ret);
 		goto out;
 	}
 
@@ -937,7 +937,7 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl)
 	struct acx_tx_config_options *acx;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx tx config options");
+	wl1271_debug(DEBUG_ACX, "acx tx config options\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 
@@ -950,7 +950,7 @@ int wl1271_acx_tx_config_options(struct wl1271 *wl)
 	acx->tx_compl_threshold = cpu_to_le16(wl->conf.tx.tx_compl_threshold);
 	ret = wl1271_cmd_configure(wl, ACX_TX_CONFIG_OPT, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("Setting of tx options failed: %d", ret);
+		wl1271_warn("Setting of tx options failed: %d\n", ret);
 		goto out;
 	}
 
@@ -965,7 +965,7 @@ int wl12xx_acx_mem_cfg(struct wl1271 *wl)
 	struct conf_memory_settings *mem;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "wl1271 mem cfg");
+	wl1271_debug(DEBUG_ACX, "wl1271 mem cfg\n");
 
 	mem_conf = kzalloc(sizeof(*mem_conf), GFP_KERNEL);
 	if (!mem_conf) {
@@ -990,7 +990,7 @@ int wl12xx_acx_mem_cfg(struct wl1271 *wl)
 	ret = wl1271_cmd_configure(wl, ACX_MEM_CFG, mem_conf,
 				   sizeof(*mem_conf));
 	if (ret < 0) {
-		wl1271_warning("wl1271 mem config failed: %d", ret);
+		wl1271_warn("wl1271 mem config failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1007,7 +1007,7 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl)
 	wl->target_mem_map = kzalloc(sizeof(struct wl1271_acx_mem_map),
 				     GFP_KERNEL);
 	if (!wl->target_mem_map) {
-		wl1271_error("couldn't allocate target memory map");
+		wl1271_err("couldn't allocate target memory map\n");
 		return -ENOMEM;
 	}
 
@@ -1015,7 +1015,7 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl)
 	ret = wl1271_acx_mem_map(wl, (void *)wl->target_mem_map,
 				 sizeof(struct wl1271_acx_mem_map));
 	if (ret < 0) {
-		wl1271_error("couldn't retrieve firmware memory map");
+		wl1271_err("couldn't retrieve firmware memory map\n");
 		kfree(wl->target_mem_map);
 		wl->target_mem_map = NULL;
 		return ret;
@@ -1024,7 +1024,7 @@ int wl1271_acx_init_mem_config(struct wl1271 *wl)
 	/* initialize TX block book keeping */
 	wl->tx_blocks_available =
 		le32_to_cpu(wl->target_mem_map->num_tx_mem_blocks);
-	wl1271_debug(DEBUG_TX, "available tx blocks: %d",
+	wl1271_debug(DEBUG_TX, "available tx blocks: %d\n",
 		     wl->tx_blocks_available);
 
 	return 0;
@@ -1036,7 +1036,7 @@ int wl1271_acx_init_rx_interrupt(struct wl1271 *wl)
 	struct wl1271_acx_rx_config_opt *rx_conf;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "wl1271 rx interrupt config");
+	wl1271_debug(DEBUG_ACX, "wl1271 rx interrupt config\n");
 
 	rx_conf = kzalloc(sizeof(*rx_conf), GFP_KERNEL);
 	if (!rx_conf) {
@@ -1052,7 +1052,7 @@ int wl1271_acx_init_rx_interrupt(struct wl1271 *wl)
 	ret = wl1271_cmd_configure(wl, ACX_RX_CONFIG_OPT, rx_conf,
 				   sizeof(*rx_conf));
 	if (ret < 0) {
-		wl1271_warning("wl1271 rx config opt failed: %d", ret);
+		wl1271_warn("wl1271 rx config opt failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1067,7 +1067,7 @@ int wl1271_acx_bet_enable(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_acx_bet_enable *acx = NULL;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx bet enable");
+	wl1271_debug(DEBUG_ACX, "acx bet enable\n");
 
 	if (enable && wl->conf.conn.bet_enable == CONF_BET_MODE_DISABLE)
 		goto out;
@@ -1084,7 +1084,7 @@ int wl1271_acx_bet_enable(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx bet enable failed: %d", ret);
+		wl1271_warn("acx bet enable failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1099,7 +1099,7 @@ int wl1271_acx_arp_ip_filter(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_acx_arp_filter *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx arp ip filter, enable: %d", enable);
+	wl1271_debug(DEBUG_ACX, "acx arp ip filter, enable: %d\n", enable);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1117,7 +1117,7 @@ int wl1271_acx_arp_ip_filter(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_configure(wl, ACX_ARP_IP_FILTER,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("failed to set arp ip filter: %d", ret);
+		wl1271_warn("failed to set arp ip filter: %d\n", ret);
 		goto out;
 	}
 
@@ -1132,7 +1132,7 @@ int wl1271_acx_pm_config(struct wl1271 *wl)
 	struct  conf_pm_config_settings *c = &wl->conf.pm_config;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx pm config");
+	wl1271_debug(DEBUG_ACX, "acx pm config\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1145,7 +1145,7 @@ int wl1271_acx_pm_config(struct wl1271 *wl)
 
 	ret = wl1271_cmd_configure(wl, ACX_PM_CONFIG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx pm config failed: %d", ret);
+		wl1271_warn("acx pm config failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1161,7 +1161,7 @@ int wl1271_acx_keep_alive_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_acx_keep_alive_mode *acx = NULL;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx keep alive mode: %d", enable);
+	wl1271_debug(DEBUG_ACX, "acx keep alive mode: %d\n", enable);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1174,7 +1174,7 @@ int wl1271_acx_keep_alive_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_KEEP_ALIVE_MODE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx keep alive mode failed: %d", ret);
+		wl1271_warn("acx keep alive mode failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1189,7 +1189,7 @@ int wl1271_acx_keep_alive_config(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_acx_keep_alive_config *acx = NULL;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx keep alive config");
+	wl1271_debug(DEBUG_ACX, "acx keep alive config\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1206,7 +1206,7 @@ int wl1271_acx_keep_alive_config(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_configure(wl, ACX_SET_KEEP_ALIVE_CONFIG,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx keep alive config failed: %d", ret);
+		wl1271_warn("acx keep alive config failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1221,7 +1221,7 @@ int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_acx_rssi_snr_trigger *acx = NULL;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx rssi snr trigger");
+	wl1271_debug(DEBUG_ACX, "acx rssi snr trigger\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1247,7 +1247,7 @@ int wl1271_acx_rssi_snr_trigger(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_configure(wl, ACX_RSSI_SNR_TRIGGER, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx rssi snr trigger setting failed: %d", ret);
+		wl1271_warn("acx rssi snr trigger setting failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1263,7 +1263,7 @@ int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl,
 	struct conf_roam_trigger_settings *c = &wl->conf.roam_trigger;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx rssi snr avg weights");
+	wl1271_debug(DEBUG_ACX, "acx rssi snr avg weights\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1279,7 +1279,7 @@ int wl1271_acx_rssi_snr_avg_weights(struct wl1271 *wl,
 
 	ret = wl1271_cmd_configure(wl, ACX_RSSI_SNR_WEIGHTS, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx rssi snr trigger weights failed: %d", ret);
+		wl1271_warn("acx rssi snr trigger weights failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1296,9 +1296,8 @@ int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
 	int ret = 0;
 	u32 ht_capabilites = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx ht capabilities setting "
-		     "sta supp: %d sta cap: %d", ht_cap->ht_supported,
-		     ht_cap->cap);
+	wl1271_debug(DEBUG_ACX, "acx ht capabilities setting sta supp: %d sta cap: %d\n",
+		     ht_cap->ht_supported, ht_cap->cap);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1326,7 +1325,7 @@ int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
 
 	ret = wl1271_cmd_configure(wl, ACX_PEER_HT_CAP, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx ht capabilities setting failed: %d", ret);
+		wl1271_warn("acx ht capabilities setting failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1342,7 +1341,7 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl,
 	struct wl1271_acx_ht_information *acx;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx ht information setting");
+	wl1271_debug(DEBUG_ACX, "acx ht information setting\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1362,7 +1361,7 @@ int wl1271_acx_set_ht_information(struct wl1271 *wl,
 	ret = wl1271_cmd_configure(wl, ACX_HT_BSS_OPERATION, acx, sizeof(*acx));
 
 	if (ret < 0) {
-		wl1271_warning("acx ht information setting failed: %d", ret);
+		wl1271_warn("acx ht information setting failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1378,7 +1377,7 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
 	struct wl1271_acx_ba_initiator_policy *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx ba initiator policy");
+	wl1271_debug(DEBUG_ACX, "acx ba initiator policy\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1397,7 +1396,7 @@ int wl12xx_acx_set_ba_initiator_policy(struct wl1271 *wl,
 				   acx,
 				   sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx ba initiator policy failed: %d", ret);
+		wl1271_warn("acx ba initiator policy failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1413,7 +1412,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
 	struct wl1271_acx_ba_receiver_setup *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx ba receiver session setting");
+	wl1271_debug(DEBUG_ACX, "acx ba receiver session setting\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1430,7 +1429,7 @@ int wl12xx_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index,
 	ret = wl1271_cmd_configure(wl, ACX_BA_SESSION_RX_SETUP, acx,
 				   sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx ba receiver session failed: %d", ret);
+		wl1271_warn("acx ba receiver session failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1456,7 +1455,7 @@ int wl12xx_acx_tsf_info(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_interrogate(wl, ACX_TSF_INFO,
 				     tsf_info, sizeof(*tsf_info));
 	if (ret < 0) {
-		wl1271_warning("acx tsf info interrogate failed");
+		wl1271_warn("acx tsf info interrogate failed\n");
 		goto out;
 	}
 
@@ -1475,7 +1474,7 @@ int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	u32 conf_queues, enable_queues;
 	int i, ret = 0;
 
-	wl1271_debug(DEBUG_ACX, "acx ps rx streaming");
+	wl1271_debug(DEBUG_ACX, "acx ps rx streaming\n");
 
 	rx_streaming = kzalloc(sizeof(*rx_streaming), GFP_KERNEL);
 	if (!rx_streaming) {
@@ -1508,7 +1507,7 @@ int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 					   rx_streaming,
 					   sizeof(*rx_streaming));
 		if (ret < 0) {
-			wl1271_warning("acx ps rx streaming failed: %d", ret);
+			wl1271_warn("acx ps rx streaming failed: %d\n", ret);
 			goto out;
 		}
 	}
@@ -1522,7 +1521,7 @@ int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	struct wl1271_acx_ap_max_tx_retry *acx = NULL;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx ap max tx retry");
+	wl1271_debug(DEBUG_ACX, "acx ap max tx retry\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx)
@@ -1533,7 +1532,7 @@ int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
 	ret = wl1271_cmd_configure(wl, ACX_MAX_TX_FAILURE, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx ap max tx retry failed: %d", ret);
+		wl1271_warn("acx ap max tx retry failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1547,7 +1546,7 @@ int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	struct wl1271_acx_config_ps *config_ps;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx config ps");
+	wl1271_debug(DEBUG_ACX, "acx config ps\n");
 
 	config_ps = kzalloc(sizeof(*config_ps), GFP_KERNEL);
 	if (!config_ps) {
@@ -1563,7 +1562,7 @@ int wl12xx_acx_config_ps(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 				   sizeof(*config_ps));
 
 	if (ret < 0) {
-		wl1271_warning("acx config ps failed: %d", ret);
+		wl1271_warn("acx config ps failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1577,7 +1576,7 @@ int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr)
 	struct wl1271_acx_inconnection_sta *acx = NULL;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx set inconnaction sta %pM", addr);
+	wl1271_debug(DEBUG_ACX, "acx set inconnaction sta %pM\n", addr);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx)
@@ -1588,7 +1587,7 @@ int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr)
 	ret = wl1271_cmd_configure(wl, ACX_UPDATE_INCONNECTION_STA_LIST,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx set inconnaction sta failed: %d", ret);
+		wl1271_warn("acx set inconnaction sta failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1602,7 +1601,7 @@ int wl1271_acx_fm_coex(struct wl1271 *wl)
 	struct wl1271_acx_fm_coex *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx fm coex setting");
+	wl1271_debug(DEBUG_ACX, "acx fm coex setting\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1628,7 +1627,7 @@ int wl1271_acx_fm_coex(struct wl1271 *wl)
 
 	ret = wl1271_cmd_configure(wl, ACX_FM_COEX_CFG, acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx fm coex setting failed: %d", ret);
+		wl1271_warn("acx fm coex setting failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1643,7 +1642,7 @@ int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl)
 	struct conf_rate_policy_settings *conf = &wl->conf.rate;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx set rate mgmt params");
+	wl1271_debug(DEBUG_ACX, "acx set rate mgmt params\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx)
@@ -1670,7 +1669,7 @@ int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl)
 	ret = wl1271_cmd_configure(wl, ACX_SET_RATE_MGMT_PARAMS,
 				   acx, sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx set rate mgmt params failed: %d", ret);
+		wl1271_warn("acx set rate mgmt params failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1685,7 +1684,7 @@ int wl12xx_acx_config_hangover(struct wl1271 *wl)
 	struct conf_hangover_settings *conf = &wl->conf.hangover;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx config hangover");
+	wl1271_debug(DEBUG_ACX, "acx config hangover\n");
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
 	if (!acx) {
@@ -1709,7 +1708,7 @@ int wl12xx_acx_config_hangover(struct wl1271 *wl)
 				   sizeof(*acx));
 
 	if (ret < 0) {
-		wl1271_warning("acx config hangover failed: %d", ret);
+		wl1271_warn("acx config hangover failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1727,7 +1726,7 @@ int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable,
 	struct acx_default_rx_filter *acx;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "acx default rx filter en: %d act: %d",
+	wl1271_debug(DEBUG_ACX, "acx default rx filter en: %d act: %d\n",
 		     enable, action);
 
 	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
@@ -1740,7 +1739,7 @@ int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable,
 	ret = wl1271_cmd_configure(wl, ACX_ENABLE_RX_DATA_FILTER, acx,
 				   sizeof(*acx));
 	if (ret < 0) {
-		wl1271_warning("acx default rx filter enable failed: %d", ret);
+		wl1271_warn("acx default rx filter enable failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1762,14 +1761,14 @@ int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable,
 	WARN_ON(index >= WL1271_MAX_RX_FILTERS);
 
 	wl1271_debug(DEBUG_ACX,
-		     "acx set rx filter idx: %d enable: %d filter: %p",
+		     "acx set rx filter idx: %d enable: %d filter: %p\n",
 		     index, enable, filter);
 
 	if (enable) {
 		fields_size = wl1271_rx_filter_get_fields_size(filter);
 
-		wl1271_debug(DEBUG_ACX, "act: %d num_fields: %d field_size: %d",
-		      filter->action, filter->num_fields, fields_size);
+		wl1271_debug(DEBUG_ACX, "act: %d num_fields: %d field_size: %d\n",
+			     filter->action, filter->num_fields, fields_size);
 	}
 
 	acx_size = ALIGN(sizeof(*acx) + fields_size, 4);
@@ -1791,7 +1790,7 @@ int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable,
 
 	ret = wl1271_cmd_configure(wl, ACX_SET_RX_DATA_FILTER, acx, acx_size);
 	if (ret < 0) {
-		wl1271_warning("setting rx filter failed: %d", ret);
+		wl1271_warn("setting rx filter failed: %d\n", ret);
 		goto out;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c
index 0fda500..2cefdbf 100644
--- a/drivers/net/wireless/ti/wlcore/boot.c
+++ b/drivers/net/wireless/ti/wlcore/boot.c
@@ -62,7 +62,7 @@ static int wlcore_boot_parse_fw_ver(struct wl1271 *wl,
 		     &wl->chip.fw_ver[4]);
 
 	if (ret != 5) {
-		wl1271_warning("fw version incorrect value");
+		wl1271_warn("fw version incorrect value\n");
 		memset(wl->chip.fw_ver, 0, sizeof(wl->chip.fw_ver));
 		ret = -EINVAL;
 		goto out;
@@ -112,19 +112,19 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
 
 	/* whal_FwCtrl_LoadFwImageSm() */
 
-	wl1271_debug(DEBUG_BOOT, "starting firmware upload");
+	wl1271_debug(DEBUG_BOOT, "starting firmware upload\n");
 
-	wl1271_debug(DEBUG_BOOT, "fw_data_len %zd chunk_size %d",
+	wl1271_debug(DEBUG_BOOT, "fw_data_len %zd chunk_size %d\n",
 		     fw_data_len, CHUNK_SIZE);
 
 	if ((fw_data_len % 4) != 0) {
-		wl1271_error("firmware length not multiple of four");
+		wl1271_err("firmware length not multiple of four\n");
 		return -EIO;
 	}
 
 	chunk = kmalloc(CHUNK_SIZE, GFP_KERNEL);
 	if (!chunk) {
-		wl1271_error("allocation for firmware upload chunk failed");
+		wl1271_err("allocation for firmware upload chunk failed\n");
 		return -ENOMEM;
 	}
 
@@ -151,7 +151,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
 		addr = dest + chunk_num * CHUNK_SIZE;
 		p = buf + chunk_num * CHUNK_SIZE;
 		memcpy(chunk, p, CHUNK_SIZE);
-		wl1271_debug(DEBUG_BOOT, "uploading fw chunk 0x%p to 0x%x",
+		wl1271_debug(DEBUG_BOOT, "uploading fw chunk 0x%p to 0x%x\n",
 			     p, addr);
 		wl1271_write(wl, addr, chunk, CHUNK_SIZE, false);
 
@@ -162,7 +162,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
 	addr = dest + chunk_num * CHUNK_SIZE;
 	p = buf + chunk_num * CHUNK_SIZE;
 	memcpy(chunk, p, fw_data_len % CHUNK_SIZE);
-	wl1271_debug(DEBUG_BOOT, "uploading fw last chunk (%zd B) 0x%p to 0x%x",
+	wl1271_debug(DEBUG_BOOT, "uploading fw last chunk (%zd B) 0x%p to 0x%x\n",
 		     fw_data_len % CHUNK_SIZE, p, addr);
 	wl1271_write(wl, addr, chunk, fw_data_len % CHUNK_SIZE, false);
 
@@ -180,7 +180,8 @@ int wlcore_boot_upload_firmware(struct wl1271 *wl)
 	chunks = be32_to_cpup((__be32 *) fw);
 	fw += sizeof(u32);
 
-	wl1271_debug(DEBUG_BOOT, "firmware chunks to be uploaded: %u", chunks);
+	wl1271_debug(DEBUG_BOOT, "firmware chunks to be uploaded: %u\n",
+		     chunks);
 
 	while (chunks--) {
 		addr = be32_to_cpup((__be32 *) fw);
@@ -189,10 +190,10 @@ int wlcore_boot_upload_firmware(struct wl1271 *wl)
 		fw += sizeof(u32);
 
 		if (len > 300000) {
-			wl1271_info("firmware chunk too long: %u", len);
+			wl1271_info("firmware chunk too long: %u\n", len);
 			return -EINVAL;
 		}
-		wl1271_debug(DEBUG_BOOT, "chunk %d addr 0x%x len %u",
+		wl1271_debug(DEBUG_BOOT, "chunk %d addr 0x%x len %u\n",
 			     chunks, addr, len);
 		ret = wl1271_boot_upload_firmware_chunk(wl, fw, len, addr);
 		if (ret != 0)
@@ -212,7 +213,7 @@ int wlcore_boot_upload_nvs(struct wl1271 *wl)
 	u8 *nvs_ptr, *nvs_aligned;
 
 	if (wl->nvs == NULL) {
-		wl1271_error("NVS file is needed during boot");
+		wl1271_err("NVS file is needed during boot\n");
 		return -ENODEV;
 	}
 
@@ -233,8 +234,8 @@ int wlcore_boot_upload_nvs(struct wl1271 *wl)
 		if (wl->nvs_len != sizeof(struct wl1271_nvs_file) &&
 		    (wl->nvs_len != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
 		     wl->enable_11a)) {
-			wl1271_error("nvs size is not as expected: %zu != %zu",
-				wl->nvs_len, sizeof(struct wl1271_nvs_file));
+			wl1271_err("nvs size is not as expected: %zu != %zu\n",
+				   wl->nvs_len, sizeof(struct wl1271_nvs_file));
 			kfree(wl->nvs);
 			wl->nvs = NULL;
 			wl->nvs_len = 0;
@@ -251,9 +252,9 @@ int wlcore_boot_upload_nvs(struct wl1271 *wl)
 			if (nvs->general_params.dual_mode_select)
 				wl->enable_11a = true;
 		} else {
-			wl1271_error("nvs size is not as expected: %zu != %zu",
-				     wl->nvs_len,
-				     sizeof(struct wl128x_nvs_file));
+			wl1271_err("nvs size is not as expected: %zu != %zu\n",
+				   wl->nvs_len,
+				   sizeof(struct wl128x_nvs_file));
 			kfree(wl->nvs);
 			wl->nvs = NULL;
 			wl->nvs_len = 0;
@@ -305,7 +306,7 @@ int wlcore_boot_upload_nvs(struct wl1271 *wl)
 			       | (nvs_ptr[2] << 16) | (nvs_ptr[3] << 24));
 
 			wl1271_debug(DEBUG_BOOT,
-				     "nvs burst write 0x%x: 0x%x",
+				     "nvs burst write 0x%x: 0x%x\n",
 				     dest_addr, val);
 			wl1271_write32(wl, dest_addr, val);
 
@@ -348,7 +349,7 @@ int wlcore_boot_upload_nvs(struct wl1271 *wl)
 	return 0;
 
 out_badnvs:
-	wl1271_error("nvs data is malformed");
+	wl1271_err("nvs data is malformed\n");
 	return -EILSEQ;
 }
 EXPORT_SYMBOL_GPL(wlcore_boot_upload_nvs);
@@ -365,10 +366,11 @@ int wlcore_boot_run_firmware(struct wl1271 *wl)
 
 	chip_id = wlcore_read_reg(wl, REG_CHIP_ID_B);
 
-	wl1271_debug(DEBUG_BOOT, "chip id after firmware boot: 0x%x", chip_id);
+	wl1271_debug(DEBUG_BOOT, "chip id after firmware boot: 0x%x\n",
+		     chip_id);
 
 	if (chip_id != wl->chip.id) {
-		wl1271_error("chip id doesn't match after firmware boot");
+		wl1271_err("chip id doesn't match after firmware boot\n");
 		return -EIO;
 	}
 
@@ -379,8 +381,7 @@ int wlcore_boot_run_firmware(struct wl1271 *wl)
 		intr = wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR);
 
 		if (intr == 0xffffffff) {
-			wl1271_error("error reading hardware complete "
-				     "init indication");
+			wl1271_err("error reading hardware complete init indication\n");
 			return -EIO;
 		}
 		/* check that ACX_INTR_INIT_COMPLETE is enabled */
@@ -392,26 +393,25 @@ int wlcore_boot_run_firmware(struct wl1271 *wl)
 	}
 
 	if (loop > INIT_LOOP) {
-		wl1271_error("timeout waiting for the hardware to "
-			     "complete initialization");
+		wl1271_err("timeout waiting for the hardware to complete initialization\n");
 		return -EIO;
 	}
 
 	/* get hardware config command mail box */
 	wl->cmd_box_addr = wlcore_read_reg(wl, REG_COMMAND_MAILBOX_PTR);
 
-	wl1271_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x", wl->cmd_box_addr);
+	wl1271_debug(DEBUG_MAILBOX, "cmd_box_addr 0x%x\n", wl->cmd_box_addr);
 
 	/* get hardware config event mail box */
 	wl->mbox_ptr[0] = wlcore_read_reg(wl, REG_EVENT_MAILBOX_PTR);
 	wl->mbox_ptr[1] = wl->mbox_ptr[0] + sizeof(struct event_mailbox);
 
-	wl1271_debug(DEBUG_MAILBOX, "MBOX ptrs: 0x%x 0x%x",
+	wl1271_debug(DEBUG_MAILBOX, "MBOX ptrs: 0x%x 0x%x\n",
 		     wl->mbox_ptr[0], wl->mbox_ptr[1]);
 
 	ret = wlcore_boot_static_data(wl);
 	if (ret < 0) {
-		wl1271_error("error getting static data");
+		wl1271_err("error getting static data\n");
 		return ret;
 	}
 
@@ -440,7 +440,7 @@ int wlcore_boot_run_firmware(struct wl1271 *wl)
 
 	ret = wl1271_event_unmask(wl);
 	if (ret < 0) {
-		wl1271_error("EVENT mask setting failed");
+		wl1271_err("EVENT mask setting failed\n");
 		return ret;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 885364c..c90b339 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -78,7 +78,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
 	intr = wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR);
 	while (!(intr & WL1271_ACX_INTR_CMD_COMPLETE)) {
 		if (time_after(jiffies, timeout)) {
-			wl1271_error("command complete timeout");
+			wl1271_err("command complete timeout\n");
 			ret = -ETIMEDOUT;
 			goto fail;
 		}
@@ -99,7 +99,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
 
 	status = le16_to_cpu(cmd->status);
 	if (status != CMD_STATUS_SUCCESS) {
-		wl1271_error("command execute failure %d", status);
+		wl1271_err("command execute failure %d\n", status);
 		ret = -EIO;
 		goto fail;
 	}
@@ -132,7 +132,7 @@ static int wl1271_cmd_wait_for_event_or_timeout(struct wl1271 *wl, u32 mask)
 
 	do {
 		if (time_after(jiffies, timeout)) {
-			wl1271_debug(DEBUG_CMD, "timeout waiting for event %d",
+			wl1271_debug(DEBUG_CMD, "timeout waiting for event %d\n",
 				     (int)mask);
 			ret = -ETIMEDOUT;
 			goto out;
@@ -173,7 +173,7 @@ int wl12xx_cmd_role_enable(struct wl1271 *wl, u8 *addr, u8 role_type,
 	struct wl12xx_cmd_role_enable *cmd;
 	int ret;
 
-	wl1271_debug(DEBUG_CMD, "cmd role enable");
+	wl1271_debug(DEBUG_CMD, "cmd role enable\n");
 
 	if (WARN_ON(*role_id != WL12XX_INVALID_ROLE_ID))
 		return -EBUSY;
@@ -196,7 +196,7 @@ int wl12xx_cmd_role_enable(struct wl1271 *wl, u8 *addr, u8 role_type,
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_ENABLE, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role enable");
+		wl1271_err("failed to initiate cmd role enable\n");
 		goto out_free;
 	}
 
@@ -215,7 +215,7 @@ int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id)
 	struct wl12xx_cmd_role_disable *cmd;
 	int ret;
 
-	wl1271_debug(DEBUG_CMD, "cmd role disable");
+	wl1271_debug(DEBUG_CMD, "cmd role disable\n");
 
 	if (WARN_ON(*role_id == WL12XX_INVALID_ROLE_ID))
 		return -ENOENT;
@@ -229,7 +229,7 @@ int wl12xx_cmd_role_disable(struct wl1271 *wl, u8 *role_id)
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_DISABLE, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role disable");
+		wl1271_err("failed to initiate cmd role disable\n");
 		goto out_free;
 	}
 
@@ -321,7 +321,7 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl,
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id);
+	wl1271_debug(DEBUG_CMD, "cmd role start dev %d\n", wlvif->dev_role_id);
 
 	cmd->role_id = wlvif->dev_role_id;
 	if (wlvif->band == IEEE80211_BAND_5GHZ)
@@ -336,12 +336,12 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl,
 	cmd->device.hlid = wlvif->dev_hlid;
 	cmd->device.session = wl12xx_get_new_session_id(wl, wlvif);
 
-	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d",
+	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d\n",
 		     cmd->role_id, cmd->device.hlid, cmd->device.session);
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role enable");
+		wl1271_err("failed to initiate cmd role enable\n");
 		goto err_hlid;
 	}
 
@@ -373,7 +373,7 @@ static int wl12xx_cmd_role_stop_dev(struct wl1271 *wl,
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_CMD, "cmd role stop dev");
+	wl1271_debug(DEBUG_CMD, "cmd role stop dev\n");
 
 	cmd->role_id = wlvif->dev_role_id;
 	cmd->disc_type = DISCONNECT_IMMEDIATE;
@@ -381,13 +381,13 @@ static int wl12xx_cmd_role_stop_dev(struct wl1271 *wl,
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role stop");
+		wl1271_err("failed to initiate cmd role stop\n");
 		goto out_free;
 	}
 
 	ret = wl1271_cmd_wait_for_event(wl, ROLE_STOP_COMPLETE_EVENT_ID);
 	if (ret < 0) {
-		wl1271_error("cmd role stop dev event completion error");
+		wl1271_err("cmd role stop dev event completion error\n");
 		goto out_free;
 	}
 
@@ -412,7 +412,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id);
+	wl1271_debug(DEBUG_CMD, "cmd role start sta %d\n", wlvif->role_id);
 
 	cmd->role_id = wlvif->role_id;
 	if (wlvif->band == IEEE80211_BAND_5GHZ)
@@ -436,14 +436,13 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	cmd->sta.session = wl12xx_get_new_session_id(wl, wlvif);
 	cmd->sta.remote_rates = cpu_to_le32(wlvif->rate_set);
 
-	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
-		     "basic_rate_set: 0x%x, remote_rates: 0x%x",
+	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d basic_rate_set: 0x%x, remote_rates: 0x%x\n",
 		     wlvif->role_id, cmd->sta.hlid, cmd->sta.session,
 		     wlvif->basic_rate_set, wlvif->rate_set);
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role start sta");
+		wl1271_err("failed to initiate cmd role start sta\n");
 		goto err_hlid;
 	}
 
@@ -475,7 +474,7 @@ int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_CMD, "cmd role stop sta %d", wlvif->role_id);
+	wl1271_debug(DEBUG_CMD, "cmd role stop sta %d\n", wlvif->role_id);
 
 	cmd->role_id = wlvif->role_id;
 	cmd->disc_type = DISCONNECT_IMMEDIATE;
@@ -483,7 +482,7 @@ int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role stop sta");
+		wl1271_err("failed to initiate cmd role stop sta\n");
 		goto out_free;
 	}
 
@@ -504,11 +503,11 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	u32 supported_rates;
 	int ret;
 
-	wl1271_debug(DEBUG_CMD, "cmd role start ap %d", wlvif->role_id);
+	wl1271_debug(DEBUG_CMD, "cmd role start ap %d\n", wlvif->role_id);
 
 	/* trying to use hidden SSID with an old hostapd version */
 	if (wlvif->ssid_len == 0 && !bss_conf->hidden_ssid) {
-		wl1271_error("got a null SSID from beacon/bss");
+		wl1271_err("got a null SSID from beacon/bss\n");
 		ret = -EINVAL;
 		goto out;
 	}
@@ -555,7 +554,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	supported_rates = CONF_TX_AP_ENABLED_RATES | CONF_TX_MCS_RATES |
 		wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif);
 
-	wl1271_debug(DEBUG_CMD, "cmd role start ap with supported_rates 0x%08x",
+	wl1271_debug(DEBUG_CMD, "cmd role start ap with supported_rates 0x%08x\n",
 		     supported_rates);
 
 	cmd->ap.local_rates = cpu_to_le32(supported_rates);
@@ -568,14 +567,14 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		cmd->band = WLCORE_BAND_5GHZ;
 		break;
 	default:
-		wl1271_warning("ap start - unknown band: %d", (int)wlvif->band);
+		wl1271_warn("ap start - unknown band: %d\n", (int)wlvif->band);
 		cmd->band = WLCORE_BAND_2_4GHZ;
 		break;
 	}
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role start ap");
+		wl1271_err("failed to initiate cmd role start ap\n");
 		goto out_free_bcast;
 	}
 
@@ -605,13 +604,13 @@ int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_CMD, "cmd role stop ap %d", wlvif->role_id);
+	wl1271_debug(DEBUG_CMD, "cmd role stop ap %d\n", wlvif->role_id);
 
 	cmd->role_id = wlvif->role_id;
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_STOP, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role stop ap");
+		wl1271_err("failed to initiate cmd role stop ap\n");
 		goto out_free;
 	}
 
@@ -638,7 +637,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id);
+	wl1271_debug(DEBUG_CMD, "cmd role start ibss %d\n", wlvif->role_id);
 
 	cmd->role_id = wlvif->role_id;
 	if (wlvif->band == IEEE80211_BAND_5GHZ)
@@ -661,17 +660,16 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	cmd->ibss.hlid = wlvif->sta.hlid;
 	cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set);
 
-	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
-		     "basic_rate_set: 0x%x, remote_rates: 0x%x",
+	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d basic_rate_set: 0x%x, remote_rates: 0x%x\n",
 		     wlvif->role_id, cmd->sta.hlid, cmd->sta.session,
 		     wlvif->basic_rate_set, wlvif->rate_set);
 
-	wl1271_debug(DEBUG_CMD, "vif->bss_conf.bssid = %pM",
+	wl1271_debug(DEBUG_CMD, "vif->bss_conf.bssid = %pM\n",
 		     vif->bss_conf.bssid);
 
 	ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd role enable");
+		wl1271_err("failed to initiate cmd role enable\n");
 		goto err_hlid;
 	}
 
@@ -702,7 +700,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer)
 	int ret;
 	size_t res_len = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd test");
+	wl1271_debug(DEBUG_CMD, "cmd test\n");
 
 	if (answer)
 		res_len = buf_len;
@@ -710,7 +708,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer)
 	ret = wl1271_cmd_send(wl, CMD_TEST, buf, buf_len, res_len);
 
 	if (ret < 0) {
-		wl1271_warning("TEST command failed");
+		wl1271_warn("TEST command failed\n");
 		return ret;
 	}
 
@@ -731,7 +729,7 @@ int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len)
 	struct acx_header *acx = buf;
 	int ret;
 
-	wl1271_debug(DEBUG_CMD, "cmd interrogate");
+	wl1271_debug(DEBUG_CMD, "cmd interrogate\n");
 
 	acx->id = cpu_to_le16(id);
 
@@ -740,7 +738,7 @@ int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len)
 
 	ret = wl1271_cmd_send(wl, CMD_INTERROGATE, acx, sizeof(*acx), len);
 	if (ret < 0)
-		wl1271_error("INTERROGATE command failed");
+		wl1271_err("INTERROGATE command failed\n");
 
 	return ret;
 }
@@ -758,7 +756,7 @@ int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len)
 	struct acx_header *acx = buf;
 	int ret;
 
-	wl1271_debug(DEBUG_CMD, "cmd configure (%d)", id);
+	wl1271_debug(DEBUG_CMD, "cmd configure (%d)\n", id);
 
 	acx->id = cpu_to_le16(id);
 
@@ -767,7 +765,7 @@ int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len)
 
 	ret = wl1271_cmd_send(wl, CMD_CONFIGURE, acx, len, 0);
 	if (ret < 0) {
-		wl1271_warning("CONFIGURE command NOK");
+		wl1271_warn("CONFIGURE command NOK\n");
 		return ret;
 	}
 
@@ -781,7 +779,7 @@ int wl1271_cmd_data_path(struct wl1271 *wl, bool enable)
 	int ret;
 	u16 cmd_rx, cmd_tx;
 
-	wl1271_debug(DEBUG_CMD, "cmd data path");
+	wl1271_debug(DEBUG_CMD, "cmd data path\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -802,22 +800,22 @@ int wl1271_cmd_data_path(struct wl1271 *wl, bool enable)
 
 	ret = wl1271_cmd_send(wl, cmd_rx, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("rx %s cmd for channel %d failed",
-			     enable ? "start" : "stop", cmd->channel);
+		wl1271_err("rx %s cmd for channel %d failed\n",
+			   enable ? "start" : "stop", cmd->channel);
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_BOOT, "rx %s cmd channel %d",
+	wl1271_debug(DEBUG_BOOT, "rx %s cmd channel %d\n",
 		     enable ? "start" : "stop", cmd->channel);
 
 	ret = wl1271_cmd_send(wl, cmd_tx, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("tx %s cmd for channel %d failed",
-			     enable ? "start" : "stop", cmd->channel);
+		wl1271_err("tx %s cmd for channel %d failed\n",
+			   enable ? "start" : "stop", cmd->channel);
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_BOOT, "tx %s cmd channel %d",
+	wl1271_debug(DEBUG_BOOT, "tx %s cmd channel %d\n",
 		     enable ? "start" : "stop", cmd->channel);
 
 out:
@@ -832,7 +830,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_cmd_ps_params *ps_params = NULL;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd set ps mode");
+	wl1271_debug(DEBUG_CMD, "cmd set ps mode\n");
 
 	ps_params = kzalloc(sizeof(*ps_params), GFP_KERNEL);
 	if (!ps_params) {
@@ -847,7 +845,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	ret = wl1271_cmd_send(wl, CMD_SET_PS_MODE, ps_params,
 			      sizeof(*ps_params), 0);
 	if (ret < 0) {
-		wl1271_error("cmd set_ps_mode failed");
+		wl1271_err("cmd set_ps_mode failed\n");
 		goto out;
 	}
 
@@ -863,7 +861,7 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u8 role_id,
 	struct wl1271_cmd_template_set *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd template_set %d (role %d)",
+	wl1271_debug(DEBUG_CMD, "cmd template_set %d (role %d)\n",
 		     template_id, role_id);
 
 	WARN_ON(buf_len > WL1271_CMD_TEMPL_MAX_SIZE);
@@ -889,7 +887,7 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u8 role_id,
 
 	ret = wl1271_cmd_send(wl, CMD_SET_TEMPLATE, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_warning("cmd set_template failed: %d", ret);
+		wl1271_warn("cmd set_template failed: %d\n", ret);
 		goto out_free;
 	}
 
@@ -927,7 +925,7 @@ int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 out:
 	dev_kfree_skb(skb);
 	if (ret)
-		wl1271_warning("cmd buld null data failed %d", ret);
+		wl1271_warn("cmd buld null data failed %d\n", ret);
 
 	return ret;
 
@@ -952,7 +950,7 @@ int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
 out:
 	dev_kfree_skb(skb);
 	if (ret)
-		wl1271_warning("cmd build klv null data failed %d", ret);
+		wl1271_warn("cmd build klv null data failed %d\n", ret);
 
 	return ret;
 
@@ -1038,7 +1036,7 @@ struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl,
 					      skb->data, skb->len, 0, rate);
 
 	if (ret < 0)
-		wl1271_error("Unable to set ap probe request template.");
+		wl1271_err("Unable to set ap probe request template\n");
 
 out:
 	return skb;
@@ -1057,7 +1055,7 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	skb = dev_alloc_skb(sizeof(*hdr) + sizeof(__le16) + sizeof(*tmpl) +
 			    WL1271_EXTRA_SPACE_MAX);
 	if (!skb) {
-		wl1271_error("failed to allocate buffer for arp rsp template");
+		wl1271_err("failed to allocate buffer for arp rsp template\n");
 		return -ENOMEM;
 	}
 
@@ -1097,8 +1095,8 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		extra = 0;
 		break;
 	default:
-		wl1271_warning("Unknown encryption type: %d",
-			       wlvif->encryption_type);
+		wl1271_warn("Unknown encryption type: %d\n",
+			    wlvif->encryption_type);
 		ret = -EINVAL;
 		goto out;
 	}
@@ -1165,7 +1163,7 @@ int wl12xx_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid)
 	struct wl1271_cmd_set_keys *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd set_default_wep_key %d", id);
+	wl1271_debug(DEBUG_CMD, "cmd set_default_wep_key %d\n", id);
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1181,7 +1179,7 @@ int wl12xx_cmd_set_default_wep_key(struct wl1271 *wl, u8 id, u8 hlid)
 
 	ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_warning("cmd set_default_wep_key failed: %d", ret);
+		wl1271_warn("cmd set_default_wep_key failed: %d\n", ret);
 		goto out;
 	}
 
@@ -1246,7 +1244,7 @@ int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_warning("could not set keys");
+		wl1271_warn("could not set keys\n");
 	goto out;
 	}
 
@@ -1282,8 +1280,8 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		lid_type = UNICAST_LID_TYPE;
 	}
 
-	wl1271_debug(DEBUG_CRYPT, "ap key action: %d id: %d lid: %d type: %d"
-		     " hlid: %d", (int)action, (int)id, (int)lid_type,
+	wl1271_debug(DEBUG_CRYPT, "ap key action: %d id: %d lid: %d type: %d hlid: %d\n",
+		     (int)action, (int)id, (int)lid_type,
 		     (int)key_type, (int)hlid);
 
 	cmd->lid_key_type = lid_type;
@@ -1313,7 +1311,7 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_send(wl, CMD_SET_KEYS, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_warning("could not set ap keys");
+		wl1271_warn("could not set ap keys\n");
 		goto out;
 	}
 
@@ -1327,7 +1325,7 @@ int wl12xx_cmd_set_peer_state(struct wl1271 *wl, u8 hlid)
 	struct wl12xx_cmd_set_peer_state *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd set peer state (hlid=%d)", hlid);
+	wl1271_debug(DEBUG_CMD, "cmd set peer state (hlid=%d)\n", hlid);
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1340,7 +1338,7 @@ int wl12xx_cmd_set_peer_state(struct wl1271 *wl, u8 hlid)
 
 	ret = wl1271_cmd_send(wl, CMD_SET_PEER_STATE, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send set peer state command");
+		wl1271_err("failed to send set peer state command\n");
 		goto out_free;
 	}
 
@@ -1358,7 +1356,7 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	int i, ret;
 	u32 sta_rates;
 
-	wl1271_debug(DEBUG_CMD, "cmd add peer %d", (int)hlid);
+	wl1271_debug(DEBUG_CMD, "cmd add peer %d\n", (int)hlid);
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1392,12 +1390,12 @@ int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		cpu_to_le32(wl1271_tx_enabled_rates_get(wl, sta_rates,
 							wlvif->band));
 
-	wl1271_debug(DEBUG_CMD, "new peer rates=0x%x queues=0x%x",
+	wl1271_debug(DEBUG_CMD, "new peer rates=0x%x queues=0x%x\n",
 		     cmd->supported_rates, sta->uapsd_queues);
 
 	ret = wl1271_cmd_send(wl, CMD_ADD_PEER, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd add peer");
+		wl1271_err("failed to initiate cmd add peer\n");
 		goto out_free;
 	}
 
@@ -1413,7 +1411,7 @@ int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid)
 	struct wl12xx_cmd_remove_peer *cmd;
 	int ret;
 
-	wl1271_debug(DEBUG_CMD, "cmd remove peer %d", (int)hlid);
+	wl1271_debug(DEBUG_CMD, "cmd remove peer %d\n", (int)hlid);
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1428,7 +1426,7 @@ int wl12xx_cmd_remove_peer(struct wl1271 *wl, u8 hlid)
 
 	ret = wl1271_cmd_send(wl, CMD_REMOVE_PEER, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to initiate cmd remove peer");
+		wl1271_err("failed to initiate cmd remove peer\n");
 		goto out_free;
 	}
 
@@ -1451,7 +1449,7 @@ int wl12xx_cmd_config_fwlog(struct wl1271 *wl)
 	struct wl12xx_cmd_config_fwlog *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd config firmware logger");
+	wl1271_debug(DEBUG_CMD, "cmd config firmware logger\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1467,7 +1465,7 @@ int wl12xx_cmd_config_fwlog(struct wl1271 *wl)
 
 	ret = wl1271_cmd_send(wl, CMD_CONFIG_FWLOGGER, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send config firmware logger command");
+		wl1271_err("failed to send config firmware logger command\n");
 		goto out_free;
 	}
 
@@ -1483,7 +1481,7 @@ int wl12xx_cmd_start_fwlog(struct wl1271 *wl)
 	struct wl12xx_cmd_start_fwlog *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd start firmware logger");
+	wl1271_debug(DEBUG_CMD, "cmd start firmware logger\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1493,7 +1491,7 @@ int wl12xx_cmd_start_fwlog(struct wl1271 *wl)
 
 	ret = wl1271_cmd_send(wl, CMD_START_FWLOGGER, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send start firmware logger command");
+		wl1271_err("failed to send start firmware logger command\n");
 		goto out_free;
 	}
 
@@ -1509,7 +1507,7 @@ int wl12xx_cmd_stop_fwlog(struct wl1271 *wl)
 	struct wl12xx_cmd_stop_fwlog *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd stop firmware logger");
+	wl1271_debug(DEBUG_CMD, "cmd stop firmware logger\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1519,7 +1517,7 @@ int wl12xx_cmd_stop_fwlog(struct wl1271 *wl)
 
 	ret = wl1271_cmd_send(wl, CMD_STOP_FWLOGGER, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send stop firmware logger command");
+		wl1271_err("failed to send stop firmware logger command\n");
 		goto out_free;
 	}
 
@@ -1536,7 +1534,7 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl12xx_cmd_roc *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd roc %d (%d)", wlvif->channel, role_id);
+	wl1271_debug(DEBUG_CMD, "cmd roc %d (%d)\n", wlvif->channel, role_id);
 
 	if (WARN_ON(role_id == WL12XX_INVALID_ROLE_ID))
 		return -EINVAL;
@@ -1557,7 +1555,7 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		cmd->band = WLCORE_BAND_5GHZ;
 		break;
 	default:
-		wl1271_error("roc - unknown band: %d", (int)wlvif->band);
+		wl1271_err("roc - unknown band: %d\n", (int)wlvif->band);
 		ret = -EINVAL;
 		goto out_free;
 	}
@@ -1565,7 +1563,7 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 	ret = wl1271_cmd_send(wl, CMD_REMAIN_ON_CHANNEL, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send ROC command");
+		wl1271_err("failed to send ROC command\n");
 		goto out_free;
 	}
 
@@ -1581,7 +1579,7 @@ static int wl12xx_cmd_croc(struct wl1271 *wl, u8 role_id)
 	struct wl12xx_cmd_croc *cmd;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd croc (%d)", role_id);
+	wl1271_debug(DEBUG_CMD, "cmd croc (%d)\n", role_id);
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1593,7 +1591,7 @@ static int wl12xx_cmd_croc(struct wl1271 *wl, u8 role_id)
 	ret = wl1271_cmd_send(wl, CMD_CANCEL_REMAIN_ON_CHANNEL, cmd,
 			      sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send ROC command");
+		wl1271_err("failed to send ROC command\n");
 		goto out_free;
 	}
 
@@ -1623,7 +1621,7 @@ int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id)
 		ret = wl1271_cmd_wait_for_event(wl,
 					   REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID);
 		if (ret < 0) {
-			wl1271_error("cmd roc event completion error");
+			wl1271_err("cmd roc event completion error\n");
 			goto out;
 		}
 	}
@@ -1664,7 +1662,7 @@ int wl12xx_cmd_channel_switch(struct wl1271 *wl,
 	struct wl12xx_cmd_channel_switch *cmd;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "cmd channel switch");
+	wl1271_debug(DEBUG_ACX, "cmd channel switch\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1682,7 +1680,7 @@ int wl12xx_cmd_channel_switch(struct wl1271 *wl,
 
 	ret = wl1271_cmd_send(wl, CMD_CHANNEL_SWITCH, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send channel switch command");
+		wl1271_err("failed to send channel switch command\n");
 		goto out_free;
 	}
 
@@ -1698,7 +1696,7 @@ int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl)
 	struct wl12xx_cmd_stop_channel_switch *cmd;
 	int ret;
 
-	wl1271_debug(DEBUG_ACX, "cmd stop channel switch");
+	wl1271_debug(DEBUG_ACX, "cmd stop channel switch\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -1708,7 +1706,7 @@ int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl)
 
 	ret = wl1271_cmd_send(wl, CMD_STOP_CHANNEL_SWICTH, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("failed to stop channel switch command");
+		wl1271_err("failed to stop channel switch command\n");
 		goto out_free;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/debug.h b/drivers/net/wireless/ti/wlcore/debug.h
index 6b800b3..83b72c2 100644
--- a/drivers/net/wireless/ti/wlcore/debug.h
+++ b/drivers/net/wireless/ti/wlcore/debug.h
@@ -61,22 +61,22 @@ extern u32 wl12xx_debug_level;
 
 #define DEBUG_DUMP_LIMIT 1024
 
-#define wl1271_error(fmt, arg...) \
-	pr_err(DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
+#define wl1271_err(fmt, arg...)				\
+	pr_err(DRIVER_PREFIX "ERROR " fmt, ##arg)
 
-#define wl1271_warning(fmt, arg...) \
-	pr_warning(DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
+#define wl1271_warn(fmt, arg...)				\
+	pr_warn(DRIVER_PREFIX "WARNING " fmt, ##arg)
 
-#define wl1271_notice(fmt, arg...) \
-	pr_info(DRIVER_PREFIX fmt "\n", ##arg)
+#define wl1271_notice(fmt, arg...)		\
+	pr_info(DRIVER_PREFIX fmt, ##arg)
 
-#define wl1271_info(fmt, arg...) \
-	pr_info(DRIVER_PREFIX fmt "\n", ##arg)
+#define wl1271_info(fmt, arg...)		\
+	pr_info(DRIVER_PREFIX fmt, ##arg)
 
-#define wl1271_debug(level, fmt, arg...) \
-	do { \
+#define wl1271_debug(level, fmt, arg...)	\
+	do {					\
 		if (level & wl12xx_debug_level) \
-			pr_debug(DRIVER_PREFIX fmt "\n", ##arg); \
+			pr_debug(DRIVER_PREFIX fmt, ##arg); \
 	} while (0)
 
 /* TODO: use pr_debug_hex_dump when it becomes available */
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti/wlcore/debugfs.c
index 689a847..d5bbc9a 100644
--- a/drivers/net/wireless/ti/wlcore/debugfs.c
+++ b/drivers/net/wireless/ti/wlcore/debugfs.c
@@ -109,7 +109,7 @@ static void chip_op_handler(struct wl1271 *wl, unsigned long value,
 	int (*chip_op) (struct wl1271 *wl);
 
 	if (!arg) {
-		wl1271_warning("debugfs chip_op_handler with no callback");
+		wl1271_warn("debugfs chip_op_handler with no callback\n");
 		return;
 	}
 
@@ -153,12 +153,12 @@ static inline void no_write_handler(struct wl1271 *wl,
 									\
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);		\
 	if (ret < 0) {							\
-		wl1271_warning("illegal value for " #param);		\
+		wl1271_warn("illegal value for " #param);		\
 		return -EINVAL;						\
 	}								\
 									\
 	if (value < min_val || value > max_val) {			\
-		wl1271_warning(#param " is not in valid range");	\
+		wl1271_warn(#param " is not in valid range");		\
 		return -ERANGE;						\
 	}								\
 									\
@@ -209,7 +209,7 @@ static ssize_t gpio_power_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value in gpio_power");
+		wl1271_warn("illegal value in gpio_power\n");
 		return -EINVAL;
 	}
 
@@ -271,12 +271,12 @@ static ssize_t dynamic_ps_timeout_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value in dynamic_ps");
+		wl1271_warn("illegal value in dynamic_ps\n");
 		return -EINVAL;
 	}
 
 	if (value < 1 || value > 65535) {
-		wl1271_warning("dyanmic_ps_timeout is not in valid range");
+		wl1271_warn("dyanmic_ps_timeout is not in valid range\n");
 		return -ERANGE;
 	}
 
@@ -335,12 +335,12 @@ static ssize_t forced_ps_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value in forced_ps");
+		wl1271_warn("illegal value in forced_ps\n");
 		return -EINVAL;
 	}
 
 	if (value != 1 && value != 0) {
-		wl1271_warning("forced_ps should be either 0 or 1");
+		wl1271_warn("forced_ps should be either 0 or 1\n");
 		return -ERANGE;
 	}
 
@@ -403,12 +403,12 @@ static ssize_t split_scan_timeout_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value in split_scan_timeout");
+		wl1271_warn("illegal value in split_scan_timeout\n");
 		return -EINVAL;
 	}
 
 	if (value == 0)
-		wl1271_info("split scan will be disabled");
+		wl1271_info("split scan will be disabled\n");
 
 	mutex_lock(&wl->mutex);
 
@@ -641,12 +641,12 @@ static ssize_t dtim_interval_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value for dtim_interval");
+		wl1271_warn("illegal value for dtim_interval\n");
 		return -EINVAL;
 	}
 
 	if (value < 1 || value > 10) {
-		wl1271_warning("dtim value is not in valid range");
+		wl1271_warn("dtim value is not in valid range\n");
 		return -ERANGE;
 	}
 
@@ -702,12 +702,12 @@ static ssize_t suspend_dtim_interval_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value for suspend_dtim_interval");
+		wl1271_warn("illegal value for suspend_dtim_interval\n");
 		return -EINVAL;
 	}
 
 	if (value < 1 || value > 10) {
-		wl1271_warning("suspend_dtim value is not in valid range");
+		wl1271_warn("suspend_dtim value is not in valid range\n");
 		return -ERANGE;
 	}
 
@@ -757,12 +757,12 @@ static ssize_t beacon_interval_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value for beacon_interval");
+		wl1271_warn("illegal value for beacon_interval\n");
 		return -EINVAL;
 	}
 
 	if (value < 1 || value > 255) {
-		wl1271_warning("beacon interval value is not in valid range");
+		wl1271_warn("beacon interval value is not in valid range\n");
 		return -ERANGE;
 	}
 
@@ -801,13 +801,13 @@ static ssize_t rx_streaming_interval_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value in rx_streaming_interval!");
+		wl1271_warn("illegal value in rx_streaming_interval!\n");
 		return -EINVAL;
 	}
 
 	/* valid values: 0, 10-100 */
 	if (value && (value < 10 || value > 100)) {
-		wl1271_warning("value is not in range!");
+		wl1271_warn("value is not in range!\n");
 		return -ERANGE;
 	}
 
@@ -856,13 +856,13 @@ static ssize_t rx_streaming_always_write(struct file *file,
 
 	ret = kstrtoul_from_user(user_buf, count, 10, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value in rx_streaming_write!");
+		wl1271_warn("illegal value in rx_streaming_write!\n");
 		return -EINVAL;
 	}
 
 	/* valid values: 0, 10-100 */
 	if (!(value == 0 || value == 1)) {
-		wl1271_warning("value is not in valid!");
+		wl1271_warn("value is not in valid!\n");
 		return -EINVAL;
 	}
 
@@ -918,7 +918,7 @@ static ssize_t beacon_filtering_write(struct file *file,
 
 	ret = kstrtoul(buf, 0, &value);
 	if (ret < 0) {
-		wl1271_warning("illegal value for beacon_filtering!");
+		wl1271_warn("illegal value for beacon_filtering!\n");
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c
index c976f04..49217f7 100644
--- a/drivers/net/wireless/ti/wlcore/event.c
+++ b/drivers/net/wireless/ti/wlcore/event.c
@@ -120,15 +120,15 @@ static int wl1271_event_process(struct wl1271 *wl)
 	}
 
 	if (vector & PERIODIC_SCAN_REPORT_EVENT_ID) {
-		wl1271_debug(DEBUG_EVENT, "PERIODIC_SCAN_REPORT_EVENT "
-			     "(status 0x%0x)", mbox->scheduled_scan_status);
+		wl1271_debug(DEBUG_EVENT, "PERIODIC_SCAN_REPORT_EVENT (status 0x%0x)\n",
+			     mbox->scheduled_scan_status);
 
 		wl1271_scan_sched_scan_results(wl);
 	}
 
 	if (vector & PERIODIC_SCAN_COMPLETE_EVENT_ID) {
-		wl1271_debug(DEBUG_EVENT, "PERIODIC_SCAN_COMPLETE_EVENT "
-			     "(status 0x%0x)", mbox->scheduled_scan_status);
+		wl1271_debug(DEBUG_EVENT, "PERIODIC_SCAN_COMPLETE_EVENT (status 0x%0x)\n",
+			     mbox->scheduled_scan_status);
 		if (wl->sched_scanning) {
 			ieee80211_sched_scan_stopped(wl->hw);
 			wl->sched_scanning = false;
@@ -187,8 +187,7 @@ static int wl1271_event_process(struct wl1271 *wl)
 
 	if (vector & BA_SESSION_RX_CONSTRAINT_EVENT_ID) {
 		u8 role_id = mbox->role_id;
-		wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. "
-			     "ba_allowed = 0x%x, role_id=%d",
+		wl1271_debug(DEBUG_EVENT, "BA_SESSION_RX_CONSTRAINT_EVENT_ID. ba_allowed = 0x%x, role_id=%d\n",
 			     mbox->rx_ba_allowed, role_id);
 
 		wl12xx_for_each_wlvif(wl, wlvif) {
@@ -202,9 +201,8 @@ static int wl1271_event_process(struct wl1271 *wl)
 	}
 
 	if (vector & CHANNEL_SWITCH_COMPLETE_EVENT_ID) {
-		wl1271_debug(DEBUG_EVENT, "CHANNEL_SWITCH_COMPLETE_EVENT_ID. "
-					  "status = 0x%x",
-					  mbox->channel_switch_status);
+		wl1271_debug(DEBUG_EVENT, "CHANNEL_SWITCH_COMPLETE_EVENT_ID. status = 0x%x\n",
+			     mbox->channel_switch_status);
 		/*
 		 * That event uses for two cases:
 		 * 1) channel switch complete with status=0
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 1156e3f..3795568 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -85,7 +85,7 @@ static int wl12xx_set_authorized(struct wl1271 *wl,
 
 	wl12xx_croc(wl, wlvif->role_id);
 
-	wl1271_info("Association completed.");
+	wl1271_info("Association completed\n");
 	return 0;
 }
 
@@ -260,7 +260,7 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work)
 	 * time (e.g. pending Tx on the non-ROC channels)
 	 */
 	if (find_first_bit(wl->roc_map, WL12XX_MAX_ROLES) < WL12XX_MAX_ROLES) {
-		wl1271_debug(DEBUG_TX, "No Tx (in FW) for %d ms due to ROC",
+		wl1271_debug(DEBUG_TX, "No Tx (in FW) for %d ms due to ROC\n",
 			     wl->conf.tx.tx_watchdog_timeout);
 		wl12xx_rearm_tx_watchdog_locked(wl);
 		goto out;
@@ -271,7 +271,7 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work)
 	 * time
 	 */
 	if (wl->scan.state != WL1271_SCAN_STATE_IDLE) {
-		wl1271_debug(DEBUG_TX, "No Tx (in FW) for %d ms due to scan",
+		wl1271_debug(DEBUG_TX, "No Tx (in FW) for %d ms due to scan\n",
 			     wl->conf.tx.tx_watchdog_timeout);
 		wl12xx_rearm_tx_watchdog_locked(wl);
 		goto out;
@@ -284,16 +284,15 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work)
 	* stations are removed due to inactivity.
 	*/
 	if (wl->active_sta_count) {
-		wl1271_debug(DEBUG_TX, "No Tx (in FW) for %d ms. AP has "
-			     " %d stations",
-			      wl->conf.tx.tx_watchdog_timeout,
-			      wl->active_sta_count);
+		wl1271_debug(DEBUG_TX, "No Tx (in FW) for %d ms. AP has %d stations\n",
+			     wl->conf.tx.tx_watchdog_timeout,
+			     wl->active_sta_count);
 		wl12xx_rearm_tx_watchdog_locked(wl);
 		goto out;
 	}
 
-	wl1271_error("Tx stuck (in FW) for %d ms. Starting recovery",
-		     wl->conf.tx.tx_watchdog_timeout);
+	wl1271_err("Tx stuck (in FW) for %d ms. Starting recovery.\n",
+		   wl->conf.tx.tx_watchdog_timeout);
 	wl12xx_queue_recovery_work(wl);
 
 out:
@@ -315,7 +314,7 @@ static void wlcore_adjust_conf(struct wl1271 *wl)
 			wl->conf.fwlog.mem_blocks = 0;
 			wl->conf.fwlog.output = WL12XX_FWLOG_OUTPUT_NONE;
 		} else {
-			wl1271_error("Unknown fwlog parameter %s", fwlog_param);
+			wl1271_err("Unknown fwlog parameter %s\n", fwlog_param);
 		}
 	}
 }
@@ -358,7 +357,7 @@ static void wl12xx_irq_update_links_status(struct wl1271 *wl,
 	cur_fw_ps_map = le32_to_cpu(status->link_ps_bitmap);
 	if (wl->ap_fw_ps_map != cur_fw_ps_map) {
 		wl1271_debug(DEBUG_PSM,
-			     "link ps prev 0x%x cur 0x%x changed 0x%x",
+			     "link ps prev 0x%x cur 0x%x changed 0x%x\n",
 			     wl->ap_fw_ps_map, cur_fw_ps_map,
 			     wl->ap_fw_ps_map ^ cur_fw_ps_map);
 
@@ -395,8 +394,7 @@ static void wl12xx_fw_status(struct wl1271 *wl,
 	wlcore_raw_read_data(wl, REG_RAW_FW_STATUS_ADDR, status_1,
 			     status_len, false);
 
-	wl1271_debug(DEBUG_IRQ, "intr: 0x%x (fw_rx_counter = %d, "
-		     "drv_rx_counter = %d, tx_results_counter = %d)",
+	wl1271_debug(DEBUG_IRQ, "intr: 0x%x (fw_rx_counter = %d, drv_rx_counter = %d, tx_results_counter = %d)\n",
 		     status_1->intr,
 		     status_1->fw_rx_counter,
 		     status_1->drv_rx_counter,
@@ -512,7 +510,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
 
 	mutex_lock(&wl->mutex);
 
-	wl1271_debug(DEBUG_IRQ, "IRQ work");
+	wl1271_debug(DEBUG_IRQ, "IRQ work\n");
 
 	if (unlikely(wl->state == WL1271_STATE_OFF))
 		goto out;
@@ -542,7 +540,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
 		}
 
 		if (unlikely(intr & WL1271_ACX_INTR_WATCHDOG)) {
-			wl1271_error("HW watchdog interrupt received! starting recovery.");
+			wl1271_err("HW watchdog interrupt received! Starting recovery.\n");
 			wl->watchdog_recovery = true;
 			wl12xx_queue_recovery_work(wl);
 
@@ -551,8 +549,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
 		}
 
 		if (unlikely(intr & WL1271_ACX_SW_INTR_WATCHDOG)) {
-			wl1271_error("SW watchdog interrupt received! "
-				     "starting recovery.");
+			wl1271_err("SW watchdog interrupt received! Starting recovery.\n");
 			wl->watchdog_recovery = true;
 			wl12xx_queue_recovery_work(wl);
 
@@ -561,7 +558,7 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
 		}
 
 		if (likely(intr & WL1271_ACX_INTR_DATA)) {
-			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA");
+			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA\n");
 
 			wl12xx_rx(wl, wl->fw_status_1);
 
@@ -590,21 +587,21 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
 		}
 
 		if (intr & WL1271_ACX_INTR_EVENT_A) {
-			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_EVENT_A");
+			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_EVENT_A\n");
 			wl1271_event_handle(wl, 0);
 		}
 
 		if (intr & WL1271_ACX_INTR_EVENT_B) {
-			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_EVENT_B");
+			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_EVENT_B\n");
 			wl1271_event_handle(wl, 1);
 		}
 
 		if (intr & WL1271_ACX_INTR_INIT_COMPLETE)
 			wl1271_debug(DEBUG_IRQ,
-				     "WL1271_ACX_INTR_INIT_COMPLETE");
+				     "WL1271_ACX_INTR_INIT_COMPLETE\n");
 
 		if (intr & WL1271_ACX_INTR_HW_AVAILABLE)
-			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_HW_AVAILABLE");
+			wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_HW_AVAILABLE\n");
 	}
 
 	wl1271_ps_elp_sleep(wl);
@@ -679,18 +676,18 @@ static int wl12xx_fetch_firmware(struct wl1271 *wl, bool plt)
 	if (wl->fw_type == fw_type)
 		return 0;
 
-	wl1271_debug(DEBUG_BOOT, "booting firmware %s", fw_name);
+	wl1271_debug(DEBUG_BOOT, "booting firmware %s\n", fw_name);
 
 	ret = request_firmware(&fw, fw_name, wl->dev);
 
 	if (ret < 0) {
-		wl1271_error("could not get firmware %s: %d", fw_name, ret);
+		wl1271_err("could not get firmware %s: %d\n", fw_name, ret);
 		return ret;
 	}
 
 	if (fw->size % 4) {
-		wl1271_error("firmware size is not multiple of 32 bits: %zu",
-			     fw->size);
+		wl1271_err("firmware size is not multiple of 32 bits: %zu\n",
+			   fw->size);
 		ret = -EILSEQ;
 		goto out;
 	}
@@ -701,7 +698,7 @@ static int wl12xx_fetch_firmware(struct wl1271 *wl, bool plt)
 	wl->fw = vmalloc(wl->fw_len);
 
 	if (!wl->fw) {
-		wl1271_error("could not allocate memory for the firmware");
+		wl1271_err("could not allocate memory for the firmware\n");
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -723,7 +720,7 @@ static void wl1271_fetch_nvs(struct wl1271 *wl)
 	ret = request_firmware(&fw, WL12XX_NVS_NAME, wl->dev);
 
 	if (ret < 0) {
-		wl1271_debug(DEBUG_BOOT, "could not get nvs file %s: %d",
+		wl1271_debug(DEBUG_BOOT, "could not get nvs file %s: %d\n",
 			     WL12XX_NVS_NAME, ret);
 		return;
 	}
@@ -731,7 +728,7 @@ static void wl1271_fetch_nvs(struct wl1271 *wl)
 	wl->nvs = kmemdup(fw->data, fw->size, GFP_KERNEL);
 
 	if (!wl->nvs) {
-		wl1271_error("could not allocate memory for the nvs file");
+		wl1271_err("could not allocate memory for the nvs file\n");
 		goto out;
 	}
 
@@ -781,7 +778,7 @@ static void wl12xx_read_fwlog_panic(struct wl1271 *wl)
 	    (wl->conf.fwlog.mem_blocks == 0))
 		return;
 
-	wl1271_info("Reading FW panic log");
+	wl1271_info("Reading FW panic log\n");
 
 	block = kmalloc(WL12XX_HW_BLOCK_SIZE, GFP_KERNEL);
 	if (!block)
@@ -845,8 +842,7 @@ static void wl1271_recovery_work(struct work_struct *work)
 
 	/* change partitions momentarily so we can read the FW pc */
 	wlcore_set_partition(wl, &wl->ptable[PART_BOOT]);
-	wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x "
-		    "hint_sts: 0x%08x",
+	wl1271_info("Hardware recovery in progress. FW ver: %s pc: 0x%x hint_sts: 0x%08x\n",
 		    wl->chip.fw_ver_str,
 		    wlcore_read_reg(wl, REG_PC_ON_RECOVERY),
 		    wlcore_read_reg(wl, REG_INTERRUPT_NO_CLEAR));
@@ -856,7 +852,7 @@ static void wl1271_recovery_work(struct work_struct *work)
 	       !test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags));
 
 	if (no_recovery) {
-		wl1271_info("No recovery (chosen on module load). Fw will remain stuck.");
+		wl1271_info("No recovery (chosen on module load). Fw will remain stuck.\n");
 		clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
 		goto out_unlock;
 	}
@@ -998,11 +994,11 @@ int wl1271_plt_start(struct wl1271 *wl)
 
 	mutex_lock(&wl->mutex);
 
-	wl1271_notice("power up");
+	wl1271_notice("power up\n");
 
 	if (wl->state != WL1271_STATE_OFF) {
-		wl1271_error("cannot go into PLT state because not "
-			     "in off state: %d", wl->state);
+		wl1271_err("cannot go into PLT state because not in off state: %d\n",
+			   wl->state);
 		ret = -EBUSY;
 		goto out;
 	}
@@ -1019,7 +1015,7 @@ int wl1271_plt_start(struct wl1271 *wl)
 
 		wl->plt = true;
 		wl->state = WL1271_STATE_ON;
-		wl1271_notice("firmware booted in PLT mode (%s)",
+		wl1271_notice("firmware booted in PLT mode (%s)\n",
 			      wl->chip.fw_ver_str);
 
 		/* update hw/fw version info in wiphy struct */
@@ -1033,8 +1029,8 @@ power_off:
 		wl1271_power_off(wl);
 	}
 
-	wl1271_error("firmware boot in PLT mode failed despite %d retries",
-		     WL1271_BOOT_RETRIES);
+	wl1271_err("firmware boot in PLT mode failed despite %d retries\n",
+		   WL1271_BOOT_RETRIES);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -1045,7 +1041,7 @@ int wl1271_plt_stop(struct wl1271 *wl)
 {
 	int ret = 0;
 
-	wl1271_notice("power down");
+	wl1271_notice("power down\n");
 
 	/*
 	 * Interrupts must be disabled before setting the state to OFF.
@@ -1064,8 +1060,8 @@ int wl1271_plt_stop(struct wl1271 *wl)
 		 */
 		wlcore_enable_interrupts(wl);
 
-		wl1271_error("cannot power down because not in PLT "
-			     "state: %d", wl->state);
+		wl1271_err("cannot power down because not in PLT state: %d\n",
+			   wl->state);
 		ret = -EBUSY;
 		goto out;
 	}
@@ -1121,12 +1117,12 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	     (wlcore_is_queue_stopped(wl, q) &&
 	      !wlcore_is_queue_stopped_by_reason(wl, q,
 			WLCORE_QUEUE_STOP_REASON_WATERMARK))) {
-		wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d", hlid, q);
+		wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d\n", hlid, q);
 		ieee80211_free_txskb(hw, skb);
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_TX, "queue skb hlid %d q %d len %d",
+	wl1271_debug(DEBUG_TX, "queue skb hlid %d q %d len %d\n",
 		     hlid, q, skb->len);
 	skb_queue_tail(&wl->links[hlid].tx_queue[q], skb);
 
@@ -1137,7 +1133,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	 * the queue here, otherwise the queue will get too long.
 	 */
 	if (wl->tx_queue_count[q] >= WL1271_TX_QUEUE_HIGH_WATERMARK) {
-		wl1271_debug(DEBUG_TX, "op_tx: stopping queues for q %d", q);
+		wl1271_debug(DEBUG_TX, "op_tx: stopping queues for q %d\n", q);
 		wlcore_stop_queue_locked(wl, q,
 					 WLCORE_QUEUE_STOP_REASON_WATERMARK);
 	}
@@ -1200,7 +1196,7 @@ static struct sk_buff *wl12xx_alloc_dummy_packet(struct wl1271 *wl)
 
 	skb = dev_alloc_skb(TOTAL_TX_DUMMY_PACKET_SIZE);
 	if (!skb) {
-		wl1271_warning("Failed to allocate a dummy packet skb");
+		wl1271_warn("Failed to allocate a dummy packet skb\n");
 		return NULL;
 	}
 
@@ -1233,7 +1229,7 @@ wl1271_validate_wowlan_pattern(struct cfg80211_wowlan_trig_pkt_pattern *p)
 	int i, pattern_len = 0;
 
 	if (!p->mask) {
-		wl1271_warning("No mask in WoWLAN pattern");
+		wl1271_warn("No mask in WoWLAN pattern\n");
 		return -EINVAL;
 	}
 
@@ -1276,12 +1272,12 @@ wl1271_validate_wowlan_pattern(struct cfg80211_wowlan_trig_pkt_pattern *p)
 	}
 
 	if (num_fields > WL1271_RX_FILTER_MAX_FIELDS) {
-		wl1271_warning("RX Filter too complex. Too many segments");
+		wl1271_warn("RX Filter too complex. Too many segments\n");
 		return -EINVAL;
 	}
 
 	if (fields_size > WL1271_RX_FILTER_MAX_FIELDS_SIZE) {
-		wl1271_warning("RX filter pattern is too big");
+		wl1271_warn("RX filter pattern is too big\n");
 		return -E2BIG;
 	}
 
@@ -1313,7 +1309,7 @@ int wl1271_rx_filter_alloc_field(struct wl12xx_rx_filter *filter,
 	struct wl12xx_rx_filter_field *field;
 
 	if (filter->num_fields == WL1271_RX_FILTER_MAX_FIELDS) {
-		wl1271_warning("Max fields per RX filter. can't alloc another");
+		wl1271_warn("Max fields per RX filter. can't alloc another\n");
 		return -EINVAL;
 	}
 
@@ -1321,7 +1317,7 @@ int wl1271_rx_filter_alloc_field(struct wl12xx_rx_filter *filter,
 
 	field->pattern = kzalloc(len, GFP_KERNEL);
 	if (!field->pattern) {
-		wl1271_warning("Failed to allocate RX filter pattern");
+		wl1271_warn("Failed to allocate RX filter pattern\n");
 		return -ENOMEM;
 	}
 
@@ -1381,7 +1377,7 @@ static int wl1271_convert_wowlan_pattern_to_rx_filter(
 
 	filter = wl1271_rx_filter_alloc();
 	if (!filter) {
-		wl1271_warning("Failed to alloc rx filter");
+		wl1271_warn("Failed to alloc rx filter\n");
 		ret = -ENOMEM;
 		goto err;
 	}
@@ -1452,7 +1448,7 @@ static int wl1271_configure_wowlan(struct wl1271 *wl,
 	for (i = 0; i < wow->n_patterns; i++) {
 		ret = wl1271_validate_wowlan_pattern(&wow->patterns[i]);
 		if (ret) {
-			wl1271_warning("Bad wowlan pattern %d", i);
+			wl1271_warn("Bad wowlan pattern %d\n", i);
 			return ret;
 		}
 	}
@@ -1469,8 +1465,8 @@ static int wl1271_configure_wowlan(struct wl1271 *wl,
 
 		ret = wl1271_convert_wowlan_pattern_to_rx_filter(p, &filter);
 		if (ret) {
-			wl1271_warning("Failed to create an RX filter from "
-				       "wowlan pattern %d", i);
+			wl1271_warn("Failed to create an RX filter from wowlan pattern %d\n",
+				    i);
 			goto out;
 		}
 
@@ -1506,7 +1502,7 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl,
 				    wl->conf.conn.suspend_listen_interval);
 
 	if (ret < 0)
-		wl1271_error("suspend: set wake up conditions failed: %d", ret);
+		wl1271_err("suspend: set wake up conditions failed: %d\n", ret);
 
 	wl1271_ps_elp_sleep(wl);
 
@@ -1568,8 +1564,8 @@ static void wl1271_configure_resume(struct wl1271 *wl,
 				    wl->conf.conn.listen_interval);
 
 		if (ret < 0)
-			wl1271_error("resume: wake up conditions failed: %d",
-				     ret);
+			wl1271_err("resume: wake up conditions failed: %d\n",
+				   ret);
 
 	} else if (is_ap) {
 		ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false);
@@ -1596,7 +1592,7 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw,
 		ret = wl1271_configure_suspend(wl, wlvif, wow);
 		if (ret < 0) {
 			mutex_unlock(&wl->mutex);
-			wl1271_warning("couldn't prepare device to suspend");
+			wl1271_warn("couldn't prepare device to suspend\n");
 			return ret;
 		}
 	}
@@ -1815,7 +1811,7 @@ static u8 wl12xx_get_role_type(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 		return WL1271_ROLE_IBSS;
 
 	default:
-		wl1271_error("invalid bss_type: %d", wlvif->bss_type);
+		wl1271_err("invalid bss_type: %d\n", wlvif->bss_type);
 	}
 	return WL12XX_INVALID_ROLE_TYPE;
 }
@@ -1949,12 +1945,12 @@ power_off:
 	}
 
 	if (!booted) {
-		wl1271_error("firmware boot failed despite %d retries",
-			     WL1271_BOOT_RETRIES);
+		wl1271_err("firmware boot failed despite %d retries\n",
+			   WL1271_BOOT_RETRIES);
 		goto out;
 	}
 
-	wl1271_info("firmware booted (%s)", wl->chip.fw_ver_str);
+	wl1271_info("firmware booted (%s)\n", wl->chip.fw_ver_str);
 
 	/* update hw/fw version info in wiphy struct */
 	wiphy->hw_version = wl->chip.id;
@@ -2156,7 +2152,7 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
 	if (wl->state != WL1271_STATE_ON)
 		return;
 
-	wl1271_info("down");
+	wl1271_info("down\n");
 
 	if (wl->scan.state != WL1271_SCAN_STATE_IDLE &&
 	    wl->scan_vif == vif) {
@@ -2314,7 +2310,7 @@ static int wl1271_join(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	 * users who really like to roam a lot :)
 	 */
 	if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
-		wl1271_info("JOIN while associated.");
+		wl1271_info("JOIN while associated\n");
 
 	/* clear encryption type */
 	wlvif->encryption_type = KEY_NONE;
@@ -2456,8 +2452,8 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		if (is_ap) {
 			ret = wl1271_init_ap_rates(wl, wlvif);
 			if (ret < 0)
-				wl1271_error("AP rate policy change failed %d",
-					     ret);
+				wl1271_err("AP rate policy change failed %d\n",
+					   ret);
 		} else {
 			/*
 			 * FIXME: the mac80211 should really provide a fixed
@@ -2473,8 +2469,8 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 						       wlvif->basic_rate_set);
 			ret = wl1271_acx_sta_rate_policies(wl, wlvif);
 			if (ret < 0)
-				wl1271_warning("rate policy for channel "
-					       "failed %d", ret);
+				wl1271_warn("rate policy for channel failed %d\n",
+					    ret);
 
 			/*
 			 * change the ROC channel. do it only if we are
@@ -2513,23 +2509,23 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 				ps_mode_str = "auto";
 			}
 
-			wl1271_debug(DEBUG_PSM, "%s ps enabled", ps_mode_str);
+			wl1271_debug(DEBUG_PSM, "%s ps enabled\n", ps_mode_str);
 
 			ret = wl1271_ps_set_mode(wl, wlvif, ps_mode);
 
 			if (ret < 0)
-				wl1271_warning("enter %s ps failed %d",
-					       ps_mode_str, ret);
+				wl1271_warn("enter %s ps failed %d\n",
+					    ps_mode_str, ret);
 
 		} else if (!(conf->flags & IEEE80211_CONF_PS) &&
 			   test_bit(WLVIF_FLAG_IN_PS, &wlvif->flags)) {
 
-			wl1271_debug(DEBUG_PSM, "auto ps disabled");
+			wl1271_debug(DEBUG_PSM, "auto ps disabled\n");
 
 			ret = wl1271_ps_set_mode(wl, wlvif,
 						 STATION_ACTIVE_MODE);
 			if (ret < 0)
-				wl1271_warning("exit auto ps failed %d", ret);
+				wl1271_warn("exit auto ps failed %d\n", ret);
 		}
 	}
 
@@ -2553,13 +2549,12 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
 
 	channel = ieee80211_frequency_to_channel(conf->channel->center_freq);
 
-	wl1271_debug(DEBUG_MAC80211, "mac80211 config ch %d psm %s power %d %s"
-		     " changed 0x%x",
+	wl1271_debug(DEBUG_MAC80211, "mac80211 config ch %d psm %s power %d %s changed 0x%x\n",
 		     channel,
 		     conf->flags & IEEE80211_CONF_PS ? "on" : "off",
 		     conf->power_level,
 		     conf->flags & IEEE80211_CONF_IDLE ? "idle" : "in use",
-			 changed);
+		     changed);
 
 	/*
 	 * mac80211 will go to idle nearly immediately after transmitting some
@@ -2624,7 +2619,7 @@ static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw,
 
 	fp = kzalloc(sizeof(*fp), GFP_ATOMIC);
 	if (!fp) {
-		wl1271_error("Out of memory setting filters.");
+		wl1271_err("Out of memory setting filters\n");
 		return 0;
 	}
 
@@ -2661,8 +2656,8 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw,
 
 	int ret;
 
-	wl1271_debug(DEBUG_MAC80211, "mac80211 configure filter changed %x"
-		     " total %x", changed, *total);
+	wl1271_debug(DEBUG_MAC80211, "mac80211 configure filter changed %x total %x\n",
+		     changed, *total);
 
 	mutex_lock(&wl->mutex);
 
@@ -2714,7 +2709,7 @@ static int wl1271_record_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	struct wl1271_ap_key *ap_key;
 	int i;
 
-	wl1271_debug(DEBUG_CRYPT, "record ap key id %d", (int)id);
+	wl1271_debug(DEBUG_CRYPT, "record ap key id %d\n", (int)id);
 
 	if (key_size > MAX_KEY_SIZE)
 		return -EINVAL;
@@ -2728,7 +2723,7 @@ static int wl1271_record_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 			break;
 
 		if (wlvif->ap.recorded_keys[i]->id == id) {
-			wl1271_warning("trying to record key replacement");
+			wl1271_warn("trying to record key replacement\n");
 			return -EINVAL;
 		}
 	}
@@ -2910,8 +2905,8 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
 
 	wl1271_debug(DEBUG_MAC80211, "mac80211 set key");
 
-	wl1271_debug(DEBUG_CRYPT, "CMD: 0x%x sta: %p", cmd, sta);
-	wl1271_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x",
+	wl1271_debug(DEBUG_CRYPT, "CMD: 0x%x sta: %p\n", cmd, sta);
+	wl1271_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x\n",
 		     key_conf->cipher, key_conf->keyidx,
 		     key_conf->keylen, key_conf->flags);
 	wl1271_dump(DEBUG_CRYPT, "KEY: ", key_conf->key, key_conf->keylen);
@@ -2954,7 +2949,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
 		tx_seq_16 = WL1271_TX_SECURITY_LO16(wlvif->tx_security_seq);
 		break;
 	default:
-		wl1271_error("Unknown key algo 0x%x", key_conf->cipher);
+		wl1271_err("Unknown key algo 0x%x\n", key_conf->cipher);
 
 		ret = -EOPNOTSUPP;
 		goto out_sleep;
@@ -2967,7 +2962,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
 				 key_conf->keylen, key_conf->key,
 				 tx_seq_32, tx_seq_16, sta);
 		if (ret < 0) {
-			wl1271_error("Could not add or replace key");
+			wl1271_err("Could not add or replace key\n");
 			goto out_sleep;
 		}
 
@@ -2981,7 +2976,7 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
 			wlvif->encryption_type = key_type;
 			ret = wl1271_cmd_build_arp_rsp(wl, wlvif);
 			if (ret < 0) {
-				wl1271_warning("build arp rsp failed: %d", ret);
+				wl1271_warn("build arp rsp failed: %d\n", ret);
 				goto out_sleep;
 			}
 		}
@@ -2993,13 +2988,13 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd,
 				     key_conf->keylen, key_conf->key,
 				     0, 0, sta);
 		if (ret < 0) {
-			wl1271_error("Could not remove key");
+			wl1271_err("Could not remove key\n");
 			goto out_sleep;
 		}
 		break;
 
 	default:
-		wl1271_error("Unsupported key cmd 0x%x", cmd);
+		wl1271_err("Unsupported key cmd 0x%x\n", cmd);
 		ret = -EOPNOTSUPP;
 		break;
 	}
@@ -3190,7 +3185,7 @@ static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
 
 	ret = wl1271_acx_frag_threshold(wl, value);
 	if (ret < 0)
-		wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret);
+		wl1271_warn("wl1271_op_set_frag_threshold failed: %d\n", ret);
 
 	wl1271_ps_elp_sleep(wl);
 
@@ -3220,7 +3215,7 @@ static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
 	wl12xx_for_each_wlvif(wl, wlvif) {
 		ret = wl1271_acx_rts_threshold(wl, wlvif, value);
 		if (ret < 0)
-			wl1271_warning("set rts threshold failed: %d", ret);
+			wl1271_warn("set rts threshold failed: %d\n", ret);
 	}
 	wl1271_ps_elp_sleep(wl);
 
@@ -3239,13 +3234,13 @@ static int wl1271_ssid_set(struct ieee80211_vif *vif, struct sk_buff *skb,
 					 skb->len - offset);
 
 	if (!ptr) {
-		wl1271_error("No SSID in IEs!");
+		wl1271_err("No SSID in IEs!\n");
 		return -ENOENT;
 	}
 
 	ssid_len = ptr[1];
 	if (ssid_len > IEEE80211_MAX_SSID_LEN) {
-		wl1271_error("SSID is too long!");
+		wl1271_err("SSID is too long!\n");
 		return -EINVAL;
 	}
 
@@ -3306,7 +3301,7 @@ static int wl1271_ap_set_probe_resp_tmpl(struct wl1271 *wl, u32 rates,
 	if (ret < 0)
 		goto out;
 
-	wl1271_debug(DEBUG_AP, "probe response updated");
+	wl1271_debug(DEBUG_AP, "probe response updated\n");
 	set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags);
 
 out:
@@ -3334,7 +3329,7 @@ static int wl1271_ap_set_probe_resp_tmpl_legacy(struct wl1271 *wl,
 					       rates);
 
 	if (probe_rsp_len + bss_conf->ssid_len > WL1271_CMD_TEMPL_MAX_SIZE) {
-		wl1271_error("probe_rsp template too big");
+		wl1271_err("probe_rsp template too big\n");
 		return -EINVAL;
 	}
 
@@ -3344,7 +3339,7 @@ static int wl1271_ap_set_probe_resp_tmpl_legacy(struct wl1271 *wl,
 	ptr = cfg80211_find_ie(WLAN_EID_SSID, probe_rsp_data + ie_offset,
 			       probe_rsp_len - ie_offset);
 	if (!ptr) {
-		wl1271_error("No SSID in beacon!");
+		wl1271_err("No SSID in beacon!\n");
 		return -EINVAL;
 	}
 
@@ -3385,7 +3380,7 @@ static int wl1271_bss_erp_info_changed(struct wl1271 *wl,
 		else
 			ret = wl1271_acx_slot(wl, wlvif, SLOT_TIME_LONG);
 		if (ret < 0) {
-			wl1271_warning("Set slot time failed %d", ret);
+			wl1271_warn("Set slot time failed %d\n", ret);
 			goto out;
 		}
 	}
@@ -3405,7 +3400,7 @@ static int wl1271_bss_erp_info_changed(struct wl1271 *wl,
 			ret = wl1271_acx_cts_protect(wl, wlvif,
 						     CTSPROTECT_DISABLE);
 		if (ret < 0) {
-			wl1271_warning("Set ctsprotect failed %d", ret);
+			wl1271_warn("Set ctsprotect failed %d\n", ret);
 			goto out;
 		}
 	}
@@ -3432,7 +3427,7 @@ static int wlcore_set_beacon_template(struct wl1271 *wl,
 		goto out;
 	}
 
-	wl1271_debug(DEBUG_MASTER, "beacon updated");
+	wl1271_debug(DEBUG_MASTER, "beacon updated\n");
 
 	ret = wl1271_ssid_set(vif, beacon, ieoffset);
 	if (ret < 0) {
@@ -3505,8 +3500,8 @@ static int wl1271_bss_beacon_info_changed(struct wl1271 *wl,
 	int ret = 0;
 
 	if ((changed & BSS_CHANGED_BEACON_INT)) {
-		wl1271_debug(DEBUG_MASTER, "beacon interval updated: %d",
-			bss_conf->beacon_int);
+		wl1271_debug(DEBUG_MASTER, "beacon interval updated: %d\n",
+			     bss_conf->beacon_int);
 
 		wlvif->beacon_int = bss_conf->beacon_int;
 	}
@@ -3525,7 +3520,7 @@ static int wl1271_bss_beacon_info_changed(struct wl1271 *wl,
 
 out:
 	if (ret != 0)
-		wl1271_error("beacon info change failed: %d", ret);
+		wl1271_err("beacon info change failed: %d\n", ret);
 	return ret;
 }
 
@@ -3548,7 +3543,7 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
 
 		ret = wl1271_init_ap_rates(wl, wlvif);
 		if (ret < 0) {
-			wl1271_error("AP rate policy change failed %d", ret);
+			wl1271_err("AP rate policy change failed %d\n", ret);
 			goto out;
 		}
 
@@ -3581,7 +3576,7 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
 					goto out;
 
 				set_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags);
-				wl1271_debug(DEBUG_AP, "started AP");
+				wl1271_debug(DEBUG_AP, "started AP\n");
 			}
 		} else {
 			if (test_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags)) {
@@ -3592,7 +3587,7 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
 				clear_bit(WLVIF_FLAG_AP_STARTED, &wlvif->flags);
 				clear_bit(WLVIF_FLAG_AP_PROBE_RESP_SET,
 					  &wlvif->flags);
-				wl1271_debug(DEBUG_AP, "stopped AP");
+				wl1271_debug(DEBUG_AP, "stopped AP\n");
 			}
 		}
 	}
@@ -3607,7 +3602,7 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
 		ret = wl1271_acx_set_ht_information(wl, wlvif,
 					bss_conf->ht_operation_mode);
 		if (ret < 0) {
-			wl1271_warning("Set ht information failed %d", ret);
+			wl1271_warn("Set ht information failed %d\n", ret);
 			goto out;
 		}
 	}
@@ -3658,7 +3653,7 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
 		do_join = true;
 
 	if ((changed & BSS_CHANGED_BEACON_ENABLED) && ibss_joined) {
-		wl1271_debug(DEBUG_ADHOC, "ad-hoc beaconing: %s",
+		wl1271_debug(DEBUG_ADHOC, "ad-hoc beaconing: %s\n",
 			     bss_conf->enable_beacon ? "enabled" : "disabled");
 
 		do_join = true;
@@ -3667,7 +3662,7 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
 	if (changed & BSS_CHANGED_IDLE && !is_ibss) {
 		ret = wl1271_sta_handle_idle(wl, wlvif, bss_conf->idle);
 		if (ret < 0)
-			wl1271_warning("idle mode change failed %d", ret);
+			wl1271_warn("idle mode change failed %d\n", ret);
 	}
 
 	if ((changed & BSS_CHANGED_CQM)) {
@@ -3829,7 +3824,7 @@ sta_not_found:
 	}
 
 	if (changed & BSS_CHANGED_IBSS) {
-		wl1271_debug(DEBUG_ADHOC, "ibss_joined: %d",
+		wl1271_debug(DEBUG_ADHOC, "ibss_joined: %d\n",
 			     bss_conf->ibss_joined);
 
 		if (bss_conf->ibss_joined) {
@@ -3856,7 +3851,7 @@ sta_not_found:
 	if (do_join) {
 		ret = wl1271_join(wl, wlvif, set_assoc);
 		if (ret < 0) {
-			wl1271_warning("cmd join failed %d", ret);
+			wl1271_warn("cmd join failed %d\n", ret);
 			goto out;
 		}
 
@@ -3889,8 +3884,8 @@ sta_not_found:
 							     true,
 							     wlvif->sta.hlid);
 			if (ret < 0) {
-				wl1271_warning("Set ht cap true failed %d",
-					       ret);
+				wl1271_warn("Set ht cap true failed %d\n",
+					    ret);
 				goto out;
 			}
 		}
@@ -3901,8 +3896,8 @@ sta_not_found:
 							     false,
 							     wlvif->sta.hlid);
 			if (ret < 0) {
-				wl1271_warning("Set ht cap false failed %d",
-					       ret);
+				wl1271_warn("Set ht cap false failed %d\n",
+					    ret);
 				goto out;
 			}
 		}
@@ -3914,7 +3909,7 @@ sta_not_found:
 		ret = wl1271_acx_set_ht_information(wl, wlvif,
 					bss_conf->ht_operation_mode);
 		if (ret < 0) {
-			wl1271_warning("Set ht information failed %d", ret);
+			wl1271_warn("Set ht information failed %d\n", ret);
 			goto out;
 		}
 	}
@@ -3937,7 +3932,7 @@ sta_not_found:
 			 */
 			ret = wl1271_cmd_build_arp_rsp(wl, wlvif);
 			if (ret < 0) {
-				wl1271_warning("build arp rsp failed: %d", ret);
+				wl1271_warn("build arp rsp failed: %d\n", ret);
 				goto out;
 			}
 
@@ -4112,14 +4107,14 @@ static int wl1271_allocate_sta(struct wl1271 *wl,
 
 
 	if (wl->active_sta_count >= AP_MAX_STATIONS) {
-		wl1271_warning("could not allocate HLID - too much stations");
+		wl1271_warn("could not allocate HLID - too much stations\n");
 		return -EBUSY;
 	}
 
 	wl_sta = (struct wl1271_station *)sta->drv_priv;
 	ret = wl12xx_allocate_link(wl, wlvif, &wl_sta->hlid);
 	if (ret < 0) {
-		wl1271_warning("could not allocate HLID - too many links");
+		wl1271_warn("could not allocate HLID - too many links\n");
 		return -EBUSY;
 	}
 
@@ -4344,14 +4339,14 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 
 		if (wl->ba_rx_session_count >= RX_BA_MAX_SESSIONS) {
 			ret = -EBUSY;
-			wl1271_error("exceeded max RX BA sessions");
+			wl1271_err("exceeded max RX BA sessions\n");
 			break;
 		}
 
 		if (*ba_bitmap & BIT(tid)) {
 			ret = -EINVAL;
-			wl1271_error("cannot enable RX BA session on active "
-				     "tid: %d", tid);
+			wl1271_err("cannot enable RX BA session on active tid: %d\n",
+				   tid);
 			break;
 		}
 
@@ -4366,8 +4361,8 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 	case IEEE80211_AMPDU_RX_STOP:
 		if (!(*ba_bitmap & BIT(tid))) {
 			ret = -EINVAL;
-			wl1271_error("no active RX BA session on tid: %d",
-				     tid);
+			wl1271_err("no active RX BA session on tid: %d\n",
+				   tid);
 			break;
 		}
 
@@ -4390,7 +4385,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
 		break;
 
 	default:
-		wl1271_error("Incorrect ampdu action id=%x\n", action);
+		wl1271_err("Incorrect ampdu action id=%x\n", action);
 		ret = -EINVAL;
 	}
 
@@ -4411,8 +4406,8 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw,
 	int i, ret = 0;
 
 	wl1271_debug(DEBUG_MAC80211, "mac80211 set_bitrate_mask 0x%x 0x%x",
-		mask->control[NL80211_BAND_2GHZ].legacy,
-		mask->control[NL80211_BAND_5GHZ].legacy);
+		     mask->control[NL80211_BAND_2GHZ].legacy,
+		     mask->control[NL80211_BAND_5GHZ].legacy);
 
 	mutex_lock(&wl->mutex);
 
@@ -4685,13 +4680,13 @@ u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum ieee80211_band band)
 	BUG_ON(band >= 2);
 
 	if (unlikely(rate >= wl->hw_tx_rate_tbl_size)) {
-		wl1271_error("Illegal RX rate from HW: %d", rate);
+		wl1271_err("Illegal RX rate from HW: %d\n", rate);
 		return 0;
 	}
 
 	idx = wl->band_rate_to_idx[band][rate];
 	if (unlikely(idx == CONF_HW_RXTX_RATE_UNSUPPORTED)) {
-		wl1271_error("Unsupported RX rate from HW: %d", rate);
+		wl1271_err("Unsupported RX rate from HW: %d\n", rate);
 		return 0;
 	}
 
@@ -4726,7 +4721,7 @@ static ssize_t wl1271_sysfs_store_bt_coex_state(struct device *dev,
 
 	ret = kstrtoul(buf, 10, &res);
 	if (ret < 0) {
-		wl1271_warning("incorrect value written to bt_coex_mode");
+		wl1271_warn("incorrect value written to bt_coex_mode\n");
 		return count;
 	}
 
@@ -4853,7 +4848,7 @@ static void wl1271_connection_loss_work(struct work_struct *work)
 	dwork = container_of(work, struct delayed_work, work);
 	wl = container_of(dwork, struct wl1271, connection_loss_work);
 
-	wl1271_info("Connection loss work.");
+	wl1271_info("Connection loss work\n");
 
 	mutex_lock(&wl->mutex);
 
@@ -4876,11 +4871,11 @@ static void wl12xx_derive_mac_addresses(struct wl1271 *wl,
 {
 	int i;
 
-	wl1271_debug(DEBUG_PROBE, "base address: oui %06x nic %06x, n %d",
+	wl1271_debug(DEBUG_PROBE, "base address: oui %06x nic %06x, n %d\n",
 		     oui, nic, n);
 
 	if (nic + n - 1 > 0xffffff)
-		wl1271_warning("NIC part of the MAC address wraps around!");
+		wl1271_warn("NIC part of the MAC address wraps around!\n");
 
 	for (i = 0; i < n; i++) {
 		wl->addresses[i].addr[0] = (u8)(oui >> 16);
@@ -4952,7 +4947,7 @@ static int wl1271_register_hw(struct wl1271 *wl)
 
 	ret = ieee80211_register_hw(wl->hw);
 	if (ret < 0) {
-		wl1271_error("unable to register mac80211 hw: %d", ret);
+		wl1271_err("unable to register mac80211 hw: %d\n", ret);
 		goto out;
 	}
 
@@ -4960,7 +4955,7 @@ static int wl1271_register_hw(struct wl1271 *wl)
 
 	wl1271_debugfs_init(wl);
 
-	wl1271_notice("loaded");
+	wl1271_notice("loaded\n");
 
 out:
 	return ret;
@@ -5092,7 +5087,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size)
 
 	hw = ieee80211_alloc_hw(sizeof(*wl), &wl1271_ops);
 	if (!hw) {
-		wl1271_error("could not alloc ieee80211_hw");
+		wl1271_err("could not alloc ieee80211_hw\n");
 		ret = -ENOMEM;
 		goto err_hw_alloc;
 	}
@@ -5102,7 +5097,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size)
 
 	wl->priv = kzalloc(priv_size, GFP_KERNEL);
 	if (!wl->priv) {
-		wl1271_error("could not alloc wl priv");
+		wl1271_err("could not alloc wl priv\n");
 		ret = -ENOMEM;
 		goto err_priv_alloc;
 	}
@@ -5260,7 +5255,7 @@ static irqreturn_t wl12xx_hardirq(int irq, void *cookie)
 	struct wl1271 *wl = cookie;
 	unsigned long flags;
 
-	wl1271_debug(DEBUG_IRQ, "IRQ");
+	wl1271_debug(DEBUG_IRQ, "IRQ\n");
 
 	/* complete the ELP completion */
 	spin_lock_irqsave(&wl->wl_lock, flags);
@@ -5273,7 +5268,7 @@ static irqreturn_t wl12xx_hardirq(int irq, void *cookie)
 	if (test_bit(WL1271_FLAG_SUSPENDED, &wl->flags)) {
 		/* don't enqueue a work right now. mark it as pending */
 		set_bit(WL1271_FLAG_PENDING_WORK, &wl->flags);
-		wl1271_debug(DEBUG_IRQ, "should not enqueue work");
+		wl1271_debug(DEBUG_IRQ, "should not enqueue work\n");
 		disable_irq_nosync(wl->irq);
 		pm_wakeup_event(wl->dev, 0);
 		spin_unlock_irqrestore(&wl->wl_lock, flags);
@@ -5317,7 +5312,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
 				   irqflags,
 				   pdev->name, wl);
 	if (ret < 0) {
-		wl1271_error("request_irq() failed: %d", ret);
+		wl1271_err("request_irq() failed: %d\n", ret);
 		goto out_free_hw;
 	}
 
@@ -5338,7 +5333,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
 
 	ret = wl12xx_get_hw_info(wl);
 	if (ret < 0) {
-		wl1271_error("couldn't get hw info");
+		wl1271_err("couldn't get hw info\n");
 		goto out;
 	}
 
@@ -5357,21 +5352,21 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
 	/* Create sysfs file to control bt coex state */
 	ret = device_create_file(wl->dev, &dev_attr_bt_coex_state);
 	if (ret < 0) {
-		wl1271_error("failed to create sysfs file bt_coex_state");
+		wl1271_err("failed to create sysfs file bt_coex_state\n");
 		goto out_irq;
 	}
 
 	/* Create sysfs file to get HW PG version */
 	ret = device_create_file(wl->dev, &dev_attr_hw_pg_ver);
 	if (ret < 0) {
-		wl1271_error("failed to create sysfs file hw_pg_ver");
+		wl1271_err("failed to create sysfs file hw_pg_ver\n");
 		goto out_bt_coex_state;
 	}
 
 	/* Create sysfs file for the FW log */
 	ret = device_create_bin_file(wl->dev, &fwlog_attr);
 	if (ret < 0) {
-		wl1271_error("failed to create sysfs file fwlog");
+		wl1271_err("failed to create sysfs file fwlog\n");
 		goto out_hw_pg_ver;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c
index 47e81b3..eef201f4 100644
--- a/drivers/net/wireless/ti/wlcore/ps.c
+++ b/drivers/net/wireless/ti/wlcore/ps.c
@@ -39,7 +39,7 @@ void wl1271_elp_work(struct work_struct *work)
 	dwork = container_of(work, struct delayed_work, work);
 	wl = container_of(dwork, struct wl1271, elp_work);
 
-	wl1271_debug(DEBUG_PSM, "elp work");
+	wl1271_debug(DEBUG_PSM, "elp work\n");
 
 	mutex_lock(&wl->mutex);
 
@@ -62,7 +62,7 @@ void wl1271_elp_work(struct work_struct *work)
 			goto out;
 	}
 
-	wl1271_debug(DEBUG_PSM, "chip to elp");
+	wl1271_debug(DEBUG_PSM, "chip to elp\n");
 	wl1271_raw_write32(wl, HW_ACCESS_ELP_CTRL_REG, ELPCTRL_SLEEP);
 	set_bit(WL1271_FLAG_IN_ELP, &wl->flags);
 
@@ -122,7 +122,7 @@ int wl1271_ps_elp_wakeup(struct wl1271 *wl)
 	if (!test_bit(WL1271_FLAG_IN_ELP, &wl->flags))
 		return 0;
 
-	wl1271_debug(DEBUG_PSM, "waking up chip from elp");
+	wl1271_debug(DEBUG_PSM, "waking up chip from elp\n");
 
 	/*
 	 * The spinlock is required here to synchronize both the work and
@@ -141,19 +141,19 @@ int wl1271_ps_elp_wakeup(struct wl1271 *wl)
 		ret = wait_for_completion_timeout(
 			&compl, msecs_to_jiffies(WL1271_WAKEUP_TIMEOUT));
 		if (ret == 0) {
-			wl1271_error("ELP wakeup timeout!");
+			wl1271_err("ELP wakeup timeout!\n");
 			wl12xx_queue_recovery_work(wl);
 			ret = -ETIMEDOUT;
 			goto err;
 		} else if (ret < 0) {
-			wl1271_error("ELP wakeup completion error.");
+			wl1271_err("ELP wakeup completion error\n");
 			goto err;
 		}
 	}
 
 	clear_bit(WL1271_FLAG_IN_ELP, &wl->flags);
 
-	wl1271_debug(DEBUG_PSM, "wakeup time: %u ms",
+	wl1271_debug(DEBUG_PSM, "wakeup time: %u ms\n",
 		     jiffies_to_msecs(jiffies - start_time));
 	goto out;
 
@@ -176,14 +176,14 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	switch (mode) {
 	case STATION_AUTO_PS_MODE:
 	case STATION_POWER_SAVE_MODE:
-		wl1271_debug(DEBUG_PSM, "entering psm (mode=%d,timeout=%u)",
+		wl1271_debug(DEBUG_PSM, "entering psm (mode=%d,timeout=%u)\n",
 			     mode, timeout);
 
 		ret = wl1271_acx_wake_up_conditions(wl, wlvif,
 					    wl->conf.conn.wake_up_event,
 					    wl->conf.conn.listen_interval);
 		if (ret < 0) {
-			wl1271_error("couldn't set wake up conditions");
+			wl1271_err("couldn't set wake up conditions\n");
 			return ret;
 		}
 
@@ -205,7 +205,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		}
 		break;
 	case STATION_ACTIVE_MODE:
-		wl1271_debug(DEBUG_PSM, "leaving psm");
+		wl1271_debug(DEBUG_PSM, "leaving psm\n");
 
 		/* disable beacon early termination */
 		if ((wlvif->band == IEEE80211_BAND_2GHZ) &&
@@ -222,7 +222,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		clear_bit(WLVIF_FLAG_IN_PS, &wlvif->flags);
 		break;
 	default:
-		wl1271_warning("trying to set ps to unsupported mode %d", mode);
+		wl1271_warn("trying to set ps to unsupported mode %d\n", mode);
 		ret = -EINVAL;
 	}
 
@@ -270,15 +270,15 @@ void wl12xx_ps_link_start(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	if (test_bit(hlid, &wl->ap_ps_map))
 		return;
 
-	wl1271_debug(DEBUG_PSM, "start mac80211 PSM on hlid %d pkts %d "
-		     "clean_queues %d", hlid, wl->links[hlid].allocated_pkts,
+	wl1271_debug(DEBUG_PSM, "start mac80211 PSM on hlid %d pkts %d clean_queues %d\n",
+		     hlid, wl->links[hlid].allocated_pkts,
 		     clean_queues);
 
 	rcu_read_lock();
 	sta = ieee80211_find_sta(vif, wl->links[hlid].addr);
 	if (!sta) {
-		wl1271_error("could not find sta %pM for starting ps",
-			     wl->links[hlid].addr);
+		wl1271_err("could not find sta %pM for starting ps\n",
+			   wl->links[hlid].addr);
 		rcu_read_unlock();
 		return;
 	}
@@ -301,15 +301,15 @@ void wl12xx_ps_link_end(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 hlid)
 	if (!test_bit(hlid, &wl->ap_ps_map))
 		return;
 
-	wl1271_debug(DEBUG_PSM, "end mac80211 PSM on hlid %d", hlid);
+	wl1271_debug(DEBUG_PSM, "end mac80211 PSM on hlid %d\n", hlid);
 
 	__clear_bit(hlid, &wl->ap_ps_map);
 
 	rcu_read_lock();
 	sta = ieee80211_find_sta(vif, wl->links[hlid].addr);
 	if (!sta) {
-		wl1271_error("could not find sta %pM for ending ps",
-			     wl->links[hlid].addr);
+		wl1271_err("could not find sta %pM for ending ps\n",
+			   wl->links[hlid].addr);
 		goto end;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c
index 78200dc..99d5021 100644
--- a/drivers/net/wireless/ti/wlcore/rx.c
+++ b/drivers/net/wireless/ti/wlcore/rx.c
@@ -94,7 +94,7 @@ static void wl1271_rx_status(struct wl1271 *wl,
 
 		if (unlikely(desc_err_code == WL1271_RX_DESC_MIC_FAIL)) {
 			status->flag |= RX_FLAG_MMIC_ERROR;
-			wl1271_warning("Michael MIC error");
+			wl1271_warn("Michael MIC error\n");
 		}
 	}
 }
@@ -121,8 +121,8 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
 
 	pkt_data_len = wlcore_hw_get_rx_packet_len(wl, data, length);
 	if (!pkt_data_len) {
-		wl1271_error("Invalid packet arrived from HW. length %d",
-			     length);
+		wl1271_err("Invalid packet arrived from HW. length %d\n",
+			   length);
 		return -EINVAL;
 	}
 
@@ -143,22 +143,22 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
 	/* discard corrupted packets */
 	case WL1271_RX_DESC_DRIVER_RX_Q_FAIL:
 	case WL1271_RX_DESC_DECRYPT_FAIL:
-		wl1271_warning("corrupted packet in RX with status: 0x%x",
-			       desc->status & WL1271_RX_DESC_STATUS_MASK);
+		wl1271_warn("corrupted packet in RX with status: 0x%x\n",
+			    desc->status & WL1271_RX_DESC_STATUS_MASK);
 		return -EINVAL;
 	case WL1271_RX_DESC_SUCCESS:
 	case WL1271_RX_DESC_MIC_FAIL:
 		break;
 	default:
-		wl1271_error("invalid RX descriptor status: 0x%x",
-			     desc->status & WL1271_RX_DESC_STATUS_MASK);
+		wl1271_err("invalid RX descriptor status: 0x%x\n",
+			   desc->status & WL1271_RX_DESC_STATUS_MASK);
 		return -EINVAL;
 	}
 
 	/* skb length not including rx descriptor */
 	skb = __dev_alloc_skb(pkt_data_len + reserved, GFP_KERNEL);
 	if (!skb) {
-		wl1271_error("Couldn't allocate RX frame");
+		wl1271_err("Couldn't allocate RX frame\n");
 		return -ENOMEM;
 	}
 
@@ -189,7 +189,7 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
 	wlcore_hw_set_rx_csum(wl, desc, skb);
 
 	seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
-	wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s seq %d hlid %d", skb,
+	wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s seq %d hlid %d\n", skb,
 		     skb->len - desc->pad_len,
 		     beacon ? "beacon" : "",
 		     seq_num, *hlid);
@@ -228,7 +228,7 @@ void wl12xx_rx(struct wl1271 *wl, struct wl_fw_status_1 *status)
 		}
 
 		if (buf_size == 0) {
-			wl1271_warning("received empty data");
+			wl1271_warn("received empty data\n");
 			break;
 		}
 
@@ -257,9 +257,8 @@ void wl12xx_rx(struct wl1271 *wl, struct wl_fw_status_1 *status)
 				if (hlid < WL12XX_MAX_LINKS)
 					__set_bit(hlid, active_hlids);
 				else
-					WARN(1,
-					     "hlid exceeded WL12XX_MAX_LINKS "
-					     "(%d)\n", hlid);
+					WARN(1, "hlid exceeded WL12XX_MAX_LINKS (%d)\n",
+					     hlid);
 			}
 
 			wl->rx_counter++;
@@ -288,16 +287,16 @@ int wl1271_rx_filter_enable(struct wl1271 *wl,
 	int ret;
 
 	if (wl->rx_filter_enabled[index] == enable) {
-		wl1271_warning("Request to enable an already "
-			     "enabled rx filter %d", index);
+		wl1271_warn("Request to enable an already enabled rx filter %d\n",
+			    index);
 		return 0;
 	}
 
 	ret = wl1271_acx_set_rx_filter(wl, index, enable, filter);
 
 	if (ret) {
-		wl1271_error("Failed to %s rx data filter %d (err=%d)",
-			     enable ? "enable" : "disable", index, ret);
+		wl1271_err("Failed to %s rx data filter %d (err=%d)\n",
+			   enable ? "enable" : "disable", index, ret);
 		return ret;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c
index d9daed5..f53e6ca 100644
--- a/drivers/net/wireless/ti/wlcore/scan.c
+++ b/drivers/net/wireless/ti/wlcore/scan.c
@@ -42,7 +42,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
 	dwork = container_of(work, struct delayed_work, work);
 	wl = container_of(dwork, struct wl1271, scan_complete_work);
 
-	wl1271_debug(DEBUG_SCAN, "Scanning complete");
+	wl1271_debug(DEBUG_SCAN, "Scanning complete\n");
 
 	mutex_lock(&wl->mutex);
 
@@ -78,7 +78,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
 	wl1271_ps_elp_sleep(wl);
 
 	if (wl->scan.failed) {
-		wl1271_info("Scan completed due to error.");
+		wl1271_info("Scan completed due to error\n");
 		wl12xx_queue_recovery_work(wl);
 	}
 
@@ -114,17 +114,17 @@ static int wl1271_get_scan_channels(struct wl1271 *wl,
 		     * marked as passive.
 		     */
 		    (passive || !(flags & IEEE80211_CHAN_PASSIVE_SCAN))) {
-			wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ",
+			wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d\n",
 				     req->channels[i]->band,
 				     req->channels[i]->center_freq);
-			wl1271_debug(DEBUG_SCAN, "hw_value %d, flags %X",
+			wl1271_debug(DEBUG_SCAN, "hw_value %d, flags %X\n",
 				     req->channels[i]->hw_value,
 				     req->channels[i]->flags);
 			wl1271_debug(DEBUG_SCAN,
-				     "max_antenna_gain %d, max_power %d",
+				     "max_antenna_gain %d, max_power %d\n",
 				     req->channels[i]->max_antenna_gain,
 				     req->channels[i]->max_power);
-			wl1271_debug(DEBUG_SCAN, "beacon_found %d",
+			wl1271_debug(DEBUG_SCAN, "beacon_found %d\n",
 				     req->channels[i]->beacon_found);
 
 			if (!passive) {
@@ -228,7 +228,7 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
 					 wl->scan.req->ie,
 					 wl->scan.req->ie_len);
 	if (ret < 0) {
-		wl1271_error("PROBE request template failed");
+		wl1271_err("PROBE request template failed\n");
 		goto out;
 	}
 
@@ -236,7 +236,7 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
 	ret = wl1271_cmd_send(wl, CMD_TRIGGER_SCAN_TO, trigger,
 			      sizeof(*trigger), 0);
 	if (ret < 0) {
-		wl1271_error("trigger scan to failed for hw scan");
+		wl1271_err("trigger scan to failed for hw scan\n");
 		goto out;
 	}
 
@@ -244,7 +244,7 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
 
 	ret = wl1271_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("SCAN failed");
+		wl1271_err("SCAN failed\n");
 		goto out;
 	}
 
@@ -332,7 +332,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct ieee80211_vif *vif)
 		break;
 
 	default:
-		wl1271_error("invalid scan state");
+		wl1271_err("invalid scan state\n");
 		break;
 	}
 
@@ -387,7 +387,7 @@ int wl1271_scan_stop(struct wl1271 *wl)
 	if (WARN_ON(wl->scan.state == WL1271_SCAN_STATE_IDLE))
 		return -EINVAL;
 
-	wl1271_debug(DEBUG_CMD, "cmd scan stop");
+	wl1271_debug(DEBUG_CMD, "cmd scan stop\n");
 
 	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -398,7 +398,7 @@ int wl1271_scan_stop(struct wl1271 *wl)
 	ret = wl1271_cmd_send(wl, CMD_STOP_SCAN, cmd,
 			      sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("cmd stop_scan failed");
+		wl1271_err("cmd stop_scan failed\n");
 		goto out;
 	}
 out:
@@ -450,15 +450,15 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
 		    /* if radar is set, we ignore the passive flag */
 		    (radar ||
 		     !!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive)) {
-			wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ",
+			wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d\n",
 				     req->channels[i]->band,
 				     req->channels[i]->center_freq);
-			wl1271_debug(DEBUG_SCAN, "hw_value %d, flags %X",
+			wl1271_debug(DEBUG_SCAN, "hw_value %d, flags %X\n",
 				     req->channels[i]->hw_value,
 				     req->channels[i]->flags);
-			wl1271_debug(DEBUG_SCAN, "max_power %d",
+			wl1271_debug(DEBUG_SCAN, "max_power %d\n",
 				     req->channels[i]->max_power);
-			wl1271_debug(DEBUG_SCAN, "min_dwell_time %d max dwell time %d",
+			wl1271_debug(DEBUG_SCAN, "min_dwell_time %d max dwell time %d\n",
 				     min_dwell_time_active,
 				     max_dwell_time_active);
 
@@ -493,7 +493,7 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
 				 * the passive channel list
 				 */
 				(*n_pactive_ch)++;
-				wl1271_debug(DEBUG_SCAN, "n_pactive_ch = %d",
+				wl1271_debug(DEBUG_SCAN, "n_pactive_ch = %d\n",
 					     *n_pactive_ch);
 			}
 
@@ -550,11 +550,11 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl,
 
 	cfg->n_pactive_ch = n_pactive_ch;
 
-	wl1271_debug(DEBUG_SCAN, "    2.4GHz: active %d passive %d",
+	wl1271_debug(DEBUG_SCAN, "    2.4GHz: active %d passive %d\n",
 		     cfg->active[0], cfg->passive[0]);
-	wl1271_debug(DEBUG_SCAN, "    5GHz: active %d passive %d",
+	wl1271_debug(DEBUG_SCAN, "    5GHz: active %d passive %d\n",
 		     cfg->active[1], cfg->passive[1]);
-	wl1271_debug(DEBUG_SCAN, "    DFS: %d", cfg->dfs);
+	wl1271_debug(DEBUG_SCAN, "    DFS: %d\n", cfg->dfs);
 
 	return  cfg->passive[0] || cfg->active[0] ||
 		cfg->passive[1] || cfg->active[1] || cfg->dfs ||
@@ -572,7 +572,7 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl,
 	struct cfg80211_ssid *ssids = req->ssids;
 	int ret = 0, type, i, j, n_match_ssids = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd sched scan ssid list");
+	wl1271_debug(DEBUG_CMD, "cmd sched scan ssid list\n");
 
 	/* count the match sets that contain SSIDs */
 	for (i = 0; i < req->n_match_sets; i++)
@@ -655,7 +655,7 @@ wl12xx_scan_sched_scan_ssid_list(struct wl1271 *wl,
 	ret = wl1271_cmd_send(wl, CMD_CONNECTION_SCAN_SSID_CFG, cmd,
 			      sizeof(*cmd), 0);
 	if (ret < 0) {
-		wl1271_error("cmd sched scan ssid list failed");
+		wl1271_err("cmd sched scan ssid list failed\n");
 		goto out_free;
 	}
 
@@ -677,7 +677,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
 	int i, ret;
 	bool force_passive = !req->n_ssids;
 
-	wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config");
+	wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config\n");
 
 	cfg = kzalloc(sizeof(*cfg), GFP_KERNEL);
 	if (!cfg)
@@ -707,10 +707,10 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
 
 	cfg->filter_type = ret;
 
-	wl1271_debug(DEBUG_SCAN, "filter_type = %d", cfg->filter_type);
+	wl1271_debug(DEBUG_SCAN, "filter_type = %d\n", cfg->filter_type);
 
 	if (!wl1271_scan_sched_scan_channels(wl, req, cfg)) {
-		wl1271_error("scan channel list is empty");
+		wl1271_err("scan channel list is empty\n");
 		ret = -EINVAL;
 		goto out;
 	}
@@ -724,7 +724,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
 						 ies->ie[band],
 						 ies->len[band]);
 		if (ret < 0) {
-			wl1271_error("2.4GHz PROBE request template failed");
+			wl1271_err("2.4GHz PROBE request template failed\n");
 			goto out;
 		}
 	}
@@ -738,7 +738,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
 						 ies->ie[band],
 						 ies->len[band]);
 		if (ret < 0) {
-			wl1271_error("5GHz PROBE request template failed");
+			wl1271_err("5GHz PROBE request template failed\n");
 			goto out;
 		}
 	}
@@ -748,7 +748,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
 	ret = wl1271_cmd_send(wl, CMD_CONNECTION_SCAN_CFG, cfg,
 			      sizeof(*cfg), 0);
 	if (ret < 0) {
-		wl1271_error("SCAN configuration failed");
+		wl1271_err("SCAN configuration failed\n");
 		goto out;
 	}
 out:
@@ -761,7 +761,7 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	struct wl1271_cmd_sched_scan_start *start;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd periodic scan start");
+	wl1271_debug(DEBUG_CMD, "cmd periodic scan start\n");
 
 	if (wlvif->bss_type != BSS_TYPE_STA_BSS)
 		return -EOPNOTSUPP;
@@ -779,7 +779,7 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif)
 	ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start,
 			      sizeof(*start), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send scan start command");
+		wl1271_err("failed to send scan start command\n");
 		goto out_free;
 	}
 
@@ -790,7 +790,7 @@ out_free:
 
 void wl1271_scan_sched_scan_results(struct wl1271 *wl)
 {
-	wl1271_debug(DEBUG_SCAN, "got periodic scan results");
+	wl1271_debug(DEBUG_SCAN, "got periodic scan results\n");
 
 	ieee80211_sched_scan_results(wl->hw);
 }
@@ -800,12 +800,12 @@ void wl1271_scan_sched_scan_stop(struct wl1271 *wl,  struct wl12xx_vif *wlvif)
 	struct wl1271_cmd_sched_scan_stop *stop;
 	int ret = 0;
 
-	wl1271_debug(DEBUG_CMD, "cmd periodic scan stop");
+	wl1271_debug(DEBUG_CMD, "cmd periodic scan stop\n");
 
 	/* FIXME: what to do if alloc'ing to stop fails? */
 	stop = kzalloc(sizeof(*stop), GFP_KERNEL);
 	if (!stop) {
-		wl1271_error("failed to alloc memory to send sched scan stop");
+		wl1271_err("failed to alloc memory to send sched scan stop\n");
 		return;
 	}
 
@@ -815,7 +815,7 @@ void wl1271_scan_sched_scan_stop(struct wl1271 *wl,  struct wl12xx_vif *wlvif)
 	ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop,
 			      sizeof(*stop), 0);
 	if (ret < 0) {
-		wl1271_error("failed to send sched scan stop command");
+		wl1271_err("failed to send sched scan stop command\n");
 		goto out_free;
 	}
 
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index c67ec48..b7ade55 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -342,8 +342,7 @@ static int wl1271_suspend(struct device *dev)
 		sdio_flags = sdio_get_host_pm_caps(func);
 
 		if (!(sdio_flags & MMC_PM_KEEP_POWER)) {
-			dev_err(dev, "can't keep power while host "
-				     "is suspended\n");
+			dev_err(dev, "can't keep power while host is suspended\n");
 			ret = -EINVAL;
 			goto out;
 		}
diff --git a/drivers/net/wireless/ti/wlcore/testmode.c b/drivers/net/wireless/ti/wlcore/testmode.c
index 0e59ea2..05cd2de 100644
--- a/drivers/net/wireless/ti/wlcore/testmode.c
+++ b/drivers/net/wireless/ti/wlcore/testmode.c
@@ -76,7 +76,7 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
 	void *buf;
 	u8 answer = 0;
 
-	wl1271_debug(DEBUG_TESTMODE, "testmode cmd test");
+	wl1271_debug(DEBUG_TESTMODE, "testmode cmd test\n");
 
 	if (!tb[WL1271_TM_ATTR_DATA])
 		return -EINVAL;
@@ -103,7 +103,7 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
 
 	ret = wl1271_cmd_test(wl, buf, buf_len, answer);
 	if (ret < 0) {
-		wl1271_warning("testmode cmd test failed: %d", ret);
+		wl1271_warn("testmode cmd test failed: %d\n", ret);
 		goto out_sleep;
 	}
 
@@ -142,7 +142,7 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
 	struct sk_buff *skb;
 	u8 ie_id;
 
-	wl1271_debug(DEBUG_TESTMODE, "testmode cmd interrogate");
+	wl1271_debug(DEBUG_TESTMODE, "testmode cmd interrogate\n");
 
 	if (!tb[WL1271_TM_ATTR_IE_ID])
 		return -EINVAL;
@@ -168,7 +168,7 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
 
 	ret = wl1271_cmd_interrogate(wl, ie_id, cmd, sizeof(*cmd));
 	if (ret < 0) {
-		wl1271_warning("testmode cmd interrogate failed: %d", ret);
+		wl1271_warn("testmode cmd interrogate failed: %d\n", ret);
 		goto out_free;
 	}
 
@@ -205,7 +205,7 @@ static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[])
 	void *buf;
 	u8 ie_id;
 
-	wl1271_debug(DEBUG_TESTMODE, "testmode cmd configure");
+	wl1271_debug(DEBUG_TESTMODE, "testmode cmd configure\n");
 
 	if (!tb[WL1271_TM_ATTR_DATA])
 		return -EINVAL;
@@ -224,7 +224,7 @@ static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[])
 	mutex_unlock(&wl->mutex);
 
 	if (ret < 0) {
-		wl1271_warning("testmode cmd configure failed: %d", ret);
+		wl1271_warn("testmode cmd configure failed: %d\n", ret);
 		return ret;
 	}
 
@@ -236,7 +236,7 @@ static int wl1271_tm_cmd_set_plt_mode(struct wl1271 *wl, struct nlattr *tb[])
 	u32 val;
 	int ret;
 
-	wl1271_debug(DEBUG_TESTMODE, "testmode cmd set plt mode");
+	wl1271_debug(DEBUG_TESTMODE, "testmode cmd set plt mode\n");
 
 	if (!tb[WL1271_TM_ATTR_PLT_MODE])
 		return -EINVAL;
@@ -260,7 +260,7 @@ static int wl1271_tm_cmd_set_plt_mode(struct wl1271 *wl, struct nlattr *tb[])
 
 static int wl1271_tm_cmd_recover(struct wl1271 *wl, struct nlattr *tb[])
 {
-	wl1271_debug(DEBUG_TESTMODE, "testmode cmd recover");
+	wl1271_debug(DEBUG_TESTMODE, "testmode cmd recover\n");
 
 	wl12xx_queue_recovery_work(wl);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 6983e7a..6a0bebd 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -54,7 +54,7 @@ static int wl1271_set_default_wep_key(struct wl1271 *wl,
 	if (ret < 0)
 		return ret;
 
-	wl1271_debug(DEBUG_CRYPT, "default wep key idx: %d", (int)id);
+	wl1271_debug(DEBUG_CRYPT, "default wep key idx: %d\n", (int)id);
 	return 0;
 }
 
@@ -235,7 +235,7 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		ret = 0;
 
 		wl1271_debug(DEBUG_TX,
-			     "tx_allocate: size: %d, blocks: %d, id: %d",
+			     "tx_allocate: size: %d, blocks: %d, id: %d\n",
 			     total_len, total_blocks, id);
 	} else {
 		wl1271_free_tx_id(wl, id);
@@ -380,7 +380,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	}
 	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
 	if (hlid == WL12XX_INVALID_LINK_ID) {
-		wl1271_error("invalid hlid. dropping skb 0x%p", skb);
+		wl1271_err("invalid hlid. dropping skb 0x%p\n", skb);
 		return -EINVAL;
 	}
 
@@ -797,7 +797,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
 
 	/* check for id legality */
 	if (unlikely(id >= wl->num_tx_desc || wl->tx_frames[id] == NULL)) {
-		wl1271_warning("TX result illegal id: %d", id);
+		wl1271_warn("TX result illegal id: %d\n", id);
 		return;
 	}
 
@@ -865,8 +865,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
 		skb_pull(skb, WL1271_EXTRA_SPACE_TKIP);
 	}
 
-	wl1271_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x"
-		     " status 0x%x",
+	wl1271_debug(DEBUG_TX, "tx status id %u skb 0x%p failures %u rate 0x%x status 0x%x\n",
 		     result->id, skb, result->ack_failures,
 		     result->rate_class_index, result->status);
 
@@ -895,11 +894,11 @@ void wl1271_tx_complete(struct wl1271 *wl)
 				tx_result_host_counter), fw_counter);
 
 	count = fw_counter - wl->tx_results_count;
-	wl1271_debug(DEBUG_TX, "tx_complete received, packets: %d", count);
+	wl1271_debug(DEBUG_TX, "tx_complete received, packets: %d\n", count);
 
 	/* verify that the result buffer is not getting overrun */
 	if (unlikely(count > TX_HW_RESULT_QUEUE_LEN))
-		wl1271_warning("TX result overflow from chipset: %d", count);
+		wl1271_warn("TX result overflow from chipset: %d\n", count);
 
 	/* process the results */
 	for (i = 0; i < count; i++) {
@@ -926,7 +925,7 @@ void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid)
 	for (i = 0; i < NUM_TX_QUEUES; i++) {
 		total[i] = 0;
 		while ((skb = skb_dequeue(&wl->links[hlid].tx_queue[i]))) {
-			wl1271_debug(DEBUG_TX, "link freeing skb 0x%p", skb);
+			wl1271_debug(DEBUG_TX, "link freeing skb 0x%p\n", skb);
 
 			if (!wl12xx_is_dummy_packet(wl, skb)) {
 				info = IEEE80211_SKB_CB(skb);
@@ -994,7 +993,7 @@ void wl12xx_tx_reset(struct wl1271 *wl)
 
 		skb = wl->tx_frames[i];
 		wl1271_free_tx_id(wl, i);
-		wl1271_debug(DEBUG_TX, "freeing skb 0x%p", skb);
+		wl1271_debug(DEBUG_TX, "freeing skb 0x%p\n", skb);
 
 		if (!wl12xx_is_dummy_packet(wl, skb)) {
 			/*
@@ -1037,7 +1036,7 @@ void wl1271_tx_flush(struct wl1271 *wl)
 
 	while (!time_after(jiffies, timeout)) {
 		mutex_lock(&wl->mutex);
-		wl1271_debug(DEBUG_TX, "flushing tx buffer: %d %d",
+		wl1271_debug(DEBUG_TX, "flushing tx buffer: %d %d\n",
 			     wl->tx_frames_cnt,
 			     wl1271_tx_total_queue_count(wl));
 		if ((wl->tx_frames_cnt == 0) &&
@@ -1049,7 +1048,7 @@ void wl1271_tx_flush(struct wl1271 *wl)
 		msleep(1);
 	}
 
-	wl1271_warning("Unable to flush all TX buffers, timed out.");
+	wl1271_warn("Unable to flush all TX buffers, timed out\n");
 
 	/* forcibly flush all Tx buffers on our queues */
 	mutex_lock(&wl->mutex);
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 19/20] wl3501_cs: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, John W. Linville
  Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.
Add newline terminations to pr_debug uses.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/wl3501_cs.c |   80 ++++++++++++++++++--------------------
 1 files changed, 38 insertions(+), 42 deletions(-)

diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 00f6e69..a7dac1a 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -27,6 +27,8 @@
  * with a SMP machine (dual pentium 100), using pktgen, 432 pps (pkt_size = 60)
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/init.h>
@@ -431,9 +433,9 @@ static int wl3501_pwr_mgmt(struct wl3501_card *this, int suspend)
 			spin_unlock_irqrestore(&this->lock, flags);
 			rc = wait_event_interruptible(this->wait,
 				this->sig_pwr_mgmt_confirm.status != 255);
-			printk(KERN_INFO "%s: %s status=%d\n", __func__,
-			       suspend ? "suspend" : "resume",
-			       this->sig_pwr_mgmt_confirm.status);
+			pr_info("%s: %s status=%d\n",
+				__func__, suspend ? "suspend" : "resume",
+				this->sig_pwr_mgmt_confirm.status);
 			goto out;
 		}
 	}
@@ -650,10 +652,10 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
 	int matchflag = 0;
 	struct wl3501_scan_confirm sig;
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
 	if (sig.status == WL3501_STATUS_SUCCESS) {
-		pr_debug("success");
+		pr_debug("success\n");
 		if ((this->net_type == IW_MODE_INFRA &&
 		     (sig.cap_info & WL3501_MGMT_CAPABILITY_ESS)) ||
 		    (this->net_type == IW_MODE_ADHOC &&
@@ -688,7 +690,7 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
 			}
 		}
 	} else if (sig.status == WL3501_STATUS_TIMEOUT) {
-		pr_debug("timeout");
+		pr_debug("timeout\n");
 		this->join_sta_bss = 0;
 		for (i = this->join_sta_bss; i < this->bss_cnt; i++)
 			if (!wl3501_mgmt_join(this, i))
@@ -822,8 +824,8 @@ static void wl3501_online(struct net_device *dev)
 {
 	struct wl3501_card *this = netdev_priv(dev);
 
-	printk(KERN_INFO "%s: Wireless LAN online. BSSID: %pM\n",
-	       dev->name, this->bssid);
+	pr_info("%s: Wireless LAN online. BSSID: %pM\n",
+		dev->name, this->bssid);
 	netif_wake_queue(dev);
 }
 
@@ -845,7 +847,7 @@ static int wl3501_mgmt_auth(struct wl3501_card *this)
 		.timeout = 1000,
 	};
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	memcpy(sig.mac_addr, this->bssid, ETH_ALEN);
 	return wl3501_esbq_exec(this, &sig, sizeof(sig));
 }
@@ -859,7 +861,7 @@ static int wl3501_mgmt_association(struct wl3501_card *this)
 		.cap_info	 = this->cap_info,
 	};
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	memcpy(sig.mac_addr, this->bssid, ETH_ALEN);
 	return wl3501_esbq_exec(this, &sig, sizeof(sig));
 }
@@ -869,7 +871,7 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
 	struct wl3501_card *this = netdev_priv(dev);
 	struct wl3501_join_confirm sig;
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
 	if (sig.status == WL3501_STATUS_SUCCESS) {
 		if (this->net_type == IW_MODE_INFRA) {
@@ -916,7 +918,7 @@ static inline void wl3501_alarm_interrupt(struct net_device *dev,
 					  struct wl3501_card *this)
 {
 	if (this->net_type == IW_MODE_INFRA) {
-		printk(KERN_INFO "Wireless LAN offline\n");
+		pr_info("Wireless LAN offline\n");
 		netif_stop_queue(dev);
 		wl3501_mgmt_resync(this);
 	}
@@ -928,7 +930,7 @@ static inline void wl3501_md_confirm_interrupt(struct net_device *dev,
 {
 	struct wl3501_md_confirm sig;
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
 	wl3501_free_tx_buffer(this, sig.data);
 	if (netif_queue_stopped(dev))
@@ -956,7 +958,7 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
 			    &addr4, sizeof(addr4));
 	if (!(addr4[0] == 0xAA && addr4[1] == 0xAA &&
 	      addr4[2] == 0x03 && addr4[4] == 0x00)) {
-		printk(KERN_INFO "Insupported packet type!\n");
+		pr_info("Insupported packet type!\n");
 		return;
 	}
 	pkt_len = sig.size + 12 - 24 - 4 - 6;
@@ -964,8 +966,8 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
 	skb = dev_alloc_skb(pkt_len + 5);
 
 	if (!skb) {
-		printk(KERN_WARNING "%s: Can't alloc a sk_buff of size %d.\n",
-		       dev->name, pkt_len);
+		pr_warn("%s: Can't alloc a sk_buff of size %d\n",
+			dev->name, pkt_len);
 		dev->stats.rx_dropped++;
 	} else {
 		skb->dev = dev;
@@ -983,7 +985,7 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
 static inline void wl3501_get_confirm_interrupt(struct wl3501_card *this,
 						u16 addr, void *sig, int size)
 {
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &this->sig_get_confirm,
 			    sizeof(this->sig_get_confirm));
 	wake_up(&this->wait);
@@ -995,7 +997,7 @@ static inline void wl3501_start_confirm_interrupt(struct net_device *dev,
 {
 	struct wl3501_start_confirm sig;
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
 	if (sig.status == WL3501_STATUS_SUCCESS)
 		netif_wake_queue(dev);
@@ -1007,7 +1009,7 @@ static inline void wl3501_assoc_confirm_interrupt(struct net_device *dev,
 	struct wl3501_card *this = netdev_priv(dev);
 	struct wl3501_assoc_confirm sig;
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
 
 	if (sig.status == WL3501_STATUS_SUCCESS)
@@ -1019,7 +1021,7 @@ static inline void wl3501_auth_confirm_interrupt(struct wl3501_card *this,
 {
 	struct wl3501_auth_confirm sig;
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 	wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
 
 	if (sig.status == WL3501_STATUS_SUCCESS)
@@ -1035,7 +1037,7 @@ static inline void wl3501_rx_interrupt(struct net_device *dev)
 	u8 sig_id;
 	struct wl3501_card *this = netdev_priv(dev);
 
-	pr_debug("entry");
+	pr_debug("entry\n");
 loop:
 	morepkts = 0;
 	if (!wl3501_esbq_confirm(this))
@@ -1158,7 +1160,7 @@ static int wl3501_reset_board(struct wl3501_card *this)
 		}
 		WL3501_NOPLOOP(10);
 	}
-	printk(KERN_WARNING "%s: failed to reset the board!\n", __func__);
+	pr_warn("%s: failed to reset the board!\n", __func__);
 	rc = -ENODEV;
 out:
 	return rc;
@@ -1209,7 +1211,7 @@ static int wl3501_init_firmware(struct wl3501_card *this)
 out:
 	return rc;
 fail:
-	printk(KERN_WARNING "%s: failed!\n", __func__);
+	pr_warn("%s: failed!\n", __func__);
 	goto out;
 }
 
@@ -1232,7 +1234,7 @@ static int wl3501_close(struct net_device *dev)
 	wl3501_block_interrupt(this);
 
 	rc = 0;
-	printk(KERN_INFO "%s: WL3501 closed\n", dev->name);
+	pr_info("%s: WL3501 closed\n", dev->name);
 	spin_unlock_irqrestore(&this->lock, flags);
 	return rc;
 }
@@ -1253,8 +1255,7 @@ static int wl3501_reset(struct net_device *dev)
 	wl3501_block_interrupt(this);
 
 	if (wl3501_init_firmware(this)) {
-		printk(KERN_WARNING "%s: Can't initialize Firmware!\n",
-		       dev->name);
+		pr_warn("%s: Can't initialize Firmware!\n", dev->name);
 		/* Free IRQ, and mark IRQ as unused */
 		free_irq(dev->irq, dev);
 		goto out;
@@ -1268,7 +1269,7 @@ static int wl3501_reset(struct net_device *dev)
 	wl3501_ack_interrupt(this);
 	wl3501_unblock_interrupt(this);
 	wl3501_mgmt_scan(this, 100);
-	pr_debug("%s: device reset", dev->name);
+	pr_debug("%s: device reset\n", dev->name);
 	rc = 0;
 out:
 	return rc;
@@ -1286,7 +1287,7 @@ static void wl3501_tx_timeout(struct net_device *dev)
 	rc = wl3501_reset(dev);
 	spin_unlock_irqrestore(&this->lock, flags);
 	if (rc)
-		printk(KERN_ERR "%s: Error %d resetting card on Tx timeout!\n",
+		pr_err("%s: Error %d resetting card on Tx timeout!\n",
 		       dev->name, rc);
 	else {
 		dev->trans_start = jiffies; /* prevent tx timeout */
@@ -1341,7 +1342,7 @@ static int wl3501_open(struct net_device *dev)
 	link->open++;
 
 	/* Initial WL3501 firmware */
-	pr_debug("%s: Initialize WL3501 firmware...", dev->name);
+	pr_debug("%s: Initialize WL3501 firmware...\n", dev->name);
 	if (wl3501_init_firmware(this))
 		goto fail;
 	/* Initial device variables */
@@ -1353,16 +1354,14 @@ static int wl3501_open(struct net_device *dev)
 	wl3501_unblock_interrupt(this);
 	wl3501_mgmt_scan(this, 100);
 	rc = 0;
-	pr_debug("%s: WL3501 opened", dev->name);
-	printk(KERN_INFO "%s: Card Name: %s\n"
-			 "%s: Firmware Date: %s\n",
-			 dev->name, this->card_name,
-			 dev->name, this->firmware_date);
+	pr_debug("%s: WL3501 opened\n", dev->name);
+	pr_info("%s: Card Name: %s\n", dev->name, this->card_name);
+	pr_info("%s: Firmware Date: %s\n", dev->name, this->firmware_date);
 out:
 	spin_unlock_irqrestore(&this->lock, flags);
 	return rc;
 fail:
-	printk(KERN_WARNING "%s: Can't initialize firmware!\n", dev->name);
+	pr_warn("%s: Can't initialize firmware!\n", dev->name);
 	goto out;
 }
 
@@ -1922,7 +1921,7 @@ static int wl3501_config(struct pcmcia_device *link)
 	dev->base_addr = link->resource[0]->start;
 	SET_NETDEV_DEV(dev, &link->dev);
 	if (register_netdev(dev)) {
-		printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
+		pr_notice("register_netdev() failed\n");
 		goto failed;
 	}
 
@@ -1931,8 +1930,7 @@ static int wl3501_config(struct pcmcia_device *link)
 	this->base_addr = dev->base_addr;
 
 	if (!wl3501_get_flash_mac_addr(this)) {
-		printk(KERN_WARNING "%s: Can't read MAC addr in flash ROM?\n",
-		       dev->name);
+		pr_warn("%s: Can't read MAC addr in flash ROM?\n", dev->name);
 		unregister_netdev(dev);
 		goto failed;
 	}
@@ -1941,10 +1939,8 @@ static int wl3501_config(struct pcmcia_device *link)
 		dev->dev_addr[i] = ((char *)&this->mac_addr)[i];
 
 	/* print probe information */
-	printk(KERN_INFO "%s: wl3501 @ 0x%3.3x, IRQ %d, "
-	       "MAC addr in flash ROM:%pM\n",
-	       dev->name, this->base_addr, (int)dev->irq,
-	       dev->dev_addr);
+	pr_info("%s: wl3501 @ 0x%3.3x, IRQ %d, MAC addr in flash ROM:%pM\n",
+		dev->name, this->base_addr, (int)dev->irq, dev->dev_addr);
 	/*
 	 * Initialize card parameters - added by jss
 	 */
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 20/20] zd_usb: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:54 UTC (permalink / raw)
  To: Daniel Drake, Ulrich Kunitz
  Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/zd1211rw/zd_usb.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index af83c43..7acaa1d 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -19,6 +19,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/firmware.h>
@@ -1551,29 +1553,28 @@ static int __init usb_init(void)
 {
 	int r;
 
-	pr_debug("%s usb_init()\n", driver.name);
+	pr_debug("usb_init()\n");
 
 	zd_workqueue = create_singlethread_workqueue(driver.name);
 	if (zd_workqueue == NULL) {
-		printk(KERN_ERR "%s couldn't create workqueue\n", driver.name);
+		pr_err("couldn't create workqueue\n");
 		return -ENOMEM;
 	}
 
 	r = usb_register(&driver);
 	if (r) {
 		destroy_workqueue(zd_workqueue);
-		printk(KERN_ERR "%s usb_register() failed. Error number %d\n",
-		       driver.name, r);
+		pr_err("usb_register() failed. Error number %d\n", r);
 		return r;
 	}
 
-	pr_debug("%s initialized\n", driver.name);
+	pr_debug("initialized\n");
 	return 0;
 }
 
 static void __exit usb_exit(void)
 {
-	pr_debug("%s usb_exit()\n", driver.name);
+	pr_debug("usb_exit()\n");
 	usb_deregister(&driver);
 	destroy_workqueue(zd_workqueue);
 }
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* [PATCH wireless-next 17/20] rtl818x: Use pr_<level>
From: Joe Perches @ 2012-06-15  5:53 UTC (permalink / raw)
  To: John W. Linville, Herton Ronaldo Krzesinski, Hin-Tak Leung,
	Larry Finger
  Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

Use a more current logging style.

Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/wireless/rtl818x/rtl8180/dev.c    |   35 ++++++++++---------------
 drivers/net/wireless/rtl818x/rtl8187/dev.c    |   15 +++++-----
 drivers/net/wireless/rtl818x/rtl8187/leds.c   |    6 +++-
 drivers/net/wireless/rtl818x/rtl8187/rfkill.c |    9 +++---
 4 files changed, 30 insertions(+), 35 deletions(-)

diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 2bebcb7..b0818a9 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -15,6 +15,8 @@
  * published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
@@ -913,15 +915,13 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 
 	err = pci_enable_device(pdev);
 	if (err) {
-		printk(KERN_ERR "%s (rtl8180): Cannot enable new PCI device\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot enable new PCI device\n", pci_name(pdev));
 		return err;
 	}
 
 	err = pci_request_regions(pdev, KBUILD_MODNAME);
 	if (err) {
-		printk(KERN_ERR "%s (rtl8180): Cannot obtain PCI resources\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot obtain PCI resources\n", pci_name(pdev));
 		return err;
 	}
 
@@ -932,16 +932,14 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 
 	if (mem_len < sizeof(struct rtl818x_csr) ||
 	    io_len < sizeof(struct rtl818x_csr)) {
-		printk(KERN_ERR "%s (rtl8180): Too short PCI resources\n",
-		       pci_name(pdev));
+		pr_err("%s: Too short PCI resources\n", pci_name(pdev));
 		err = -ENOMEM;
 		goto err_free_reg;
 	}
 
 	if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
 	    (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
-		printk(KERN_ERR "%s (rtl8180): No suitable DMA available\n",
-		       pci_name(pdev));
+		pr_err("%s: No suitable DMA available\n", pci_name(pdev));
 		goto err_free_reg;
 	}
 
@@ -949,8 +947,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 
 	dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8180_ops);
 	if (!dev) {
-		printk(KERN_ERR "%s (rtl8180): ieee80211 alloc failed\n",
-		       pci_name(pdev));
+		pr_err("%s: ieee80211 alloc failed\n", pci_name(pdev));
 		err = -ENOMEM;
 		goto err_free_reg;
 	}
@@ -967,8 +964,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 		priv->map = pci_iomap(pdev, 0, io_len);
 
 	if (!priv->map) {
-		printk(KERN_ERR "%s (rtl8180): Cannot map device memory\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot map device memory\n", pci_name(pdev));
 		goto err_free_dev;
 	}
 
@@ -1010,8 +1006,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 		chip_name = "RTL8185vD";
 		break;
 	default:
-		printk(KERN_ERR "%s (rtl8180): Unknown chip! (0x%x)\n",
-		       pci_name(pdev), reg >> 25);
+		pr_err("%s: Unknown chip! (0x%x)\n", pci_name(pdev), reg >> 25);
 		goto err_iounmap;
 	}
 
@@ -1052,13 +1047,12 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 		rf_name = "RTL8255";
 		break;
 	default:
-		printk(KERN_ERR "%s (rtl8180): Unknown RF! (0x%x)\n",
-		       pci_name(pdev), eeprom_val);
+		pr_err("%s: Unknown RF! (0x%x)\n", pci_name(pdev), eeprom_val);
 		goto err_iounmap;
 	}
 
 	if (!priv->rf) {
-		printk(KERN_ERR "%s (rtl8180): %s RF frontend not supported!\n",
+		pr_err("%s: %s RF frontend not supported!\n",
 		       pci_name(pdev), rf_name);
 		goto err_iounmap;
 	}
@@ -1074,8 +1068,8 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 
 	eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)mac_addr, 3);
 	if (!is_valid_ether_addr(mac_addr)) {
-		printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using"
-		       " randomly generated MAC addr\n", pci_name(pdev));
+		pr_warn("%s: Invalid hwaddr! Using randomly generated MAC addr\n",
+			pci_name(pdev));
 		random_ether_addr(mac_addr);
 	}
 	SET_IEEE80211_PERM_ADDR(dev, mac_addr);
@@ -1104,8 +1098,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
 
 	err = ieee80211_register_hw(dev);
 	if (err) {
-		printk(KERN_ERR "%s (rtl8180): Cannot register device\n",
-		       pci_name(pdev));
+		pr_err("%s: Cannot register device\n", pci_name(pdev));
 		goto err_iounmap;
 	}
 
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..ae631b4 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -20,6 +20,8 @@
  * published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/init.h>
 #include <linux/usb.h>
 #include <linux/slab.h>
@@ -1425,7 +1427,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
 
 	dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops);
 	if (!dev) {
-		printk(KERN_ERR "rtl8187: ieee80211 alloc failed\n");
+		pr_err("ieee80211 alloc failed\n");
 		return -ENOMEM;
 	}
 
@@ -1484,8 +1486,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
 	eeprom_93cx6_multiread(&eeprom, RTL8187_EEPROM_MAC_ADDR,
 			       (__le16 __force *)mac_addr, 3);
 	if (!is_valid_ether_addr(mac_addr)) {
-		printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly "
-		       "generated MAC address\n");
+		pr_warn("Invalid hwaddr! Using randomly generated MAC address\n");
 		random_ether_addr(mac_addr);
 	}
 	SET_IEEE80211_PERM_ADDR(dev, mac_addr);
@@ -1540,8 +1541,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
 		 * only uses it in their sources
 		 */
 		/*if (priv->asic_rev == 0) {
-			printk(KERN_WARNING "rtl8187: Forcing use of USB "
-			       "requests to write to radio registers\n");
+			pr_warn("Forcing use of USB requests to write to radio registers\n");
 			priv->asic_rev = 1;
 		}*/
 		switch (rtl818x_ioread8(priv, (u8 *)0xFFE1)) {
@@ -1595,8 +1595,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
 				      BIT(NL80211_IFTYPE_ADHOC) ;
 
 	if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b)
-		printk(KERN_INFO "rtl8187: inconsistency between id with OEM"
-		       " info!\n");
+		pr_info("inconsistency between id with OEM info!\n");
 
 	priv->rf = rtl8187_detect_rf(dev);
 	dev->extra_tx_headroom = (!priv->is_rtl8187b) ?
@@ -1609,7 +1608,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
 
 	err = ieee80211_register_hw(dev);
 	if (err) {
-		printk(KERN_ERR "rtl8187: Cannot register device\n");
+		pr_err("Cannot register device\n");
 		goto err_free_dmabuf;
 	}
 	mutex_init(&priv->conf_mutex);
diff --git a/drivers/net/wireless/rtl818x/rtl8187/leds.c b/drivers/net/wireless/rtl818x/rtl8187/leds.c
index c2d5b49..ad6bde4 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/leds.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/leds.c
@@ -15,6 +15,8 @@
 
 #ifdef CONFIG_RTL8187_LEDS
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <net/mac80211.h>
 #include <linux/usb.h>
 #include <linux/eeprom_93cx6.h>
@@ -154,7 +156,7 @@ static int rtl8187_register_led(struct ieee80211_hw *dev,
 
 	err = led_classdev_register(&priv->udev->dev, &led->led_dev);
 	if (err) {
-		printk(KERN_INFO "LEDs: Failed to register %s\n", name);
+		pr_info("Failed to register %s\n", name);
 		led->dev = NULL;
 		return err;
 	}
@@ -181,7 +183,7 @@ void rtl8187_leds_init(struct ieee80211_hw *dev, u16 custid)
 	/* According to the vendor driver, the LED operation depends on the
 	 * customer ID encoded in the EEPROM
 	 */
-	printk(KERN_INFO "rtl8187: Customer ID is 0x%02X\n", custid);
+	pr_info("Customer ID is 0x%02X\n", custid);
 	switch (custid) {
 	case EEPROM_CID_RSVD0:
 	case EEPROM_CID_RSVD1:
diff --git a/drivers/net/wireless/rtl818x/rtl8187/rfkill.c b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
index 3411671..cc9223f 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/rfkill.c
@@ -13,6 +13,8 @@
  * published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/types.h>
 #include <linux/usb.h>
 #include <net/mac80211.h>
@@ -36,8 +38,7 @@ void rtl8187_rfkill_init(struct ieee80211_hw *hw)
 	struct rtl8187_priv *priv = hw->priv;
 
 	priv->rfkill_off = rtl8187_is_radio_enabled(priv);
-	printk(KERN_INFO "rtl8187: wireless switch is %s\n",
-	       priv->rfkill_off ? "on" : "off");
+	pr_info("wireless switch is %s\n", priv->rfkill_off ? "on" : "off");
 	wiphy_rfkill_set_hw_state(hw->wiphy, !priv->rfkill_off);
 	wiphy_rfkill_start_polling(hw->wiphy);
 }
@@ -51,8 +52,8 @@ void rtl8187_rfkill_poll(struct ieee80211_hw *hw)
 	enabled = rtl8187_is_radio_enabled(priv);
 	if (unlikely(enabled != priv->rfkill_off)) {
 		priv->rfkill_off = enabled;
-		printk(KERN_INFO "rtl8187: wireless radio switch turned %s\n",
-		       enabled ? "on" : "off");
+		pr_info("wireless radio switch turned %s\n",
+			enabled ? "on" : "off");
 		wiphy_rfkill_set_hw_state(hw->wiphy, !enabled);
 	}
 	mutex_unlock(&priv->conf_mutex);
-- 
1.7.8.111.gad25c.dirty

^ permalink raw reply related

* Re: [net-next.git 1/4 (v5)] phy: add the EEE support and the way to access to the MMD registers.
From: Giuseppe CAVALLARO @ 2012-06-15  6:06 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: netdev, eric.dumazet, rayagond, davem, yuvalmin
In-Reply-To: <1339630137.2612.83.camel@bwh-desktop.uk.solarflarecom.com>

Hello Ben

On 6/14/2012 1:28 AM, Ben Hutchings wrote:

[snip]

>> > + */
>> > +int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
>> > +{
>> > +	int ret = -EPROTONOSUPPORT;
>> > +
>> > +	/* According to 802.3az,the EEE is supported only in full duplex-mode.
>> > +	 * Also EEE feature is active when core is operating with MII, GMII
>> > +	 * or RGMII.
>> > +	 */
>> > +	if ((phydev->duplex == DUPLEX_FULL) &&
>> > +	    ((phydev->interface == PHY_INTERFACE_MODE_MII) ||
>> > +	    (phydev->interface == PHY_INTERFACE_MODE_GMII) ||
>> > +	    (phydev->interface == PHY_INTERFACE_MODE_RGMII))) {
>> > +		int eee_cap, eee_link;
>> > +
>> > +		/* EEE ability must be supported in both local and remote
>> > +		 * PHY devices.
>> > +		 */
>> > +		eee_cap = phy_read_mmd_indirect(phydev->bus, MDIO_AN_EEE_LPABLE,
>> > +						MDIO_MMD_AN, phydev->addr);
>> > +		if (eee_cap < 0)
>> > +			return eee_cap;
>> > +
>> > +		eee_link = phy_read_mmd_indirect(phydev->bus, MDIO_PCS_EEE_ABLE,
>> > +						 MDIO_MMD_PCS, phydev->addr);
>> > +		if (eee_link < 0)
>> > +			return eee_link;
>> > +
>> > +		if (eee_cap && eee_link) {
> I don't see any harm in setting the 'clock stop' bit if requested, even
> if EEE is not supported and therefore we will never receive LPI from the
> link partner.

ok

> But you also use this condition to decide whether to enable TX LPI, so
> it's important that it does match the specification (§78.3) for whether
> EEE is supported - but it doesn't.  You need to work out what mode was
> autonegotiated, then check that the relevant bit is set in both our EEE
> advertising (*not* supported) and the LP EEE advertising masks.

I've some doubts and, before resending the patch, I kindly ask you some
further details just on this point.

In the code, I check if the EEE is supported and on GMII, MII and RGMII
and duplex mode; in case of success the Ethernet driver can enable the
TX LPI.
Indeed, I am only using the 3.20 and 7.61 registers w/o looking at the
7.60. So this should be fixed, shouldn't it?
Am I missing anything else?
What do you mean when say that it doesn't match the specification
(§78.3)? I'm pointing to the '78.3 Capabilities Negotiation' chapter of
the IEEE802-3az, is it ok?\x02\x03\x03\x03\x04\x05\x06\a\x04\b

\x03\x03\x03\x04Thanks for your feedback in advance.

peppe

^ permalink raw reply

* Re: [PATCH] net: remove skb_orphan_try()
From: Oliver Hartkopp @ 2012-06-15  7:15 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, jhautbois, netdev
In-Reply-To: <1339692164.7491.64.camel@edumazet-glaptop>

On 14.06.2012 18:42, Eric Dumazet wrote:


> 
> [PATCH] net: remove skb_orphan_try()
> 
> Orphaning skb in dev_hard_start_xmit() makes bonding behavior
> unfriendly for applications sending big UDP bursts : Once packets
> pass the bonding device and come to real device, they might hit a full
> qdisc and be dropped. Without orphaning, the sender is automatically
> throttled because sk->sk_wmemalloc reaches sk->sk_sndbuf (assuming
> sk_sndbuf is not too big)
> 
> We could try to defer the orphaning adding another test in
> dev_hard_start_xmit(), but all this seems of little gain,
> now that BQL tends to make packets more likely to be parked
> in Qdisc queues instead of NIC TX ring, in cases where performance
> matters.
> 
> Reverts commits :
> fc6055a5ba31 net: Introduce skb_orphan_try()
> 87fd308cfc6b net: skb_tx_hash() fix relative to skb_orphan_try()
> and removes SKBTX_DRV_NEEDS_SK_REF flag
> 
> Reported-and-bisected-by: Jean-Michel Hautbois <jhautbois@gmail.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  include/linux/skbuff.h |    7 ++-----
>  net/can/raw.c          |    3 ---
>  net/core/dev.c         |   23 +----------------------
>  net/iucv/af_iucv.c     |    1 -
>  4 files changed, 3 insertions(+), 31 deletions(-)
> 


As i originally introduced the SKBTX_DRV_NEEDS_SK_REF flag to preserve the skb
packet flow for CAN i'm pretty happy to see that skb_orphan_try() goes away
again :-)

I also tested this patch with my test-apps that would detect these problems.

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>

Tnx Eric!

Regards,
Oliver

^ permalink raw reply

* Re: [PATCH 0/8] dcbnl: Major simplifications
From: Thomas Graf @ 2012-06-15  7:26 UTC (permalink / raw)
  To: John Fastabend; +Cc: alexander.h.duyck, David Miller, netdev, lucy.liu
In-Reply-To: <4FDA0BFC.90807@intel.com>

On Thu, Jun 14, 2012 at 09:06:20AM -0700, John Fastabend wrote:
> On 6/14/2012 12:54 AM, Thomas Graf wrote:
> >On Wed, Jun 13, 2012 at 03:55:41PM -0700, David Miller wrote:
> >>Lots of deleted code, I like it :-)
> >>
> >>Applied, but could you send a follow-on patch to use BUG_ON() instead
> >>of that "if (!ptr) { /* ... */ BUG(); }" construct?
> >
> >Sure, I must have had a weak moment right there :)
> >
> 
> Nice! I'm a bit late but dumped this into my dcbnl netlink test kit
> and everything looks good so...

Thank you for testing John. Are you referring to lldp/test/nltest.c?
I only discovered it after you mentioned a test kit. I've been feeding
a list of commands through dcbtool for testing so far.

BTW, I believe you mentioned at some point, that there is a patch
available allowing non net_device based DCB users to use dcbnl.
Otherwise I would start with the effort :)

^ permalink raw reply

* Re: [PATCH wireless-next 00/20] Use pr_<level>
From: Johannes Berg @ 2012-06-15  7:36 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-wireless, b43-dev, libertas-dev, netdev, linux-kernel
In-Reply-To: <cover.1339739415.git.joe@perches.com>

On Thu, 2012-06-14 at 22:53 -0700, Joe Perches wrote:
> Update logging style

So ... since we make everybody else explain *why* they make a change, I
think you should too. I don't see a reason for this random patching of
perfectly good code.

johannes

^ permalink raw reply

* Re: [PATCH] net: remove my future former mail address
From: Sakari Ailus @ 2012-06-15  7:44 UTC (permalink / raw)
  To: Rémi Denis-Courmont; +Cc: netdev, Rémi Denis-Courmont
In-Reply-To: <1339662543-7203-1-git-send-email-remi@remlab.net>

Hi Rémi,

Rémi Denis-Courmont wrote:
> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
> Cc: Sakari Ailus <sakari.ailus@nokia.com>

Hmm. While you're at it, could you please remove mine from the same
files as well, please?

I wonder if this also means that the code will be without a maintainer
in the future.

Kind regards,

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox