stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4.12 -stable] rt2800: fix TX_PIN_CFG setting for non MT7620 chips
@ 2017-09-11 10:55 Stanislaw Gruszka
  2017-09-11 12:04 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2017-09-11 10:55 UTC (permalink / raw)
  To: stable; +Cc: Larry Finger

commit 83ec489193894e52bd395eec470f4f7c4286d4a5 upstream.

Since commit 41977e86c984 ("rt2x00: add support for MT7620") we do not
initialize TX_PIN_CFG setting. This cause breakage at least on some
RT3573 devices. To fix the problem patch restores previous behaviour
for non MT7620 chips.

Fixes: 41977e86c984 ("rt2x00: add support for MT7620")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1480829
Reported-and-tested-by: Jussi Eloranta <jussi.eloranta@csun.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

This fix should be applied to 4.12 and 4.13 trees.
Patch for 4.13 is the same as commited to Linus tree.

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index d11c7b2..5672aec 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -3699,7 +3699,10 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
 	if (rt2x00_rt(rt2x00dev, RT3572))
 		rt2800_rfcsr_write(rt2x00dev, 8, 0);
 
-	rt2800_register_read(rt2x00dev, TX_PIN_CFG, &tx_pin);
+	if (rt2x00_rt(rt2x00dev, RT6352))
+		rt2800_register_read(rt2x00dev, TX_PIN_CFG, &tx_pin);
+	else
+		tx_pin = 0;
 
 	switch (rt2x00dev->default_ant.tx_chain_num) {
 	case 3:
-- 
2.7.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-11 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 10:55 [PATCH v4.12 -stable] rt2800: fix TX_PIN_CFG setting for non MT7620 chips Stanislaw Gruszka
2017-09-11 12:04 ` Greg KH

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).