linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	lrodriguez@atheros.com, j@w1.fi,
	Senthilkumar.Balasubramanian@atheros.com,
	Vasanth.Thiagarajan@atheros.com, nbd@openwrt.org
Subject: Re: [PATCH] ath9k: Properly assign boolean types Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Date: Mon, 25 Oct 2010 08:58:46 -0700	[thread overview]
Message-ID: <4CC5A936.7070009@candelatech.com> (raw)
In-Reply-To: <1287990961-2619-1-git-send-email-mshajakhan@atheros.com>

On 10/25/2010 12:16 AM, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>
> ---
>   drivers/net/wireless/ath/ath9k/rc.c |    9 ++++++---
>   1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
> index 0cee90c..0c70839 100644
> --- a/drivers/net/wireless/ath/ath9k/rc.c
> +++ b/drivers/net/wireless/ath/ath9k/rc.c
> @@ -1444,12 +1444,15 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
>   		ath_rc_priv->neg_ht_rates.rs_nrates = j;
>   	}
>
> -	is_cw40 = sta->ht_cap.cap&  IEEE80211_HT_CAP_SUP_WIDTH_20_40;
> +	is_cw40 = (sta->ht_cap.cap&  IEEE80211_HT_CAP_SUP_WIDTH_20_40) ?
> +		true : false;

Maybe use:
is_cw40 = !!(sta->ht_cap.cap&  IEEE80211_HT_CAP_SUP_WIDTH_20_40);

Seems a bit simpler to me...

Ben


>
>   	if (is_cw40)
> -		is_sgi = sta->ht_cap.cap&  IEEE80211_HT_CAP_SGI_40;
> +		is_sgi = (sta->ht_cap.cap&  IEEE80211_HT_CAP_SGI_40) ?
> +			true : false;
>   	else if (sc->sc_ah->caps.hw_caps&  ATH9K_HW_CAP_SGI_20)
> -		is_sgi = sta->ht_cap.cap&  IEEE80211_HT_CAP_SGI_20;
> +		is_sgi = (sta->ht_cap.cap&  IEEE80211_HT_CAP_SGI_20) ?
> +			true : false
>
>   	/* Choose rate table first */
>


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2010-10-25 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25  7:16 [PATCH] ath9k: Properly assign boolean types Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Mohammed Shafi Shajakhan
2010-10-25 15:58 ` Ben Greear [this message]
2010-10-26  2:42   ` Bob Copeland
2010-10-26  4:36   ` Mohammed Shafi
2010-10-25 16:28 ` Luis R. Rodriguez
2010-10-26  4:27   ` 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=4CC5A936.7070009@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=Senthilkumar.Balasubramanian@atheros.com \
    --cc=Vasanth.Thiagarajan@atheros.com \
    --cc=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=mshajakhan@atheros.com \
    --cc=nbd@openwrt.org \
    /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).