diff options
Diffstat (limited to 'drivers/net/wireless/ath9k/rc.c')
-rw-r--r-- | drivers/net/wireless/ath9k/rc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c index 28d69da342cd..74bc4e64b030 100644 --- a/drivers/net/wireless/ath9k/rc.c +++ b/drivers/net/wireless/ath9k/rc.c | |||
@@ -1470,16 +1470,18 @@ static void ath_rc_init(struct ath_softc *sc, | |||
1470 | ath_rc_priv->ht_cap); | 1470 | ath_rc_priv->ht_cap); |
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | static u8 ath_rc_build_ht_caps(struct ath_softc *sc, bool is_ht, bool is_cw40, | 1473 | static u8 ath_rc_build_ht_caps(struct ath_softc *sc, struct ieee80211_sta *sta, |
1474 | bool is_sgi40) | 1474 | bool is_cw40, bool is_sgi40) |
1475 | { | 1475 | { |
1476 | u8 caps = 0; | 1476 | u8 caps = 0; |
1477 | 1477 | ||
1478 | if (is_ht) { | 1478 | if (sta->ht_cap.ht_supported) { |
1479 | caps = WLAN_RC_HT_FLAG; | 1479 | caps = WLAN_RC_HT_FLAG; |
1480 | if (sc->sc_ah->caps.tx_chainmask != 1 && | 1480 | if (sc->sc_ah->caps.tx_chainmask != 1 && |
1481 | ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_DS, 0, NULL)) | 1481 | ath9k_hw_getcapability(sc->sc_ah, ATH9K_CAP_DS, 0, NULL)) { |
1482 | caps |= WLAN_RC_DS_FLAG; | 1482 | if (sta->ht_cap.mcs.rx_mask[1]) |
1483 | caps |= WLAN_RC_DS_FLAG; | ||
1484 | } | ||
1483 | if (is_cw40) | 1485 | if (is_cw40) |
1484 | caps |= WLAN_RC_40_FLAG; | 1486 | caps |= WLAN_RC_40_FLAG; |
1485 | if (is_sgi40) | 1487 | if (is_sgi40) |
@@ -1626,8 +1628,7 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, | |||
1626 | rate_table = sc->cur_rate_table; | 1628 | rate_table = sc->cur_rate_table; |
1627 | } | 1629 | } |
1628 | 1630 | ||
1629 | ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, sta->ht_cap.ht_supported, | 1631 | ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, sta, is_cw40, is_sgi40); |
1630 | is_cw40, is_sgi40); | ||
1631 | ath_rc_init(sc, priv_sta, sband, sta, rate_table); | 1632 | ath_rc_init(sc, priv_sta, sband, sta, rate_table); |
1632 | } | 1633 | } |
1633 | 1634 | ||
@@ -1661,8 +1662,7 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband, | |||
1661 | rate_table = ath_choose_rate_table(sc, sband->band, | 1662 | rate_table = ath_choose_rate_table(sc, sband->band, |
1662 | sta->ht_cap.ht_supported, | 1663 | sta->ht_cap.ht_supported, |
1663 | oper_cw40); | 1664 | oper_cw40); |
1664 | ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, | 1665 | ath_rc_priv->ht_cap = ath_rc_build_ht_caps(sc, sta, |
1665 | sta->ht_cap.ht_supported, | ||
1666 | oper_cw40, oper_sgi40); | 1666 | oper_cw40, oper_sgi40); |
1667 | ath_rc_init(sc, priv_sta, sband, sta, rate_table); | 1667 | ath_rc_init(sc, priv_sta, sband, sta, rate_table); |
1668 | 1668 | ||