[patch] iwi(4) suspend/resume broken

Mitsuru IWASAKI iwasaki at jp.FreeBSD.org
Sun Mar 18 19:22:55 UTC 2012


Hi,

From: Bernhard Schmidt <bschmidt at 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 --------------
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;
 }


More information about the freebsd-wireless mailing list