Commit 8bd890a4 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XVIII

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent c73901c9
......@@ -23,42 +23,38 @@
#include "r8190P_rtl8256.h"
#include "rtl_pm.h"
int rtl8192E_save_state (struct pci_dev *dev, pm_message_t state)
int rtl8192E_save_state(struct pci_dev *dev, pm_message_t state)
{
printk(KERN_NOTICE "r8192E save state call (state %u).\n", state.event);
return(-EAGAIN);
printk(KERN_NOTICE "r8192E save state call (state %u).\n", state.event);
return -EAGAIN;
}
int rtl8192E_suspend (struct pci_dev *pdev, pm_message_t state)
int rtl8192E_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct r8192_priv *priv = rtllib_priv(dev);
u32 ulRegRead;
RT_TRACE(COMP_POWER, "============> r8192E suspend call.\n");
printk("============> r8192E suspend call.\n");
printk(KERN_INFO "============> 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("RTL819XE:UI is open out of suspend function\n");
goto out_pci_suspend;
}
if (!netif_running(dev)) {
printk(KERN_INFO "RTL819XE:UI is open out of suspend "
"function\n");
goto out_pci_suspend;
}
#ifdef HAVE_NET_DEVICE_OPS
if (dev->netdev_ops->ndo_stop)
dev->netdev_ops->ndo_stop(dev);
#else
dev->stop(dev);
#endif
netif_device_detach(dev);
if (!priv->rtllib->bSupportRemoteWakeUp) {
MgntActSet_RF_State(dev, eRfOff, RF_CHANGE_BY_INIT,true);
MgntActSet_RF_State(dev, eRfOff, RF_CHANGE_BY_INIT, true);
ulRegRead = read_nic_dword(dev, CPU_GEN);
ulRegRead|=CPU_GEN_SYSTEM_RESET;
ulRegRead |= CPU_GEN_SYSTEM_RESET;
write_nic_dword(dev, CPU_GEN, ulRegRead);
} else {
write_nic_dword(dev, WFCRC0, 0xffffffff);
......@@ -68,81 +64,73 @@ int rtl8192E_suspend (struct pci_dev *pdev, pm_message_t state)
write_nic_byte(dev, MacBlkCtrl, 0xa);
}
out_pci_suspend:
RT_TRACE(COMP_POWER, "r8192E support WOL call??????????????????????\n");
printk("r8192E support WOL call??????????????????????\n");
if (priv->rtllib->bSupportRemoteWakeUp) {
RT_TRACE(COMP_POWER, "r8192E support WOL call!!!!!!!!!!!!!!!!!!.\n");
}
if (priv->rtllib->bSupportRemoteWakeUp)
RT_TRACE(COMP_POWER, "r8192E support WOL call!!!!!!!"
"!!!!!!!!!!!.\n");
pci_save_state(pdev);
pci_disable_device(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev,state),\
priv->rtllib->bSupportRemoteWakeUp?1:0);
pci_set_power_state(pdev,pci_choose_state(pdev,state));
pci_enable_wake(pdev, pci_choose_state(pdev, state),
priv->rtllib->bSupportRemoteWakeUp ? 1 : 0);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
mdelay(20);
mdelay(20);
return 0;
}
int rtl8192E_resume (struct pci_dev *pdev)
int rtl8192E_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct r8192_priv *priv = rtllib_priv(dev);
int err;
u32 val;
RT_TRACE(COMP_POWER, "================>r8192E resume call.");
printk("================>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);
return err;
}
pci_restore_state(pdev);
pci_read_config_dword(pdev, 0x40, &val);
if ((val & 0x0000ff00) != 0) {
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
}
pci_enable_wake(pdev, PCI_D0, 0);
if (priv->polling_timer_on == 0){
check_rfctrl_gpio_timer((unsigned long)dev);
}
if (!netif_running(dev)){
printk("RTL819XE:UI is open out of resume function\n");
goto out;
}
netif_device_attach(dev);
#ifdef HAVE_NET_DEVICE_OPS
if (dev->netdev_ops->ndo_open)
dev->netdev_ops->ndo_open(dev);
#else
dev->open(dev);
#endif
struct net_device *dev = pci_get_drvdata(pdev);
struct r8192_priv *priv = rtllib_priv(dev);
int err;
u32 val;
printk(KERN_INFO "================>r8192E resume call.\n");
if (!priv->rtllib->bSupportRemoteWakeUp) {
MgntActSet_RF_State(dev, eRfOn, RF_CHANGE_BY_INIT,true);
}
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);
return err;
}
pci_restore_state(pdev);
pci_read_config_dword(pdev, 0x40, &val);
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
pci_enable_wake(pdev, PCI_D0, 0);
if (priv->polling_timer_on == 0)
check_rfctrl_gpio_timer((unsigned long)dev);
if (!netif_running(dev)) {
printk(KERN_INFO "RTL819XE:UI is open out of resume "
"function\n");
goto out;
}
netif_device_attach(dev);
if (dev->netdev_ops->ndo_open)
dev->netdev_ops->ndo_open(dev);
if (!priv->rtllib->bSupportRemoteWakeUp)
MgntActSet_RF_State(dev, eRfOn, RF_CHANGE_BY_INIT, true);
out:
RT_TRACE(COMP_POWER, "<================r8192E resume call.\n");
return 0;
RT_TRACE(COMP_POWER, "<================r8192E resume call.\n");
return 0;
}
int rtl8192E_enable_wake (struct pci_dev *dev, pm_message_t state, int enable)
int rtl8192E_enable_wake(struct pci_dev *dev, pm_message_t state, int enable)
{
printk(KERN_NOTICE "r8192E enable wake call (state %u, enable %d).\n",
printk(KERN_NOTICE "r8192E enable wake call (state %u, enable %d).\n",
state.event, enable);
return(-EAGAIN);
return -EAGAIN;
}
#endif
......@@ -25,10 +25,10 @@
#include <linux/types.h>
#include <linux/pci.h>
int rtl8192E_save_state (struct pci_dev *dev, pm_message_t state);
int rtl8192E_suspend (struct pci_dev *dev, pm_message_t state);
int rtl8192E_resume (struct pci_dev *dev);
int rtl8192E_enable_wake (struct pci_dev *dev, pm_message_t state, int enable);
int rtl8192E_save_state(struct pci_dev *dev, pm_message_t state);
int rtl8192E_suspend(struct pci_dev *dev, pm_message_t state);
int rtl8192E_resume(struct pci_dev *dev);
int rtl8192E_enable_wake(struct pci_dev *dev, pm_message_t state, int enable);
#endif
......
This diff is collapsed.
......@@ -36,7 +36,7 @@ void rtl8192_hw_wakeup(struct net_device *dev);
void rtl8192_hw_to_sleep(struct net_device *dev, u64 time);
void rtllib_ips_leave_wq(struct net_device *dev);
void rtllib_ips_leave(struct net_device *dev);
void IPSLeave_wq (void *data);
void IPSLeave_wq(void *data);
void IPSEnter(struct net_device *dev);
void IPSLeave(struct net_device *dev);
......
This diff is collapsed.
......@@ -26,6 +26,6 @@ struct iw_statistics;
extern struct iw_handler_def r8192_wx_handlers_def;
struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev);
u16 rtl8192_11n_user_show_rates(struct net_device* dev);
u16 rtl8192_11n_user_show_rates(struct net_device *dev);
#endif
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