aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath9k/main.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 561a2c3adbbe..15a7f90bc84b 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -854,7 +854,8 @@ static void ath_key_delete(struct ath_softc *sc, struct ieee80211_key_conf *key)
854 } 854 }
855} 855}
856 856
857static void setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info) 857static void setup_ht_cap(struct ath_softc *sc,
858 struct ieee80211_sta_ht_cap *ht_info)
858{ 859{
859#define ATH9K_HT_CAP_MAXRXAMPDU_65536 0x3 /* 2 ^ 16 */ 860#define ATH9K_HT_CAP_MAXRXAMPDU_65536 0x3 /* 2 ^ 16 */
860#define ATH9K_HT_CAP_MPDUDENSITY_8 0x6 /* 8 usec */ 861#define ATH9K_HT_CAP_MPDUDENSITY_8 0x6 /* 8 usec */
@@ -867,10 +868,22 @@ static void setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info)
867 868
868 ht_info->ampdu_factor = ATH9K_HT_CAP_MAXRXAMPDU_65536; 869 ht_info->ampdu_factor = ATH9K_HT_CAP_MAXRXAMPDU_65536;
869 ht_info->ampdu_density = ATH9K_HT_CAP_MPDUDENSITY_8; 870 ht_info->ampdu_density = ATH9K_HT_CAP_MPDUDENSITY_8;
871
870 /* set up supported mcs set */ 872 /* set up supported mcs set */
871 memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); 873 memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
872 ht_info->mcs.rx_mask[0] = 0xff; 874
873 ht_info->mcs.rx_mask[1] = 0xff; 875 switch(sc->sc_rx_chainmask) {
876 case 1:
877 ht_info->mcs.rx_mask[0] = 0xff;
878 break;
879 case 5:
880 case 7:
881 default:
882 ht_info->mcs.rx_mask[0] = 0xff;
883 ht_info->mcs.rx_mask[1] = 0xff;
884 break;
885 }
886
874 ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; 887 ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
875} 888}
876 889
@@ -1549,9 +1562,9 @@ int ath_attach(u16 devid, struct ath_softc *sc)
1549 hw->rate_control_algorithm = "ath9k_rate_control"; 1562 hw->rate_control_algorithm = "ath9k_rate_control";
1550 1563
1551 if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_HT) { 1564 if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_HT) {
1552 setup_ht_cap(&sc->sbands[IEEE80211_BAND_2GHZ].ht_cap); 1565 setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap);
1553 if (test_bit(ATH9K_MODE_11A, sc->sc_ah->ah_caps.wireless_modes)) 1566 if (test_bit(ATH9K_MODE_11A, sc->sc_ah->ah_caps.wireless_modes))
1554 setup_ht_cap(&sc->sbands[IEEE80211_BAND_5GHZ].ht_cap); 1567 setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
1555 } 1568 }
1556 1569
1557 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &sc->sbands[IEEE80211_BAND_2GHZ]; 1570 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &sc->sbands[IEEE80211_BAND_2GHZ];