diff options
author | Shaul Triebitz <shaul.triebitz@intel.com> | 2017-10-30 18:38:43 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-11-25 18:01:04 +0300 |
commit | c4e45c84270798b1d51ede9a8c6810378ccfe162 (patch) | |
tree | b2e68fb0ed27d9811169ab6479ccb7e7c8d46cb6 /drivers/net/wireless/intel | |
parent | ed59b7d53c95548d83d4e7e1bc5edafcdcad09c9 (diff) | |
download | linux-c4e45c84270798b1d51ede9a8c6810378ccfe162.tar.xz |
iwlwifi: mvm: set correct chains in Rx status
ieee80211_rx_status::chains was always set to zero.
That caused rate scaling to always start with the
lowest rate possible (rs_get_initial_rate).
Set it correctly according to the MPDU response.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 76dc58381e1c..20fe23fbf040 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -213,6 +213,7 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, struct ieee80211_rx_status *rx_status) { int energy_a, energy_b, max_energy; + u32 rate_flags = le32_to_cpu(desc->rate_n_flags); energy_a = desc->energy_a; energy_a = energy_a ? -energy_a : S8_MIN; @@ -224,7 +225,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, energy_a, energy_b, max_energy); rx_status->signal = max_energy; - rx_status->chains = 0; /* TODO: phy info */ + rx_status->chains = + (rate_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_POS; rx_status->chain_signal[0] = energy_a; rx_status->chain_signal[1] = energy_b; rx_status->chain_signal[2] = S8_MIN; |