public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>
Cc: "bcm43xx-dev@lists.berlios.de" <bcm43xx-dev@lists.berlios.de>
Subject: [PATCH 3/7] b43: N-PHY: implement MIMO config update
Date: Sun, 17 Jan 2010 13:03:40 +0100	[thread overview]
Message-ID: <op.u6oegeb39lhzdc@linux-g0th.site> (raw)


Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
  drivers/net/wireless/b43/phy_n.c |   16 +++++++++++++++-
  drivers/net/wireless/b43/phy_n.h |    1 +
  2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 34dd4a2..582d6b0 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -424,6 +424,20 @@ static void b43_nphy_reset_cca(struct b43_wldev *dev)
  	/* TODO: N PHY Force RF Seq with argument 2 */
  }

+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/MIMOConfig */
+static void b43_nphy_update_mimo_config(struct b43_wldev *dev, s32 preamble)
+{
+	u16 mimocfg = b43_phy_read(dev, B43_NPHY_MIMOCFG);
+
+	mimocfg |= B43_NPHY_MIMOCFG_AUTO;
+	if (preamble == 1)
+		mimocfg |= B43_NPHY_MIMOCFG_GFMIX;
+	else
+		mimocfg &= ~B43_NPHY_MIMOCFG_GFMIX;
+
+	b43_phy_write(dev, B43_NPHY_MIMOCFG, mimocfg);
+}
+
  /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqEst */
  static void b43_nphy_rx_iq_est(struct b43_wldev *dev, struct nphy_iq_est *est,
  				u16 samps, u8 time, bool wait)
@@ -2180,7 +2194,7 @@ int b43_phy_initn(struct b43_wldev *dev)
  	b43_phy_write(dev, B43_NPHY_PLOAD_CSENSE_EXTLEN, 0x50);
  	b43_phy_write(dev, B43_NPHY_TXRIFS_FRDEL, 0x30);

-	/* TODO MIMO-Config */
+	b43_nphy_update_mimo_config(dev, nphy->preamble_override);
  	/* TODO Update TX/RX chain */

  	if (phy->rev < 2) {
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index 4572866..ae00e3f 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -973,6 +973,7 @@ struct b43_phy_n {
  	bool hang_avoid;
  	bool mute;
  	u16 papd_epsilon_offset[2];
+	s32 preamble_override;

  	u8 mphase_cal_phase_id;
  	u16 mphase_txcal_cmdidx;
-- 
1.6.4.2


                 reply	other threads:[~2010-01-17 12:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=op.u6oegeb39lhzdc@linux-g0th.site \
    --to=zajec5@gmail.com \
    --cc=bcm43xx-dev@lists.berlios.de \
    --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