提交 d69d2054 编写于 作者: M Mateusz Kulikowski 提交者: Greg Kroah-Hartman

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