linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Eyal Shapira <eyal@wizery.com>, <stable@vger.kernel.org>,
	Eyal Shapira <eyalx.shapira@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 07/12] iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate
Date: Mon,  8 Sep 2014 19:56:12 +0300	[thread overview]
Message-ID: <1410195377-10075-7-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <540DDF37.5030801@gmail.com>

From: Eyal Shapira <eyal@wizery.com>

Using the LQ table which is initially set according to
the rssi could lead to EAPOLs being sent in high legacy
rates like 54mbps.
It's better to avoid sending EAPOLs in high rates as it reduces
the chances of a successful 4-Way handshake.
Avoid this and treat them like other mgmt frames which would
initially get sent at the basic rate.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/tx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index dbc8707..9ee410b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -168,10 +168,14 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
 
 	/*
 	 * for data packets, rate info comes from the table inside the fw. This
-	 * table is controlled by LINK_QUALITY commands
+	 * table is controlled by LINK_QUALITY commands. Exclude ctrl port
+	 * frames like EAPOLs which should be treated as mgmt frames. This
+	 * avoids them being sent initially in high rates which increases the
+	 * chances for completion of the 4-Way handshake.
 	 */
 
-	if (ieee80211_is_data(fc) && sta) {
+	if (ieee80211_is_data(fc) && sta &&
+	    !(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) {
 		tx_cmd->initial_rate_index = 0;
 		tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_STA_RATE);
 		return;
-- 
1.9.1


  parent reply	other threads:[~2014-09-08 16:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 16:54 pull request: iwlwifi 2014-09-08 Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 01/12] iwlwifi: mvm: enable scheduled scan on newest firmware Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 02/12] iwlwifi: mvm: BT Coex - remove shadowing variable Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 03/12] iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P client Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 04/12] iwlwifi: mvm: fix endianity issues with Smart Fifo commands Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 05/12] iwlwifi: increase DEFAULT_MAX_TX_POWER Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 06/12] iwlwifi: mvm: correctly handle PM/QoS changes from mac80211 Emmanuel Grumbach
2014-09-08 16:56 ` Emmanuel Grumbach [this message]
2014-09-08 16:56 ` [PATCH 08/12] iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_period Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 09/12] iwlwifi: mvm: BT Coex - always initialize smps_mode Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 10/12] iwlwifi: dvm: disable power save by default Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 11/12] iwlwifi: add PCI IDs and add then new 3165 series Emmanuel Grumbach
2014-09-08 16:56 ` [PATCH 12/12] iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength Emmanuel Grumbach
2014-09-09 19:01 ` pull request: iwlwifi 2014-09-08 John W. Linville
2014-09-15  5:07 pull request: iwlwifi-next 2014-09-15 Emmanuel Grumbach
2014-09-15  5:10 ` [PATCH 07/12] iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate Emmanuel Grumbach

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=1410195377-10075-7-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=eyal@wizery.com \
    --cc=eyalx.shapira@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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).