Skip to content

Commit

Permalink
ath9k: Properly assign boolean types
Browse files Browse the repository at this point in the history
This takes care that boolean types are properly assigned

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed Nov 15, 2010
1 parent 446fad5 commit 5d4c428
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/net/wireless/ath/ath9k/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1425,12 +1425,12 @@ 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);

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);
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);

/* Choose rate table first */

Expand All @@ -1449,10 +1449,8 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
struct ath_rate_priv *ath_rc_priv = priv_sta;
const struct ath_rate_table *rate_table = NULL;
bool oper_cw40 = false, oper_sgi;
bool local_cw40 = (ath_rc_priv->ht_cap & WLAN_RC_40_FLAG) ?
true : false;
bool local_sgi = (ath_rc_priv->ht_cap & WLAN_RC_SGI_FLAG) ?
true : false;
bool local_cw40 = !!(ath_rc_priv->ht_cap & WLAN_RC_40_FLAG);
bool local_sgi = !!(ath_rc_priv->ht_cap & WLAN_RC_SGI_FLAG);

/* FIXME: Handle AP mode later when we support CWM */

Expand Down

0 comments on commit 5d4c428

Please sign in to comment.