[rt2x00-users] [PATCH] Move TX/RX work into dedicated workqueue

Johannes Stezenbach js at sig21.net
Wed Jan 26 09:27:30 EST 2011


Hi,

On Mon, Jan 24, 2011 at 04:14:04PM +0100, Ivo van Doorn wrote:
> diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c
> index bfda60e..c975b0a 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00link.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00link.c
> @@ -417,7 +417,8 @@ void rt2x00link_start_watchdog(struct rt2x00_dev *rt2x00dev)
>  	    !test_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags))
>  		return;
>  
> -	schedule_delayed_work(&link->watchdog_work, WATCHDOG_INTERVAL);
> +	ieee80211_queue_delayed_work(rt2x00dev->hw,
> +				     &link->watchdog_work, WATCHDOG_INTERVAL);
>  }
>  
>  void rt2x00link_stop_watchdog(struct rt2x00_dev *rt2x00dev)
> @@ -441,7 +442,9 @@ static void rt2x00link_watchdog(struct work_struct *work)
>  	rt2x00dev->ops->lib->watchdog(rt2x00dev);
>  
>  	if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
> -		schedule_delayed_work(&link->watchdog_work, WATCHDOG_INTERVAL);
> +		ieee80211_queue_delayed_work(rt2x00dev->hw,
> +					     &link->watchdog_work,
> +					     WATCHDOG_INTERVAL);
>  }
>  
>  void rt2x00link_register(struct rt2x00_dev *rt2x00dev)

Doesn't this mean the watchdog cannot run while we are blocked
in the flush callback waiting for the queue to become empty?
I think it would be better if the watchdog would use the same
workqueue as the RX/TX work.


Johannes



More information about the users mailing list