b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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 1/6] b43: LCN-PHY: minor fixes
Date: Wed, 31 Aug 2011 23:36:16 +0200	[thread overview]
Message-ID: <1314826581-27852-1-git-send-email-zajec5@gmail.com> (raw)

The biggest change is reversing order of reading 32-bit table value.
MMIO dumps has shown it's done that way for LCN-PHY.

Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 drivers/net/wireless/b43/b43.h            |    2 ++
 drivers/net/wireless/b43/main.c           |    1 +
 drivers/net/wireless/b43/tables_phy_lcn.c |   10 ++++------
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 8ff7062..f8615cd 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -110,6 +110,8 @@
 #define B43_MMIO_TSF_CFP_START_LOW	0x604
 #define B43_MMIO_TSF_CFP_START_HIGH	0x606
 #define B43_MMIO_TSF_CFP_PRETBTT	0x612
+#define B43_MMIO_TSF_CLK_FRAC_LOW	0x62E
+#define B43_MMIO_TSF_CLK_FRAC_HIGH	0x630
 #define B43_MMIO_TSF_0			0x632	/* core rev < 3 only */
 #define B43_MMIO_TSF_1			0x634	/* core rev < 3 only */
 #define B43_MMIO_TSF_2			0x636	/* core rev < 3 only */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 1722941..6bca727 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2953,6 +2953,7 @@ static void b43_rate_memory_init(struct b43_wldev *dev)
 	case B43_PHYTYPE_N:
 	case B43_PHYTYPE_LP:
 	case B43_PHYTYPE_HT:
+	case B43_PHYTYPE_LCN:
 		b43_rate_memory_write(dev, B43_OFDM_RATE_6MB, 1);
 		b43_rate_memory_write(dev, B43_OFDM_RATE_12MB, 1);
 		b43_rate_memory_write(dev, B43_OFDM_RATE_18MB, 1);
diff --git a/drivers/net/wireless/b43/tables_phy_lcn.c b/drivers/net/wireless/b43/tables_phy_lcn.c
index 0a58428..916d3f1 100644
--- a/drivers/net/wireless/b43/tables_phy_lcn.c
+++ b/drivers/net/wireless/b43/tables_phy_lcn.c
@@ -318,9 +318,8 @@ u32 b43_lcntab_read(struct b43_wldev *dev, u32 offset)
 		break;
 	case B43_LCNTAB_32BIT:
 		b43_phy_write(dev, B43_PHY_LCN_TABLE_ADDR, offset);
-		value = b43_phy_read(dev, B43_PHY_LCN_TABLE_DATAHI);
-		value <<= 16;
-		value |= b43_phy_read(dev, B43_PHY_LCN_TABLE_DATALO);
+		value = b43_phy_read(dev, B43_PHY_LCN_TABLE_DATALO);
+		value |= (b43_phy_read(dev, B43_PHY_LCN_TABLE_DATAHI) << 16);
 		break;
 	default:
 		B43_WARN_ON(1);
@@ -357,10 +356,9 @@ void b43_lcntab_read_bulk(struct b43_wldev *dev, u32 offset,
 			break;
 		case B43_LCNTAB_32BIT:
 			*((u32 *)data) = b43_phy_read(dev,
-						      B43_PHY_LCN_TABLE_DATAHI);
-			*((u32 *)data) <<= 16;
-			*((u32 *)data) |= b43_phy_read(dev,
 						B43_PHY_LCN_TABLE_DATALO);
+			*((u32 *)data) |= (b43_phy_read(dev,
+					   B43_PHY_LCN_TABLE_DATAHI) << 16);
 			data += 4;
 			break;
 		default:
-- 
1.7.3.4

             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 Rafał Miłecki [this message]
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 ` [PATCH 5/6] b43: LCN-PHY: rename functions, get rid of magic names Rafał Miłecki
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-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).