linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Shaul Triebitz <shaul.triebitz@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 1/6] iwlwifi: mvm: set correct chains in Rx status
Date: Sat, 25 Nov 2017 17:35:05 +0200	[thread overview]
Message-ID: <20171125153510.25359-2-luca@coelho.fi> (raw)
In-Reply-To: <20171125153510.25359-1-luca@coelho.fi>

From: Shaul Triebitz <shaul.triebitz@intel.com>

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>
---
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
-- 
2.15.0

  reply	other threads:[~2017-11-25 15:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-25 15:35 [PATCH 0/6] iwlwifi: fixes intended for 4.15 2017-11-25 Luca Coelho
2017-11-25 15:35 ` Luca Coelho [this message]
2017-11-25 15:35 ` [PATCH 2/6] iwlwifi: mvm: don't use transmit queue hang detection when it is not possible Luca Coelho
2017-11-25 15:35 ` [PATCH 3/6] iwlwifi: mvm: fix the TX queue hang timeout for MONITOR vif type Luca Coelho
2017-11-25 15:35 ` [PATCH 4/6] iwlwifi: mvm: fix packet injection Luca Coelho
2017-11-25 15:35 ` [PATCH 5/6] iwlwifi: pcie: fix erroneous "Read failed message" Luca Coelho
2017-11-25 15:35 ` [PATCH 6/6] iwlwifi: fix access to prph when transport is stopped Luca Coelho
2017-11-29 10:19   ` Kalle Valo
2017-11-29 10:21     ` Kalle Valo
2017-11-29 10:23   ` Kalle Valo
2017-11-29 10:29     ` Luca Coelho
2017-12-08 12:22       ` Kalle Valo
2017-12-08 12:26         ` Kalle Valo
2017-12-08 12:35           ` Luca Coelho
2017-12-08 12:56             ` Kalle Valo
2017-12-08 12:28         ` Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171125153510.25359-2-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=shaul.triebitz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).