Skip to contentSkip to conversation

b43 vs b43legacy

DISCUSSION Matthieu CASTET 4 participants 8 messages May 29, 2009 – Jun 8, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Hi,

what's the difference between b43 and b43legacy ?

Quoted 1 line

From a first point a view, it seems b43 is for core >= 5 and b43legacy for the

other.
There is also firmware difference : b43 need v4 and b43legacy need v3.

But v4 firmware seems to support core 4 (pcm4 & ucode4) and b43 code got some support for old chips (<5).

Is the split was made because nobody know how to use firmware v4 with core 4 or because core 4 it so different from newer core.
In the latter case why code for older chip (<5) is not removed from the driver ?

Thanks

Matthieu

PS : sorry if the answer is already available on internet, I try to search it without finding anything.

#1 lore raw
Quoted 8 lines · Matthieu CASTET

Hi,

what's the difference between b43 and b43legacy ?

From a first point a view, it seems b43 is for core >= 5 and b43legacy for the other.
There is also firmware difference : b43 need v4 and b43legacy need v3.

Quoted 7 lines

But v4 firmware seems to support core 4 (pcm4 & ucode4) and b43 code got some support for old chips (<5).

Is the split was made because nobody know how to use firmware v4 with core 4 or because core 4 it so different from newer core.
In the latter case why code for older chip (<5) is not removed from the driver ?

http://wireless.kernel.org/en/users/Drivers/b43

Luis

#2 lore raw
In reply to Matthieu CASTET
Quoted 6 lines · Matthieu CASTET

what's the difference between b43 and b43legacy ?

Quoted 1 line

From a first point a view, it seems b43 is for core >= 5 and b43legacy for the

other.
There is also firmware difference : b43 need v4 and b43legacy need v3.

The firmware difference is the primary one.

Quoted 2 lines

But v4 firmware seems to support core 4 (pcm4 & ucode4) and b43 code got some support for old chips (<5).

The Broadcom V4 drivers do have core 4 firmware embedded in them and it is extracted by b43-fwcutter; however, b43 will _NOT_ work with core 4 chips. The firmware loader will only find firmware for core 5 and later. On the other hand, core 5 devices have been tested with b43legacy. I have a local patch that I use to switch my 14e4:4312 device so that it uses b43legacy. This allows me to test any changes.

Quoted 5 lines

Is the split was made because nobody know how to use firmware v4 with core 4 or because core 4 it so different from newer core.
In the latter case why code for older chip (<5) is not removed from the driver ?

From what I have heard, the older chips do not have the on-board memory to run

V4 firmware. Certainly, any chips that have core 2 cannot handle V4 firmware.

I suspect that any residual code for older chips left in b43 was missed. If you want to prepare patches to remove such code, please do.

Larry

#3 lore raw
Quoted 7 lines · Larry Finger
Quoted 5 lines · Matthieu CASTET

what's the difference between b43 and b43legacy ?

Quoted 1 line

From a first point a view, it seems b43 is for core >= 5 and b43legacy for the

other.
There is also firmware difference : b43 need v4 and b43legacy need v3.

Quoted 8 lines

The firmware difference is the primary one.

Quoted 2 lines

But v4 firmware seems to support core 4 (pcm4 & ucode4) and b43 code got some support for old chips (<5).

The Broadcom V4 drivers do have core 4 firmware embedded in them and it is extracted by b43-fwcutter; however, b43 will _NOT_ work with core 4 chips. The firmware loader will only find firmware for core 5 and later.

Ok but what prevent b43 to support core 4 chip with v4 firmware like the broadcom driver does ? I am aware that the current driver doesn't support it, but what are the missing part to support it ?

If it is the difference from core4 from newer chip, why b43legacy contains only few special case for core4 chip.

Quoted 3 lines

I suspect that any residual code for older chips left in b43 was missed. If you want to prepare patches to remove such code, please do.

Yes, I could prepare such patches

Thanks

Matthieu

PS : I don't have core 4 chip nor plan to get some, I ask this out of curiosity.

#4 lore raw
Quoted 20 lines · matthieu castet
Quoted 14 lines · Larry Finger
Quoted 6 lines · Matthieu CASTET

what's the difference between b43 and b43legacy ?

Quoted 1 line

From a first point a view, it seems b43 is for core >= 5 and

b43legacy for the
other.
There is also firmware difference : b43 need v4 and b43legacy need v3.

The firmware difference is the primary one.

Quoted 3 lines

But v4 firmware seems to support core 4 (pcm4 & ucode4) and b43 code got some
support for old chips (<5).

Quoted 5 lines

