linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rt2800: fix TX_PIN_CFG setting for non MT7620 chips
@ 2017-08-25 15:04 Stanislaw Gruszka
  2017-08-25 18:42 ` Daniel Golle
  2017-08-30 16:50 ` [v2] " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2017-08-25 15:04 UTC (permalink / raw)
  To: linux-wireless; +Cc: Daniel Golle

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>
Cc: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
v1 -> v2: patch for updated linux version

 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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

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

* Re: [PATCH v2] rt2800: fix TX_PIN_CFG setting for non MT7620 chips
  2017-08-25 15:04 [PATCH v2] rt2800: fix TX_PIN_CFG setting for non MT7620 chips Stanislaw Gruszka
@ 2017-08-25 18:42 ` Daniel Golle
  2017-08-30 16:50 ` [v2] " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Golle @ 2017-08-25 18:42 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless

On Fri, Aug 25, 2017 at 05:04:15PM +0200, Stanislaw Gruszka wrote:
> 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>
> Cc: Daniel Golle <daniel@makrotopia.org>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Acked-by: Daniel Golle <daniel@makrotopia.org>

> ---
> v1 -> v2: patch for updated linux version
> 
>  drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> index 0b75def39c6c..d2c289446c00 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> @@ -3702,7 +3702,10 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>  	if (rt2x00_rt(rt2x00dev, RT3572))
>  		rt2800_rfcsr_write(rt2x00dev, 8, 0);
>  
> -	tx_pin = rt2800_register_read(rt2x00dev, TX_PIN_CFG);
> +	if (rt2x00_rt(rt2x00dev, RT6352))
> +		tx_pin = rt2800_register_read(rt2x00dev, TX_PIN_CFG);
> +	else
> +		tx_pin = 0;
>  
>  	switch (rt2x00dev->default_ant.tx_chain_num) {
>  	case 3:
> -- 
> 2.7.5

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

* Re: [v2] rt2800: fix TX_PIN_CFG setting for non MT7620 chips
  2017-08-25 15:04 [PATCH v2] rt2800: fix TX_PIN_CFG setting for non MT7620 chips Stanislaw Gruszka
  2017-08-25 18:42 ` Daniel Golle
@ 2017-08-30 16:50 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-08-30 16:50 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Daniel Golle

Stanislaw Gruszka <sgruszka@redhat.com> wrote:

> 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>
> Cc: Daniel Golle <daniel@makrotopia.org>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> Acked-by: Daniel Golle <daniel@makrotopia.org>

Patch applied to wireless-drivers-next.git, thanks.

83ec48919389 rt2800: fix TX_PIN_CFG setting for non MT7620 chips

-- 
https://patchwork.kernel.org/patch/9922285/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2017-08-30 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 15:04 [PATCH v2] rt2800: fix TX_PIN_CFG setting for non MT7620 chips Stanislaw Gruszka
2017-08-25 18:42 ` Daniel Golle
2017-08-30 16:50 ` [v2] " Kalle Valo

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