From: Gertjan van Wingerde <gwingerde@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>,
<linux-wireless@vger.kernel.org>
Cc: Ivo van Doorn <IvDoorn@gmail.com>,
Helmut Schaa <helmut.schaa@googlemail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>
Subject: [PATCH 7/8] rt2x00: Fix RT3572 channel switch RFCSR 7 programming.
Date: Mon, 6 Feb 2012 23:45:12 +0100 [thread overview]
Message-ID: <1328568313-26267-8-git-send-email-gwingerde@gmail.com> (raw)
In-Reply-To: <1328568313-26267-7-git-send-email-gwingerde@gmail.com>
Align with the v2.5.0.0 Ralink RT3572 driver.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 8aabd0d..c6648b0 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -1819,10 +1819,12 @@ struct mac_iveiv_entry {
* RFCSR 7:
*/
#define RFCSR7_RF_TUNING FIELD8(0x01)
-#define RFCSR7_R02 FIELD8(0x07)
-#define RFCSR7_R3 FIELD8(0x08)
-#define RFCSR7_R45 FIELD8(0x30)
-#define RFCSR7_R67 FIELD8(0xc0)
+#define RFCSR7_BIT1 FIELD8(0x02)
+#define RFCSR7_BIT2 FIELD8(0x04)
+#define RFCSR7_BIT3 FIELD8(0x08)
+#define RFCSR7_BIT4 FIELD8(0x10)
+#define RFCSR7_BIT5 FIELD8(0x20)
+#define RFCSR7_BITS67 FIELD8(0xc0)
/*
* RFCSR 11:
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2afb798..28dc6ba 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1865,7 +1865,12 @@ static void rt2800_config_channel_rf3052(struct rt2x00_dev *rt2x00dev,
rt2800_rfcsr_write(rt2x00dev, 27, 0x00);
rt2800_rfcsr_write(rt2x00dev, 29, 0x9b);
} else {
- rt2800_rfcsr_write(rt2x00dev, 7, 0x14);
+ rt2800_rfcsr_read(rt2x00dev, 7, &rfcsr);
+ rt2x00_set_field8(&rfcsr, RFCSR7_BIT2, 1);
+ rt2x00_set_field8(&rfcsr, RFCSR7_BIT3, 0);
+ rt2x00_set_field8(&rfcsr, RFCSR7_BIT4, 1);
+ rt2x00_set_field8(&rfcsr, RFCSR7_BITS67, 0);
+ rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
rt2800_rfcsr_write(rt2x00dev, 9, 0xc0);
rt2800_rfcsr_write(rt2x00dev, 10, 0xf1);
rt2800_rfcsr_write(rt2x00dev, 11, 0x00);
--
1.7.9
next prev parent reply other threads:[~2012-02-06 22:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 22:45 [PATCH 0/8] rt2x00: RT3572 fixes Gertjan van Wingerde
2012-02-06 22:45 ` [PATCH 1/8] rt2x00: Introduce concept of driver data in struct rt2x00_dev Gertjan van Wingerde
2012-02-06 22:45 ` [PATCH 2/8] rt2x00: Use struct rt2x00_dev driver data in rt2800{pci,usb} Gertjan van Wingerde
2012-02-06 22:45 ` [PATCH 3/8] rt2x00: Update comment on freq_offset field in struct rt2x00_dev Gertjan van Wingerde
2012-02-06 22:45 ` [PATCH 4/8] rt2x00: Use saved BBP 25 and 26 values when configuring channel on RT3572 Gertjan van Wingerde
2012-02-06 22:45 ` [PATCH 5/8] rt2x00: Fix RFCSR 12 & 13 programming on RT3572 channel switching Gertjan van Wingerde
2012-02-06 22:45 ` [PATCH 6/8] rt2x00: Align RT3572 channel switch RFCSR 1 programming with Ralink driver Gertjan van Wingerde
2012-02-06 22:45 ` Gertjan van Wingerde [this message]
2012-02-06 22:45 ` [PATCH 8/8] rt2x00: Correctly set txmixer_gain in RT3572 channel switching Gertjan van Wingerde
2012-02-07 12:52 ` Ivo Van Doorn
2012-02-07 12:52 ` [PATCH 7/8] rt2x00: Fix RT3572 channel switch RFCSR 7 programming Ivo Van Doorn
2012-02-07 12:52 ` [PATCH 6/8] rt2x00: Align RT3572 channel switch RFCSR 1 programming with Ralink driver Ivo Van Doorn
2012-02-07 12:51 ` [PATCH 5/8] rt2x00: Fix RFCSR 12 & 13 programming on RT3572 channel switching Ivo Van Doorn
2012-02-07 12:51 ` [PATCH 4/8] rt2x00: Use saved BBP 25 and 26 values when configuring channel on RT3572 Ivo Van Doorn
2012-02-07 12:51 ` [PATCH 3/8] rt2x00: Update comment on freq_offset field in struct rt2x00_dev Ivo Van Doorn
2012-02-07 12:50 ` [PATCH 2/8] rt2x00: Use struct rt2x00_dev driver data in rt2800{pci,usb} Ivo Van Doorn
2012-02-07 12:50 ` [PATCH 1/8] rt2x00: Introduce concept of driver data in struct rt2x00_dev 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=1328568313-26267-8-git-send-email-gwingerde@gmail.com \
--to=gwingerde@gmail.com \
--cc=IvDoorn@gmail.com \
--cc=helmut.schaa@googlemail.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).