mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-07 22:38:55 +00:00
439ac8104b
Import patches from upstream to sync 19.07 with master: 9f3e3323e996 rt2x00: allow to specify watchdog interval 2034afe4db4a rt2800: add helpers for reading dma done index 759c5b599cf4 rt2800: initial watchdog implementation 09db3b000619 rt2800: add pre_reset_hw callback 710e6cc1595e rt2800: do not nullify initialization vector data e403fa31ed71 rt2x00: add restart hw 0f47aeeada2a rt2800: do not enable watchdog by default 41a531ffa4c5 rt2x00usb: fix rx queue hang 3b902fa811cf rt2x00usb: remove unnecessary rx flag checks 1dc244064c47 rt2x00: no need to check return value of debugfs_create functions 706f0182b1ad rt2800usb: Add new rt2800usb device PLANEX GW-USMicroN 95844124385e rt2x00: clear IV's on start to fix AP mode regression 567a9b766b47 rt2x00: do not set IEEE80211_TX_STAT_AMPDU_NO_BACK on tx status 14d5e14c8a6c rt2x00: clear up IV's on key removal 13fa451568ab Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band" --pending-- rt2800: remove errornous duplicate condition Signed-off-by: Daniel Golle <daniel@makrotopia.org>
89 lines
3.8 KiB
Diff
89 lines
3.8 KiB
Diff
From patchwork Sat Nov 2 17:47:01 2019
|
|
Content-Type: text/plain; charset="utf-8"
|
|
MIME-Version: 1.0
|
|
Content-Transfer-Encoding: 7bit
|
|
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
|
X-Patchwork-Id: 11224189
|
|
X-Patchwork-Delegate: kvalo@adurom.com
|
|
Return-Path: <SRS0=CgQo=Y2=vger.kernel.org=linux-wireless-owner@kernel.org>
|
|
Date: Sat, 2 Nov 2019 18:47:01 +0100
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
To: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
Cc: linux-wireless@vger.kernel.org, Roman Yeryomin <roman@advem.lv>,
|
|
wbob <wbob@jify.de>
|
|
Subject: [PATCH v2] rt2800: remove errornous duplicate condition
|
|
Message-ID: <20191102174701.GA1489@makrotopia.org>
|
|
References: <20191102154639.GA4589@redhat.com>
|
|
MIME-Version: 1.0
|
|
Content-Disposition: inline
|
|
In-Reply-To: <20191102154639.GA4589@redhat.com>
|
|
User-Agent: Mutt/1.12.2 (2019-09-21)
|
|
Sender: linux-wireless-owner@vger.kernel.org
|
|
Precedence: bulk
|
|
List-ID: <linux-wireless.vger.kernel.org>
|
|
X-Mailing-List: linux-wireless@vger.kernel.org
|
|
|
|
On 2019-10-28 06:07, wbob wrote:
|
|
> Hello Roman,
|
|
>
|
|
> while reading around drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
> I stumbled on what I think is an edit of yours made in error in march
|
|
> 2017:
|
|
>
|
|
> https://github.com/torvalds/linux/commit/41977e86#diff-dae5dc10da180f3b055809a48118e18aR5281
|
|
>
|
|
> RT6352 in line 5281 should not have been introduced as the "else if"
|
|
> below line 5291 can then not take effect for a RT6352 device. Another
|
|
> possibility is for line 5291 to be not for RT6352, but this seems
|
|
> very unlikely. Are you able to clarify still after this substantial time?
|
|
>
|
|
> 5277: static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
|
|
> ...
|
|
> 5279: } else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
|
> 5280: rt2x00_rt(rt2x00dev, RT5392) ||
|
|
> 5281: rt2x00_rt(rt2x00dev, RT6352)) {
|
|
> ...
|
|
> 5291: } else if (rt2x00_rt(rt2x00dev, RT6352)) {
|
|
> ...
|
|
|
|
Hence remove errornous line 5281 to make the driver actually
|
|
execute the correct initialization routine for MT7620 chips.
|
|
|
|
As it was requested by Stanislaw Gruszka remove setting values of
|
|
MIMO_PS_CFG and TX_PIN_CFG. MIMO_PS_CFG is responsible for MIMO
|
|
power-safe mode (which is disabled), hence we can drop setting it.
|
|
TX_PIN_CFG is set correctly in other functions, and as setting this
|
|
value breaks some devices, rather don't set it here during init, but
|
|
only modify it later on.
|
|
|
|
Fixes: 41977e86c984 ("rt2x00: add support for MT7620")
|
|
Reported-by: wbob <wbob@jify.de>
|
|
Reported-by: Roman Yeryomin <roman@advem.lv>
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
---
|
|
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 +----
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
@@ -5850,8 +5850,7 @@ static int rt2800_init_registers(struct
|
|
rt2800_register_write(rt2x00dev, TX_TXBF_CFG_0, 0x8000fc21);
|
|
rt2800_register_write(rt2x00dev, TX_TXBF_CFG_3, 0x00009c40);
|
|
} else if (rt2x00_rt(rt2x00dev, RT5390) ||
|
|
- rt2x00_rt(rt2x00dev, RT5392) ||
|
|
- rt2x00_rt(rt2x00dev, RT6352)) {
|
|
+ rt2x00_rt(rt2x00dev, RT5392)) {
|
|
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
|
|
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
|
|
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
|
@@ -5865,8 +5864,6 @@ static int rt2800_init_registers(struct
|
|
rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000401);
|
|
rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x000C0000);
|
|
rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
|
|
- rt2800_register_write(rt2x00dev, MIMO_PS_CFG, 0x00000002);
|
|
- rt2800_register_write(rt2x00dev, TX_PIN_CFG, 0x00150F0F);
|
|
rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000);
|
|
rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0);
|
|
rt2800_register_write(rt2x00dev, TX1_BB_GAIN_ATTEN, 0x0);
|