Support for suspend/resume in laptops. Loosely based on the wi(4) patches
but not quite. The memory descriptors and most of the card parameters need to be writen to the card. MFC in: 3 days
This commit is contained in:
parent
fb256a4a54
commit
01de2955e4
@ -2832,6 +2832,26 @@ an_shutdown(dev)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
an_resume(dev)
|
||||
device_t dev;
|
||||
{
|
||||
struct an_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
sc = device_get_softc(dev);
|
||||
ifp = &sc->arpcom.ac_if;
|
||||
|
||||
an_reset(sc);
|
||||
if (sc->mpi350)
|
||||
an_init_mpi350_desc(sc);
|
||||
an_init(sc);
|
||||
|
||||
if (ifp->if_flags & IFF_UP)
|
||||
an_start(ifp);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ANCACHE
|
||||
/* Aironet signal strength cache code.
|
||||
* store signal/noise/quality on per MAC src basis in
|
||||
|
@ -116,6 +116,8 @@ static struct an_type an_devs[] = {
|
||||
static int an_probe_pci (device_t);
|
||||
static int an_attach_pci (device_t);
|
||||
static int an_detach_pci (device_t);
|
||||
static int an_suspend_pci (device_t);
|
||||
static int an_resume_pci (device_t);
|
||||
|
||||
static int
|
||||
an_probe_pci(device_t dev)
|
||||
@ -261,12 +263,30 @@ an_detach_pci(device_t dev)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
an_suspend_pci(device_t dev)
|
||||
{
|
||||
an_shutdown(dev);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
an_resume_pci(device_t dev)
|
||||
{
|
||||
an_resume(dev);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static device_method_t an_pci_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, an_probe_pci),
|
||||
DEVMETHOD(device_attach, an_attach_pci),
|
||||
DEVMETHOD(device_detach, an_detach_pci),
|
||||
DEVMETHOD(device_shutdown, an_shutdown),
|
||||
DEVMETHOD(device_suspend, an_suspend_pci),
|
||||
DEVMETHOD(device_resume, an_resume_pci),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -503,6 +503,7 @@ int an_alloc_aux_memory (device_t, int, int);
|
||||
int an_alloc_irq (device_t, int, int);
|
||||
int an_probe (device_t);
|
||||
void an_shutdown (device_t);
|
||||
void an_resume (device_t);
|
||||
int an_attach (struct an_softc *, int, int);
|
||||
void an_stop (struct an_softc *);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user