summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShaul Triebitz <shaul.triebitz@intel.com>2017-10-30 16:38:43 +0100
committerLuca Coelho <luciano.coelho@intel.com>2017-11-25 16:01:04 +0100
commitc4e45c84270798b1d51ede9a8c6810378ccfe162 (patch)
treeb2e68fb0ed27d9811169ab6479ccb7e7c8d46cb6 /drivers
parentMerge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/at... (diff)
downloadlinux-c4e45c84270798b1d51ede9a8c6810378ccfe162.tar.xz
linux-c4e45c84270798b1d51ede9a8c6810378ccfe162.zip
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')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c4
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;