Date: Mon, 19 Mar 2012 04:22:50 +0900 (JST) From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> To: bschmidt@freebsd.org Cc: freebsd-wireless@freebsd.org Subject: Re: [patch] iwi(4) suspend/resume broken Message-ID: <20120319.042250.74754884.iwasaki@jp.FreeBSD.org> In-Reply-To: <201203181825.25124.bschmidt@freebsd.org> References: <201203171232.42515.bschmidt@freebsd.org> <20120319.010352.124006046.iwasaki@jp.FreeBSD.org> <201203181825.25124.bschmidt@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----Next_Part(Mon_Mar_19_04:22:50_2012_364)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, From: Bernhard Schmidt <bschmidt@freebsd.org> > Well, I came up with attached diff. It works fine on iwn and wpi > too basically, wpi has a bit of an issue with the scan after resume, > I see probe resquest/response on air but the device doesn't pick > em up sometimes.. still debugging. > > Anyways, I'm pretty sure that if you are doing the same for ipw/iwi > it will just work fine. The ieee80211_resume_all/suspend_all calls > will ensure that the appropriate stop/init driver functions are called. Great! I did the same thing for iwi(4), tested several times and it works just fine. Please commit the attached patches if you like it. Thanks! ----Next_Part(Mon_Mar_19_04:22:50_2012_364)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="iwi-suspend.diff" Index: if_iwi.c =================================================================== RCS file: /home/ncvs/src/sys/dev/iwi/if_iwi.c,v retrieving revision 1.81 diff -u -r1.81 if_iwi.c --- if_iwi.c 10 Mar 2012 17:08:57 -0000 1.81 +++ if_iwi.c 18 Mar 2012 19:02:42 -0000 @@ -863,8 +863,10 @@ iwi_suspend(device_t dev) { struct iwi_softc *sc = device_get_softc(dev); + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; - iwi_stop(sc); + ieee80211_suspend_all(ic); return 0; } @@ -874,11 +876,11 @@ { struct iwi_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = 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; } ----Next_Part(Mon_Mar_19_04:22:50_2012_364)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120319.042250.74754884.iwasaki>