svn commit: r234571 - in stable/8/sys/dev: ipw iwi iwn wpi
Bernhard Schmidt
bschmidt at FreeBSD.org
Sun Apr 22 09:19:20 UTC 2012
Author: bschmidt
Date: Sun Apr 22 09:19:19 2012
New Revision: 234571
URL: http://svn.freebsd.org/changeset/base/234571
Log:
MFC r233387:
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.
Modified:
stable/8/sys/dev/ipw/if_ipw.c
stable/8/sys/dev/iwi/if_iwi.c
stable/8/sys/dev/iwn/if_iwn.c
stable/8/sys/dev/wpi/if_wpi.c
Directory Properties:
stable/8/sys/ (props changed)
Modified: stable/8/sys/dev/ipw/if_ipw.c
==============================================================================
--- stable/8/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:10 2012 (r234570)
+++ stable/8/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:19 2012 (r234571)
@@ -833,9 +833,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;
}
@@ -843,13 +843,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;
}
Modified: stable/8/sys/dev/iwi/if_iwi.c
==============================================================================
--- stable/8/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:10 2012 (r234570)
+++ stable/8/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:19 2012 (r234571)
@@ -861,9 +861,9 @@ static int
iwi_suspend(device_t dev)
{
struct iwi_softc *sc = device_get_softc(dev);
+ struct ieee80211com *ic = sc->sc_ifp->if_l2com;
- iwi_stop(sc);
-
+ ieee80211_suspend_all(ic);
return 0;
}
@@ -871,13 +871,11 @@ static int
iwi_resume(device_t dev)
{
struct iwi_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)
- iwi_init(sc);
-
+ ieee80211_resume_all(ic);
return 0;
}
Modified: stable/8/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/8/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:10 2012 (r234570)
+++ stable/8/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:19 2012 (r234571)
@@ -958,13 +958,9 @@ static int
iwn_suspend(device_t dev)
{
struct iwn_softc *sc = device_get_softc(dev);
- struct ifnet *ifp = sc->sc_ifp;
- struct ieee80211com *ic = ifp->if_l2com;
- struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
+ struct ieee80211com *ic = sc->sc_ifp->if_l2com;
- iwn_stop(sc);
- if (vap != NULL)
- ieee80211_stop(vap);
+ ieee80211_suspend_all(ic);
return 0;
}
@@ -972,20 +968,12 @@ static int
iwn_resume(device_t dev)
{
struct iwn_softc *sc = device_get_softc(dev);
- struct ifnet *ifp = sc->sc_ifp;
- struct ieee80211com *ic = ifp->if_l2com;
- struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
+ struct ieee80211com *ic = sc->sc_ifp->if_l2com;
/* Clear device-specific "PCI retry timeout" register (41h). */
pci_write_config(dev, 0x41, 0, 1);
- if (ifp->if_flags & IFF_UP) {
- iwn_init(sc);
- if (vap != NULL)
- ieee80211_init(vap);
- if (ifp->if_drv_flags & IFF_DRV_RUNNING)
- iwn_start(ifp);
- }
+ ieee80211_resume_all(ic);
return 0;
}
Modified: stable/8/sys/dev/wpi/if_wpi.c
==============================================================================
--- stable/8/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:10 2012 (r234570)
+++ stable/8/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:19 2012 (r234571)
@@ -1216,8 +1216,9 @@ static int
wpi_suspend(device_t dev)
{
struct wpi_softc *sc = device_get_softc(dev);
+ struct ieee80211com *ic = sc->sc_ifp->if_l2com;
- wpi_stop(sc);
+ ieee80211_suspend_all(ic);
return 0;
}
@@ -1225,15 +1226,11 @@ static int
wpi_resume(device_t dev)
{
struct wpi_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) {
- wpi_init(ifp->if_softc);
- if (ifp->if_drv_flags & IFF_DRV_RUNNING)
- wpi_start(ifp);
- }
+ ieee80211_resume_all(ic);
return 0;
}
More information about the svn-src-stable-8
mailing list