linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: "Tomislav Požega" <pozega.tomislav@gmail.com>,
	"Daniel Golle" <daniel@makrotopia.org>,
	"Felix Fietkau" <nbd@nbd.name>, "Mathias Kresin" <dev@kresin.me>
Subject: [PATCH v5 2/5] rt2x00: remove confusing AGC register
Date: Wed, 13 Feb 2019 11:09:13 +0100	[thread overview]
Message-ID: <1550052556-7158-3-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1550052556-7158-1-git-send-email-sgruszka@redhat.com>

From: Tomislav Požega <pozega.tomislav@gmail.com>

Register 66 was causing issues on RT6352 if set to the same value as
in MTK driver. With 1c reg value device was working fine in both HT20
and HT40 modes.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 0165e274a884..f420b6af1f2a 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -3983,11 +3983,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
 		rt2800_bbp_write(rt2x00dev, 196, reg);
 
 		/* AGC init */
-		if (rt2x00_rt(rt2x00dev, RT6352))
-			reg = 0x04;
-		else
-			reg = rf->channel <= 14 ? 0x1c : 0x24;
-
+		reg = rf->channel <= 14 ? 0x1c : 0x24;
 		reg += 2 * rt2x00dev->lna_gain;
 		rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
 
-- 
2.7.5


  parent reply	other threads:[~2019-02-13 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 10:09 [PATCH v5 0/5] rt2800: register programing tweaks and clean ups Stanislaw Gruszka
2019-02-13 10:09 ` [PATCH v5 1/5] rt2x00: remove unneeded check Stanislaw Gruszka
2019-02-19 15:19   ` Kalle Valo
2019-02-13 10:09 ` Stanislaw Gruszka [this message]
2019-02-13 10:09 ` [PATCH v5 3/5] rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band Stanislaw Gruszka
2019-02-13 10:09 ` [PATCH v5 4/5] rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620 Stanislaw Gruszka
2019-02-13 10:09 ` [PATCH v5 5/5] rt2800: comment and simplify AGC init for RT6352 Stanislaw Gruszka

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=1550052556-7158-3-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=daniel@makrotopia.org \
    --cc=dev@kresin.me \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=pozega.tomislav@gmail.com \
    /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 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).