From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Cc: b43-dev@lists.infradead.org, "Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH V3 01/13] b43: HT-PHY: rename AFE defines
Date: Sat, 9 Mar 2013 13:43:49 +0100 [thread overview]
Message-ID: <1362833029-8484-1-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1362671247-10766-2-git-send-email-zajec5@gmail.com>
It you take a look at N-PHY analog switch function it touches every core
on the chipset. It seems HT-PHY does they same, it just has 3 cores
instead of 2 (which make sense since BCM4331 is 3x3). Rename AFE defines
to include core id.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
V2: make ctl_regs array static btw
V3: use correct --in-reply-to
Sorry for using wrong In-Reply-To in V2 :(
---
drivers/net/wireless/b43/phy_ht.c | 38 ++++++++++++++++++-------------------
drivers/net/wireless/b43/phy_ht.h | 12 ++++++------
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/drivers/net/wireless/b43/phy_ht.c b/drivers/net/wireless/b43/phy_ht.c
index 3719a88..df07c83 100644
--- a/drivers/net/wireless/b43/phy_ht.c
+++ b/drivers/net/wireless/b43/phy_ht.c
@@ -176,10 +176,10 @@ static void b43_phy_ht_afe_unk1(struct b43_wldev *dev)
{
u8 i;
- const u16 ctl_regs[3][2] = {
- { B43_PHY_HT_AFE_CTL1, B43_PHY_HT_AFE_CTL2 },
- { B43_PHY_HT_AFE_CTL3, B43_PHY_HT_AFE_CTL4 },
- { B43_PHY_HT_AFE_CTL5, B43_PHY_HT_AFE_CTL6},
+ static const u16 ctl_regs[3][2] = {
+ { B43_PHY_HT_AFE_C1_OVER, B43_PHY_HT_AFE_C1 },
+ { B43_PHY_HT_AFE_C2_OVER, B43_PHY_HT_AFE_C2 },
+ { B43_PHY_HT_AFE_C3_OVER, B43_PHY_HT_AFE_C3},
};
for (i = 0; i < 3; i++) {
@@ -362,9 +362,9 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev)
b43_phy_mask(dev, B43_PHY_EXTG(0), ~0x3);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C1_OVER, 0);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C2_OVER, 0);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C3_OVER, 0);
b43_phy_write(dev, B43_PHY_EXTG(0x103), 0x20);
b43_phy_write(dev, B43_PHY_EXTG(0x101), 0x20);
@@ -511,19 +511,19 @@ static void b43_phy_ht_op_software_rfkill(struct b43_wldev *dev,
static void b43_phy_ht_op_switch_analog(struct b43_wldev *dev, bool on)
{
if (on) {
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL2, 0x00cd);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0x0000);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL4, 0x00cd);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0x0000);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL6, 0x00cd);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0x0000);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C1, 0x00cd);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C1_OVER, 0x0000);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C2, 0x00cd);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C2_OVER, 0x0000);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C3, 0x00cd);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C3_OVER, 0x0000);
} else {
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL1, 0x07ff);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL2, 0x00fd);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL3, 0x07ff);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL4, 0x00fd);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL5, 0x07ff);
- b43_phy_write(dev, B43_PHY_HT_AFE_CTL6, 0x00fd);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C1_OVER, 0x07ff);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C1, 0x00fd);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C2_OVER, 0x07ff);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C2, 0x00fd);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C3_OVER, 0x07ff);
+ b43_phy_write(dev, B43_PHY_HT_AFE_C3, 0x00fd);
}
}
diff --git a/drivers/net/wireless/b43/phy_ht.h b/drivers/net/wireless/b43/phy_ht.h
index 6544c42..60824fa 100644
--- a/drivers/net/wireless/b43/phy_ht.h
+++ b/drivers/net/wireless/b43/phy_ht.h
@@ -36,12 +36,12 @@
#define B43_PHY_HT_RF_CTL1 B43_PHY_EXTG(0x010)
-#define B43_PHY_HT_AFE_CTL1 B43_PHY_EXTG(0x110)
-#define B43_PHY_HT_AFE_CTL2 B43_PHY_EXTG(0x111)
-#define B43_PHY_HT_AFE_CTL3 B43_PHY_EXTG(0x114)
-#define B43_PHY_HT_AFE_CTL4 B43_PHY_EXTG(0x115)
-#define B43_PHY_HT_AFE_CTL5 B43_PHY_EXTG(0x118)
-#define B43_PHY_HT_AFE_CTL6 B43_PHY_EXTG(0x119)
+#define B43_PHY_HT_AFE_C1_OVER B43_PHY_EXTG(0x110)
+#define B43_PHY_HT_AFE_C1 B43_PHY_EXTG(0x111)
+#define B43_PHY_HT_AFE_C2_OVER B43_PHY_EXTG(0x114)
+#define B43_PHY_HT_AFE_C2 B43_PHY_EXTG(0x115)
+#define B43_PHY_HT_AFE_C3_OVER B43_PHY_EXTG(0x118)
+#define B43_PHY_HT_AFE_C3 B43_PHY_EXTG(0x119)
/* Values for PHY registers used on channel switching */
--
1.7.10.4
next prev parent reply other threads:[~2013-03-09 12:43 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 15:47 [PATCH 00/13] b43: implement basic TX power mgmt Rafał Miłecki
2013-03-07 15:47 ` [PATCH 01/13] b43: HT-PHY: rename AFE defines Rafał Miłecki
2013-03-09 12:43 ` Rafał Miłecki [this message]
2013-03-07 15:47 ` [PATCH 02/13] b43: HT-PHY: add classifier control function Rafał Miłecki
2013-03-07 15:47 ` [PATCH 03/13] b43: HT-PHY: move TX fix to the separated function Rafał Miłecki
2013-03-07 15:47 ` [PATCH 04/13] b43: HT-PHY: implement spurious tone avoidance Rafał Miłecki
2013-03-07 15:47 ` [PATCH 05/13] b43: HT-PHY: implement MAC reclocking Rafał Miłecki
2013-03-07 15:47 ` [PATCH 06/13] b43: HT-PHY: implement CCA reset Rafał Miłecki
2013-03-07 15:47 ` [PATCH 07/13] b43: HT-PHY: implement PA override Rafał Miłecki
2013-03-09 12:49 ` [PATCH V2 " Rafał Miłecki
2013-03-07 15:47 ` [PATCH 08/13] b43: HT-PHY: implement controlling TX power control Rafał Miłecki
2013-03-09 12:52 ` [PATCH V2 " Rafał Miłecki
2013-03-07 15:47 ` [PATCH 09/13] b43: HT-PHY: implement stopping sample tone playback Rafał Miłecki
2013-03-07 15:47 ` [PATCH 10/13] b43: HT-PHY: implement playing sample tone Rafał Miłecki
2013-03-07 15:47 ` [PATCH 11/13] b43: HT-PHY: implement RSSI polling Rafał Miłecki
2013-03-07 16:35 ` Michael Büsch
2013-03-07 16:41 ` Rafał Miłecki
2013-03-09 12:41 ` [PATCH V2 01/13] b43: HT-PHY: rename AFE defines Rafał Miłecki
2013-03-09 12:56 ` [PATCH V2 11/13] b43: HT-PHY: implement RSSI polling Rafał Miłecki
2013-03-07 15:47 ` [PATCH 12/13] b43: HT-PHY: setup TX power control Rafał Miłecki
2013-03-07 15:47 ` [PATCH 13/13] b43: HT-PHY: enable basic TX power setup Rafał Miłecki
2013-03-07 18:09 ` [PATCH 00/13] b43: implement basic TX power mgmt Larry Finger
2013-03-07 18:43 ` Rafał Miłecki
2013-03-07 18:55 ` Rafał Miłecki
2013-03-07 19:01 ` Larry Finger
2013-03-09 11:20 ` Rafał Miłecki
2013-03-09 11:59 ` Hauke Mehrtens
2013-03-09 12:58 ` Rafał Miłecki
2013-03-09 17:21 ` Larry Finger
2013-03-13 10:41 ` David Woodhouse
2013-03-13 23:19 ` Rafał Miłecki
2013-03-14 14:58 ` David Woodhouse
2013-03-16 13:50 ` Rafał Miłecki
2013-03-18 21:30 ` David Woodhouse
2013-03-19 8:38 ` Rafał Miłecki
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=1362833029-8484-1-git-send-email-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=b43-dev@lists.infradead.org \
--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).