linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: bcm43xx-dev@lists.berlios.de
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH 1/3] b43: N-PHY: add b43_nphy_rx_iq_est and b43_nphy_tx_iq_workaround
Date: Tue, 12 Jan 2010 23:10:21 +0100	[thread overview]
Message-ID: <201001122310.21654.mb@bu3sch.de> (raw)
In-Reply-To: <op.u6fp5shd9lhzdc@linux-g0th.site>

On Tuesday 12 January 2010 20:38:07 Rafał Miłecki wrote:
>   struct nphy_txgains { u16 txgm[2]; u16 pga[2]; u16 pad[2]; u16 ipa[2]; };
> +struct nphy_iq_est { s32 iq0_prod; u32 i0_pwr; u32 q0_pwr; s32 iq1_prod;
> +			u32 i1_pwr; u32 q1_pwr; };

So it seems I didn't notice this earlier, but this violates kernel coding style.
Please do a separate patch that converts all structs from
struct foo { a; b; c; };
to
struct foo {
	a;
	b;
	c;
};

> +	if (wait)
> +		b43_phy_set(dev, B43_NPHY_IQEST_CMD, B43_NPHY_IQEST_CMD_MODE);
> +	else
> +		b43_phy_mask(dev, B43_NPHY_IQEST_CMD, B43_NPHY_IQEST_CMD_MODE);

Looks wrong to me.
Do you want this?

+	if (wait)
+		b43_phy_set(dev, B43_NPHY_IQEST_CMD, B43_NPHY_IQEST_CMD_MODE);
+	else
+		b43_phy_mask(dev, B43_NPHY_IQEST_CMD, ~B43_NPHY_IQEST_CMD_MODE);

> +/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxIqWar */
> +static void b43_nphy_tx_iq_workaround(struct b43_wldev *dev)
> +{
> +	u16 array[4];
> +	int i;
> +
> +	b43_phy_write(dev, B43_NPHY_TABLE_ADDR, 0x3C50);
> +	for (i = 0; i < 4; i++)
> +		array[i] = b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
> +
> +	b43_shm_write16(dev, B43_SHM_SHARED, 0x0700, array[0]);
> +	b43_shm_write16(dev, B43_SHM_SHARED, 0x0702, array[1]);
> +	b43_shm_write16(dev, B43_SHM_SHARED, 0x0704, array[2]);
> +	b43_shm_write16(dev, B43_SHM_SHARED, 0x0706, array[3]);

Do we have some names for the SHM locations?
If not, just do some defines.
#define B43_SHM_SH_NPHY_TXIQW0	0x0700
#define B43_SHM_SH_NPHY_TXIQW1	0x0702
...
in b43.h (next to the other SHM_SH defines)

-- 
Greetings, Michael.

  reply	other threads:[~2010-01-12 22:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 19:38 [PATCH 1/3] b43: N-PHY: add b43_nphy_rx_iq_est and b43_nphy_tx_iq_workaround Rafał Miłecki
2010-01-12 22:10 ` Michael Buesch [this message]
2010-01-12 22:51   ` Rafał Miłecki
2010-01-13 23:39     ` 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=201001122310.21654.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=zajec5@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 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).