From: Bruno Randolf <br1@einfach.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linville@tuxdriver.com, jirislaby@gmail.com, mickflemm@gmail.com,
lrodriguez@atheros.com, linux-wireless@vger.kernel.org,
ath5k-devel@lists.ath5k.org
Subject: Re: [PATCH] ath5k: fix locking in tx_complete_poll_work
Date: Wed, 19 Jan 2011 09:58:51 +0900 [thread overview]
Message-ID: <201101190958.51192.br1@einfach.org> (raw)
In-Reply-To: <1295356003-1425-1-git-send-email-me@bobcopeland.com>
On Tue January 18 2011 22:06:43 Bob Copeland wrote:
> ath5k_reset must be called with sc->lock. Since the tx queue
> watchdog runs in a workqueue and accesses sc, it's appropriate
> to just take the lock over the whole function.
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
> ---
> drivers/net/wireless/ath/ath5k/base.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c
> b/drivers/net/wireless/ath/ath5k/base.c index 019a74d..09ae4ef 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -2294,6 +2294,8 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
> int i;
> bool needreset = false;
>
> + mutex_lock(&sc->lock);
> +
> for (i = 0; i < ARRAY_SIZE(sc->txqs); i++) {
> if (sc->txqs[i].setup) {
> txq = &sc->txqs[i];
> @@ -2321,6 +2323,8 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
> ath5k_reset(sc, NULL, true);
> }
>
> + mutex_unlock(&sc->lock);
> +
> ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
> msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT));
> }
Acked-by: Bruno Randolf <br1@einfach.org>
prev parent reply other threads:[~2011-01-19 0:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 13:06 [PATCH] ath5k: fix locking in tx_complete_poll_work Bob Copeland
2011-01-19 0:58 ` Bruno Randolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201101190958.51192.br1@einfach.org \
--to=br1@einfach.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=me@bobcopeland.com \
--cc=mickflemm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox