2 Power management interface routines.
3 Written by Mariusz Matuszek.
4 This code is currently just a placeholder for later work and
5 does not do anything useful.
7 This is part of rtl8180 OpenSource driver.
8 Copyright (C) Andrea Merello 2004 <andreamrl@tiscali.it>
9 Released under the terms of GPL (General Public Licence)
12 #ifdef CONFIG_RTL8192_PM
14 #include "r8192U_pm.h"
16 /*****************************************************************************/
17 int rtl8192U_save_state (struct pci_dev *dev, u32 state)
19 printk(KERN_NOTICE "r8192U save state call (state %u).\n", state);
23 int rtl8192U_suspend(struct usb_interface *intf, pm_message_t state)
25 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
26 struct net_device *dev = usb_get_intfdata(intf);
28 //struct net_device *dev = (struct net_device *)ptr;
30 RT_TRACE(COMP_POWER, "============> r8192U suspend call.\n");
33 if (!netif_running(dev)) {
34 printk(KERN_WARNING "netif not running, go out suspend function\n");
38 if (dev->netdev_ops->ndo_stop)
39 dev->netdev_ops->ndo_stop(dev);
43 netif_device_detach(dev);
49 int rtl8192U_resume (struct usb_interface *intf)
51 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
52 struct net_device *dev = usb_get_intfdata(intf);
54 //struct net_device *dev = (struct net_device *)ptr;
57 RT_TRACE(COMP_POWER, "================>r8192U resume call.");
60 if (!netif_running(dev)){
61 printk(KERN_WARNING "netif not running, go out resume function\n");
65 netif_device_attach(dev);
67 if (dev->netdev_ops->ndo_open)
68 dev->netdev_ops->ndo_open(dev);
74 int rtl8192U_enable_wake (struct pci_dev *dev, u32 state, int enable)
76 printk(KERN_NOTICE "r8192U enable wake call (state %u, enable %d).\n",
81 #endif //CONFIG_RTL8192_PM