summaryrefslogtreecommitdiffstats
path: root/sys/dev/ipw
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2012-03-23 19:32:30 +0000
committerbschmidt <bschmidt@FreeBSD.org>2012-03-23 19:32:30 +0000
commitfe30cce04e8766dd56da51435cef313654bb3934 (patch)
tree50514bac3ab34984d21a9f648583b21556874511 /sys/dev/ipw
parent918c9660084650a34776f2ea17b1ff5860508600 (diff)
downloadFreeBSD-src-fe30cce04e8766dd56da51435cef313654bb3934.zip
FreeBSD-src-fe30cce04e8766dd56da51435cef313654bb3934.tar.gz
Use suspend/resume methods provided by net80211. This ensures that the
appropriate state handling takes place, not doing so results in the device doing nothing until manual intervention. Reviewed by: iwasaki Tested by: iwasaki (iwi) MFC after: 4 weeks
Diffstat (limited to 'sys/dev/ipw')
-rw-r--r--sys/dev/ipw/if_ipw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index bc3d593..01e3012 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -835,9 +835,9 @@ static int
ipw_suspend(device_t dev)
{
struct ipw_softc *sc = device_get_softc(dev);
+ struct ieee80211com *ic = sc->sc_ifp->if_l2com;
- ipw_stop(sc);
-
+ ieee80211_suspend_all(ic);
return 0;
}
@@ -845,13 +845,11 @@ static int
ipw_resume(device_t dev)
{
struct ipw_softc *sc = device_get_softc(dev);
- struct ifnet *ifp = sc->sc_ifp;
+ struct ieee80211com *ic = sc->sc_ifp->if_l2com;
pci_write_config(dev, 0x41, 0, 1);
- if (ifp->if_flags & IFF_UP)
- ipw_init(sc);
-
+ ieee80211_resume_all(ic);
return 0;
}
OpenPOWER on IntegriCloud