Use pr_<level>
Subsystems (6)
cover Use pr_<level>
Update logging style
Joe Perches (20):
adm8211: Use pr_<level>
airo_cs: Use pr_<level>
at76c50x-usb: Use pr_<level>
atmel: atmel_cs: Use pr_<level>
b43: Use pr_<level>
b43legacy: Use pr_<level>
hostap: Use pr_<level>
ipw2x00: Use pr_<level>
libertas: Use pr_<level>
libertas_tf: Use pr_<level>
mac80211_hwsim: Use pr_<level>
mwl8k: Use pr_<level>
orinoco: Use pr_<level>
p54: Use pr_<level>
prism54: Use pr_<level>
ray_cs: Use pr_<level>
rtl818x: Use pr_<level>
ti: Use pr_<level>
wl3501_cs: Use pr_<level>
zd_usb: Use pr_<level>
drivers/net/wireless/adm8211.c | 67 ++-- drivers/net/wireless/airo_cs.c | 4 +- drivers/net/wireless/at76c50x-usb.c | 15 +- drivers/net/wireless/atmel.c | 71 ++-- drivers/net/wireless/atmel_cs.c | 4 +- drivers/net/wireless/b43/debugfs.c | 20 +- drivers/net/wireless/b43/main.c | 41 +-- drivers/net/wireless/b43/pcmcia.c | 5 +- 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 + 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 +- 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 +- 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 + 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 +- drivers/net/wireless/mac80211_hwsim.c | 61 ++-- drivers/net/wireless/mwl8k.c | 53 ++-- 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 +- drivers/net/wireless/p54/fwio.c | 6 +- drivers/net/wireless/p54/p54spi.c | 4 +- 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 +- drivers/net/wireless/ray_cs.c | 147 ++++----- 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 +- 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 +- drivers/net/wireless/wl3501_cs.c | 80 +++--- drivers/net/wireless/zd1211rw/zd_usb.c | 13 +- 115 files changed, 2579 insertions(+), 2795 deletions(-)
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 1/20 adm8211: Use pr_<level>
Use a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- drivers/net/wireless/adm8211.c | 67 ++++++++++++++++++---------------------- 1 files changed, 30 insertions(+), 37 deletions(-)
drivers/net/wireless/adm8211.c +30 -37
@@ -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 */ , ®);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; }
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 2/20 airo_cs: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- drivers/net/wireless/airo_cs.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/wireless/airo_cs.c +3 -1
@@ -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;
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 3/20 at76c50x-usb: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- drivers/net/wireless/at76c50x-usb.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-)
drivers/net/wireless/at76c50x-usb.c +7 -8
@@ -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);
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 4/20 atmel: atmel_cs: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- drivers/net/wireless/atmel.c | 71 ++++++++++++++++++++------------------- drivers/net/wireless/atmel_cs.c | 4 ++- 2 files changed, 39 insertions(+), 36 deletions(-)
drivers/net/wireless/atmel.c +36 -35
@@ -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,
drivers/net/wireless/atmel_cs.c +3 -1
@@ -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;
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 5/20 b43: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/b43/debugfs.c +11 -9
@@ -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. */
drivers/net/wireless/b43/main.c +19 -22
97 lines not on this page · raw message
drivers/net/wireless/b43/pcmcia.c +3 -2
@@ -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; }
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 6/20 b43legacy: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/b43legacy/b43legacy.h +6 -8
@@ -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. */
drivers/net/wireless/b43legacy/debugfs.c +3 -1
@@ -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 )
drivers/net/wireless/b43legacy/dma.c +2 -0
@@ -27,6 +27,8 @@*/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include "b43legacy.h" #include "dma.h" #include "main.h"
drivers/net/wireless/b43legacy/main.c +9 -7
@@ -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); }
drivers/net/wireless/b43legacy/phy.c +2 -0
@@ -29,6 +29,8 @@*/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/delay.h> #include <linux/pci.h> #include <linux/sched.h>
drivers/net/wireless/b43legacy/radio.c +3 -2
@@ -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 ; }
drivers/net/wireless/b43legacy/xmit.c +2 -0
@@ -28,6 +28,8 @@*/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <net/dst.h> #include "xmit.h"
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 7/20 hostap: Use pr_<level>
In reply to Joe PerchesUse 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.
--- 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(-)
drivers/net/wireless/hostap/hostap_80211_rx.c +57 -68
@@ -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 */
drivers/net/wireless/hostap/hostap_80211_tx.c +37 -41
163 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_ap.c +34 -43
203 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_cs.c +22 -31
135 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_download.c +64 -79
345 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_hw.c +195 -243
1,025 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_info.c +19 -17
@@ -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,
drivers/net/wireless/hostap/hostap_ioctl.c +80 -95
469 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_main.c +65 -77
289 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_pci.c +11 -15
@@ -4,6 +4,8 @@* driver patches from Reyk Floeter <[email protected]> and * Andy Warner <[email protected]> */ +#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);
Lines of this file are not shown. View the raw message.
drivers/net/wireless/hostap/hostap_plx.c +26 -43
69 lines not on this page · raw message
drivers/net/wireless/hostap/hostap_proc.c +10 -8
Lines of this file are not shown. View the raw message.
drivers/net/wireless/hostap/hostap_wlan.h +9 -7
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.8.111.gad25c.dirty
Part of the diff is not shown here. View the raw message.
PATCH 8/20 ipw2x00: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/ipw2x00/ipw2100.c +91 -134
@@ -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 ;
drivers/net/wireless/ipw2x00/ipw2100.h +2 -2
@@ -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)
drivers/net/wireless/ipw2x00/ipw2200.c +23 -31
154 lines not on this page · raw message
drivers/net/wireless/ipw2x00/ipw2200.h +24 -12
@@ -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)
drivers/net/wireless/ipw2x00/libipw.h +17 -7
@@ -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)
drivers/net/wireless/ipw2x00/libipw_geo.c +3 -0
@@ -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>
drivers/net/wireless/ipw2x00/libipw_module.c +5 -4
@@ -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 ; }
drivers/net/wireless/ipw2x00/libipw_rx.c +22 -27
127 lines not on this page · raw message
drivers/net/wireless/ipw2x00/libipw_tx.c +7 -4
@@ -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; }
drivers/net/wireless/ipw2x00/libipw_wx.c +3 -1
@@ -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 ; }
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 9/20 libertas: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/libertas/cmd.c +2 -0
@@ -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>
drivers/net/wireless/libertas/cmdresp.c +2 -0
@@ -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>
drivers/net/wireless/libertas/if_cs.c +6 -8
@@ -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); }
drivers/net/wireless/libertas/if_sdio.c +3 -3
@@ -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);
drivers/net/wireless/libertas/if_spi.c +2 -2
@@ -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;
drivers/net/wireless/libertas/if_usb.c +2 -2
@@ -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) &&
drivers/net/wireless/libertas/tx.c +3 -0
@@ -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>
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 10/20 libertas_tf: Use pr_<level>
In reply to Joe PerchesUse 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.
--- 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(-)
drivers/net/wireless/libertas_tf/cmd.c +6 -6
@@ -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 ; }
drivers/net/wireless/libertas_tf/deb_defs.h +69 -36
114 lines not on this page · raw message
drivers/net/wireless/libertas_tf/if_usb.c +1 -1
@@ -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",
drivers/net/wireless/libertas_tf/main.c +7 -7
@@ -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 );
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 11/20 mac80211_hwsim: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- drivers/net/wireless/mac80211_hwsim.c | 61 ++++++++++++++------------------ 1 files changed, 27 insertions(+), 34 deletions(-)
drivers/net/wireless/mac80211_hwsim.c +27 -34
@@ -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 ();
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 12/20 mwl8k: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
Add missing newline terminations.
--- drivers/net/wireless/mwl8k.c | 53 ++++++++++++++++++++--------------------- 1 files changed, 26 insertions(+), 27 deletions(-)
drivers/net/wireless/mwl8k.c +26 -27
@@ -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)
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 13/20 orinoco: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/orinoco/airport.c +14 -14
@@ -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); }
drivers/net/wireless/orinoco/cfg.c +5 -4
@@ -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 {
drivers/net/wireless/orinoco/hermes.c +35 -36
157 lines not on this page · raw message
drivers/net/wireless/orinoco/hw.c +34 -45
241 lines not on this page · raw message
drivers/net/wireless/orinoco/main.c +89 -105
531 lines not on this page · raw message
drivers/net/wireless/orinoco/mic.c +8 -5
@@ -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 ; }
drivers/net/wireless/orinoco/orinoco.h +9 -4
@@ -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 */ /********************************************************************/
drivers/net/wireless/orinoco/orinoco_cs.c +5 -6
@@ -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; }
drivers/net/wireless/orinoco/orinoco_nortel.c +20 -20
@@ -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); }
drivers/net/wireless/orinoco/orinoco_pci.c +12 -11
@@ -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); }
drivers/net/wireless/orinoco/orinoco_pci.h +2 -4
@@ -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 ; }
drivers/net/wireless/orinoco/orinoco_plx.c +20 -20
@@ -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); }
drivers/net/wireless/orinoco/orinoco_tmd.c +13 -12
@@ -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); }
drivers/net/wireless/orinoco/orinoco_usb.c +69 -76
433 lines not on this page · raw message
drivers/net/wireless/orinoco/scan.c +8 -8
@@ -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; }
drivers/net/wireless/orinoco/spectrum_cs.c +3 -3
@@ -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; }
drivers/net/wireless/orinoco/wext.c +15 -13
@@ -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); }
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 14/20 p54: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- drivers/net/wireless/p54/fwio.c | 6 ++++-- drivers/net/wireless/p54/p54spi.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/wireless/p54/fwio.c +4 -2
@@ -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 ;
drivers/net/wireless/p54/p54spi.c +3 -1
@@ -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; }
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 15/20 prism54: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/prism54/isl_ioctl.c +32 -37
@@ -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); } }
drivers/net/wireless/prism54/islpci_dev.c +27 -30
180 lines not on this page · raw message
drivers/net/wireless/prism54/islpci_eth.c +10 -15
@@ -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); } }
drivers/net/wireless/prism54/islpci_hotplug.c +15 -19
@@ -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 ; }
drivers/net/wireless/prism54/islpci_mgt.c +28 -47
174 lines not on this page · raw message
drivers/net/wireless/prism54/islpci_mgt.h +7 -2
@@ -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 */
drivers/net/wireless/prism54/oid_mgt.c +11 -12
@@ -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,
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 16/20 ray_cs: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- drivers/net/wireless/ray_cs.c | 147 +++++++++++++++++++---------------------- 1 files changed, 69 insertions(+), 78 deletions(-)
drivers/net/wireless/ray_cs.c +69 -78
@@ -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 );
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 17/20 rtl818x: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Convert printk(KERN_DEBUG to pr_debug(.
Coalesce formats, align arguments.
--- 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(-)
drivers/net/wireless/rtl818x/rtl8180/dev.c +14 -21
@@ -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; }
drivers/net/wireless/rtl818x/rtl8187/dev.c +7 -8
@@ -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);
drivers/net/wireless/rtl818x/rtl8187/leds.c +4 -2
@@ -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 :
drivers/net/wireless/rtl818x/rtl8187/rfkill.c +5 -4
@@ -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);
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 18/20 ti: Use pr_<level>
In reply to Joe PerchesUse 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.
--- 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(-)
drivers/net/wireless/ti/wl1251/acx.c +75 -76
@@ -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; }
drivers/net/wireless/ti/wl1251/boot.c +25 -26
167 lines not on this page · raw message
drivers/net/wireless/ti/wl1251/cmd.c +38 -38
252 lines not on this page · raw message
drivers/net/wireless/ti/wl1251/init.c +8 -8
@@ -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,
drivers/net/wireless/ti/wl1251/io.c +12 -15
@@ -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); }
drivers/net/wireless/ti/wl1251/main.c +51 -52
351 lines not on this page · raw message
drivers/net/wireless/ti/wl1251/ps.c +8 -8
@@ -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 )
drivers/net/wireless/ti/wl1251/rx.c +4 -4
@@ -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));
drivers/net/wireless/ti/wl1251/sdio.c +10 -10
@@ -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);
drivers/net/wireless/ti/wl1251/spi.c +10 -10
@@ -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);
drivers/net/wireless/ti/wl1251/tx.c +10 -11
@@ -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 ;
drivers/net/wireless/ti/wl1251/wl1251.h +10 -10
@@ -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) \
drivers/net/wireless/ti/wl12xx/acx.c +1 -1
@@ -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; }
drivers/net/wireless/ti/wl12xx/cmd.c +9 -9
@@ -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;
drivers/net/wireless/ti/wl12xx/main.c +20 -19
@@ -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);
drivers/net/wireless/ti/wl18xx/acx.c +6 -6
@@ -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; }
drivers/net/wireless/ti/wl18xx/main.c +27 -27
155 lines not on this page · raw message
drivers/net/wireless/ti/wl18xx/tx.c +5 -5
@@ -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 ; }
drivers/net/wireless/ti/wlcore/acx.c +114 -115
721 lines not on this page · raw message
drivers/net/wireless/ti/wlcore/boot.c +28 -28
56 lines not on this page · raw message
drivers/net/wireless/ti/wlcore/cmd.c +81 -83
164 lines not on this page · raw message
drivers/net/wireless/ti/wlcore/debug.h +11 -11
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ti/wlcore/debugfs.c +21 -21
42 lines not on this page · raw message
drivers/net/wireless/ti/wlcore/main.c +138 -143
281 lines not on this page · raw message
drivers/net/wireless/ti/wlcore/scan.c +34 -34
68 lines not on this page · raw message
drivers/net/wireless/ti/wlcore/testmode.c +8 -8
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.8.111.gad25c.dirty
Part of the diff is not shown here. View the raw message.
Re: [PATCH wireless-next 18/20] ti: Use pr_<level>
Hi Joe,
Quoted 11 lines · Joe Perches
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 <[email protected]>---
As Johannes already mentioned, I have to also ask why do you need to do this? I see the point, slightly, with the wl1251 code, because it is still using printks, but with wlcore and friends, there's no functional change.
[...]
Quoted 25 lines
drivers/net/wireless/ti/wl1251/wl1251.h +6
-8@@ -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)
drivers/net/wireless/ti/wl1251/wl1251.h enum { · line 73
Quoted 10 lines
drivers/net/wireless/ti/wl1251/wl1251.h +4
-2+#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)
As mentioned above, this change here is acceptable, but removing the \n from the macro and adding it at the end of each and every call is useless and will just skew git-blame and make it harder to do rebase or apply patches because of conflicts.
[...]
Quoted 7 lines
drivers/net/wireless/ti/wlcore/debug.h +0
-0@@ -61,22 +61,22 @@ extern u32 wl12xx_debug_level;#define DEBUG_DUMP_LIMIT 1024
drivers/net/wireless/ti/wlcore/debug.h extern u32 wl12xx_debug_level; · line 68
Quoted 10 lines
drivers/net/wireless/ti/wlcore/debug.h +4
-4-#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)
Using pr_warn instead of pr_warning is pointless. pr_warning is the main definition, actually, and pr_warn is just a "mirror".
Quoted 8 lines
drivers/net/wireless/ti/wlcore/debug.h +3
-4-#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...) \
drivers/net/wireless/ti/wlcore/debug.h extern u32 wl12xx_debug_level; · line 80
Quoted 10 lines
drivers/net/wireless/ti/wlcore/debug.h +4
-3+ 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)
Again, moving the \n from the macro definition and changing all the callers is an unnecessary, intrusive change.
We have wanted to change "wl1271" to "wl12xx" for a long time, but we don't do it exactly because this means we need to change the calls everywhere.
So, this is a NACK from me, unless you have a really good reason why this change is needed.
--
Luca.
Re: [PATCH wireless-next 18/20] ti: Use pr_<level>
Quoted 1 line · Luciano Coelho
Hi Joe,
Hi Luciano.
Quoted 2 lines
As Johannes already mentioned, I have to also ask why do you need to do this?
To use a more consistent logging style.
To minimize unnecessary changes when adding similar drivers based on this code.
Quoted 3 lines
I see the point, slightly, with the wl1251 code, because it is
still using printks, but with wlcore and friends, there's no functional change.
Using a consistent logging style minimizes defects.
Quoted 4 lines
As mentioned above, this change here is acceptable, but removing the \n from the macro and adding it at the end of each and every call is useless and will just skew git-blame and make it harder to do rebase or apply patches because of conflicts.
In practice, the merging won't be much of an issue. Neither will git blame.
Quoted 7 lines
drivers/net/wireless/ti/wlcore/debug.h extern u32 wl12xx_debug_level; · line 68
Quoted 4 lines
drivers/net/wireless/ti/wlcore/debug.h +2
-2-#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)Using
pr_warninstead ofpr_warningis pointless.pr_warningis the main definition, actually, andpr_warnis just a "mirror".
I expect one day to reverse the definitions.
The kernel is moving, albeit slowly to prefer pr_warn to mirror dev_warn, netdev_warn, etc.
Most of these uses will eventually become netdev_warn. netdev_warn still uses a \n.
Quoted 6 lines
Again, moving the \n from the macro definition and changing all the callers is an unnecessary, intrusive change.
We have wanted to change "wl1271" to "wl12xx" for a long time, but we don't do it exactly because this means we need to change the calls everywhere.
Nothing in ever _needed_, no child will go hungry or fed here. This is a consistency change.
There are a couple of instances where \n is currently used unnecessarily that are fixed in the conversion.
$ git grep -E "\bwl12[0-9]+_[a-z]+\s*\(.*\\\\n\"" drivers/net/wireless/ti
drivers/net/wireless/ti/wl12xx/cmd.c: wl1271_debug(DEBUG_CMD, "FEM autodetect: %s, manufacturer: %d\n",
drivers/net/wireless/ti/wl12xx/cmd.c: wl1271_debug(DEBUG_CMD, "FEM autodetect: %s, manufacturer: %d\n",
drivers/net/wireless/ti/wlcore/main.c: wl1271_error("Incorrect ampdu action id=%x\n", action);People make these mistakes because the more common and adjacent dev_<level> code _use_
a newline. Using a consistent style minimzes these defects.
cheers, Joe
PATCH 19/20 wl3501_cs: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
Add newline terminations to pr_debug uses.
--- drivers/net/wireless/wl3501_cs.c | 80 ++++++++++++++++++-------------------- 1 files changed, 38 insertions(+), 42 deletions(-)
drivers/net/wireless/wl3501_cs.c +38 -42
@@ -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 */
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH 20/20 zd_usb: Use pr_<level>
In reply to Joe PerchesUse a more current logging style.
Convert printks to pr_<level>.
Coalesce formats, align arguments.
--- drivers/net/wireless/zd1211rw/zd_usb.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
drivers/net/wireless/zd1211rw/zd_usb.c +7 -6
@@ -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); }
Signature · 1 line
1.7.8.111.gad25c.dirty
Johannes Berg
maintainerQuoted 1 line · Joe Perches
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
Quoted 5 lines · Johannes Berg
Quoted 1 line · Joe Perches
Update logging style
So ... since we make everybody else explain *why* they make a change, I think you should too.
To improve logging style consistency.
To reduce logging defects.
To standardize logging prefixes.
To tee up conversions of:
pr_<level>("%s: ...", ([truct netdevice *]foo)->name, ...)
to
netdev_<level>(foo, "...", ...) Quoted 4 lines · Joe Perches
To tee up conversions of:
pr_<level>("%s: ...", ([truct netdevice *]foo)->name, ...) to netdev_<level>(foo, "...", ...)
If the goal is to do the latter, why introduce needless patch churn now just to get to pr_<level>? Having a standardized netdev_<label>() adds real benefit that can be weighed against the cost of code churn. Why not just wait until the netdev_<level> infrastructure can be introduced? It will save effort on everybody's part.
- Ted
Quoted 11 lines · Ted Ts'o
Quoted 4 lines · Joe Perches
To tee up conversions of:
pr_<level>("%s: ...", ([truct netdevice *]foo)->name, ...) to netdev_<level>(foo, "...", ...)If the goal is to do the latter, why introduce needless patch churn now just to get to pr_<level>? Having a standardized netdev_<label>() adds real benefit that can be weighed against the cost of code churn. Why not just wait until the netdev_<level> infrastructure can be introduced? It will save effort on everybody's part.
Not really. This standardizes prefixes as is.
The newlines and such will still occur. The git blame noise etc too.
The standardization via spatch will be significantly easier this way. It's also a far easier pattern to verify.