2009-08-26 21:46:19

by Gábor Stefanik

[permalink] [raw]
Subject: [PATCH v3] b43: LP-PHY: Revert to the original PHY register write routine

After some discussion on IRC about the PHY register write change,
I am not sure anymore if this is the right thing to do.

Signed-off-by: Gábor Stefanik <[email protected]>
---
v3: Use 16-bit writes.

drivers/net/wireless/b43/phy_lp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 80f245c..a57c40d 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -1496,7 +1496,8 @@ static u16 b43_lpphy_op_read(struct b43_wldev *dev, u16 reg)

static void b43_lpphy_op_write(struct b43_wldev *dev, u16 reg, u16 value)
{
- b43_write32(dev, B43_MMIO_PHY_CONTROL, ((u32)value << 16) | reg);
+ b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
+ b43_write16(dev, B43_MMIO_PHY_DATA, value);
}

static void b43_lpphy_op_maskset(struct b43_wldev *dev, u16 reg, u16 mask,
--
1.5.6



2009-08-27 00:27:35

by Larry Finger

[permalink] [raw]
Subject: Congratulations

Gábor,

Congratulations on your progress. With today's patches my BCM4312
802.11b/g card with PCI ID 14e4:4315 works - I'm using it at the
moment. I'm using WPA2 encryption and have connected to APs on
channels 1 and 11. My logs are clean.

As you noted, performance is a little weak, but I get transmits of
9-11 Mb/s and receive rates up to 18 Mb/s - eminently usable.

I certainly hope that you get the patches approved so that these
changes will be in the 2.6.32 kernel.

Once again, congratulations to you, Michael, and the others members of
the reverse engineering team. Seeing the device comes to life makes
all those hours of staring at MIPS binary code seem very worthwhile.

For those of you with N PHYs, the RE of those devices will be my next
step.

Larry

2009-08-27 02:22:27

by Gábor Stefanik

[permalink] [raw]
Subject: Re: Congratulations

2009/8/27 Larry Finger <[email protected]>:
> G?bor,
>
> Congratulations on your progress. With today's patches my BCM4312
> 802.11b/g card with PCI ID 14e4:4315 works - I'm using it at the
> moment. I'm using WPA2 encryption and have connected to APs on
> channels 1 and 11. My logs are clean.

That's good to hear!

>
> As you noted, performance is a little weak, but I get transmits of
> 9-11 Mb/s and receive rates up to 18 Mb/s - eminently usable.

What is your actual RX throughput? For me, it's usable up to 24Mb/s,
but the actual throughput is limited to 1.2Mb/s.

>
> I certainly hope that you get the patches approved so that these
> changes will be in the 2.6.32 kernel.

The patches are already in the tree, actually.

>
> Once again, congratulations to you, Michael, and the others members of
> the reverse engineering team. Seeing the device comes to life makes
> all those hours of staring at MIPS binary code seem very worthwhile.
>
> For those of you with N PHYs, the RE of those devices will be my next
> step.

My next step will be calibration. :-)

(However, calibration specs are still not complete - there are 2 wlc_*
calls in PR41573. But that only matters for rev.0, and apparently all
4312s are rev.1.)

>
> Larry
>



--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

2009-08-27 02:57:09

by Larry Finger

[permalink] [raw]
Subject: Re: Congratulations

G?bor Stefanik wrote:
> 2009/8/27 Larry Finger <[email protected]>:
>> G?bor,
>>
>> Congratulations on your progress. With today's patches my BCM4312
>> 802.11b/g card with PCI ID 14e4:4315 works - I'm using it at the
>> moment. I'm using WPA2 encryption and have connected to APs on
>> channels 1 and 11. My logs are clean.
>
> That's good to hear!
>
>> As you noted, performance is a little weak, but I get transmits of
>> 9-11 Mb/s and receive rates up to 18 Mb/s - eminently usable.
>
> What is your actual RX throughput? For me, it's usable up to 24Mb/s,
> but the actual throughput is limited to 1.2Mb/s.

That 18 Mb/s receive rate was observed data transfer from my server
that is wired to the router/AP and over the air to the BCM4312, just
as the 11 Mb/s was observed transfer from the BCM4312 to the server. I
have no idea what bit rate was set into the interface. Every time I
looked, it was at 1 Mb/s, but the throughput is better than that.

--snip--

>> For those of you with N PHYs, the RE of those devices will be my next
>> step.
>
> My next step will be calibration. :-)
>
> (However, calibration specs are still not complete - there are 2 wlc_*
> calls in PR41573. But that only matters for rev.0, and apparently all
> 4312s are rev.1.)

I missed those (obviously). Are there any other places in the LP PHY
that need work?

Larry