aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/rt2x00
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-10-11 23:15:57 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-10-19 12:35:55 +0200
commit67dc023f87699e56457a3ba4a97da60605042bd7 (patch)
treedbc7e4101b8205d4fa3ebfaf2da42e3542e010f4 /package/kernel/mac80211/patches/rt2x00
parent54d9ac8ba822e76a2667ce3b49c9be4496c5eba4 (diff)
downloadupstream-67dc023f87699e56457a3ba4a97da60605042bd7.tar.gz
upstream-67dc023f87699e56457a3ba4a97da60605042bd7.tar.bz2
upstream-67dc023f87699e56457a3ba4a97da60605042bd7.zip
mac80211: Update to version 5.3.6
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/kernel/mac80211/patches/rt2x00')
-rw-r--r--package/kernel/mac80211/patches/rt2x00/010-rt2x00-clear-IV-s-on-start-to-fix-AP-mode-regression.patch113
-rw-r--r--package/kernel/mac80211/patches/rt2x00/011-rt2x00-clear-up-IV-s-on-key-removal.patch55
-rw-r--r--package/kernel/mac80211/patches/rt2x00/016-rt2x00-revert-rt2800-enable-TX_PIN_CFG_LNA_PE_-bits-per-band.patch70
3 files changed, 0 insertions, 238 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/010-rt2x00-clear-IV-s-on-start-to-fix-AP-mode-regression.patch b/package/kernel/mac80211/patches/rt2x00/010-rt2x00-clear-IV-s-on-start-to-fix-AP-mode-regression.patch
deleted file mode 100644
index 8859c0dd9e..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/010-rt2x00-clear-IV-s-on-start-to-fix-AP-mode-regression.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From patchwork Mon Aug 19 11:20:07 2019
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Stanislaw Gruszka <sgruszka@redhat.com>
-X-Patchwork-Id: 11100685
-X-Patchwork-Delegate: kvalo@adurom.com
-Return-Path: <linux-wireless-owner@kernel.org>
-From: Stanislaw Gruszka <sgruszka@redhat.com>
-To: linux-wireless@vger.kernel.org
-Subject: [PATCH 5.3] rt2x00: clear IV's on start to fix AP mode regression
-Date: Mon, 19 Aug 2019 13:20:07 +0200
-Message-Id: <1566213607-6723-1-git-send-email-sgruszka@redhat.com>
-Sender: linux-wireless-owner@vger.kernel.org
-List-ID: <linux-wireless.vger.kernel.org>
-X-Mailing-List: linux-wireless@vger.kernel.org
-
-To do not brake HW restart we should keep initialization vectors data.
-I assumed that on start the data is already initialized to zeros, but
-that not true on some scenarios and we should clear it. So add
-additional flag to check if we are under HW restart and clear IV's
-data if we are not.
-
-Patch fixes AP mode regression.
-
-Reported-and-tested-by: Emil Karlson <jekarl@iki.fi>
-Fixes: 710e6cc1595e ("rt2800: do not nullify initialization vector data")
-Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
----
- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 +++++++++
- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 +
- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 13 ++++++++-----
- 3 files changed, 18 insertions(+), 5 deletions(-)
-
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -6095,6 +6095,15 @@ static int rt2800_init_registers(struct
- }
-
- /*
-+ * Clear encryption initialization vectors on start, but keep them
-+ * for watchdog reset. Otherwise we will have wrong IVs and not be
-+ * able to keep connections after reset.
-+ */
-+ if (!test_bit(DEVICE_STATE_RESET, &rt2x00dev->flags))
-+ for (i = 0; i < 256; i++)
-+ rt2800_register_write(rt2x00dev, MAC_IVEIV_ENTRY(i), 0);
-+
-+ /*
- * Clear all beacons
- */
- for (i = 0; i < 8; i++)
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -658,6 +658,7 @@ enum rt2x00_state_flags {
- DEVICE_STATE_ENABLED_RADIO,
- DEVICE_STATE_SCANNING,
- DEVICE_STATE_FLUSHING,
-+ DEVICE_STATE_RESET,
-
- /*
- * Driver configuration
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1256,13 +1256,14 @@ static int rt2x00lib_initialize(struct r
-
- int rt2x00lib_start(struct rt2x00_dev *rt2x00dev)
- {
-- int retval;
-+ int retval = 0;
-
- if (test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) {
- /*
- * This is special case for ieee80211_restart_hw(), otherwise
- * mac80211 never call start() two times in row without stop();
- */
-+ set_bit(DEVICE_STATE_RESET, &rt2x00dev->flags);
- rt2x00dev->ops->lib->pre_reset_hw(rt2x00dev);
- rt2x00lib_stop(rt2x00dev);
- }
-@@ -1273,14 +1274,14 @@ int rt2x00lib_start(struct rt2x00_dev *r
- */
- retval = rt2x00lib_load_firmware(rt2x00dev);
- if (retval)
-- return retval;
-+ goto out;
-
- /*
- * Initialize the device.
- */
- retval = rt2x00lib_initialize(rt2x00dev);
- if (retval)
-- return retval;
-+ goto out;
-
- rt2x00dev->intf_ap_count = 0;
- rt2x00dev->intf_sta_count = 0;
-@@ -1289,11 +1290,13 @@ int rt2x00lib_start(struct rt2x00_dev *r
- /* Enable the radio */
- retval = rt2x00lib_enable_radio(rt2x00dev);
- if (retval)
-- return retval;
-+ goto out;
-
- set_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags);
-
-- return 0;
-+out:
-+ clear_bit(DEVICE_STATE_RESET, &rt2x00dev->flags);
-+ return retval;
- }
-
- void rt2x00lib_stop(struct rt2x00_dev *rt2x00dev)
diff --git a/package/kernel/mac80211/patches/rt2x00/011-rt2x00-clear-up-IV-s-on-key-removal.patch b/package/kernel/mac80211/patches/rt2x00/011-rt2x00-clear-up-IV-s-on-key-removal.patch
deleted file mode 100644
index 7f3f139e9f..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/011-rt2x00-clear-up-IV-s-on-key-removal.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From patchwork Fri Aug 23 12:48:03 2019
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Stanislaw Gruszka <sgruszka@redhat.com>
-X-Patchwork-Id: 11111605
-X-Patchwork-Delegate: kvalo@adurom.com
-From: Stanislaw Gruszka <sgruszka@redhat.com>
-To: linux-wireless@vger.kernel.org
-Subject: [PATCH 5.3] rt2x00: clear up IV's on key removal
-Date: Fri, 23 Aug 2019 14:48:03 +0200
-Message-Id: <1566564483-31088-1-git-send-email-sgruszka@redhat.com>
-Sender: linux-wireless-owner@vger.kernel.org
-List-ID: <linux-wireless.vger.kernel.org>
-X-Mailing-List: linux-wireless@vger.kernel.org
-
-After looking at code I realized that my previous fix
-95844124385e ("rt2x00: clear IV's on start to fix AP mode regression")
-was incomplete. We can still have wrong IV's after re-keyring.
-To fix that, clear up IV's also on key removal.
-
-Fixes: 710e6cc1595e ("rt2800: do not nullify initialization vector data")
-Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
----
- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 19 ++++++++++++-------
- 1 file changed, 12 insertions(+), 7 deletions(-)
-
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -1654,13 +1654,18 @@ static void rt2800_config_wcid_attr_ciph
-
- offset = MAC_IVEIV_ENTRY(key->hw_key_idx);
-
-- rt2800_register_multiread(rt2x00dev, offset,
-- &iveiv_entry, sizeof(iveiv_entry));
-- if ((crypto->cipher == CIPHER_TKIP) ||
-- (crypto->cipher == CIPHER_TKIP_NO_MIC) ||
-- (crypto->cipher == CIPHER_AES))
-- iveiv_entry.iv[3] |= 0x20;
-- iveiv_entry.iv[3] |= key->keyidx << 6;
-+ if (crypto->cmd == SET_KEY) {
-+ rt2800_register_multiread(rt2x00dev, offset,
-+ &iveiv_entry, sizeof(iveiv_entry));
-+ if ((crypto->cipher == CIPHER_TKIP) ||
-+ (crypto->cipher == CIPHER_TKIP_NO_MIC) ||
-+ (crypto->cipher == CIPHER_AES))
-+ iveiv_entry.iv[3] |= 0x20;
-+ iveiv_entry.iv[3] |= key->keyidx << 6;
-+ } else {
-+ memset(&iveiv_entry, 0, sizeof(iveiv_entry));
-+ }
-+
- rt2800_register_multiwrite(rt2x00dev, offset,
- &iveiv_entry, sizeof(iveiv_entry));
- }
diff --git a/package/kernel/mac80211/patches/rt2x00/016-rt2x00-revert-rt2800-enable-TX_PIN_CFG_LNA_PE_-bits-per-band.patch b/package/kernel/mac80211/patches/rt2x00/016-rt2x00-revert-rt2800-enable-TX_PIN_CFG_LNA_PE_-bits-per-band.patch
deleted file mode 100644
index 3fcf231870..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/016-rt2x00-revert-rt2800-enable-TX_PIN_CFG_LNA_PE_-bits-per-band.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From patchwork Thu Aug 29 11:29:59 2019
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Stanislaw Gruszka <sgruszka@redhat.com>
-X-Patchwork-Id: 11121089
-X-Patchwork-Delegate: kvalo@adurom.com
-From: Stanislaw Gruszka <sgruszka@redhat.com>
-To: linux-wireless@vger.kernel.org
-Subject: [PATCH 5.3] Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band"
-Date: Thu, 29 Aug 2019 13:29:59 +0200
-Message-Id: <1567078199-3645-1-git-send-email-sgruszka@redhat.com>
-Sender: linux-wireless-owner@vger.kernel.org
-List-ID: <linux-wireless.vger.kernel.org>
-X-Mailing-List: linux-wireless@vger.kernel.org
-
-This reverts commit 9ad3b55654455258a9463384edb40077439d879f.
-
-As reported by Sergey:
-
-"I got some problem after upgrade kernel to 5.2 version (debian testing
-linux-image-5.2.0-2-amd64). 5Ghz client stopped to see AP.
-Some tests with 1metre distance between client-AP: 2.4Ghz -22dBm, for
-5Ghz - 53dBm !, for longer distance (8m + walls) 2.4 - 61dBm, 5Ghz not
-visible."
-
-It was identified that rx signal level degradation was caused by
-9ad3b5565445 ("rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band").
-So revert this commit.
-
-Cc: <stable@vger.kernel.org> # v5.1+
-Reported-and-tested-by: Sergey Maranchuk <slav0nic0@gmail.com>
-Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
----
- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 18 ++++++------------
- 1 file changed, 6 insertions(+), 12 deletions(-)
-
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -4242,24 +4242,18 @@ static void rt2800_config_channel(struct
- switch (rt2x00dev->default_ant.rx_chain_num) {
- case 3:
- /* Turn on tertiary LNAs */
-- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN,
-- rf->channel > 14);
-- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN,
-- rf->channel <= 14);
-+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN, 1);
-+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN, 1);
- /* fall-through */
- case 2:
- /* Turn on secondary LNAs */
-- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN,
-- rf->channel > 14);
-- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN,
-- rf->channel <= 14);
-+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN, 1);
-+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN, 1);
- /* fall-through */
- case 1:
- /* Turn on primary LNAs */
-- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN,
-- rf->channel > 14);
-- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN,
-- rf->channel <= 14);
-+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN, 1);
-+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN, 1);
- break;
- }
-