diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 12 |
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 | ||