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,8 +224,8 @@ void rtl8192e_SetHwReg(struct net_device *dev, u8 variable, u8 *val)
break;
default:
printk(KERN_INFO "SetHwReg8185(): invalid ACI: %d !\n",
eACI);
netdev_info(dev, "SetHwReg8185(): invalid ACI: %d !\n",
eACI);
break;
}
priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACM_CTRL,
......
......@@ -476,7 +476,7 @@ void rtl8192_tx_timeout(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
schedule_work(&priv->reset_wq);
printk(KERN_INFO "TXTIMEOUT");
netdev_info(dev, "TXTIMEOUT");
}
void rtl8192_irq_enable(struct net_device *dev)
......@@ -1211,8 +1211,8 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->AcmControl = 0;
priv->pFirmware = vzalloc(sizeof(struct rt_firmware));
if (!priv->pFirmware)
printk(KERN_ERR
"rtl8192e: Unable to allocate space for firmware\n");
netdev_err(dev,
"rtl8192e: Unable to allocate space for firmware\n");
skb_queue_head_init(&priv->rx_queue);
skb_queue_head_init(&priv->skb_queue);
......@@ -1284,8 +1284,8 @@ static short rtl8192_get_channel_map(struct net_device *dev)
}
if (priv->ChannelPlan >= COUNTRY_CODE_MAX) {
printk(KERN_INFO
"rtl819x_init:Error channel plan! Set to default.\n");
netdev_info(dev,
"rtl819x_init:Error channel plan! Set to default.\n");
priv->ChannelPlan = COUNTRY_CODE_FCC;
}
RT_TRACE(COMP_INIT, "Channel plan is %d\n", priv->ChannelPlan);
......@@ -1329,7 +1329,7 @@ static short rtl8192_init(struct net_device *dev)
rtl8192_irq_disable(dev);
if (request_irq(dev->irq, rtl8192_interrupt, IRQF_SHARED,
dev->name, dev)) {
printk(KERN_ERR "Error allocating IRQ %d", dev->irq);
netdev_err(dev, "Error allocating IRQ %d", dev->irq);
return -1;
} else {
priv->irq = dev->irq;
......@@ -1337,7 +1337,7 @@ static short rtl8192_init(struct net_device *dev)
}
if (rtl8192_pci_initdescring(dev) != 0) {
printk(KERN_ERR "Endopoints initialization failed");
netdev_err(dev, "Endopoints initialization failed");
free_irq(dev->irq, dev);
return -1;
}
......@@ -1357,7 +1357,7 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev)
if ((i == TXCMD_QUEUE) || (i == HCCA_QUEUE))
continue;
if (skb_queue_len(&(&priv->tx_ring[i])->queue) > 0) {
printk(KERN_INFO "===>tx queue is not empty:%d, %d\n",
netdev_info(dev, "===>tx queue is not empty:%d, %d\n",
i, skb_queue_len(&(&priv->tx_ring[i])->queue));
return 0;
}
......@@ -1406,10 +1406,10 @@ static enum reset_type rtl819x_TxCheckStuck(struct net_device *dev)
tcb_desc->nStuckCount++;
bCheckFwTxCnt = true;
if (tcb_desc->nStuckCount > 1)
printk(KERN_INFO
"%s: QueueID=%d tcb_desc->nStuckCount=%d\n",
__func__, QueueID,
tcb_desc->nStuckCount);
netdev_info(dev,
"%s: QueueID=%d tcb_desc->nStuckCount=%d\n",
__func__, QueueID,
tcb_desc->nStuckCount);
}
}
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
......@@ -1456,13 +1456,13 @@ static enum reset_type rtl819x_ifcheck_resetornot(struct net_device *dev)
if (TxResetType == RESET_TYPE_NORMAL ||
RxResetType == RESET_TYPE_NORMAL) {
printk(KERN_INFO "%s(): TxResetType is %d, RxResetType is %d\n",
__func__, TxResetType, RxResetType);
netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n",
__func__, TxResetType, RxResetType);
return RESET_TYPE_NORMAL;
} else if (TxResetType == RESET_TYPE_SILENT ||
RxResetType == RESET_TYPE_SILENT) {
printk(KERN_INFO "%s(): TxResetType is %d, RxResetType is %d\n",
__func__, TxResetType, RxResetType);
netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n",
__func__, TxResetType, RxResetType);
return RESET_TYPE_SILENT;
} else {
return RESET_TYPE_NORESET;
......@@ -1534,7 +1534,7 @@ static void rtl819x_ifsilentreset(struct net_device *dev)
if (ieee->state == RTLLIB_LINKED) {
SEM_DOWN_IEEE_WX(&ieee->wx_sem);
printk(KERN_INFO "ieee->state is RTLLIB_LINKED\n");
netdev_info(dev, "ieee->state is RTLLIB_LINKED\n");
rtllib_stop_send_beacons(priv->rtllib);
del_timer_sync(&ieee->associate_timer);
cancel_delayed_work(&ieee->associate_retry_wq);
......@@ -1542,7 +1542,7 @@ static void rtl819x_ifsilentreset(struct net_device *dev)
netif_carrier_off(dev);
SEM_UP_IEEE_WX(&ieee->wx_sem);
} else {
printk(KERN_INFO "ieee->state is NOT LINKED\n");
netdev_info(dev, "ieee->state is NOT LINKED\n");
rtllib_softmac_stop_protocol(priv->rtllib, 0 , true);
}
......@@ -1741,9 +1741,9 @@ void rtl819x_watchdog_wqcallback(void *data)
if (ieee->eRFPowerState == eRfOff)
RT_TRACE(COMP_ERR, "========>%s()\n", __func__);
printk(KERN_INFO
"===>%s(): AP is power off, chan:%d, connect another one\n",
__func__, priv->chan);
netdev_info(dev,
"===>%s(): AP is power off, chan:%d, connect another one\n",
__func__, priv->chan);
ieee->state = RTLLIB_ASSOCIATING;
......@@ -2875,7 +2875,8 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
printk(KERN_INFO "Unable to obtain 32bit DMA for consistent allocations\n");
dev_info(&pdev->dev,
"Unable to obtain 32bit DMA for consistent allocations\n");
goto err_pci_disable;
}
}
......@@ -2908,7 +2909,8 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,
goto err_rel_rtllib;
}
printk(KERN_INFO "Memory mapped space start: 0x%08lx\n", pmem_start);
dev_info(&pdev->dev, "Memory mapped space start: 0x%08lx\n",
pmem_start);
if (!request_mem_region(pmem_start, pmem_len, DRV_NAME)) {
RT_TRACE(COMP_ERR, "request_mem_region failed!");
goto err_rel_rtllib;
......@@ -3010,7 +3012,7 @@ static void rtl8192_pci_disconnect(struct pci_dev *pdev)
rtl8192_free_tx_ring(dev, i);
if (priv->irq) {
printk(KERN_INFO "Freeing irq %d\n", dev->irq);
dev_info(&pdev->dev, "Freeing irq %d\n", dev->irq);
free_irq(dev->irq, dev);
priv->irq = 0;
}
......@@ -3084,8 +3086,8 @@ bool NicIFDisableNIC(struct net_device *dev)
static int __init rtl8192_pci_module_init(void)
{
printk(KERN_INFO "\nLinux kernel driver for RTL8192E WLAN cards\n");
printk(KERN_INFO "Copyright (c) 2007-2008, Realsil Wlan Driver\n");
pr_info("\nLinux kernel driver for RTL8192E WLAN cards\n");
pr_info("Copyright (c) 2007-2008, Realsil Wlan Driver\n");
if (0 != pci_register_driver(&rtl8192_pci_driver)) {
DMESG("No device found");
......
......@@ -1420,7 +1420,8 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
TM_Trigger = 1;
return;
} else {
printk(KERN_INFO "===============>Schedule TxPowerTrackingWorkItem\n");
netdev_info(dev,
"===============>Schedule TxPowerTrackingWorkItem\n");
queue_delayed_work_rsl(priv->priv_wq, &priv->txpower_tracking_wq, 0);
TM_Trigger = 0;
......@@ -2131,10 +2132,10 @@ static void dm_check_edca_turbo(struct net_device *dev)
static int wb_tmp;
if (wb_tmp == 0) {
printk(KERN_INFO
"%s():iot peer is %s, bssid: %pM\n", __func__,
peername[pHTInfo->IOTPeer],
priv->rtllib->current_network.bssid);
netdev_info(dev,
"%s():iot peer is %s, bssid: %pM\n",
__func__, peername[pHTInfo->IOTPeer],
priv->rtllib->current_network.bssid);
wb_tmp = 1;
}
}
......
......@@ -65,31 +65,32 @@ bool rtl8192_pci_findadapter(struct pci_dev *pdev, struct net_device *dev)
if (DeviceID == 0x8172) {
switch (RevisionID) {
case HAL_HW_PCI_REVISION_ID_8192PCIE:
printk(KERN_INFO
"Adapter(8192 PCI-E) is found - DeviceID=%x\n",
DeviceID);
dev_info(&pdev->dev,
"Adapter(8192 PCI-E) is found - DeviceID=%x\n",
DeviceID);
priv->card_8192 = NIC_8192E;
break;
case HAL_HW_PCI_REVISION_ID_8192SE:
printk(KERN_INFO
"Adapter(8192SE) is found - DeviceID=%x\n",
DeviceID);
dev_info(&pdev->dev,
"Adapter(8192SE) is found - DeviceID=%x\n",
DeviceID);
priv->card_8192 = NIC_8192SE;
break;
default:
printk(KERN_INFO "UNKNOWN nic type(%4x:%4x)\n",
pdev->vendor, pdev->device);
dev_info(&pdev->dev,
"UNKNOWN nic type(%4x:%4x)\n",
pdev->vendor, pdev->device);
priv->card_8192 = NIC_UNKNOWN;
return false;
}
}
if (priv->ops->nic_type != priv->card_8192) {
printk(KERN_INFO
"Detect info(%x) and hardware info(%x) not match!\n",
priv->ops->nic_type, priv->card_8192);
printk(KERN_INFO
"Please select proper driver before install!!!!\n");
dev_info(&pdev->dev,
"Detect info(%x) and hardware info(%x) not match!\n",
priv->ops->nic_type, priv->card_8192);
dev_info(&pdev->dev,
"Please select proper driver before install!!!!\n");
return false;
}
......
......@@ -29,14 +29,14 @@ int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state)
struct r8192_priv *priv = rtllib_priv(dev);
u32 ulRegRead;
printk(KERN_INFO "============> r8192E suspend call.\n");
netdev_info(dev, "============> r8192E suspend call.\n");
del_timer_sync(&priv->gpio_polling_timer);
cancel_delayed_work(&priv->gpio_change_rf_wq);
priv->polling_timer_on = 0;
if (!netif_running(dev)) {
printk(KERN_INFO
"RTL819XE:UI is open out of suspend function\n");
netdev_info(dev,
"RTL819XE:UI is open out of suspend function\n");
goto out_pci_suspend;
}
......@@ -57,7 +57,7 @@ int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state)
write_nic_byte(dev, MacBlkCtrl, 0xa);
}
out_pci_suspend:
printk("r8192E support WOL call??????????????????????\n");
netdev_info(dev, "r8192E support WOL call??????????????????????\n");
if (priv->rtllib->bSupportRemoteWakeUp)
RT_TRACE(COMP_POWER,
"r8192E support WOL call!!!!!!!!!!!!!!!!!!.\n");
......@@ -79,14 +79,13 @@ int rtl8192E_resume(struct pci_dev *pdev)
int err;
u32 val;
printk(KERN_INFO "================>r8192E resume call.\n");
netdev_info(dev, "================>r8192E resume call.\n");
pci_set_power_state(pdev, PCI_D0);
err = pci_enable_device(pdev);
if (err) {
printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
dev->name);
netdev_err(dev, "pci_enable_device failed on resume\n");
return err;
}
pci_restore_state(pdev);
......@@ -101,8 +100,8 @@ int rtl8192E_resume(struct pci_dev *pdev)
check_rfctrl_gpio_timer((unsigned long)dev);
if (!netif_running(dev)) {
printk(KERN_INFO
"RTL819XE:UI is open out of resume function\n");
netdev_info(dev,
"RTL819XE:UI is open out of resume function\n");
goto out;
}
......
......@@ -100,14 +100,14 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u64 time)
if ((time - jiffies) <= msecs_to_jiffies(MIN_SLEEP_TIME)) {
spin_unlock_irqrestore(&priv->ps_lock, flags);
printk(KERN_INFO "too short to sleep::%lld < %ld\n",
time - jiffies, msecs_to_jiffies(MIN_SLEEP_TIME));
netdev_info(dev, "too short to sleep::%lld < %ld\n",
time - jiffies, msecs_to_jiffies(MIN_SLEEP_TIME));
return;
}
if ((time - jiffies) > msecs_to_jiffies(MAX_SLEEP_TIME)) {
printk(KERN_INFO "========>too long to sleep:%lld > %ld\n",
time - jiffies, msecs_to_jiffies(MAX_SLEEP_TIME));
netdev_info(dev, "========>too long to sleep:%lld > %ld\n",
time - jiffies, msecs_to_jiffies(MAX_SLEEP_TIME));
spin_unlock_irqrestore(&priv->ps_lock, flags);
return;
}
......@@ -203,8 +203,8 @@ void rtllib_ips_leave_wq(struct net_device *dev)
__func__);
return;
} else {
printk(KERN_INFO "=========>%s(): IPSLeave\n",
__func__);
netdev_info(dev, "=========>%s(): IPSLeave\n",
__func__);
queue_work_rsl(priv->rtllib->wq,
&priv->rtllib->ips_leave_wq);
}
......
......@@ -255,7 +255,7 @@ static int r8192se_wx_set_radio(struct net_device *dev,
down(&priv->wx_sem);
printk(KERN_INFO "%s(): set radio ! extra is %d\n", __func__, *extra);
netdev_info(dev, "%s(): set radio ! extra is %d\n", __func__, *extra);
if ((*extra != 0) && (*extra != 1)) {
RT_TRACE(COMP_ERR,
"%s(): set radio an err value,must 0(radio off) or 1(radio on)\n",
......@@ -279,8 +279,8 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev,
down(&priv->wx_sem);
printk(KERN_INFO "%s(): set lps awake interval ! extra is %d\n",
__func__, *extra);
netdev_info(dev, "%s(): set lps awake interval ! extra is %d\n",
__func__, *extra);
pPSC->RegMaxLPSAwakeIntvl = *extra;
up(&priv->wx_sem);
......@@ -295,9 +295,9 @@ static int r8192se_wx_set_force_lps(struct net_device *dev,
down(&priv->wx_sem);
printk(KERN_INFO
"%s(): force LPS ! extra is %d (1 is open 0 is close)\n",
__func__, *extra);
netdev_info(dev,
"%s(): force LPS ! extra is %d (1 is open 0 is close)\n",
__func__, *extra);
priv->force_lps = *extra;
up(&priv->wx_sem);
return 0;
......@@ -314,8 +314,8 @@ static int r8192_wx_set_debugflag(struct net_device *dev,
if (priv->bHwRadioOff)
return 0;
printk(KERN_INFO "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
*extra, rt_global_debug_component);
netdev_info(dev, "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
*extra, rt_global_debug_component);
if (c > 0)
rt_global_debug_component |= (1<<c);
else
......@@ -347,9 +347,9 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
up(&priv->wx_sem);
return -1;
} else {
printk(KERN_INFO
"=========>%s(): IPSLeave\n",
__func__);
netdev_info(dev,
"=========>%s(): IPSLeave\n",
__func__);
down(&priv->rtllib->ips_sem);
IPSLeave(dev);
up(&priv->rtllib->ips_sem);
......@@ -475,8 +475,8 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
}
if (priv->bHwRadioOff) {
printk(KERN_INFO "================>%s(): hwradio off\n",
__func__);
netdev_info(dev, "================>%s(): hwradio off\n",
__func__);
return 0;
}
rtState = priv->rtllib->eRFPowerState;
......@@ -579,9 +579,9 @@ static int r8192_wx_set_essid(struct net_device *dev,
int ret;
if (priv->bHwRadioOff) {
printk(KERN_INFO
"=========>%s():hw radio off,or Rf state is eRfOff, return\n",
__func__);
netdev_info(dev,
"=========>%s():hw radio off,or Rf state is eRfOff, return\n",
__func__);
return 0;
}
down(&priv->wx_sem);
......@@ -833,7 +833,8 @@ static int r8192_wx_set_enc(struct net_device *dev,
set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104,
zero_addr[key_idx], 0, hwkey, 0);
} else {
printk(KERN_INFO "wrong type in WEP, not WEP40 and WEP104\n");
netdev_info(dev,
"wrong type in WEP, not WEP40 and WEP104\n");
}
}
......@@ -1155,8 +1156,10 @@ static int r8192_wx_set_PromiscuousMode(struct net_device *dev,
(rtllib_EnableIntelPromiscuousMode(dev, false)) :
(rtllib_DisableIntelPromiscuousMode(dev, false));
printk(KERN_INFO "=======>%s(), on = %d, filter src sta = %d\n",
__func__, bPromiscuousOn, bFilterSourceStationFrame);
netdev_info(dev,
"=======>%s(), on = %d, filter src sta = %d\n",
__func__, bPromiscuousOn,
bFilterSourceStationFrame);
} else {
return -1;
}
......
......@@ -466,7 +466,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
{
struct ts_common_info *pTS, *pTmpTS;
printk(KERN_INFO "===========>RemovePeerTS, %pM\n", Addr);
netdev_info(ieee->dev, "===========>RemovePeerTS, %pM\n", Addr);
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
if (memcmp(pTS->Addr, Addr, 6) == 0) {
......@@ -478,7 +478,8 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr)
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
if (memcmp(pTS->Addr, Addr, 6) == 0) {
printk(KERN_INFO "====>remove Tx_TS_admin_list\n");
netdev_info(ieee->dev,
"====>remove Tx_TS_admin_list\n");
RemoveTsEntry(ieee, pTS, TX_DIR);
list_del_init(&pTS->List);
list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
......
......@@ -768,8 +768,8 @@ do { \
#define RTLLIB_DL_TRACE (1<<29)
#define RTLLIB_DL_DATA (1<<30)
#define RTLLIB_DL_ERR (1<<31)
#define RTLLIB_ERROR(f, a...) printk(KERN_ERR "rtllib: " f, ## a)
#define RTLLIB_WARNING(f, a...) printk(KERN_WARNING "rtllib: " f, ## a)
#define RTLLIB_ERROR(f, a...) pr_err("rtllib: " f, ## a)
#define RTLLIB_WARNING(f, a...) pr_warn("rtllib: " f, ## a)
#define RTLLIB_DEBUG_INFO(f, a...) RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a)
#define RTLLIB_DEBUG_WX(f, a...) RTLLIB_DEBUG(RTLLIB_DL_WX, f, ## a)
......
......@@ -505,7 +505,7 @@ static int michael_mic(struct crypto_hash *tfm_michael, u8 *key, u8 *hdr,
struct scatterlist sg[2];
if (tfm_michael == NULL) {
printk(KERN_WARNING "michael_mic: tfm_michael == NULL\n");
pr_warn("michael_mic: tfm_michael == NULL\n");
return -1;
}
sg_init_table(sg, 2);
......@@ -631,7 +631,7 @@ static int rtllib_michael_mic_verify(struct sk_buff *skb, int keyidx,
printk(KERN_DEBUG "%d\n",
memcmp(mic, skb->data + skb->len - 8, 8) != 0);
if (skb->dev) {
printk(KERN_INFO "skb->dev != NULL\n");
pr_info("skb->dev != NULL\n");
rtllib_michael_mic_failure(skb->dev, hdr, keyidx);
}
tkey->dot11RSNAStatsTKIPLocalMICFailures++;
......
......@@ -106,8 +106,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
if (skb_headroom(skb) < 4 || skb_tailroom(skb) < 4 ||
skb->len < hdr_len){
printk(KERN_ERR
"Error!!! headroom=%d tailroom=%d skblen=%d hdr_len=%d\n",
pr_err("Error!!! headroom=%d tailroom=%d skblen=%d hdr_len=%d\n",
skb_headroom(skb), skb_tailroom(skb), skb->len, hdr_len);
return -1;
}
......
......@@ -80,7 +80,7 @@ do { \
#define assert(expr) \
do { \
if (!(expr)) { \
printk(KERN_INFO "Assertion failed! %s,%s,%s,line=%d\n", \
pr_info("Assertion failed! %s,%s,%s,line=%d\n", \
#expr, __FILE__, __func__, __LINE__); \
} \
} while (0);
......
......@@ -523,7 +523,9 @@ void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, struct rx_ts_record
del_timer_sync(&pTS->RxPktPendingTimer);
while (!list_empty(&pTS->RxPendingPktList)) {
if (RfdCnt >= REORDER_WIN_SIZE) {
printk(KERN_INFO "-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n", __func__);
netdev_info(ieee->dev,
"-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n",
__func__);
break;
}
......@@ -792,13 +794,18 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
(nSubframe_Length << 8);
if (skb->len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
printk(KERN_INFO "%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",\
__func__, rxb->nr_subframes);
printk(KERN_INFO "%s: A-MSDU parse error!! Subframe Length: %d\n", __func__,
nSubframe_Length);
printk(KERN_INFO "nRemain_Length is %d and nSubframe_Length is : %d\n", skb->len,
nSubframe_Length);
printk(KERN_INFO "The Packet SeqNum is %d\n", SeqNum);
netdev_info(ieee->dev,
"%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",
__func__, rxb->nr_subframes);
netdev_info(ieee->dev,
"%s: A-MSDU parse error!! Subframe Length: %d\n",
__func__, nSubframe_Length);
netdev_info(ieee->dev,
"nRemain_Length is %d and nSubframe_Length is : %d\n",
skb->len, nSubframe_Length);
netdev_info(ieee->dev,
"The Packet SeqNum is %d\n",
SeqNum);
return 0;
}
......@@ -858,7 +865,8 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
hdrlen = rtllib_get_hdrlen(fc);
if (HTCCheck(ieee, skb->data)) {
if (net_ratelimit())
printk(KERN_INFO "%s: find HTCControl!\n", __func__);
netdev_info(ieee->dev, "%s: find HTCControl!\n",
__func__);
hdrlen += 4;
rx_stats->bContainHTC = true;
}
......@@ -1048,7 +1056,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
keyidx = rtllib_rx_frame_decrypt(ieee, skb, crypt);
if (ieee->host_decrypt && (fc & RTLLIB_FCTL_WEP) && (keyidx < 0)) {
printk(KERN_INFO "%s: decrypt frame error\n", __func__);
netdev_info(ieee->dev, "%s: decrypt frame error\n", __func__);
return -1;
}
......@@ -1071,8 +1079,9 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
flen -= hdrlen;
if (frag_skb->tail + flen > frag_skb->end) {
printk(KERN_WARNING "%s: host decrypted and reassembled frame did not fit skb\n",
__func__);
netdev_warn(ieee->dev,
"%s: host decrypted and reassembled frame did not fit skb\n",
__func__);
rtllib_frag_cache_invalidate(ieee, hdr);
return -1;
}
......@@ -1108,7 +1117,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
* encrypted/authenticated */
if (ieee->host_decrypt && (fc & RTLLIB_FCTL_WEP) &&
rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
printk(KERN_INFO "%s: ==>decrypt msdu error\n", __func__);
netdev_info(ieee->dev, "%s: ==>decrypt msdu error\n", __func__);
return -1;
}
......@@ -1148,7 +1157,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
}
if (rtllib_is_eapol_frame(ieee, skb, hdrlen))
printk(KERN_WARNING "RX: IEEE802.1X EAPOL frame!\n");
netdev_warn(ieee->dev, "RX: IEEE802.1X EAPOL frame!\n");
return 0;
}
......@@ -1180,7 +1189,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
int i = 0;
if (rxb == NULL) {
printk(KERN_INFO "%s: rxb is NULL!!\n", __func__);
netdev_info(dev, "%s: rxb is NULL!!\n", __func__);
return;
}
......@@ -1261,7 +1270,8 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
/*Filter pkt has too small length */
hdrlen = rtllib_rx_get_hdrlen(ieee, skb, rx_stats);
if (skb->len < hdrlen) {
printk(KERN_INFO "%s():ERR!!! skb->len is smaller than hdrlen\n", __func__);
netdev_info(dev, "%s():ERR!!! skb->len is smaller than hdrlen\n",
__func__);
goto rx_dropped;
}
......@@ -1404,13 +1414,16 @@ static int rtllib_rx_Monitor(struct rtllib_device *ieee, struct sk_buff *skb,
size_t hdrlen = rtllib_get_hdrlen(fc);
if (skb->len < hdrlen) {
printk(KERN_INFO "%s():ERR!!! skb->len is smaller than hdrlen\n", __func__);
netdev_info(ieee->dev,
"%s():ERR!!! skb->len is smaller than hdrlen\n",
__func__);
return 0;
}
if (HTCCheck(ieee, skb->data)) {
if (net_ratelimit())
printk(KERN_INFO "%s: Find HTCControl!\n", __func__);
netdev_info(ieee->dev, "%s: Find HTCControl!\n",
__func__);
hdrlen += 4;
}
......@@ -1436,11 +1449,11 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
int ret = 0;
if ((NULL == ieee) || (NULL == skb) || (NULL == rx_stats)) {
printk(KERN_INFO "%s: Input parameters NULL!\n", __func__);
pr_info("%s: Input parameters NULL!\n", __func__);
goto rx_dropped;
}
if (skb->len < 10) {
printk(KERN_INFO "%s: SKB length < 10\n", __func__);
netdev_info(ieee->dev, "%s: SKB length < 10\n", __func__);
goto rx_dropped;
}
......@@ -1460,7 +1473,7 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
ret = rtllib_rx_Mesh(ieee, skb, rx_stats);
break;
default:
printk(KERN_INFO"%s: ERR iw mode!!!\n", __func__);
netdev_info(ieee->dev, "%s: ERR iw mode!!!\n", __func__);
break;
}
......@@ -1701,7 +1714,9 @@ static inline void rtllib_extract_country_ie(
if (!IS_COUNTRY_IE_VALID(ieee)) {
if (rtllib_act_scanning(ieee, false) && ieee->FirstIe_InScan)
printk(KERN_INFO "Received beacon ContryIE, SSID: <%s>\n", network->ssid);
netdev_info(ieee->dev,
"Received beacon ContryIE, SSID: <%s>\n",
network->ssid);
Dot11d_UpdateCountryIe(ieee, addr2, info_element->len, info_element->data);
}
}
......@@ -2138,8 +2153,8 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
}
break;
case MFIE_TYPE_QOS_PARAMETER:
printk(KERN_ERR
"QoS Error need to parse QOS_PARAMETER IE\n");
netdev_err(ieee->dev,
"QoS Error need to parse QOS_PARAMETER IE\n");
break;
case MFIE_TYPE_COUNTRY:
......@@ -2418,7 +2433,7 @@ static inline int is_beacon(__le16 fc)
static int IsPassiveChannel(struct rtllib_device *rtllib, u8 channel)
{
if (MAX_CHANNEL_NUMBER < channel) {
printk(KERN_INFO "%s(): Invalid Channel\n", __func__);
netdev_info(rtllib->dev, "%s(): Invalid Channel\n", __func__);
return 0;
}
......@@ -2431,7 +2446,7 @@ static int IsPassiveChannel(struct rtllib_device *rtllib, u8 channel)
int rtllib_legal_channel(struct rtllib_device *rtllib, u8 channel)
{
if (MAX_CHANNEL_NUMBER < channel) {
printk(KERN_INFO "%s(): Invalid Channel\n", __func__);
netdev_info(rtllib->dev, "%s(): Invalid Channel\n", __func__);
return 0;
}
if (rtllib->active_channel_map[channel] > 0)
......@@ -2497,8 +2512,9 @@ static inline void rtllib_process_probe_response(
if (WLAN_FC_GET_STYPE(le16_to_cpu(beacon->header.frame_ctl)) ==
RTLLIB_STYPE_PROBE_RESP) {
if (IsPassiveChannel(ieee, network->channel)) {
printk(KERN_INFO "GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n",
network->channel);
netdev_info(ieee->dev,
"GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n",
network->channel);
goto free_network;
}
}
......
This diff is collapsed.
......@@ -527,8 +527,8 @@ int rtllib_wx_set_rawtx(struct rtllib_device *ieee,
else
ieee->raw_tx = 0;
printk(KERN_INFO"raw TX is %s\n",
ieee->raw_tx ? "enabled" : "disabled");
netdev_info(ieee->dev, "raw TX is %s\n",
ieee->raw_tx ? "enabled" : "disabled");
if (ieee->iw_mode == IW_MODE_MONITOR) {
if (prev == 0 && ieee->raw_tx) {
......
......@@ -185,7 +185,8 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag,
crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
if (!(crypt && crypt->ops)) {
printk(KERN_INFO "=========>%s(), crypt is null\n", __func__);
netdev_info(ieee->dev, "=========>%s(), crypt is null\n",
__func__);
return -1;
}
/* To encrypt, frame format is:
......@@ -202,8 +203,8 @@ int rtllib_encrypt_fragment(struct rtllib_device *ieee, struct sk_buff *frag,
atomic_dec(&crypt->refcnt);
if (res < 0) {
printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
ieee->dev->name, frag->len);
netdev_info(ieee->dev, "%s: Encryption failed: len=%d.\n",
ieee->dev->name, frag->len);
ieee->ieee_stats.tx_discards++;
return -1;
}
......@@ -311,7 +312,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
if (pHTInfo->bCurrentAMPDUEnable) {
if (!GetTs(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1,
skb->priority, TX_DIR, true)) {
printk(KERN_INFO "%s: can't get TS\n", __func__);
netdev_info(ieee->dev, "%s: can't get TS\n", __func__);
return;
}
if (pTxTs->TxAdmittedBARecord.bValid == false) {
......@@ -582,16 +583,15 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
IEEE_SOFTMAC_TX_QUEUE)) ||
((!ieee->softmac_data_hard_start_xmit &&
(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
printk(KERN_WARNING "%s: No xmit handler.\n",
ieee->dev->name);
netdev_warn(ieee->dev, "No xmit handler.\n");
goto success;
}
if (likely(ieee->raw_tx == 0)) {
if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
printk(KERN_WARNING "%s: skb too small (%d).\n",
ieee->dev->name, skb->len);
netdev_warn(ieee->dev, "skb too small (%d).\n",
skb->len);
goto success;
}
/* Save source and destination addresses */
......@@ -604,9 +604,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
if (ieee->iw_mode == IW_MODE_MONITOR) {
txb = rtllib_alloc_txb(1, skb->len, GFP_ATOMIC);
if (unlikely(!txb)) {
printk(KERN_WARNING
"%s: Could not allocate TXB\n",
ieee->dev->name);
netdev_warn(ieee->dev,
"Could not allocate TXB\n");
goto failed;
}
......@@ -636,8 +635,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
}
}
} else if (ETH_P_ARP == ether_type) {
printk(KERN_INFO
"=================>DHCP Protocol start tx ARP pkt!!\n");
netdev_info(ieee->dev,
"=================>DHCP Protocol start tx ARP pkt!!\n");
bdhcp = true;
ieee->LPSDelayCnt =
ieee->current_network.tim.tim_count;
......@@ -717,10 +716,11 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
/* in case we are a client verify acm is not set for this ac */
while (unlikely(ieee->wmm_acm & (0x01 << skb->priority))) {
printk(KERN_INFO "skb->priority = %x\n", skb->priority);
netdev_info(ieee->dev, "skb->priority = %x\n",
skb->priority);
if (wme_downgrade_ac(skb))
break;
printk(KERN_INFO "converted skb->priority = %x\n",
netdev_info(ieee->dev, "converted skb->priority = %x\n",
skb->priority);
}
qos_ctl |= skb->priority;
......@@ -760,8 +760,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
txb = rtllib_alloc_txb(nr_frags, frag_size +
ieee->tx_headroom, GFP_ATOMIC);
if (unlikely(!txb)) {
printk(KERN_WARNING "%s: Could not allocate TXB\n",
ieee->dev->name);
netdev_warn(ieee->dev, "Could not allocate TXB\n");
goto failed;
}
txb->encrypted = encrypt;
......@@ -858,15 +857,14 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
}
} else {
if (unlikely(skb->len < sizeof(struct rtllib_hdr_3addr))) {
printk(KERN_WARNING "%s: skb too small (%d).\n",
ieee->dev->name, skb->len);
netdev_warn(ieee->dev, "skb too small (%d).\n",
skb->len);
goto success;
}
txb = rtllib_alloc_txb(1, skb->len, GFP_ATOMIC);
if (!txb) {
printk(KERN_WARNING "%s: Could not allocate TXB\n",
ieee->dev->name);
netdev_warn(ieee->dev, "Could not allocate TXB\n");
goto failed;
}
......
......@@ -389,9 +389,9 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
kfree(new_crypt);
new_crypt = NULL;
netdev_warn(dev, "%s: could not initialize WEP: "
"load module rtllib_crypt_wep\n",
dev->name);
netdev_warn(dev,
"%s: could not initialize WEP: load module rtllib_crypt_wep\n",
dev->name);
return -EOPNOTSUPP;
}
*crypt = new_crypt;
......
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