suspend and resume support.

This commit is contained in:
pizza 2006-07-22 16:00:23 +00:00
parent 073ae5f238
commit 48d6b82b7e
1 changed files with 35 additions and 4 deletions

View File

@ -33,10 +33,13 @@ module_param_array(irq_list, int, NULL, 0444);
module_param( irq_mask, int, 0644);
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
static int prism2_cs_suspend(struct pcmcia_device *pdev);
static int prism2_cs_resume(struct pcmcia_device *pdev);
#else
dev_link_t *prism2sta_attach(void);
static void prism2sta_detach(dev_link_t *link);
static void prism2sta_config(dev_link_t *link);
static int prism2sta_config(dev_link_t *link);
static void prism2sta_release(u_long arg);
static int prism2sta_event (event_t event, int priority, event_callback_args_t *args);
@ -139,7 +142,9 @@ static struct pcmcia_driver prism2_cs_driver = {
},
.owner = THIS_MODULE,
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
// XXXX probe, remove, suspend, resume
.suspend = prism2_cs_suspend,
.resume = prism2_cs_resume,
// XXXX probe, remove
#else
.attach = prism2sta_attach,
.detach = prism2sta_detach,
@ -151,7 +156,33 @@ static struct pcmcia_driver prism2_cs_driver = {
};
#endif /* kernel_version */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
int prism2_cs_suspend(struct pcmcia_device *pdev)
{
struct wlandevice *wlandev = pdev->priv;
DBFENTER;
prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable);
DBFEXIT;
return 0;
}
int prism2_cs_resume(struct pcmcia_device *pdev)
{
//struct wlandevice *wlandev = pdev->priv;
DBFENTER;
// XXX do nothing here?
DBFEXIT;
return 0;
}
#else // <= 2.6.15
/*----------------------------------------------------------------
* prism2sta_attach
*