Search Linux Wireless

Re: [RFC] ath9k: make npending frames check as bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 06, 2011 at 09:24:51PM +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mshajakhan@xxxxxxxxxxx>
> 
> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@xxxxxxxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux