From owner-svn-src-stable@FreeBSD.ORG Sun Apr 22 09:19:11 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43D721065672; Sun, 22 Apr 2012 09:19:11 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4118FC17; Sun, 22 Apr 2012 09:19:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3M9JB04029185; Sun, 22 Apr 2012 09:19:11 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3M9JAuF029180; Sun, 22 Apr 2012 09:19:10 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204220919.q3M9JAuF029180@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 22 Apr 2012 09:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234570 - in stable/9/sys/dev: ipw iwi iwn wpi X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2012 09:19:11 -0000 Author: bschmidt Date: Sun Apr 22 09:19:10 2012 New Revision: 234570 URL: http://svn.freebsd.org/changeset/base/234570 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/9/sys/dev/ipw/if_ipw.c stable/9/sys/dev/iwi/if_iwi.c stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/wpi/if_wpi.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/ipw/if_ipw.c ============================================================================== --- stable/9/sys/dev/ipw/if_ipw.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/ipw/if_ipw.c Sun Apr 22 09:19:10 2012 (r234570) @@ -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; } Modified: stable/9/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/9/sys/dev/iwi/if_iwi.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/iwi/if_iwi.c Sun Apr 22 09:19:10 2012 (r234570) @@ -863,9 +863,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; } @@ -873,13 +873,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/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/iwn/if_iwn.c Sun Apr 22 09:19:10 2012 (r234570) @@ -947,13 +947,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; } @@ -961,20 +957,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/9/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/9/sys/dev/wpi/if_wpi.c Sun Apr 22 08:49:13 2012 (r234569) +++ stable/9/sys/dev/wpi/if_wpi.c Sun Apr 22 09:19:10 2012 (r234570) @@ -1218,8 +1218,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; } @@ -1227,15 +1228,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; }