All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gábor Stefanik" <netrolller.3d@gmail.com>
To: John Linville <linville@tuxdriver.com>,
	Michael Buesch <mb@bu3sch.de>,
	Larry Finger <Larry.Finger@lwfinger.net>
Cc: Broadcom Wireless <bcm43xx-dev@lists.berlios.de>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] b43: LP-PHY: Fix analog core switching
Date: Mon, 14 Sep 2009 21:10:04 +0200	[thread overview]
Message-ID: <4AAE950C.2050704@gmail.com> (raw)

The generic analog switch routine is not correct for LP-PHY according
to the latest specs. Implement the proper analog core switch routine.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 80da9c7..b0e127a 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -2160,6 +2160,16 @@ static int lpphy_b2063_tune(struct b43_w
 	return 0;
 }
 
+static void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
+{
+	if (on) {
+		b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0x7);
+		b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x7);
+	} else {
+		b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFF8);
+	}
+}
+
 static int b43_lpphy_op_switch_channel(struct b43_wldev *dev,
 				       unsigned int new_channel)
 {
@@ -2239,7 +2249,7 @@ const struct b43_phy_operations b43_phyo
 	.radio_read		= b43_lpphy_op_radio_read,
 	.radio_write		= b43_lpphy_op_radio_write,
 	.software_rfkill	= b43_lpphy_op_software_rfkill,
-	.switch_analog		= b43_phyop_switch_analog_generic,
+	.switch_analog		= b43_lpphy_op_switch_analog,
 	.switch_channel		= b43_lpphy_op_switch_channel,
 	.get_default_chan	= b43_lpphy_op_get_default_chan,
 	.set_rx_antenna		= b43_lpphy_op_set_rx_antenna,


             reply	other threads:[~2009-09-14 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14 19:10 Gábor Stefanik [this message]
2009-09-14 19:24 ` [PATCH] b43: LP-PHY: Fix analog core switching Thomas Ilnseher
2009-09-14 19:40 ` Michael Buesch

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=4AAE950C.2050704@gmail.com \
    --to=netrolller.3d@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.