All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Gábor Stefanik" <netrolller.3d@gmail.com>
Cc: John Linville <linville@tuxdriver.com>,
	Michael Buesch <mb@bu3sch.de>, Mark Huijgen <mark@huijgen.tk>,
	Broadcom Wireless <bcm43xx-dev@lists.berlios.de>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] b43: Implement antenna diversity support for LP-PHY
Date: Thu, 27 Aug 2009 16:01:32 -0500	[thread overview]
Message-ID: <4A96F42C.30501@lwfinger.net> (raw)
In-Reply-To: <4A96D6D6.3050201@gmail.com>

Gábor Stefanik wrote:
> static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
> {
> -    //TODO
> +    int autodiv = ;
> +
> +    if (dev->phy.rev >= 2)
> +        return; // rev2+ doesn't support antenna diversity
> +
> +    if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
> +        return;
> +
> +    b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
> +    b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
> }
> 
> static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)

I noticed that your code didn't look like the specs, which is why I
thought the recent changes had affected this section.

It took me a while to figure it out, but the code above is correct.
The part that led to confusion is that the vendor uses 3 to indicate
"start with antenna 0", while you use 2 for that state. Even if we get
it wrong later, it shouldn't matter.

Larry

      parent reply	other threads:[~2009-08-27 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 18:56 [PATCH] b43: Implement antenna diversity support for LP-PHY Gábor Stefanik
2009-08-27 20:31 ` Michael Buesch
2009-08-27 20:41   ` Gábor Stefanik
2009-08-27 21:01 ` Larry Finger [this message]

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=4A96F42C.30501@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mark@huijgen.tk \
    --cc=mb@bu3sch.de \
    --cc=netrolller.3d@gmail.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 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.