The Broadcom V4 drivers do have core 4 firmware embedded in them and it is
extracted by b43-fwcutter; however, b43 will _NOT_ work with core 4 chips. The
firmware loader will only find firmware for core 5 and later.

Quoted 4 lines

Ok but what prevent b43 to support core 4 chip with v4 firmware like the broadcom driver does ?
I am aware that the current driver doesn't support it, but what are the missing part to support it ?

The firmware loader code is the first step. Beyond that, I have no idea.

Quoted 2 lines

If it is the difference from core4 from newer chip, why b43legacy contains only few special case for core4 chip.

I do not know other than that is what the specs called for.

Quoted 2 lines

PS : I don't have core 4 chip nor plan to get some, I ask this out of curiosity.

I do have such a chip, but I use it to verify b43legacy code.

Larry

#5 lore raw
In reply to matthieu castet
Quoted 4 lines · On Monday 01 June 2009 23:47:06 matthieu castet wrote:

Ok but what prevent b43 to support core 4 chip with v4 firmware like the broadcom driver does ?
I am aware that the current driver doesn't support it, but what are the missing part to support it ?

Recent broadcom drivers do not support <=rev4 anymore.
There are lots of differences between those devices and devices >=rev5. So we chose to fork it.
That's it. It's as simple as that. Why does it surprise you that much? Lots of other devices require a separate driver for legacy devices, too.

Signature · 1 line
Greetings, Michael.
#6 lore raw
Quoted 5 lines · Michael Buesch
Quoted 2 lines · On Monday 01 June 2009 23:47:06 matthieu castet wrote:

Ok but what prevent b43 to support core 4 chip with v4 firmware like the broadcom driver does ? I am aware that the current driver doesn't support it, but what are the missing part to support it ?

Recent broadcom drivers do not support <=rev4 anymore.

Which one ?
4.178.10.4 seem to support them [1].

attached is a patch that remove support for old core for b43.

[1]
$readelf -s wl_ap.o|grep -e d11.*4$

  1261: 0000b8d0  2952 OBJECT  GLOBAL DEFAULT    5 d11lp0initvals14
  1406: 0000c458   288 OBJECT  GLOBAL DEFAULT    5 d11lp0bsinitvals14
  1516: 0000ee88 20128 OBJECT  GLOBAL DEFAULT    5 d11ucode4
  1520: 000018f8  3720 OBJECT  GLOBAL DEFAULT    5 d11b0g0initvals4
  1577: 0002f13c 30992 OBJECT  GLOBAL DEFAULT    5 d11ucode14
  1614: 00048060  1312 OBJECT  GLOBAL DEFAULT    5 d11pcm4
  1809: 00003640    56 OBJECT  GLOBAL DEFAULT    5 d11a0g0bsinitvals4
  1899: 00002780    56 OBJECT  GLOBAL DEFAULT    5 d11b0g0bsinitvals4
  1920: 000027b8  3720 OBJECT  GLOBAL DEFAULT    5 d11a0g0initvals4
drivers/net/wireless/b43/dma.c +0 -3
index eae680b..c93f5c0 100644
@@ -1083,9 +1083,6 @@ int b43_dma_init(struct b43_wldev *dev)
 	if (!dma->rx_ring)
 		goto err_destroy_mcast;
 
-	/* No support for the TX status DMA ring. */
-	B43_WARN_ON(dev->dev->id.revision < 5);
-
 	b43dbg(dev->wl, "%u-bit DMA initialized\n",
 	       (unsigned int)type);
 	err = 0;
drivers/net/wireless/b43/main.c +19 -67

171 lines not on this page · raw message

drivers/net/wireless/b43/phy_common.c +0 -2
index e176b6e..8cfc85b 100644
@@ -168,7 +168,6 @@ void b43_phy_lock(struct b43_wldev *dev)
 	B43_WARN_ON(dev->phy.phy_locked);
 	dev->phy.phy_locked = 1;
 #endif
-	B43_WARN_ON(dev->dev->id.revision < 3);
 
 	if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP))
 		b43_power_saving_ctl_bits(dev, B43_PS_AWAKE);
@@ -180,7 +179,6 @@ void b43_phy_unlock(struct b43_wldev *dev)
 	B43_WARN_ON(!dev->phy.phy_locked);
 	dev->phy.phy_locked = 0;
 #endif
-	B43_WARN_ON(dev->dev->id.revision < 3);
 
 	if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP))
 		b43_power_saving_ctl_bits(dev, 0);
#7 lore raw
In reply to Matthieu CASTET
Quoted 1 line · On Friday 29 May 2009 21:19:23 Matthieu CASTET wrote:

In the latter case why code for older chip (<5) is not removed from the driver ?

Nobody cares to do so.

Signature · 1 line
Greetings, Michael.