diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 15:39:02 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 15:39:02 +0200 |
commit | aa77677e0a288e08073620db5d2a31df83ca4788 (patch) | |
tree | 0d14b995a21c43f365d66b9ad101a334109fc4e4 /drivers/staging/rtl8192e/r8192_pm.c | |
parent | efb8d21b2c6db3497655cc6a033ae8a9883e4063 (diff) | |
parent | 43a3beb6da994549ec28a9f31727b997a025f958 (diff) | |
download | op-kernel-dev-aa77677e0a288e08073620db5d2a31df83ca4788.zip op-kernel-dev-aa77677e0a288e08073620db5d2a31df83ca4788.tar.gz |
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1519 commits)
staging: et131x: Remove redundant check and return statement
staging: et131x: Mainly whitespace changes to appease checkpatch
staging: et131x: Remove last of the forward declarations
staging: et131x: Remove even more forward declarations
staging: et131x: Remove yet more forward declarations
staging: et131x: Remove more forward declarations
staging: et131x: Remove forward declaration of et131x_adapter_setup
staging: et131x: Remove some forward declarations
staging: et131x: Remove unused rx_ring.recv_packet_pool
staging: et131x: Remove call to find pci pm capability
staging: et131x: Remove redundant et131x_reset_recv() call
staging: et131x: Remove unused rx_ring.recv_buffer_pool
Staging: bcm: Fix three initialization errors in InterfaceDld.c
Staging: bcm: Fix coding style issues in InterfaceDld.c
staging:iio:dac: Add AD5360 driver
staging:iio:trigger:bfin-timer: Fix compile error
Staging: vt6655: add some range checks before memcpy()
Staging: vt6655: whitespace fixes to iotcl.c
Staging: vt6656: add some range checks before memcpy()
Staging: vt6656: whitespace cleanups in ioctl.c
...
Fix up conflicts in:
- drivers/{Kconfig,Makefile}, drivers/staging/{Kconfig,Makefile}:
vg driver movement
- drivers/staging/brcm80211/brcmfmac/{dhd_linux.c,mac80211_if.c}:
driver removal vs now stale changes
- drivers/staging/rtl8192e/r8192E_core.c:
driver removal vs now stale changes
- drivers/staging/et131x/et131*:
driver consolidation into one file, tried to do fixups
Diffstat (limited to 'drivers/staging/rtl8192e/r8192_pm.c')
-rw-r--r-- | drivers/staging/rtl8192e/r8192_pm.c | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/drivers/staging/rtl8192e/r8192_pm.c b/drivers/staging/rtl8192e/r8192_pm.c deleted file mode 100644 index 7bcc4a3..0000000 --- a/drivers/staging/rtl8192e/r8192_pm.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - Power management interface routines. - Written by Mariusz Matuszek. - This code is currently just a placeholder for later work and - does not do anything useful. - - This is part of rtl8180 OpenSource driver. - Copyright (C) Andrea Merello 2004 <andreamrl@tiscali.it> - Released under the terms of GPL (General Public Licence) -*/ - -#include "r8192E.h" -#include "r8192E_hw.h" -#include "r8192_pm.h" -#include "r8190_rtl8256.h" - -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; -} - - -int rtl8192E_suspend (struct pci_dev *pdev, pm_message_t state) -{ - struct net_device *dev = pci_get_drvdata(pdev); - struct r8192_priv *priv = ieee80211_priv(dev); - u32 ulRegRead; - - RT_TRACE(COMP_POWER, "============> r8192E suspend call.\n"); - if (!netif_running(dev)) - goto out_pci_suspend; - - if (dev->netdev_ops->ndo_stop) - dev->netdev_ops->ndo_stop(dev); - - // Call MgntActSet_RF_State instead to prevent RF config race condition. - if(!priv->ieee80211->bSupportRemoteWakeUp) { - MgntActSet_RF_State(priv, eRfOff, RF_CHANGE_BY_INIT); - // 2006.11.30. System reset bit - ulRegRead = read_nic_dword(priv, CPU_GEN); - ulRegRead|=CPU_GEN_SYSTEM_RESET; - write_nic_dword(priv, CPU_GEN, ulRegRead); - } else { - //2008.06.03 for WOL - write_nic_dword(priv, WFCRC0, 0xffffffff); - write_nic_dword(priv, WFCRC1, 0xffffffff); - write_nic_dword(priv, WFCRC2, 0xffffffff); - //Write PMR register - write_nic_byte(priv, PMR, 0x5); - //Disable tx, enanble rx - write_nic_byte(priv, MacBlkCtrl, 0xa); - } - -out_pci_suspend: - RT_TRACE(COMP_POWER, "r8192E support WOL call??????????????????????\n"); - if(priv->ieee80211->bSupportRemoteWakeUp) { - RT_TRACE(COMP_POWER, "r8192E support WOL call!!!!!!!!!!!!!!!!!!.\n"); - } - netif_device_detach(dev); - pci_save_state(pdev); - pci_disable_device(pdev); - pci_enable_wake(pdev, pci_choose_state(pdev,state), - priv->ieee80211->bSupportRemoteWakeUp?1:0); - pci_set_power_state(pdev,pci_choose_state(pdev,state)); - - return 0; -} - -int rtl8192E_resume (struct pci_dev *pdev) -{ - struct net_device *dev = pci_get_drvdata(pdev); - int err; - u32 val; - - RT_TRACE(COMP_POWER, "================>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); - - /* - * Suspend/Resume resets the PCI configuration space, so we have to - * re-disable the RETRY_TIMEOUT register (0x41) to keep PCI Tx retries - * from interfering with C3 CPU state. pci_restore_state won't help - * here since it only restores the first 64 bytes pci config header. - */ - 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(!netif_running(dev)) - goto out; - - netif_device_attach(dev); - - if (dev->netdev_ops->ndo_open) - dev->netdev_ops->ndo_open(dev); - -out: - RT_TRACE(COMP_POWER, "<================r8192E resume call.\n"); - return 0; -} - - -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", - state.event, enable); - return -EAGAIN; -} |