aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-12 23:26:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:12:51 -0400
commitc2da50e5837f92c9f16a611efd1bb0754036691b (patch)
tree548317dc4f79cac5be90ab36b068f0ffe2e7cbdd /drivers/net/wireless
parent95e4acb7331722236b9f11492ae2e96473210ebc (diff)
ath9k: Fix bug in handling single stream stations
AP mode currently sets up the dual stream capability for all stations. This patch fixes it by checking if the associated station supports dual stream MCS rates (8-15). We would disregard any MCS rates above 15, since Atheros HW supports only 0..15 rates currently, and can't receive at rates > 15 anyway. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath9k/rc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c
index 28d69da342c..74bc4e64b03 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
1473static u8 ath_rc_build_ht_caps(struct ath_softc *sc, bool is_ht, bool is_cw40, 1473static 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