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 5/6] b43: LCN-PHY: rename functions, get rid of magic names
Date: Wed, 31 Aug 2011 23:36:20 +0200 [thread overview]
Message-ID: <1314826581-27852-5-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1314826581-27852-1-git-send-email-zajec5@gmail.com>
We've compared b43 with brcmsmac and took functions names from the
later.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/phy_lcn.c | 29 +++++++++++++++++++++++------
drivers/net/wireless/b43/tables_phy_lcn.c | 10 ++++++----
2 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/b43/phy_lcn.c b/drivers/net/wireless/b43/phy_lcn.c
index 9e57577..b461278 100644
--- a/drivers/net/wireless/b43/phy_lcn.c
+++ b/drivers/net/wireless/b43/phy_lcn.c
@@ -31,6 +31,7 @@
* Radio 2064.
**************************************************/
+/* wlc_lcnphy_radio_2064_channel_tune_4313 */
static void b43_radio_2064_channel_setup(struct b43_wldev *dev)
{
u16 save[2];
@@ -73,6 +74,7 @@ static void b43_radio_2064_channel_setup(struct b43_wldev *dev)
b43_radio_write(dev, 0x091, 0x7);
}
+/* wlc_radio_2064_init */
static void b43_radio_2064_init(struct b43_wldev *dev)
{
b43_radio_write(dev, 0x09c, 0x0020);
@@ -122,6 +124,7 @@ static void b43_radio_2064_init(struct b43_wldev *dev)
* Various PHY ops
**************************************************/
+/* wlc_lcnphy_toggle_afe_pwdn */
static void b43_phy_lcn_afe_set_unset(struct b43_wldev *dev)
{
u16 afe_ctl2 = b43_phy_read(dev, B43_PHY_LCN_AFE_CTL2);
@@ -137,7 +140,8 @@ static void b43_phy_lcn_afe_set_unset(struct b43_wldev *dev)
b43_phy_write(dev, B43_PHY_LCN_AFE_CTL1, afe_ctl1);
}
-static void b43_phy_lcn_clear_0x07_table(struct b43_wldev *dev)
+/* wlc_lcnphy_clear_tx_power_offsets */
+static void b43_phy_lcn_clear_tx_power_offsets(struct b43_wldev *dev)
{
u8 i;
@@ -154,7 +158,8 @@ static void b43_phy_lcn_clear_0x07_table(struct b43_wldev *dev)
}
}
-static void b43_phy_lcn_pre_radio_init(struct b43_wldev *dev)
+/* wlc_lcnphy_rev0_baseband_init */
+static void b43_phy_lcn_rev0_baseband_init(struct b43_wldev *dev)
{
b43_radio_write(dev, 0x11c, 0);
@@ -181,7 +186,11 @@ static void b43_phy_lcn_pre_radio_init(struct b43_wldev *dev)
b43_phy_maskset(dev, 0x448, ~0x300, 0x100);
b43_phy_maskset(dev, 0x608, ~0xff, 0x17);
b43_phy_maskset(dev, 0x604, ~0x7ff, 0x3ea);
+}
+/* wlc_lcnphy_bu_tweaks */
+static void b43_phy_lcn_bu_tweaks(struct b43_wldev *dev)
+{
b43_phy_set(dev, 0x805, 0x1);
b43_phy_maskset(dev, 0x42f, ~0x7, 0x3);
@@ -203,9 +212,16 @@ static void b43_phy_lcn_pre_radio_init(struct b43_wldev *dev)
b43_phy_write(dev, 0x7d6, 0x0902);
/* TODO: more ops */
+
+ if (dev->phy.rev == 1) {
+ /* TODO: more ops */
+
+ b43_phy_lcn_clear_tx_power_offsets(dev);
+ }
}
-static void b43_phy_lcn_save_configsth_restore(struct b43_wldev *dev)
+/* wlc_lcnphy_vbat_temp_sense_setup */
+static void b43_phy_lcn_sense_setup(struct b43_wldev *dev)
{
u8 i;
@@ -297,6 +313,7 @@ static void b43_phy_lcn_op_prepare_structs(struct b43_wldev *dev)
memset(phy_lcn, 0, sizeof(*phy_lcn));
}
+/* wlc_phy_init_lcnphy */
static int b43_phy_lcn_op_init(struct b43_wldev *dev)
{
b43_phy_set(dev, 0x44a, 0x80);
@@ -312,15 +329,15 @@ static int b43_phy_lcn_op_init(struct b43_wldev *dev)
b43_phy_lcn_tables_init(dev);
- b43_phy_lcn_pre_radio_init(dev);
- b43_phy_lcn_clear_0x07_table(dev);
+ b43_phy_lcn_rev0_baseband_init(dev);
+ b43_phy_lcn_bu_tweaks(dev);
if (dev->phy.radio_ver == 0x2064)
b43_radio_2064_init(dev);
else
B43_WARN_ON(1);
- b43_phy_lcn_save_configsth_restore(dev);
+ b43_phy_lcn_sense_setup(dev);
return 0;
}
diff --git a/drivers/net/wireless/b43/tables_phy_lcn.c b/drivers/net/wireless/b43/tables_phy_lcn.c
index fd2b16d..c62a940 100644
--- a/drivers/net/wireless/b43/tables_phy_lcn.c
+++ b/drivers/net/wireless/b43/tables_phy_lcn.c
@@ -295,7 +295,7 @@ static const u32 b43_lcntab_0x18[] = {
0x00080000, 0x00080000, 0x00080000, 0x00080000,
};
-const u16 b43_lcntab_0x0f_late[] = {
+const u16 b43_lcntab_sw_ctl_4313_epa_rev0[] = {
0x0002, 0x0008, 0x0004, 0x0001, 0x0002, 0x0008,
0x0004, 0x0001, 0x0002, 0x0008, 0x0004, 0x0001,
0x0002, 0x0008, 0x0004, 0x0001, 0x0002, 0x0008,
@@ -488,7 +488,8 @@ static void b43_phy_lcn_rewrite_tables(struct b43_wldev *dev)
}
}
-static void b43_phy_lcn_clean_0x18_table(struct b43_wldev *dev)
+/* wlc_lcnphy_clear_papd_comptable */
+static void b43_phy_lcn_clean_papd_comp_table(struct b43_wldev *dev)
{
u8 i;
@@ -501,8 +502,9 @@ void b43_phy_lcn_tables_init(struct b43_wldev *dev)
b43_phy_lcn_upload_static_tables(dev);
/* TODO: various tables ops here */
b43_lcntab_write_bulk(dev, B43_LCNTAB16(0xf, 0),
- ARRAY_SIZE(b43_lcntab_0x0f_late), b43_lcntab_0x0f_late);
+ ARRAY_SIZE(b43_lcntab_sw_ctl_4313_epa_rev0),
+ b43_lcntab_sw_ctl_4313_epa_rev0);
/* TODO: various tables ops here */
b43_phy_lcn_rewrite_tables(dev);
- b43_phy_lcn_clean_0x18_table(dev);
+ b43_phy_lcn_clean_papd_comp_table(dev);
}
--
1.7.3.4
next prev parent reply other threads:[~2011-08-31 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 21:36 [PATCH 1/6] b43: LCN-PHY: minor fixes Rafał Miłecki
2011-08-31 21:36 ` [PATCH 2/6] b43: LCN-PHY: put tables functions in correct file Rafał Miłecki
2011-08-31 21:36 ` [PATCH 3/6] b43: LCN-PHY: rewrite 0x7 table at the end of init Rafał Miłecki
2011-08-31 21:36 ` [PATCH 4/6] b43: LCN-PHY: upload additional 0x7 table Rafał Miłecki
2011-08-31 21:36 ` Rafał Miłecki [this message]
2011-08-31 21:36 ` [PATCH 6/6] b43: LCN-PHY: add conditions for few operations 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=1314826581-27852-5-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).