linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: make workqueue freezable
@ 2008-06-26 17:59 Johannes Berg
  2008-06-26 18:14 ` Ivo van Doorn
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2008-06-26 17:59 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Ivo van Doorn

This patch makes the mac80211 workqueue freezable making it
interact a bit better with system suspend and not try to ping
the AP while the hardware is down.

This doesn't really help with implementing proper suspend in
any way but makes some bad things trigger less.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
I'm not sure whether we should put this into 2.6.26 or not, while it
might help a bit it doesn't really do much over what the tx bugs finder
already does except avoid sending out the packets that froze b43 in the
first place...

Ivo, you might consider using =EF=BB=BFcreate_freezeable_workqueue for =
your
rt2x00 patch though.

 net/mac80211/main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- everything.orig/net/mac80211/main.c	2008-06-26 18:21:14.000000000 +=
0200
+++ everything/net/mac80211/main.c	2008-06-26 18:21:16.000000000 +0200
@@ -1774,7 +1774,7 @@ int ieee80211_register_hw(struct ieee802
 	list_add_tail(&sdata->list, &local->interfaces);
=20
 	name =3D wiphy_dev(local->hw.wiphy)->driver->name;
-	local->hw.workqueue =3D create_singlethread_workqueue(name);
+	local->hw.workqueue =3D create_freezeable_workqueue(name);
 	if (!local->hw.workqueue) {
 		result =3D -ENOMEM;
 		goto fail_workqueue;


--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: make workqueue freezable
  2008-06-26 17:59 [PATCH] mac80211: make workqueue freezable Johannes Berg
@ 2008-06-26 18:14 ` Ivo van Doorn
  2008-06-26 18:21   ` Ivo van Doorn
  0 siblings, 1 reply; 3+ messages in thread
From: Ivo van Doorn @ 2008-06-26 18:14 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless

On Thursday 26 June 2008, Johannes Berg wrote:
> This patch makes the mac80211 workqueue freezable making it
> interact a bit better with system suspend and not try to ping
> the AP while the hardware is down.
>=20
> This doesn't really help with implementing proper suspend in
> any way but makes some bad things trigger less.
>=20
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> I'm not sure whether we should put this into 2.6.26 or not, while it
> might help a bit it doesn't really do much over what the tx bugs find=
er
> already does except avoid sending out the packets that froze b43 in t=
he
> first place...
>=20
> Ivo, you might consider using =EF=BB=BFcreate_freezeable_workqueue fo=
r your
> rt2x00 patch though.

Will do. Thanks for the tip.

Ivo

>  net/mac80211/main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> --- everything.orig/net/mac80211/main.c	2008-06-26 18:21:14.000000000=
 +0200
> +++ everything/net/mac80211/main.c	2008-06-26 18:21:16.000000000 +020=
0
> @@ -1774,7 +1774,7 @@ int ieee80211_register_hw(struct ieee802
>  	list_add_tail(&sdata->list, &local->interfaces);
> =20
>  	name =3D wiphy_dev(local->hw.wiphy)->driver->name;
> -	local->hw.workqueue =3D create_singlethread_workqueue(name);
> +	local->hw.workqueue =3D create_freezeable_workqueue(name);
>  	if (!local->hw.workqueue) {
>  		result =3D -ENOMEM;
>  		goto fail_workqueue;
>=20
>=20
>=20


--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: make workqueue freezable
  2008-06-26 18:14 ` Ivo van Doorn
@ 2008-06-26 18:21   ` Ivo van Doorn
  0 siblings, 0 replies; 3+ messages in thread
From: Ivo van Doorn @ 2008-06-26 18:21 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless

On Thursday 26 June 2008, Ivo van Doorn wrote:
> On Thursday 26 June 2008, Johannes Berg wrote:
> > This patch makes the mac80211 workqueue freezable making it
> > interact a bit better with system suspend and not try to ping
> > the AP while the hardware is down.
> >=20
> > This doesn't really help with implementing proper suspend in
> > any way but makes some bad things trigger less.
> >=20
> > Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> > ---
> > I'm not sure whether we should put this into 2.6.26 or not, while i=
t
> > might help a bit it doesn't really do much over what the tx bugs fi=
nder
> > already does except avoid sending out the packets that froze b43 in=
 the
> > first place...
> >=20
> > Ivo, you might consider using =EF=BB=BFcreate_freezeable_workqueue =
for your
> > rt2x00 patch though.
>=20
> Will do. Thanks for the tip.

Ehm, on second thought I keep it as it is. Currently the rt2x00 will al=
ready shut
down all work tasks during suspend and resumes them when the device is =
restored.

The only task that needs to survive the suspend and resume task is the =
link tuner,
and that one is automatically started when the radio is reenabled. And =
not stopping
it manually during suspend, will cause problems (aka race conditions, w=
hich have
appeared in the past when the link tuner continues running while the ra=
dio is down)

Ivo

> >  net/mac80211/main.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >=20
> > --- everything.orig/net/mac80211/main.c	2008-06-26 18:21:14.0000000=
00 +0200
> > +++ everything/net/mac80211/main.c	2008-06-26 18:21:16.000000000 +0=
200
> > @@ -1774,7 +1774,7 @@ int ieee80211_register_hw(struct ieee802
> >  	list_add_tail(&sdata->list, &local->interfaces);
> > =20
> >  	name =3D wiphy_dev(local->hw.wiphy)->driver->name;
> > -	local->hw.workqueue =3D create_singlethread_workqueue(name);
> > +	local->hw.workqueue =3D create_freezeable_workqueue(name);
> >  	if (!local->hw.workqueue) {
> >  		result =3D -ENOMEM;
> >  		goto fail_workqueue;
> >=20
> >=20
> >=20
>=20
>=20
>=20


--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-26 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 17:59 [PATCH] mac80211: make workqueue freezable Johannes Berg
2008-06-26 18:14 ` Ivo van Doorn
2008-06-26 18:21   ` Ivo van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).