From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
To: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>,
Mohammed Shajakhan <Mohammed.Shajakhan@Atheros.com>
Subject: Re: [RFC] ath9k: make npending frames check as bool
Date: Fri, 6 May 2011 21:45:42 +0530 [thread overview]
Message-ID: <20110506161541.GB6002@vasanth-laptop> (raw)
In-Reply-To: <1304697291-6850-1-git-send-email-mshajakhan@atheros.com>
On Fri, May 06, 2011 at 09:24:51PM +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
>
> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
> ---
> drivers/net/wireless/ath/ath9k/main.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index 3de115d..2b78ea2 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -2267,7 +2267,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
> timeout = 1;
>
> for (j = 0; j < timeout; j++) {
> - int npend = 0;
> + bool npend = false;
>
> if (j)
> usleep_range(1000, 2000);
> @@ -2276,7 +2276,10 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
> if (!ATH_TXQ_SETUP(sc, i))
> continue;
>
> - npend += ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
> + npend = ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
> +
> + if (npend)
> + break;
We need not bail out as soon as there is a pending frame in a queue.
There is a possibility that it could be transmitted successfully by
the time the given timeout expires.
Vasanth
next prev parent reply other threads:[~2011-05-06 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 15:54 [RFC] ath9k: make npending frames check as bool Mohammed Shafi Shajakhan
2011-05-06 16:15 ` Vasanthakumar Thiagarajan [this message]
2011-05-09 4:30 ` Mohammed Shafi
2011-05-09 9:28 ` Vasanthakumar Thiagarajan
2011-05-09 9:39 ` Vasanthakumar Thiagarajan
2011-05-09 9:39 ` Mohammed Shafi
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=20110506161541.GB6002@vasanth-laptop \
--to=vasanth@atheros.com \
--cc=Mohammed.Shajakhan@Atheros.com \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mshajakhan@atheros.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;
as well as URLs for NNTP newsgroup(s).