linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00dev: cancel all work on disconnect
@ 2009-07-29 20:07 Pavel Roskin
  2009-07-30 18:45 ` Ivo van Doorn
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Roskin @ 2009-07-29 20:07 UTC (permalink / raw)
  To: linux-wireless, John W. Linville, users; +Cc: Michael Buesch

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 658a63b..66b303b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -888,6 +888,13 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
 	clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
 
 	/*
+	 * Cancel all work.
+	 */
+	rt2x00link_stop_tuner(rt2x00dev);
+	cancel_work_sync(&rt2x00dev->filter_work);
+	cancel_work_sync(&rt2x00dev->intf_work);
+
+	/*
 	 * Disable radio.
 	 */
 	rt2x00lib_disable_radio(rt2x00dev);

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

* Re: [PATCH] rt2x00dev: cancel all work on disconnect
  2009-07-29 20:07 [PATCH] rt2x00dev: cancel all work on disconnect Pavel Roskin
@ 2009-07-30 18:45 ` Ivo van Doorn
  2009-07-30 18:58   ` Michael Buesch
  0 siblings, 1 reply; 3+ messages in thread
From: Ivo van Doorn @ 2009-07-30 18:45 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linux-wireless, John W. Linville, users, Michael Buesch

Hi,

I assume fixes the bug Michael reported on Linux-wireless yesterday?
The patch looks good, but I have some minor modification request:

On Wednesday 29 July 2009, Pavel Roskin wrote:
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
>  drivers/net/wireless/rt2x00/rt2x00dev.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> index 658a63b..66b303b 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> @@ -888,6 +888,13 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
>  	clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
>  
>  	/*
> +	 * Cancel all work.
> +	 */
> +	rt2x00link_stop_tuner(rt2x00dev);

This one isn't needed. rt2x00lib_disable_radio() is doing this.

> +	cancel_work_sync(&rt2x00dev->filter_work);
> +	cancel_work_sync(&rt2x00dev->intf_work);

Could you move these 2 until after the call to rt2x00lib_disable_radio()?

> +	/*
>  	 * Disable radio.
>  	 */
>  	rt2x00lib_disable_radio(rt2x00dev);

Thanks,

Ivo

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

* Re: [PATCH] rt2x00dev: cancel all work on disconnect
  2009-07-30 18:45 ` Ivo van Doorn
@ 2009-07-30 18:58   ` Michael Buesch
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Buesch @ 2009-07-30 18:58 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: Pavel Roskin, linux-wireless, John W. Linville, users

On Thursday 30 July 2009 20:45:15 Ivo van Doorn wrote:
> Hi,
> 
> I assume fixes the bug Michael reported on Linux-wireless yesterday?

I didn't test that, yet, but the patch looks sane anyway.

> The patch looks good, but I have some minor modification request:
> 
> On Wednesday 29 July 2009, Pavel Roskin wrote:
> > Signed-off-by: Pavel Roskin <proski@gnu.org>
> > ---
> >  drivers/net/wireless/rt2x00/rt2x00dev.c |    7 +++++++
> >  1 files changed, 7 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> > index 658a63b..66b303b 100644
> > --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> > +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> > @@ -888,6 +888,13 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
> >  	clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
> >  
> >  	/*
> > +	 * Cancel all work.
> > +	 */
> > +	rt2x00link_stop_tuner(rt2x00dev);
> 
> This one isn't needed. rt2x00lib_disable_radio() is doing this.
> 
> > +	cancel_work_sync(&rt2x00dev->filter_work);
> > +	cancel_work_sync(&rt2x00dev->intf_work);
> 
> Could you move these 2 until after the call to rt2x00lib_disable_radio()?
> 
> > +	/*
> >  	 * Disable radio.
> >  	 */
> >  	rt2x00lib_disable_radio(rt2x00dev);
> 
> Thanks,
> 
> Ivo
> 
> 



-- 
Greetings, Michael.

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

end of thread, other threads:[~2009-07-30 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-29 20:07 [PATCH] rt2x00dev: cancel all work on disconnect Pavel Roskin
2009-07-30 18:45 ` Ivo van Doorn
2009-07-30 18:58   ` Michael Buesch

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).