ath9k: Fix bug in rate control capability registration
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 23 Jan 2009 05:50:51 +0000 (11:20 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jan 2009 21:01:23 +0000 (16:01 -0500)
Dual stream capability must be registered only when the
hardware supports it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/rc.c

index 46172b5f492c618ff64f50634e239e772d1ffdac..8e1528d487b5cee14d2f45cda352bd12d5efb798 100644 (file)
@@ -1358,7 +1358,9 @@ static void ath_rc_init(struct ath_softc *sc,
        }
 
        if (sta->ht_cap.ht_supported) {
-               ath_rc_priv->ht_cap = (WLAN_RC_HT_FLAG | WLAN_RC_DS_FLAG);
+               ath_rc_priv->ht_cap = WLAN_RC_HT_FLAG;
+               if (sc->sc_tx_chainmask != 1)
+                       ath_rc_priv->ht_cap |= WLAN_RC_DS_FLAG;
                if (sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
                        ath_rc_priv->ht_cap |= WLAN_RC_40_FLAG;
                if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)