summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>2015-03-17 00:00:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-20 13:13:59 +0100
commitd69d20549be9e44b928d5f857898fe7432deeaac (patch)
treec3b56b01c5f47c95fbb5e07c558980a441ebbd9a
parent2729011c40ba0bde6ad5381fa84775fff7456c1a (diff)
downloadlinux-d69d20549be9e44b928d5f857898fe7432deeaac.tar.gz
linux-d69d20549be9e44b928d5f857898fe7432deeaac.tar.bz2
linux-d69d20549be9e44b928d5f857898fe7432deeaac.zip
staging: rtl8192e: fix coding style warnings (printk -> netdev_*)
Use netdev_*, dev_* or pr_* instead of printk where possible. KERN_DEBUG messages are left intact as pr_dbg has different behaviour. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c4
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_core.c54
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_dm.c11
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_pci.c27
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_pm.c17
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_ps.c12
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_wx.c41
-rw-r--r--drivers/staging/rtl8192e/rtl819x_TSProc.c5
-rw-r--r--drivers/staging/rtl8192e/rtllib.h4
-rw-r--r--drivers/staging/rtl8192e/rtllib_crypt_tkip.c4
-rw-r--r--drivers/staging/rtl8192e/rtllib_crypt_wep.c3
-rw-r--r--drivers/staging/rtl8192e/rtllib_debug.h2
-rw-r--r--drivers/staging/rtl8192e/rtllib_rx.c72
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c137
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac_wx.c4
-rw-r--r--drivers/staging/rtl8192e/rtllib_tx.c40
-rw-r--r--drivers/staging/rtl8192e/rtllib_wx.c6
17 files changed, 233 insertions, 210 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 14bea11a7d80..170ff12c450a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -224,8 +224,8 @@ void rtl8192e_SetHwReg(struct net_device *dev, u8 variable, u8 *val)
break;
default:
- printk(KERN_INFO "SetHwReg8185(): invalid ACI: %d !\n",
- eACI);
+ netdev_info(dev, "SetHwReg8185(): invalid ACI: %d !\n",
+ eACI);
break;
}
priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACM_CTRL,
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 14a32a8d026c..bcf7a9d822e2 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -476,7 +476,7 @@ void rtl8192_tx_timeout(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
schedule_work(&priv->reset_wq);
- printk(KERN_INFO "TXTIMEOUT");
+ netdev_info(dev, "TXTIMEOUT");
}
void rtl8192_irq_enable(struct net_device *dev)
@@ -1211,8 +1211,8 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->AcmControl = 0;
priv->pFirmware = vzalloc(sizeof(struct rt_firmware));
if (!priv->pFirmware)
- printk(KERN_ERR
- "rtl8192e: Unable to allocate space for firmware\n");
+ netdev_err(dev,
+ "rtl8192e: Unable to allocate space for firmware\n");
skb_queue_head_init(&priv->rx_queue);
skb_queue_head_init(&priv->skb_queue);
@@ -1284,8 +1284,8 @@ static short rtl8192_get_channel_map(struct net_device *dev)
}
if (priv->ChannelPlan >= COUNTRY_CODE_MAX) {
- printk(KERN_INFO
- "rtl819x_init:Error channel plan! Set to default.\n");
+ netdev_info(dev,
+ "rtl819x_init:Error channel plan! Set to default.\n");
priv->ChannelPlan = COUNTRY_CODE_FCC;
}
RT_TRACE(COMP_INIT, "Channel plan is %d\n", priv->ChannelPlan);
@@ -1329,7 +1329,7 @@ static short rtl8192_init(struct net_device *dev)
rtl8192_irq_disable(dev);
if (request_irq(dev->irq, rtl8192_interrupt, IRQF_SHARED,
dev->name, dev)) {
- printk(KERN_ERR "Error allocating IRQ %d", dev->irq);
+ netdev_err(dev, "Error allocating IRQ %d", dev->irq);
return -1;
} else {
priv->irq = dev->irq;
@@ -1337,7 +1337,7 @@ static short rtl8192_init(struct net_device *dev)
}
if (rtl8192_pci_initdescring(dev) != 0) {
- printk(KERN_ERR "Endopoints initialization failed");
+ netdev_err(dev, "Endopoints initialization failed");
free_irq(dev->irq, dev);
return -1;
}
@@ -1357,7 +1357,7 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev)
if ((i == TXCMD_QUEUE) || (i == HCCA_QUEUE))
continue;
if (skb_queue_len(&(&priv->tx_ring[i])->queue) > 0) {
- printk(KERN_INFO "===>tx queue is not empty:%d, %d\n",
+ netdev_info(dev, "===>tx queue is not empty:%d, %d\n",
i, skb_queue_len(&(&priv->tx_ring[i])->queue));
return 0;
}
@@ -1406,10 +1406,10 @@ static enum reset_type rtl819x_TxCheckStuck(struct net_device *dev)
tcb_desc->nStuckCount++;
bCheckFwTxCnt = true;
if (tcb_desc->nStuckCount > 1)
- printk(KERN_INFO
- "%s: QueueID=%d tcb_desc->nStuckCount=%d\n",
- __func__, QueueID,
- tcb_desc->nStuckCount);
+ netdev_info(dev,
+ "%s: QueueID=%d tcb_desc->nStuckCount=%d\n",
+ __func__, QueueID,
+ tcb_desc->nStuckCount);
}
}
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
@@ -1456,13 +1456,13 @@ static enum reset_type rtl819x_ifcheck_resetornot(struct net_device *dev)
if (TxResetType == RESET_TYPE_NORMAL ||
RxResetType == RESET_TYPE_NORMAL) {
- printk(KERN_INFO "%s(): TxResetType is %d, RxResetType is %d\n",
- __func__, TxResetType, RxResetType);
+ netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n",
+ __func__, TxResetType, RxResetType);
return RESET_TYPE_NORMAL;
} else if (TxResetType == RESET_TYPE_SILENT ||
RxResetType == RESET_TYPE_SILENT) {
- printk(KERN_INFO "%s(): TxResetType is %d, RxResetType is %d\n",
- __func__, TxResetType, RxResetType);
+ netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n",
+ __func__, TxResetType, RxResetType);
return RESET_TYPE_SILENT;
} else {
return RESET_TYPE_NORESET;
@@ -1534,7 +1534,7 @@ RESET_START:
if (ieee->state == RTLLIB_LINKED) {
SEM_DOWN_IEEE_WX(&ieee->wx_sem);
- printk(KERN_INFO "ieee->state is RTLLIB_LINKED\n");
+ netdev_info(dev, "ieee->state is RTLLIB_LINKED\n");
rtllib_stop_send_beacons(priv->rtllib);
del_timer_sync(&ieee->associate_timer);
cancel_delayed_work(&ieee->associate_retry_wq);
@@ -1542,7 +1542,7 @@ RESET_START:
netif_carrier_off(dev);
SEM_UP_IEEE_WX(&ieee->wx_sem);
} else {
- printk(KERN_INFO "ieee->state is NOT LINKED\n");
+ netdev_info(dev, "ieee->state is NOT LINKED\n");
rtllib_softmac_stop_protocol(priv->rtllib, 0 , true);
}
@@ -1741,9 +1741,9 @@ void rtl819x_watchdog_wqcallback(void *data)
if (ieee->eRFPowerState == eRfOff)
RT_TRACE(COMP_ERR, "========>%s()\n", __func__);
- printk(KERN_INFO
- "===>%s(): AP is power off, chan:%d, connect another one\n",
- __func__, priv->chan);
+ netdev_info(dev,
+ "===>%s(): AP is power off, chan:%d, connect another one\n",
+ __func__, priv->chan);
ieee->state = RTLLIB_ASSOCIATING;
@@ -2875,7 +2875,8 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
- printk(KERN_INFO "Unable to obtain 32bit DMA for consistent allocations\n");
+ dev_info(&pdev->dev,
+ "Unable to obtain 32bit DMA for consistent allocations\n");
goto err_pci_disable;
}
}
@@ -2908,7 +2909,8 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
goto err_rel_rtllib;
}
- printk(KERN_INFO "Memory mapped space start: 0x%08lx\n", pmem_start);
+ dev_info(&pdev->dev, "Memory mapped space start: 0x%08lx\n",
+ pmem_start);
if (!request_mem_region(pmem_start, pmem_len, DRV_NAME)) {
RT_TRACE(COMP_ERR, "request_mem_region failed!");
goto err_rel_rtllib;
@@ -3010,7 +3012,7 @@ static void rtl8192_pci_disconnect(struct pci_dev *pdev)
rtl8192_free_tx_ring(dev, i);
if (priv->irq) {
- printk(KERN_INFO "Freeing irq %d\n", dev->irq);
+ dev_info(&pdev->dev, "Freeing irq %d\n", dev->irq);
free_irq(dev->irq, dev);
priv->irq = 0;
}
@@ -3084,8 +3086,8 @@ bool NicIFDisableNIC(struct net_device *dev)
static int __init rtl8192_pci_module_init(void)
{
- printk(KERN_INFO "\nLinux kernel driver for RTL8192E WLAN cards\n");
- printk(KERN_INFO "Copyright (c) 2007-2008, Realsil Wlan Driver\n");
+ pr_info("\nLinux kernel driver for RTL8192E WLAN cards\n");
+ pr_info("Copyright (c) 2007-2008, Realsil Wlan Driver\n");
if (0 != pci_register_driver(&rtl8192_pci_driver)) {
DMESG("No device found");
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 573786122a56..aa95e88a6931 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -1420,7 +1420,8 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
TM_Trigger = 1;
return;
} else {
- printk(KERN_INFO "===============>Schedule TxPowerTrackingWorkItem\n");
+ netdev_info(dev,
+ "===============>Schedule TxPowerTrackingWorkItem\n");
queue_delayed_work_rsl(priv->priv_wq, &priv->txpower_tracking_wq, 0);
TM_Trigger = 0;
@@ -2131,10 +2132,10 @@ static void dm_check_edca_turbo(struct net_device *dev)
static int wb_tmp;
if (wb_tmp == 0) {
- printk(KERN_INFO
- "%s():iot peer is %s, bssid: %pM\n", __func__,
- peername[pHTInfo->IOTPeer],
- priv->rtllib->current_network.bssid);
+ netdev_info(dev,
+ "%s():iot peer is %s, bssid: %pM\n",
+ __func__, peername[pHTInfo->IOTPeer],
+ priv->rtllib->current_network.bssid);
wb_tmp = 1;
}
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
index bbbbcf73564b..51f53be2de17 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pci.c
@@ -65,31 +65,32 @@ bool rtl8192_pci_findadapter(struct pci_dev *pdev, struct net_device *dev)
if (DeviceID == 0x8172) {
switch (RevisionID) {
case HAL_HW_PCI_REVISION_ID_8192PCIE:
- printk(KERN_INFO
- "Adapter(8192 PCI-E) is found - DeviceID=%x\n",
- DeviceID);
+ dev_info(&pdev->dev,
+ "Adapter(8192 PCI-E) is found - DeviceID=%x\n",
+ DeviceID);
priv->card_8192 = NIC_8192E;
break;
case HAL_HW_PCI_REVISION_ID_8192SE:
- printk(KERN_INFO
- "Adapter(8192SE) is found - DeviceID=%x\n",
- DeviceID);
+ dev_info(&pdev->dev,
+ "Adapter(8192SE) is found - DeviceID=%x\n",
+ DeviceID);
priv->card_8192 = NIC_8192SE;
break;
default:
- printk(KERN_INFO "UNKNOWN nic type(%4x:%4x)\n",
- pdev->vendor, pdev->device);
+ dev_info(&pdev->dev,
+ "UNKNOWN nic type(%4x:%4x)\n",
+ pdev->vendor, pdev->device);
priv->card_8192 = NIC_UNKNOWN;
return false;
}
}
if (priv->ops->nic_type != priv->card_8192) {
- printk(KERN_INFO
- "Detect info(%x) and hardware info(%x) not match!\n",
- priv->ops->nic_type, priv->card_8192);
- printk(KERN_INFO
- "Please select proper driver before install!!!!\n");
+ dev_info(&pdev->dev,
+ "Detect info(%x) and hardware info(%x) not match!\n",
+ priv->ops->nic_type, priv->card_8192);
+ dev_info(&pdev->dev,
+ "Please select proper driver before install!!!!\n");
return false;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c
index bffe9c4b81b2..ca6ecfc8299e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c
@@ -29,14 +29,14 @@ int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state)
struct r8192_priv *priv = rtllib_priv(dev);
u32 ulRegRead;
- printk(KERN_INFO "============> r8192E suspend call.\n");
+ netdev_info(dev, "============> r8192E suspend call.\n");
del_timer_sync(&priv->gpio_polling_timer);
cancel_delayed_work(&priv->gpio_change_rf_wq);
priv->polling_timer_on = 0;
if (!netif_running(dev)) {
- printk(KERN_INFO
- "RTL819XE:UI is open out of suspend function\n");
+ netdev_info(dev,
+ "RTL819XE:UI is open out of suspend function\n");
goto out_pci_suspend;
}
@@ -57,7 +57,7 @@ int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state)
write_nic_byte(dev, MacBlkCtrl, 0xa);
}
out_pci_suspend:
- printk("r8192E support WOL call??????????????????????\n");
+ netdev_info(dev, "r8192E support WOL call??????????????????????\n");
if (priv->rtllib->bSupportRemoteWakeUp)
RT_TRACE(COMP_POWER,
"r8192E support WOL call!!!!!!!!!!!!!!!!!!.\n");
@@ -79,14 +79,13 @@ int rtl8192E_resume(struct pci_dev *pdev)
int err;
u32 val;
- printk(KERN_INFO "================>r8192E resume call.\n");
+ netdev_info(dev, "================>r8192E resume call.\n");
pci_set_power_state(pdev, PCI_D0);
err = pci_enable_device(pdev);
if (err) {
- printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
- dev->name);
+ netdev_err(dev, "pci_enable_device failed on resume\n");
return err;
}
pci_restore_state(pdev);
@@ -101,8 +100,8 @@ int rtl8192E_resume(struct pci_dev *pdev)
check_rfctrl_gpio_timer((unsigned long)dev);
if (!netif_running(dev)) {
- printk(KERN_INFO
- "RTL819XE:UI is open out of resume function\n");
+ netdev_info(dev,
+ "RTL819XE:UI is open out of resume function\n");
goto out;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
index b5abea5346eb..40c3be9a5e54 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
@@ -100,14 +100,14 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u64 time)
if ((time - jiffies) <= msecs_to_jiffies(MIN_SLEEP_TIME)) {
spin_unlock_irqrestore(&priv->ps_lock, flags);
- printk(KERN_INFO "too short to sleep::%lld < %ld\n",
- time - jiffies, msecs_to_jiffies(MIN_SLEEP_TIME));
+ netdev_info(dev, "too short to sleep::%lld < %ld\n",
+ time - jiffies, msecs_to_jiffies(MIN_SLEEP_TIME));
return;
}
if ((time - jiffies) > msecs_to_jiffies(MAX_SLEEP_TIME)) {
- printk(KERN_INFO "========>too long to sleep:%lld > %ld\n",
- time - jiffies, msecs_to_jiffies(MAX_SLEEP_TIME));
+ netdev_info(dev, "========>too long to sleep:%lld > %ld\n",
+ time - jiffies, msecs_to_jiffies(MAX_SLEEP_TIME));
spin_unlock_irqrestore(&priv->ps_lock, flags);
return;
}
@@ -203,8 +203,8 @@ void rtllib_ips_leave_wq(struct net_device *dev)
__func__);
return;
} else {
- printk(KERN_INFO "=========>%s(): IPSLeave\n",
- __func__);
+ netdev_info(dev, "=========>%s(): IPSLeave\n",
+ __func__);
queue_work_rsl(priv->rtllib->wq,
&priv->rtllib->ips_leave_wq);
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 757c30994d77..d074f974fe11 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -255,7 +255,7 @@ static int r8192se_wx_set_radio(struct net_device *dev,
down(&priv->wx_sem);
- printk(KERN_INFO "%s(): set radio ! extra is %d\n", __func__, *extra);
+ netdev_info(dev, "%s(): set radio ! extra is %d\n", __func__, *extra);
if ((*extra != 0) && (*extra != 1)) {
RT_TRACE(COMP_ERR,
"%s(): set radio an err value,must 0(radio off) or 1(radio on)\n",
@@ -279,8 +279,8 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev,
down(&priv->wx_sem);
- printk(KERN_INFO "%s(): set lps awake interval ! extra is %d\n",
- __func__, *extra);
+ netdev_info(dev, "%s(): set lps awake interval ! extra is %d\n",
+ __func__, *extra);
pPSC->RegMaxLPSAwakeIntvl = *extra;
up(&priv->wx_sem);
@@ -295,9 +295,9 @@ static int r8192se_wx_set_force_lps(struct net_device *dev,
down(&priv->wx_sem);
- printk(KERN_INFO
- "%s(): force LPS ! extra is %d (1 is open 0 is close)\n",
- __func__, *extra);
+ netdev_info(dev,
+ "%s(): force LPS ! extra is %d (1 is open 0 is close)\n",
+ __func__, *extra);
priv->force_lps = *extra;
up(&priv->wx_sem);
return 0;
@@ -314,8 +314,8 @@ static int r8192_wx_set_debugflag(struct net_device *dev,
if (priv->bHwRadioOff)
return 0;
- printk(KERN_INFO "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
- *extra, rt_global_debug_component);
+ netdev_info(dev, "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
+ *extra, rt_global_debug_component);
if (c > 0)
rt_global_debug_component |= (1<<c);
else
@@ -347,9 +347,9 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
up(&priv->wx_sem);
return -1;
} else {
- printk(KERN_INFO
- "=========>%s(): IPSLeave\n",
- __func__);
+ netdev_info(dev,
+ "=========>%s(): IPSLeave\n",
+ __func__);
down(&priv->rtllib->ips_sem);
IPSLeave(dev);
up(&priv->rtllib->ips_sem);
@@ -475,8 +475,8 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
}
if (priv->bHwRadioOff) {
- printk(KERN_INFO "================>%s(): hwradio off\n",
- __func__);
+ netdev_info(dev, "================>%s(): hwradio off\n",
+ __func__);
return 0;
}
rtState = priv->rtllib->eRFPowerState;
@@ -579,9 +579,9 @@ static int r8192_wx_set_essid(struct net_device *dev,
int ret;
if (priv->bHwRadioOff) {
- printk(KERN_INFO
- "=========>%s():hw radio off,or Rf state is eRfOff, return\n",
- __func__);
+ netdev_info(dev,
+ "=========>%s():hw radio off,or Rf state is eRfOff, return\n",
+ __func__);
return 0;
}
down(&priv->wx_sem);
@@ -833,7 +833,8 @@ static int r8192_wx_set_enc(struct net_device *dev,
set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104,
zero_addr[key_idx], 0, hwkey, 0);
} else {
- printk(KERN_INFO "wrong type in WEP, not WEP40 and WEP104\n");
+ netdev_info(dev,
+ "wrong type in WEP, not WEP40 and WEP104\n");
}
}
@@ -1155,8 +1156,10 @@ static int r8192_wx_set_PromiscuousMode(struct net_device *dev,
(rtllib_EnableIntelPromiscuousMode(dev, false)) :
(rtllib_DisableIntelPromiscuousMode(dev, false));
- printk(KERN_INFO "=======>%s(), on = %d, filter src sta = %d\n",
- __func__, bPromiscuousOn, bFilterSourceStationFrame);
+ netdev_info(dev,
+ "=======>%s(), on = %d, filter src sta = %d\n",
+ __func__, bPromiscuousOn,
+ bFilterSourceStationFrame);
} else {
return -1;
}
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 6a96129926b5..735ae60e5740 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -466,7 +466,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
{
struct ts_common_info *pTS, *pTmpTS;
- printk(KERN_INFO "===========>RemovePeerTS, %pM\n", Addr);
+ netdev_info(ieee->dev, "===========>RemovePeerTS, %pM\n", Addr);
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
if (memcmp(pTS->Addr, Addr, 6) == 0) {
@@ -478,7 +478,8 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
if (memcmp(pTS->Addr, Addr, 6) == 0) {
- printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
+ netdev_info(ieee->dev,
+ "====>remove Tx_TS_admin_list\n");
RemoveTsEntry(ieee, pTS, TX_DIR);
list_del_init(&pTS->List);
list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ec822bbbb21e..3e437ea7b85d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -768,8 +768,8 @@ do { \
#define RTLLIB_DL_TRACE (1<<29)
#define RTLLIB_DL_DATA (1<<30)
#define RTLLIB_DL_ERR (1<<31)
-#define RTLLIB_ERROR(f, a...) printk(KERN_ERR "rtllib: " f, ## a)
-#define RTLLIB_WARNING(f, a...) printk(KERN_WARNING "rtllib: " f, ## a)
+#define RTLLIB_ERROR(f, a...) pr_err("rtllib: " f, ## a)
+#define RTLLIB_WARNING(f, a...) pr_warn("rtllib: " f, ## a)
#define RTLLIB_DEBUG_INFO(f, a...) RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a)
#define RTLLIB_DEBUG_WX(f, a...) RTLLIB_DEBUG(RTLLIB_DL_WX, f, ## a)
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
index c93f8dc6243a..ccf85309b4b6 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
@@ -505,7 +505,7 @@ static int michael_mic(struct crypto_hash *tfm_michael, u8 *key, u8 *hdr,
struct scatterlist sg[2];
if (tfm_michael == NULL) {
- printk(KERN_WARNING "michael_mic: tfm_michael == NULL\n");
+ pr_warn("michael_mic: tfm_michael == NULL\n");
return -1;
}
sg_init_table(sg, 2);
@@ -631,7 +631,7 @@ static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx,
printk(KERN_DEBUG "%d\n",
memcmp(mic, skb->data + skb->len - 8, 8) != 0);
if (skb->dev) {
- printk(KERN_INFO "skb->dev != NULL\n");
+ pr_info("skb->dev != NULL\n");
rtllib_michael_mic_failure(skb->dev, hdr, keyidx);
}
tkey->dot11RSNAStatsTKIPLocalMICFailures++;
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
index 1e16d97cae03..06c79fabdcd3 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
@@ -106,8 +106,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (skb_headroom(skb) < 4 || skb_tailroom(skb) < 4 ||
skb->len < hdr_len){
- printk(KERN_ERR
- "Error!!! headroom=%d tailroom=%d skblen=%d hdr_len=%d\n",
+ pr_err("Error!!! headroom=%d tailroom=%d skblen=%d hdr_len=%d\n",
skb_headroom(skb), skb_tailroom(skb), skb->len, hdr_len);
return -1;
}
diff --git a/drivers/staging/rtl8192e/rtllib_debug.h b/drivers/staging/rtl8192e/rtllib_debug.h
index 7537dae89a75..90cffab4287e 100644
--- a/drivers/staging/rtl8192e/rtllib_debug.h
+++ b/drivers/staging/rtl8192e/rtllib_debug.h
@@ -80,7 +80,7 @@ do { \
#define assert(expr) \
do { \
if (!(expr)) { \
- printk(KERN_INFO "Assertion failed! %s,%s,%s,line=%d\n", \
+ pr_info("Assertion failed! %s,%s,%s,line=%d\n", \
#expr, __FILE__, __func__, __LINE__); \
} \
} while (0);
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 15f7d3479274..9fc635395ca5 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -523,7 +523,9 @@ void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, struct rx_ts_record
del_timer_sync(&pTS->RxPktPendingTimer);
while (!list_empty(&pTS->RxPendingPktList)) {
if (RfdCnt >= REORDER_WIN_SIZE) {
- printk(KERN_INFO "-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n", __func__);
+ netdev_info(ieee->dev,
+ "-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n",
+ __func__);
break;
}
@@ -792,13 +794,18 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
(nSubframe_Length << 8);
if (skb->len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
- printk(KERN_INFO "%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",\
- __func__, rxb->nr_subframes);
- printk(KERN_INFO "%s: A-MSDU parse error!! Subframe Length: %d\n", __func__,
- nSubframe_Length);
- printk(KERN_INFO "nRemain_Length is %d and nSubframe_Length is : %d\n", skb->len,
- nSubframe_Length);
- printk(KERN_INFO "The Packet SeqNum is %d\n", SeqNum);
+ netdev_info(ieee->dev,
+ "%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",
+ __func__, rxb->nr_subframes);
+ netdev_info(ieee->dev,
+ "%s: A-MSDU parse error!! Subframe Length: %d\n",
+ __func__, nSubframe_Length);
+ netdev_info(ieee->dev,
+ "nRemain_Length is %d and nSubframe_Length is : %d\n",
+ skb->len, nSubframe_Length);
+ netdev_info(ieee->dev,
+ "The Packet SeqNum is %d\n",
+ SeqNum);
return 0;
}
@@ -858,7 +865,8 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
hdrlen = rtllib_get_hdrlen(fc);
if (HTCCheck(ieee, skb->data)) {
if (net_ratelimit())
- printk(KERN_INFO "%s: find HTCControl!\n", __func__);
+ netdev_info(ieee->dev, "%s: find HTCControl!\n",
+ __func__);
hdrlen += 4;
rx_stats->bContainHTC = true;
}
@@ -1048,7 +1056,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
keyidx = rtllib_rx_frame_decrypt(ieee, skb, crypt);
if (ieee->host_decrypt && (fc & RTLLIB_FCTL_WEP) && (keyidx < 0)) {
- printk(KERN_INFO "%s: decrypt frame error\n", __func__);
+ netdev_info(ieee->dev, "%s: decrypt frame error\n", __func__);
return -1;
}
@@ -1071,8 +1079,9 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
flen -= hdrlen;
if (frag_skb->tail + flen > frag_skb->end) {
- printk(KERN_WARNING "%s: host decrypted and reassembled frame did not fit skb\n",
- __func__);
+ netdev_warn(ieee->dev,
+ "%s: host decrypted and reassembled frame did not fit skb\n",
+ __func__);
rtllib_frag_cache_invalidate(ieee, hdr);
return -1;
}
@@ -1108,7 +1117,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
* encrypted/authenticated */
if (ieee->host_decrypt && (fc & RTLLIB_FCTL_WEP) &&
rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
- printk(KERN_INFO "%s: ==>decrypt msdu error\n", __func__);
+ netdev_info(ieee->dev, "%s: ==>decrypt msdu error\n", __func__);
return -1;
}
@@ -1148,7 +1157,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
}
if (rtllib_is_eapol_frame(ieee, skb, hdrlen))
- printk(KERN_WARNING "RX: IEEE802.1X EAPOL frame!\n");
+ netdev_warn(ieee->dev, "RX: IEEE802.1X EAPOL frame!\n");
return 0;
}
@@ -1180,7 +1189,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
int i = 0;
if (rxb == NULL) {
- printk(KERN_INFO "%s: rxb is NULL!!\n", __func__);
+ netdev_info(dev, "%s: rxb is NULL!!\n", __func__);
return;
}
@@ -1261,7 +1270,8 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
/*Filter pkt has too small length */
hdrlen = rtllib_rx_get_hdrlen(ieee, skb, rx_stats);
if (skb->len < hdrlen) {
- printk(KERN_INFO "%s():ERR!!! skb->len is smaller than hdrlen\n", __func__);
+ netdev_info(dev, "%s():ERR!!! skb->len is smaller than hdrlen\n",
+ __func__);
goto rx_dropped;
}
@@ -1404,13 +1414,16 @@ static int rtllib_rx_Monitor(struct rtllib_device *ieee, struct sk_buff *skb,
size_t hdrlen = rtllib_get_hdrlen(fc);
if (skb->len < hdrlen) {
- printk(KERN_INFO "%s():ERR!!! skb->len is smaller than hdrlen\n", __func__);
+ netdev_info(ieee->dev,
+ "%s():ERR!!! skb->len is smaller than hdrlen\n",
+ __func__);
return 0;
}
if (HTCCheck(ieee, skb->data)) {
if (net_ratelimit())
- printk(KERN_INFO "%s: Find HTCControl!\n", __func__);
+ netdev_info(ieee->dev, "%s: Find HTCControl!\n",
+ __func__);
hdrlen += 4;
}
@@ -1436,11 +1449,11 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
int ret = 0;
if ((NULL == ieee) || (NULL == skb) || (NULL == rx_stats)) {
- printk(KERN_INFO "%s: Input parameters NULL!\n", __func__);
+ pr_info("%s: Input parameters NULL!\n", __func__);
goto rx_dropped;
}
if (skb->len < 10) {
- printk(KERN_INFO "%s: SKB length < 10\n", __func__);
+ netdev_info(ieee->dev, "%s: SKB length < 10\n", __func__);
goto rx_dropped;
}
@@ -1460,7 +1473,7 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
ret = rtllib_rx_Mesh(ieee, skb, rx_stats);
break;
default:
- printk(KERN_INFO"%s: ERR iw mode!!!\n", __func__);
+ netdev_info(ieee->dev, "%s: ERR iw mode!!!\n", __func__);
break;
}
@@ -1701,7 +1714,9 @@ static inline void rtllib_extract_country_ie(
if (!IS_COUNTRY_IE_VALID(ieee)) {
if (rtllib_act_scanning(ieee, false) && ieee->FirstIe_InScan)
- printk(KERN_INFO "Received beacon ContryIE, SSID: <%s>\n", network->ssid);
+ netdev_info(ieee->dev,
+ "Received beacon ContryIE, SSID: <%s>\n",
+ network->ssid);
Dot11d_UpdateCountryIe(ieee, addr2, info_element->len, info_element->data);
}
}
@@ -2138,8 +2153,8 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
}
break;
case MFIE_TYPE_QOS_PARAMETER:
- printk(KERN_ERR
- "QoS Error need to parse QOS_PARAMETER IE\n");
+ netdev_err(ieee->dev,
+ "QoS Error need to parse QOS_PARAMETER IE\n");
break;
case MFIE_TYPE_COUNTRY:
@@ -2418,7 +2433,7 @@ static inline int is_beacon(__le16 fc)
static int IsPassiveChannel(struct rtllib_device *rtllib, u8 channel)
{
if (MAX_CHANNEL_NUMBER < channel) {
- printk(KERN_INFO "%s(): Invalid Channel\n", __func__);
+ netdev_info(rtllib->dev, "%s(): Invalid Channel\n", __func__);
return 0;
}
@@ -2431,7 +2446,7 @@ static int IsPassiveChannel(struct rtllib_device *rtllib, u8 channel)
int rtllib_legal_channel(struct rtllib_device *rtllib, u8 channel)
{
if (MAX_CHANNEL_NUMBER < channel) {
- printk(KERN_INFO "%s(): Invalid Channel\n", __func__);
+ netdev_info(rtllib->dev, "%s(): Invalid Channel\n", __func__);
return 0;
}
if (rtllib->active_channel_map[channel] > 0)
@@ -2497,8 +2512,9 @@ static inline void rtllib_process_probe_response(
if (WLAN_FC_GET_STYPE(le16_to_cpu(beacon->header.frame_ctl)) ==
RTLLIB_STYPE_PROBE_RESP) {
if (IsPassiveChannel(ieee, network->channel)) {
- printk(KERN_INFO "GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n",
- network->channel);
+ netdev_info(ieee->dev,
+ "GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n",
+ network->channel);
goto free_network;
}
}
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index ec9689ad64ce..f1f19fc2305c 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -124,7 +124,7 @@ void rtllib_TURBO_Info(struct rtllib_device *ieee, u8 **tag_p)
*tag++ = 0x00;
*tag_p = tag;
- printk(KERN_ALERT "This is enable turbo mode IE process\n");
+ netdev_alert(ieee->dev, "This is enable turbo mode IE process\n");
}
static void enqueue_mgmt(struct rtllib_device *ieee, struct sk_buff *skb)
@@ -188,7 +188,7 @@ MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee)
if (QueryRate == 0) {
QueryRate = 12;
- printk(KERN_INFO "No BasicRate found!!\n");
+ netdev_info(ieee->dev, "No BasicRate found!!\n");
}
return QueryRate;
}
@@ -277,7 +277,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee)
/* as for the completion function, it does not need
* to check it any more.
* */
- printk(KERN_INFO
+ netdev_info(ieee->dev,
"%s():insert to waitqueue, queue_index:%d!\n",
__func__, tcb_desc->queue_index);
skb_queue_tail(&ieee->skb_waitQ[tcb_desc->queue_index],
@@ -426,7 +426,7 @@ void rtllib_EnableNetMonitorMode(struct net_device *dev,
{
struct rtllib_device *ieee = netdev_priv_rsl(dev);
- printk(KERN_INFO "========>Enter Monitor Mode\n");
+ netdev_info(dev, "========>Enter Monitor Mode\n");
ieee->AllowAllDestAddrHandler(dev, true, !bInitState);
}
@@ -442,7 +442,7 @@ void rtllib_DisableNetMonitorMode(struct net_device *dev,
{
struct rtllib_device *ieee = netdev_priv_rsl(dev);
- printk(KERN_INFO "========>Exit Monitor Mode\n");
+ netdev_info(dev, "========>Exit Monitor Mode\n");
ieee->AllowAllDestAddrHandler(dev, false, !bInitState);
}
@@ -463,7 +463,7 @@ void rtllib_EnableIntelPromiscuousMode(struct net_device *dev,
struct rtllib_device *ieee = netdev_priv_rsl(dev);
- printk(KERN_INFO "========>Enter Intel Promiscuous Mode\n");
+ netdev_info(dev, "========>Enter Intel Promiscuous Mode\n");
ieee->AllowAllDestAddrHandler(dev, true, !bInitState);
ieee->SetHwRegHandler(dev, HW_VAR_CECHK_BSSID,
@@ -486,7 +486,7 @@ void rtllib_DisableIntelPromiscuousMode(struct net_device *dev,
struct rtllib_device *ieee = netdev_priv_rsl(dev);
- printk(KERN_INFO "========>Exit Intel Promiscuous Mode\n");
+ netdev_info(dev, "========>Exit Intel Promiscuous Mode\n");
ieee->AllowAllDestAddrHandler(dev, false, !bInitState);
ieee->SetHwRegHandler(dev, HW_VAR_CECHK_BSSID,
@@ -570,7 +570,8 @@ void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh)
if (ieee->state == RTLLIB_LINKED)
goto out;
if (ieee->sync_scan_hurryup) {
- printk(KERN_INFO "============>sync_scan_hurryup out\n");
+ netdev_info(ieee->dev,
+ "============>sync_scan_hurryup out\n");
goto out;
}
@@ -615,8 +616,9 @@ static void rtllib_softmac_scan_wq(void *data)
down(&ieee->scan_sem);
if (ieee->eRFPowerState == eRfOff) {
- printk(KERN_INFO "======>%s():rf state is eRfOff, return\n",
- __func__);
+ netdev_info(ieee->dev,
+ "======>%s():rf state is eRfOff, return\n",
+ __func__);
goto out1;
}
@@ -1239,8 +1241,8 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
PMKCacheIdx = SecIsInPMKIDList(ieee, ieee->current_network.bssid);
if (PMKCacheIdx >= 0) {
wpa_ie_len += 18;
- printk(KERN_INFO "[PMK cache]: WPA2 IE length: %x\n",
- wpa_ie_len);
+ netdev_info(ieee->dev, "[PMK cache]: WPA2 IE length: %x\n",
+ wpa_ie_len);
}
len = sizeof(struct rtllib_assoc_request_frame) + 2
+ beacon->ssid_len
@@ -1419,9 +1421,9 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,
if (ieee->assocreq_ies)
memcpy(ieee->assocreq_ies, ies, ieee->assocreq_ies_len);
else {
- printk(KERN_INFO
- "%s()Warning: can't alloc memory for assocreq_ies\n",
- __func__);
+ netdev_info(ieee->dev,
+ "%s()Warning: can't alloc memory for assocreq_ies\n",
+ __func__);
ieee->assocreq_ies_len = 0;
}
return skb;
@@ -1544,9 +1546,9 @@ static void rtllib_associate_complete_wq(void *data)
associate_complete_wq);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
(&(ieee->PowerSaveControl));
- printk(KERN_INFO "Associated successfully\n");
+ netdev_info(ieee->dev, "Associated successfully\n");
if (!ieee->is_silent_reset) {
- printk(KERN_INFO "normal associate\n");
+ netdev_info(ieee->dev, "normal associate\n");
notify_wx_assoc_event(ieee);
}
@@ -1555,20 +1557,20 @@ static void rtllib_associate_complete_wq(void *data)
if (rtllib_is_54g(&ieee->current_network) &&
(ieee->modulation & RTLLIB_OFDM_MODULATION)) {
ieee->rate = 108;
- printk(KERN_INFO"Using G rates:%d\n", ieee->rate);
+ netdev_info(ieee->dev, "Using G rates:%d\n", ieee->rate);
} else {
ieee->rate = 22;
ieee->SetWirelessMode(ieee->dev, IEEE_B);
- printk(KERN_INFO"Using B rates:%d\n", ieee->rate);
+ netdev_info(ieee->dev, "Using B rates:%d\n", ieee->rate);
}
if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT) {
- printk(KERN_INFO "Successfully associated, ht enabled\n");
+ netdev_info(ieee->dev, "Successfully associated, ht enabled\n");
HTOnAssocRsp(ieee);
} else {
- printk(KERN_INFO
- "Successfully associated, ht not enabled(%d, %d)\n",
- ieee->pHTInfo->bCurrentHTSupport,
- ieee->pHTInfo->bEnableHT);
+ netdev_info(ieee->dev,
+ "Successfully associated, ht not enabled(%d, %d)\n",
+ ieee->pHTInfo->bCurrentHTSupport,
+ ieee->pHTInfo->bEnableHT);
memset(ieee->dot11HTOperationalRateSet, 0, 16);
}
ieee->LinkDetectInfo.SlotNum = 2 * (1 +
@@ -1583,7 +1585,7 @@ static void rtllib_associate_complete_wq(void *data)
ieee->link_change(ieee->dev);
if (ieee->is_silent_reset) {
- printk(KERN_INFO "silent reset associate\n");
+ netdev_info(ieee->dev, "silent reset associate\n");
ieee->is_silent_reset = false;
}
@@ -1721,15 +1723,15 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
IW_ESSID_MAX_SIZE);
ieee->current_network.ssid_len = tmp_ssid_len;
}
- printk(KERN_INFO
- "Linking with %s,channel:%d, qos:%d, myHT:%d, networkHT:%d, mode:%x cur_net.flags:0x%x\n",
- ieee->current_network.ssid,
- ieee->current_network.channel,
- ieee->current_network.qos_data.supported,
- ieee->pHTInfo->bEnableHT,
- ieee->current_network.bssht.bdSupportHT,
- ieee->current_network.mode,
- ieee->current_network.flags);
+ netdev_info(ieee->dev,
+ "Linking with %s,channel:%d, qos:%d, myHT:%d, networkHT:%d, mode:%x cur_net.flags:0x%x\n",
+ ieee->current_network.ssid,
+ ieee->current_network.channel,
+ ieee->current_network.qos_data.supported,
+ ieee->pHTInfo->bEnableHT,
+ ieee->current_network.bssht.bdSupportHT,
+ ieee->current_network.mode,
+ ieee->current_network.flags);
if ((rtllib_act_scanning(ieee, false)) &&
!(ieee->softmac_features & IEEE_SOFTMAC_SCAN))
@@ -1760,11 +1762,11 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
(ieee->modulation & RTLLIB_OFDM_MODULATION)) {
ieee->rate = 108;
ieee->SetWirelessMode(ieee->dev, IEEE_G);
- printk(KERN_INFO"Using G rates\n");
+ netdev_info(ieee->dev, "Using G rates\n");
} else {
ieee->rate = 22;
ieee->SetWirelessMode(ieee->dev, IEEE_B);
- printk(KERN_INFO"Using B rates\n");
+ netdev_info(ieee->dev, "Using B rates\n");
}
memset(ieee->dot11HTOperationalRateSet, 0, 16);
ieee->state = RTLLIB_LINKED;
@@ -1967,7 +1969,7 @@ static inline void rtllib_rx_assoc_rq(struct rtllib_device *ieee,
if (assoc_rq_parse(skb, dest) != -1)
rtllib_resp_to_assoc_rq(ieee, dest);
- printk(KERN_INFO"New client associated: %pM\n", dest);
+ netdev_info(ieee->dev, "New client associated: %pM\n", dest);
}
void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr)
@@ -2288,17 +2290,18 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
memcpy(ieee->assocresp_ies, ies,
ieee->assocresp_ies_len);
else {
- printk(KERN_INFO
- "%s()Warning: can't alloc memory for assocresp_ies\n",
- __func__);
+ netdev_info(ieee->dev,
+ "%s()Warning: can't alloc memory for assocresp_ies\n",
+ __func__);
ieee->assocresp_ies_len = 0;
}
rtllib_associate_complete(ieee);
} else {
/* aid could not been allocated */
ieee->softmac_stats.rx_ass_err++;
- printk(KERN_INFO "Association response status code 0x%x\n",
- errcode);
+ netdev_info(ieee->dev,
+ "Association response status code 0x%x\n",
+ errcode);
RTLLIB_DEBUG_MGMT(
"Association response status code 0x%x\n",
errcode);
@@ -2355,8 +2358,8 @@ inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
if (ieee->current_network.mode ==
IEEE_N_24G && bHalfSupportNmode) {
- printk(KERN_INFO
- "======>enter half N mode\n");
+ netdev_info(ieee->dev,
+ "======>enter half N mode\n");
ieee->bHalfWirelessN24GMode =
true;
} else
@@ -2373,9 +2376,9 @@ inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
RTLLIB_DEBUG_MGMT("Authentication respose status code 0x%x",
errcode);
- printk(KERN_INFO
- "Authentication respose status code 0x%x",
- errcode);
+ netdev_info(ieee->dev,
+ "Authentication respose status code 0x%x",
+ errcode);
rtllib_associate_abort(ieee);
}
@@ -2399,10 +2402,10 @@ inline int rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb)
if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) &&
ieee->state == RTLLIB_LINKED &&
(ieee->iw_mode == IW_MODE_INFRA)) {
- printk(KERN_INFO
- "==========>received disassoc/deauth(%x) frame, reason code:%x\n",
- WLAN_FC_GET_STYPE(header->frame_ctl),
- ((struct rtllib_disassoc *)skb->data)->reason);
+ netdev_info(ieee->dev,
+ "==========>received disassoc/deauth(%x) frame, reason code:%x\n",
+ WLAN_FC_GET_STYPE(header->frame_ctl),
+ ((struct rtllib_disassoc *)skb->data)->reason);
ieee->state = RTLLIB_ASSOCIATING;
ieee->softmac_stats.reassoc++;
ieee->is_roaming = true;
@@ -2692,7 +2695,7 @@ static void rtllib_start_ibss_wq(void *data)
* on the semaphore
*/
if (!ieee->proto_started) {
- printk(KERN_INFO "==========oh driver down return\n");
+ netdev_info(ieee->dev, "==========oh driver down return\n");
return;
}
down(&ieee->wx_sem);
@@ -2728,7 +2731,7 @@ static void rtllib_start_ibss_wq(void *data)
/* the network definitively is not here.. create a new cell */
if (ieee->state == RTLLIB_NOLINK) {
- printk(KERN_INFO "creating new IBSS cell\n");
+ netdev_info(ieee->dev, "creating new IBSS cell\n");
ieee->current_network.channel = ieee->IbssStartChnl;
if (!ieee->wap_set)
rtllib_randomize_cell(ieee);
@@ -2782,7 +2785,7 @@ static void rtllib_start_ibss_wq(void *data)
ieee->current_network.capability = WLAN_CAPABILITY_IBSS;
}
- printk(KERN_INFO "%s(): ieee->mode = %d\n", __func__, ieee->mode);
+ netdev_info(ieee->dev, "%s(): ieee->mode = %d\n", __func__, ieee->mode);
if ((ieee->mode == IEEE_N_24G) || (ieee->mode == IEEE_N_5G))
HTUseDefaultSetting(ieee);
else
@@ -3186,7 +3189,7 @@ static int rtllib_wpa_enable(struct rtllib_device *ieee, int value)
{
/* This is called when wpa_supplicant loads and closes the driver
* interface. */
- printk(KERN_INFO "%s WPA\n", value ? "enabling" : "disabling");
+ netdev_info(ieee->dev, "%s WPA\n", value ? "enabling" : "disabling");
ieee->wpa_enabled = value;
memset(ieee->ap_mac_addr, 0, 6);
return 0;
@@ -3217,7 +3220,7 @@ static int rtllib_wpa_mlme(struct rtllib_device *ieee, int command, int reason)
break;
default:
- printk(KERN_INFO "Unknown MLME request: %d\n", command);
+ netdev_info(ieee->dev, "Unknown MLME request: %d\n", command);
ret = -EOPNOTSUPP;
}
@@ -3348,7 +3351,7 @@ static int rtllib_wpa_set_param(struct rtllib_device *ieee, u8 name, u32 value)
break;
default:
- printk(KERN_INFO "Unknown WPA param: %d\n", name);
+ netdev_info(ieee->dev, "Unknown WPA param: %d\n", name);
ret = -EOPNOTSUPP;
}
@@ -3374,8 +3377,8 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
if (param_len !=
(int) ((char *) param->u.crypt.key - (char *) param) +
param->u.crypt.key_len) {
- printk(KERN_INFO "Len mismatch %d, %d\n", param_len,
- param->u.crypt.key_len);
+ netdev_info(ieee->dev, "Len mismatch %d, %d\n", param_len,
+ param->u.crypt.key_len);
return -EINVAL;
}
if (is_broadcast_ether_addr(param->sta_addr)) {
@@ -3415,8 +3418,8 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
ops = lib80211_get_crypto_ops(param->u.crypt.alg);
}
if (ops == NULL) {
- printk(KERN_INFO "unknown crypto alg '%s'\n",
- param->u.crypt.alg);
+ netdev_info(ieee->dev, "unknown crypto alg '%s'\n",
+ param->u.crypt.alg);
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
ret = -EINVAL;
goto done;
@@ -3450,7 +3453,7 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
(*crypt)->ops->set_key(param->u.crypt.key,
param->u.crypt.key_len, param->u.crypt.seq,
(*crypt)->priv) < 0) {
- printk(KERN_INFO "key setting failed\n");
+ netdev_info(ieee->dev, "key setting failed\n");
param->u.crypt.err = IEEE_CRYPT_ERR_KEY_SET_FAILED;
ret = -EINVAL;
goto done;
@@ -3495,7 +3498,7 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee,
ieee->iw_mode != IW_MODE_INFRA &&
ieee->reset_port &&
ieee->reset_port(ieee->dev)) {
- printk(KERN_INFO "reset_port failed\n");
+ netdev_info(ieee->dev, "reset_port failed\n");
param->u.crypt.err = IEEE_CRYPT_ERR_CARD_CONF_FAILED;
return -EINVAL;
}
@@ -3638,8 +3641,8 @@ int rtllib_wpa_supplicant_ioctl(struct rtllib_device *ieee, struct iw_point *p,
break;
default:
- printk(KERN_INFO "Unknown WPA supplicant request: %d\n",
- param->cmd);
+ netdev_info(ieee->dev, "Unknown WPA supplicant request: %d\n",
+ param->cmd);
ret = -EOPNOTSUPP;
break;
}
@@ -3753,8 +3756,8 @@ void notify_wx_assoc_event(struct rtllib_device *ieee)
ETH_ALEN);
else {
- printk(KERN_INFO "%s(): Tell user space disconnected\n",
- __func__);
+ netdev_info(ieee->dev, "%s(): Tell user space disconnected\n",
+ __func__);
eth_zero_addr(wrqu.ap_addr.sa_data);
}
wireless_send_event(ieee->dev, SIOCGIWAP, &wrqu, NULL);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index ea8488f5b7cb..9715a793fd37 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -527,8 +527,8 @@ int rtllib_wx_set_rawtx(struct rtllib_device *ieee,
else
ieee->raw_tx = 0;
- printk(KERN_INFO"raw TX is %s\n",
- ieee->raw_tx ? "enabled" : "disabled");
+ netdev_info(ieee->dev, "raw TX is %s\n",
+ ieee->raw_tx ? "enabled" : "disabled");
if (ieee->iw_mode == IW_MODE_MONITOR) {
if (prev == 0 && ieee->raw_tx) {
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 928cd4cf14bc..7c0af26f267e 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -185,7 +185,8 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag,
crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
if (!(crypt && crypt->ops)) {
- printk(KERN_INFO "=========>%s(), crypt is null\n", __func__);
+ netdev_info(ieee->dev, "=========>%s(), crypt is null\n",
+ __func__);
return -1;
}
/* To encrypt, frame format is:
@@ -202,8 +203,8 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag,
atomic_dec(&crypt->refcnt);
if (res < 0) {
- printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
- ieee->dev->name, frag->len);
+ netdev_info(ieee->dev, "%s: Encryption failed: len=%d.\n",
+ ieee->dev->name, frag->len);
ieee->ieee_stats.tx_discards++;
return -1;
}
@@ -311,7 +312,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
if (pHTInfo->bCurrentAMPDUEnable) {
if (!GetTs(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1,
skb->priority, TX_DIR, true)) {
- printk(KERN_INFO "%s: can't get TS\n", __func__);
+ netdev_info(ieee->dev, "%s: can't get TS\n", __func__);
return;
}
if (pTxTs->TxAdmittedBARecord.bValid == false) {
@@ -582,16 +583,15 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
IEEE_SOFTMAC_TX_QUEUE)) ||
((!ieee->softmac_data_hard_start_xmit &&
(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
- printk(KERN_WARNING "%s: No xmit handler.\n",
- ieee->dev->name);
+ netdev_warn(ieee->dev, "No xmit handler.\n");
goto success;
}
if (likely(ieee->raw_tx == 0)) {
if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
- printk(KERN_WARNING "%s: skb too small (%d).\n",
- ieee->dev->name, skb->len);
+ netdev_warn(ieee->dev, "skb too small (%d).\n",
+ skb->len);
goto success;
}
/* Save source and destination addresses */
@@ -604,9 +604,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
if (ieee->iw_mode == IW_MODE_MONITOR) {
txb = rtllib_alloc_txb(1, skb->len, GFP_ATOMIC);
if (unlikely(!txb)) {
- printk(KERN_WARNING
- "%s: Could not allocate TXB\n",
- ieee->dev->name);
+ netdev_warn(ieee->dev,
+ "Could not allocate TXB\n");
goto failed;
}
@@ -636,8 +635,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
}
}
} else if (ETH_P_ARP == ether_type) {
- printk(KERN_INFO
- "=================>DHCP Protocol start tx ARP pkt!!\n");
+ netdev_info(ieee->dev,
+ "=================>DHCP Protocol start tx ARP pkt!!\n");
bdhcp = true;
ieee->LPSDelayCnt =
ieee->current_network.tim.tim_count;
@@ -717,10 +716,11 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
/* in case we are a client verify acm is not set for this ac */
while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) {
- printk(KERN_INFO "skb->priority = %x\n", skb->priority);
+ netdev_info(ieee->dev, "skb->priority = %x\n",
+ skb->priority);
if (wme_downgrade_ac(skb))
break;
- printk(KERN_INFO "converted skb->priority = %x\n",
+ netdev_info(ieee->dev, "converted skb->priority = %x\n",
skb->priority);
}
qos_ctl |= skb->priority;
@@ -760,8 +760,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
txb = rtllib_alloc_txb(nr_frags, frag_size +
ieee->tx_headroom, GFP_ATOMIC);
if (unlikely(!txb)) {
- printk(KERN_WARNING "%s: Could not allocate TXB\n",
- ieee->dev->name);
+ netdev_warn(ieee->dev, "Could not allocate TXB\n");
goto failed;
}
txb->encrypted = encrypt;
@@ -858,15 +857,14 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
}
} else {
if (unlikely(skb->len < sizeof(struct rtllib_hdr_3addr))) {
- printk(KERN_WARNING "%s: skb too small (%d).\n",
- ieee->dev->name, skb->len);
+ netdev_warn(ieee->dev, "skb too small (%d).\n",
+ skb->len);
goto success;
}
txb = rtllib_alloc_txb(1, skb->len, GFP_ATOMIC);
if (!txb) {
- printk(KERN_WARNING "%s: Could not allocate TXB\n",
- ieee->dev->name);
+ netdev_warn(ieee->dev, "Could not allocate TXB\n");
goto failed;
}
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index 5bf8ea14b805..a1cae3748ae6 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -389,9 +389,9 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
kfree(new_crypt);
new_crypt = NULL;
- netdev_warn(dev, "%s: could not initialize WEP: "
- "load module rtllib_crypt_wep\n",
- dev->name);
+ netdev_warn(dev,
+ "%s: could not initialize WEP: load module rtllib_crypt_wep\n",
+ dev->name);
return -EOPNOTSUPP;
}
*crypt = new_crypt;