All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 07/12] iwlwifi: rs: set RTS protection for all non legacy rates
Date: Mon, 28 Sep 2020 12:23:16 +0300	[thread overview]
Message-ID: <iwlwifi.20200928121852.da97d87d7adf.If06301d4660b14e459195a15831b069b9f6c5e3c@changeid> (raw)
In-Reply-To: <20200928092321.649185-1-luca@coelho.fi>

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

This helps with congested environments reducing the conflict cost to
RTS retries only, instead of the entire BA packet.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/api/rs.h | 11 +++++++++--
 drivers/net/wireless/intel/iwlwifi/mvm/rs.c    |  6 ++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h b/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
index 4347be6491e9..73b839c3cac1 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
@@ -7,7 +7,7 @@
  *
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2018 - 2020 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -29,7 +29,7 @@
  *
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2018 - 2020 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -486,6 +486,13 @@ enum {
 #define RATE_MCS_HE_106T_POS		28
 #define RATE_MCS_HE_106T_MSK		(1 << RATE_MCS_HE_106T_POS)
 
+/* Bit 30-31: (1) RTS, (2) CTS */
+#define RATE_MCS_RTS_REQUIRED_POS  (30)
+#define RATE_MCS_RTS_REQUIRED_MSK  (0x1 << RATE_MCS_RTS_REQUIRED_POS)
+
+#define RATE_MCS_CTS_REQUIRED_POS  (31)
+#define RATE_MCS_CTS_REQUIRED_MSK  (0x1 << RATE_MCS_CTS_REQUIRED_POS)
+
 /* Link Quality definitions */
 
 /* # entries in rate scale table to support Tx retries */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 86b2ebb5d5fb..ed7382e7ea17 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -830,6 +830,12 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm,
 		return ucode_rate;
 	}
 
+	/* set RTS protection for all non legacy rates
+	 * This helps with congested environments reducing the conflict cost to
+	 * RTS retries only, instead of the entire BA packet.
+	 */
+	ucode_rate |= RATE_MCS_RTS_REQUIRED_MSK;
+
 	if (is_ht(rate)) {
 		if (index < IWL_FIRST_HT_RATE || index > IWL_LAST_HT_RATE) {
 			IWL_ERR(mvm, "Invalid HT rate index %d\n", index);
-- 
2.28.0


  parent reply	other threads:[~2020-09-28  9:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28  9:23 [PATCH 00/12] iwlwifi: updates intended for v5.10 2020-09-28 Luca Coelho
2020-09-28  9:23 ` [PATCH 01/12] iwlwifi: add a common struct for all iwl_tx_power_cmd versions Luca Coelho
2020-10-01 19:00   ` Luca Coelho
2020-09-28  9:23 ` [PATCH 02/12] iwlwifi: acpi: prepare SAR profile selection code for multiple sizes Luca Coelho
2020-09-28  9:23 ` [PATCH 03/12] iwlwifi: support REDUCE_TX_POWER_CMD version 6 Luca Coelho
2020-09-28  9:23 ` [PATCH 04/12] iwlwifi: acpi: rename geo structs to contain versioning Luca Coelho
2020-09-28  9:23 ` [PATCH 05/12] iwlwifi: support version 3 of GEO_TX_POWER_LIMIT Luca Coelho
2020-09-28  9:23 ` [PATCH 06/12] iwlwifi: mvm: support new KEK KCK api Luca Coelho
2020-09-28  9:23 ` Luca Coelho [this message]
2020-09-28  9:23 ` [PATCH 08/12] iwlwifi: acpi: in non acpi compilations remove iwl_sar_geo_init Luca Coelho
2020-09-28  9:23 ` [PATCH 09/12] iwlwifi: fw: add default value for iwl_fw_lookup_cmd_ver Luca Coelho
2020-09-28  9:23 ` [PATCH 10/12] iwlwifi: remove wide_cmd_header field Luca Coelho
2020-10-07 20:23   ` [REGRESSION] " Alexander Wetzel
2020-10-09  8:21     ` Luca Coelho
2020-09-28  9:23 ` [PATCH 11/12] iwlwifi: mvm: add support for range request command ver 11 Luca Coelho
2020-09-28  9:23 ` [PATCH 12/12] iwlwifi: mvm: add support for responder dynamic config command version 3 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=iwlwifi.20200928121852.da97d87d7adf.If06301d4660b14e459195a15831b069b9f6c5e3c@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.