Commit d69d2054 authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by 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: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2729011c
...@@ -224,7 +224,7 @@ void rtl8192e_SetHwReg(struct net_device *dev, u8 variable, u8 *val) ...@@ -224,7 +224,7 @@ 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;
} }
......
...@@ -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,7 +1211,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev) ...@@ -1211,7 +1211,7 @@ 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);
...@@ -1284,7 +1284,7 @@ static short rtl8192_get_channel_map(struct net_device *dev) ...@@ -1284,7 +1284,7 @@ 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;
} }
...@@ -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,7 +1406,7 @@ static enum reset_type rtl819x_TxCheckStuck(struct net_device *dev) ...@@ -1406,7 +1406,7 @@ 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);
...@@ -1456,12 +1456,12 @@ static enum reset_type rtl819x_ifcheck_resetornot(struct net_device *dev) ...@@ -1456,12 +1456,12 @@ 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 {
...@@ -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,7 +1741,7 @@ void rtl819x_watchdog_wqcallback(void *data) ...@@ -1741,7 +1741,7 @@ 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);
...@@ -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,9 +2132,9 @@ static void dm_check_edca_turbo(struct net_device *dev) ...@@ -2131,9 +2132,9 @@ 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,19 +65,20 @@ bool rtl8192_pci_findadapter(struct pci_dev *pdev, struct net_device *dev) ...@@ -65,19 +65,20 @@ 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,
"UNKNOWN nic type(%4x:%4x)\n",
pdev->vendor, pdev->device); pdev->vendor, pdev->device);
priv->card_8192 = NIC_UNKNOWN; priv->card_8192 = NIC_UNKNOWN;
return false; return false;
...@@ -85,10 +86,10 @@ bool rtl8192_pci_findadapter(struct pci_dev *pdev, struct net_device *dev) ...@@ -85,10 +86,10 @@ bool rtl8192_pci_findadapter(struct pci_dev *pdev, struct net_device *dev)
} }
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,13 +29,13 @@ int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -29,13 +29,13 @@ 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,7 +100,7 @@ int rtl8192E_resume(struct pci_dev *pdev) ...@@ -101,7 +100,7 @@ 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,13 +100,13 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u64 time) ...@@ -100,13 +100,13 @@ 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,7 +203,7 @@ void rtllib_ips_leave_wq(struct net_device *dev) ...@@ -203,7 +203,7 @@ 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,7 +279,7 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev, ...@@ -279,7 +279,7 @@ 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;
...@@ -295,7 +295,7 @@ static int r8192se_wx_set_force_lps(struct net_device *dev, ...@@ -295,7 +295,7 @@ 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;
...@@ -314,7 +314,7 @@ static int r8192_wx_set_debugflag(struct net_device *dev, ...@@ -314,7 +314,7 @@ 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);
...@@ -347,7 +347,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a, ...@@ -347,7 +347,7 @@ 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);
...@@ -475,7 +475,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, ...@@ -475,7 +475,7 @@ 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;
} }
...@@ -579,7 +579,7 @@ static int r8192_wx_set_essid(struct net_device *dev, ...@@ -579,7 +579,7 @@ 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;
...@@ -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,
"%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",
__func__, rxb->nr_subframes); __func__, rxb->nr_subframes);
printk(KERN_INFO "%s: A-MSDU parse error!! Subframe Length: %d\n", __func__, netdev_info(ieee->dev,
nSubframe_Length); "%s: A-MSDU parse error!! Subframe Length: %d\n",
printk(KERN_INFO "nRemain_Length is %d and nSubframe_Length is : %d\n", skb->len, __func__, nSubframe_Length);
nSubframe_Length); netdev_info(ieee->dev,
printk(KERN_INFO "The Packet SeqNum is %d\n", SeqNum); "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,7 +1079,8 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb, ...@@ -1071,7 +1079,8 @@ 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,
"%s: host decrypted and reassembled frame did not fit skb\n",
__func__); __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,7 +2153,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, ...@@ -2138,7 +2153,7 @@ 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;
...@@ -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,7 +2512,8 @@ static inline void rtllib_process_probe_response( ...@@ -2497,7 +2512,8 @@ 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,
"GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n",
network->channel); network->channel);
goto free_network; goto free_network;
} }
......
This diff is collapsed.
...@@ -527,7 +527,7 @@ int rtllib_wx_set_rawtx(struct rtllib_device *ieee, ...@@ -527,7 +527,7 @@ 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) {
......
...@@ -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,7 +203,7 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag, ...@@ -202,7 +203,7 @@ 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,7 +635,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -636,7 +635,7 @@ 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 =
...@@ -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,8 +389,8 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee, ...@@ -389,8 +389,8 @@ 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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment