From: Helmut Schaa <helmut.schaa@googlemail.com>
To: John Linville <linville@tuxdriver.com>
Cc: Ivo van Doorn <ivdoorn@gmail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>,
linux-wireless@vger.kernel.org
Subject: [PATCH] rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxx
Date: Fri, 23 Apr 2010 15:54:43 +0200 [thread overview]
Message-ID: <201004231554.43474.helmut.schaa@googlemail.com> (raw)
Get closer to what the ralink driver does by setting the rf register 13
to tx_power2 during channel switch.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
Just found that difference between rt2x00 and the ralink driver.
However I couldn't see any obvious improvements. So, this change
is mostly for completeness.
drivers/net/wireless/rt2x00/rt2800.h | 5 +++++
drivers/net/wireless/rt2x00/rt2800lib.c | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index ec89372..1c59dc6 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -1566,6 +1566,11 @@ struct mac_iveiv_entry {
#define RFCSR12_TX_POWER FIELD8(0x1f)
/*
+ * RFCSR 13:
+ */
+#define RFCSR13_TX_POWER FIELD8(0x1f)
+
+/*
* RFCSR 15:
*/
#define RFCSR15_TX_LO2_EN FIELD8(0x08)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index aa02ff6..3ee9882 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -794,6 +794,11 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev,
TXPOWER_G_TO_DEV(info->tx_power1));
rt2800_rfcsr_write(rt2x00dev, 12, rfcsr);
+ rt2800_rfcsr_read(rt2x00dev, 13, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR13_TX_POWER,
+ TXPOWER_G_TO_DEV(info->tx_power2));
+ rt2800_rfcsr_write(rt2x00dev, 13, rfcsr);
+
rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset);
rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
--
1.6.4.2
next reply other threads:[~2010-04-23 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 13:54 Helmut Schaa [this message]
2010-04-23 15:25 ` [PATCH] rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxx Gertjan van Wingerde
2010-04-23 18:01 ` Ivo van Doorn
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=201004231554.43474.helmut.schaa@googlemail.com \
--to=helmut.schaa@googlemail.com \
--cc=gwingerde@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).