aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mshajakhan@atheros.com>2010-10-26 11:58:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:24:43 -0500
commit5d4c428254f73bae272be9d296724b1ee09d76ec (patch)
treed91c82ca410e9e97cae21554442a182fc271972b /drivers/net
parent446fad5a5b6be765c8ec39bfdbbc6c7aa63fbcbb (diff)
ath9k: Properly assign boolean types
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 1095e18b3627..85c8e9310cae 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1425,12 +1425,12 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
1425 ath_rc_priv->neg_ht_rates.rs_nrates = j; 1425 ath_rc_priv->neg_ht_rates.rs_nrates = j;
1426 } 1426 }
1427 1427
1428 is_cw40 = sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40; 1428 is_cw40 = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40);
1429 1429
1430 if (is_cw40) 1430 if (is_cw40)
1431 is_sgi = sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40; 1431 is_sgi = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40);
1432 else if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_SGI_20) 1432 else if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_SGI_20)
1433 is_sgi = sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20; 1433 is_sgi = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20);
1434 1434
1435 /* Choose rate table first */ 1435 /* Choose rate table first */
1436 1436
@@ -1449,10 +1449,8 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
1449 struct ath_rate_priv *ath_rc_priv = priv_sta; 1449 struct ath_rate_priv *ath_rc_priv = priv_sta;
1450 const struct ath_rate_table *rate_table = NULL; 1450 const struct ath_rate_table *rate_table = NULL;
1451 bool oper_cw40 = false, oper_sgi; 1451 bool oper_cw40 = false, oper_sgi;
1452 bool local_cw40 = (ath_rc_priv->ht_cap & WLAN_RC_40_FLAG) ? 1452 bool local_cw40 = !!(ath_rc_priv->ht_cap & WLAN_RC_40_FLAG);
1453 true : false; 1453 bool local_sgi = !!(ath_rc_priv->ht_cap & WLAN_RC_SGI_FLAG);
1454 bool local_sgi = (ath_rc_priv->ht_cap & WLAN_RC_SGI_FLAG) ?
1455 true : false;
1456 1454
1457 /* FIXME: Handle AP mode later when we support CWM */ 1455 /* FIXME: Handle AP mode later when we support CWM */
1458 1456