Re: [PATCH] ath9k: cancel xmit poll work at stop() callback

Luis R. Rodriguez
2009-07-26T09:48:33Z

On Fri, Jul 24, 2009 at 5:47 PM, Luis R.
Rodriguez<lrodriguez@atheros.com> wrote:
> We forgot to cancel this work at the stop() callback.
>

<-- snip -->

> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index 3eb3032..fff89cc 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -2100,6 +2100,8 @@ static void ath9k_stop(struct ieee80211_hw *hw)
>
>        mutex_lock(&sc->mutex);
>
> +       cancel_delayed_work_sync(&sc->tx_complete_work);
> +
>        if (ath9k_wiphy_started(sc)) {
>                mutex_unlock(&sc->mutex);
>                return; /* another wiphy still in use */

This is in the right place but I see we call it upon detach. That is a
wrong place for this stuff... as well as the other cancels. Due to
virtual stuff this is more involved. We'll have to clean this better.

Luis