ath10k: fix TxBF VHT capabilities for 2+ RF-chain devices
authorMichal Kazior <michal.kazior@tieto.com>
Thu, 26 Feb 2015 10:11:22 +0000 (11:11 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Sat, 7 Mar 2015 07:56:16 +0000 (09:56 +0200)
Firmware doesn't report a complete and
ready-to-use vht cap. Instead the driver is
supposed to fill in the missing bits related to
number of chains.

This effectively increases Compressed Steering
Number and Number of Sounding Dimensions in
AssocReq frames for devices with more than one RF
chain and should improve TxBF performance.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index 32b4ce6ec35694b2d3272780ca4167d2cd0a182d..638bf32037c5403a332f9f046634e816c143d9e1 100644 (file)
@@ -5473,11 +5473,30 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
 {
        struct ieee80211_sta_vht_cap vht_cap = {0};
        u16 mcs_map;
+       u32 val;
        int i;
 
        vht_cap.vht_supported = 1;
        vht_cap.cap = ar->vht_cap_info;
 
+       if (ar->vht_cap_info & (IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
+                               IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE)) {
+               val = ar->num_rf_chains - 1;
+               val <<= IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT;
+               val &= IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK;
+
+               vht_cap.cap |= val;
+       }
+
+       if (ar->vht_cap_info & (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |
+                               IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE)) {
+               val = ar->num_rf_chains - 1;
+               val <<= IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT;
+               val &= IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK;
+
+               vht_cap.cap |= val;
+       }
+
        mcs_map = 0;
        for (i = 0; i < 8; i++) {
                if (i < ar->num_rf_chains)
This page took 0.033979 seconds and 5 git commands to generate.