Bug 673054

Summary: Symlinks /lib/firmware/brcm/bcm43xx-0.fw and /lib/firmware/brcm/bcm43xx_hdr-0.fw are missing from the package kernel-firmware
Product: [openSUSE] openSUSE 11.4 Reporter: Zsolt Sági <novell.admin>
Component: KernelAssignee: Greg Kroah-Hartman <gregkh>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: forgotten_vrBbBW-brJ
Version: RC 1   
Target Milestone: ---   
Hardware: All   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: License of Broadcom's wl driver

Description Zsolt Sági 2011-02-17 16:01:59 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b10) Gecko/20110121 Firefox/4.0b10

My Broadcom BCM4313 WiFi card (14e4:4727) doesn't work with openSUSE 11.4 RC1 because the firmware package (brcm80211-firmware-*-*.noarch.rpm) is not part of openSUSE 11.4 RC1. However, installing http://download.opensuse.org/repositories/driver:/wireless/openSUSE_11.3/noarch/brcm80211-firmware-0.610.809.0-1.1.noarch.rpm makes my card work. Please include an equivalent package in openSUSE 11.4.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



https://bugzilla.novell.com/show_bug.cgi?id=656642#c7
https://bugzilla.novell.com/show_bug.cgi?id=656642#c9
https://bugzilla.novell.com/show_bug.cgi?id=656642#c11
Comment 1 Greg Kroah-Hartman 2011-02-17 16:32:49 UTC
No separate firmware pack is needed, it is contained in the main kernel-firmware package instead.  Please install that and you should be fine.
Comment 2 Zsolt Sági 2011-02-18 10:39:55 UTC
(In reply to comment #1)
> No separate firmware pack is needed, it is contained in the main
> kernel-firmware package instead.  Please install that and you should be fine.

That definitely does not work. Some necessary files (symlinks) are missing from the kernel-firmware package. Namingly the following:

bcm43xx-0.fw -> bcm43xx-0-610-809-0.fw
bcm43xx_hdr-0.fw -> bcm43xx_hdr-0-610-809-0.fw

(And probably LICENCE.broadcom_bcm43xx ;-)
Comment 3 Zsolt Sági 2011-02-18 10:42:13 UTC
kernel-firmware package is lacking some necessary symlinks (And in addition the whole package is missing from the sefault install of openSUSE 11.4: https://bugzilla.novell.com/show_bug.cgi?id=673295 )
Comment 4 Greg Kroah-Hartman 2011-02-19 00:58:43 UTC
Those symlinks are not in the main linux-firmware package upstream, why are they needed here?
Comment 5 Zsolt Sági 2011-02-19 06:19:48 UTC
(In reply to comment #4)
> Those symlinks are not in the main linux-firmware package upstream, why are
> they needed here?

According to my experiences the brcm80211 driver (at least in the kernel of 11.4 rc1) wants to load its firmware following those symlinks. If the links are not there, the driver gets loaded but complains  about the lack of firmware and is unable to drive the card.
Comment 6 Zsolt Sági 2011-02-21 11:30:10 UTC
(In reply to comment #4)
> Those symlinks are not in the main linux-firmware package upstream, why are
> they needed here?

This is the actual error message from dmesg:

brcm80211: fail to load firmware brcm/bcm43xx-0.fw
brcm80211: Failed to find firmware usually in /lib/firmware/brcm
Comment 7 Forgotten User vrBbBW-brJ 2011-02-21 16:35:44 UTC
Had a similar problem with another Broadcom WiFi card (I hope we are all talking about PCI, not USB here), but /var/log/messages contained instructions on how to fix it, namely to execute a script (the name of which was mentioned there) that (with a running connection to the net!) would download a closed source driver, cut out the relevant firmware from that and store it in /lib/firmware. I needed to reboot afterwards to actually get WiFi to run, just trying to set up a connection again was not sufficient to make the driver use the newly obtained firmware.

Actually, this seems to be the only reasonable way to do that: The firmware stuff is NOT free (and thus should not be available in any repo), but you can (and have to!) download it somehow. So either you make the user do it all manually (as suggested on the upstream web pages) or you provide him with such a script. Of course it would be nice if there were some kind of dialog during the installation process that told the user about what he has to do; currently it is like waiting for the user to browse the system log after something has been left in a not working state.
Comment 8 Zsolt Sági 2011-02-23 16:31:33 UTC
Created attachment 415792 [details]
License of Broadcom's wl driver

I've found yet another workaround:

Downloaded the "hybrid" driver from
http://www.broadcom.com/support/802.11/linux_sta.php patched it as advised at
http://www.linuxquestions.org/questions/blog/frandalla-68463/patching-802-11-linux-sta-driver-for-kernel-2-6-37-3558/

My patch is actually the following:
####################################################
diff -rupN hybrid_wl.orig//src/wl/sys/wl_linux.c
hybrid_wl//src/wl/sys/wl_linux.c
--- hybrid_wl.orig//src/wl/sys/wl_linux.c       2010-12-15 03:01:09.000000000
+0100
+++ hybrid_wl//src/wl/sys/wl_linux.c    2011-02-23 10:57:47.824372907 +0100
@@ -482,7 +482,11 @@ wl_attach(uint16 vendor, uint16 device,
 #ifdef WL_ALL_PASSIVE
                spin_lock_init(&wl->txq_lock);
 #endif 
+               #ifndef init_MUTEX
+               sema_init(&wl->sem,1);
+               #else
                init_MUTEX(&wl->sem);
+               #endif
        }

        if (!(wl->wlc = wlc_attach((void *) wl, vendor, device, unit,
wl->piomode,
####################################################

Then I compiled it, copied the driver (acutally wl.ko) to some location under
/lib/modules, ran depmod and finally disabled the original driver:

echo 'blacklist brcm80211' >>  /etc/modprobe.d/99-local.conf

And after a restart, my wlan card can join ad-hoc networks and it even works
after suspend/hibernate and resume!

Can you ship openSUSE 11.4 whith this driver instead of brcm80211 somehow? I attached the license of this driver.
Comment 9 Greg Kroah-Hartman 2011-02-23 17:46:22 UTC
(In reply to comment #7)
> Actually, this seems to be the only reasonable way to do that: The firmware
> stuff is NOT free (and thus should not be available in any repo), but you can
> (and have to!) download it somehow. So either you make the user do it all
> manually (as suggested on the upstream web pages) or you provide him with such
> a script. Of course it would be nice if there were some kind of dialog during
> the installation process that told the user about what he has to do; currently
> it is like waiting for the user to browse the system log after something has
> been left in a not working state.

Sorry, but you are referring to the other Broadcom firmware images for older
devices, not this newer firmware for the new, in-kernel driver.  That firmware
_is_ distributable and is in the kernel-firmware package already.
Comment 10 Greg Kroah-Hartman 2011-02-23 17:48:18 UTC
(In reply to comment #8)
> Created an attachment (id=415792) [details]
> License of Broadcom's wl driver
> 
> I've found yet another workaround:
> 
> Downloaded the "hybrid" driver from
> http://www.broadcom.com/support/802.11/linux_sta.php patched it as advised at
> http://www.linuxquestions.org/questions/blog/frandalla-68463/patching-802-11-linux-sta-driver-for-kernel-2-6-37-3558/

That driver is closed source, and we can not include it at all, sorry.

> Can you ship openSUSE 11.4 whith this driver instead of brcm80211 somehow? I
> attached the license of this driver.

No, it is not allowed to be distributed.  Use the in-kernel driver instead.

This bug is just for the simple issue of creating a symlink in the firmware
package to allow the driver to find the firmware properly, don't switch to
a whole new driver just for this reason.  You can fix it yourself with a
simple symlink, which is much easier than compiling a whole different, unsupportable driver.
Comment 11 Zsolt Sági 2011-02-23 19:06:42 UTC
(In reply to comment #10)
> That driver is closed source, and we can not include it at all, sorry.

OK,don't mind it.


> You can fix it yourself with a simple symlink

I wouldn't send hundreds of bugreport if I wanted to solve the problem for just myself. If you put those symlinks in the package, every user would be able to use his/her card out of the box (if https://bugzilla.novell.com/show_bug.cgi?id=673295 were fixed too, of course) which would make openSUSE more popular. Create those symlinks in the package, please.
Comment 12 Greg Kroah-Hartman 2011-02-23 19:20:59 UTC
I am currently working on it...
Comment 13 Zsolt Sági 2011-02-23 19:28:09 UTC
(In reply to comment #12)
> I am currently working on it...

Thank you very very much! The world doesn't deserve such a kindness. And I really mean it.
Comment 14 Greg Kroah-Hartman 2011-02-23 23:03:45 UTC
Can you test the kernel-firmware package at:
  https://build.opensuse.org/package/show?package=kernel-firmware&project=home:gregkh:branches:Kernel:HEAD

and let me know if that works or not for you?
Comment 15 Zsolt Sági 2011-02-24 07:01:00 UTC
(In reply to comment #14)
> Can you test the kernel-firmware package at:
>  
> https://build.opensuse.org/package/show?package=kernel-firmware&project=home:gregkh:branches:Kernel:HEAD
> 
> and let me know if that works or not for you?

I may be because of my ignorance but http://download.opensuse.org/repositories/home:/gregkh:/branches:/Kernel:/ seems to be empty for me :(
Comment 16 Greg Kroah-Hartman 2011-02-24 18:40:33 UTC
Sorry, I forgot to publish this repo, it should be at:
  http://download.opensuse.org/repositories/home:/gregkh:/branches:/Kernel:/HEAD/
now.

If not, please let me know.
Comment 17 Zsolt Sági 2011-02-24 20:09:06 UTC
(In reply to comment #14)
> Can you test the kernel-firmware package at:
>  
> https://build.opensuse.org/package/show?package=kernel-firmware&project=home:gregkh:branches:Kernel:HEAD
> 
> and let me know if that works or not for you?

Yes, it works perfectly. However, I'm afraid (but as a layman I'm not sure) that still there is something to prevent it (and probably other hardware, too) from working really out of the box:

https://bugzilla.novell.com/show_bug.cgi?id=673295

Is it really invalid? It didn't get installed automatically for me, despite I have a hardware which needs it :(
Comment 18 Zsolt Sági 2011-02-24 20:10:12 UTC
Sorry, the needinfo flag. So, THIS bug is surely fixed. Thank you very much.
Comment 19 Greg Kroah-Hartman 2011-02-24 21:54:36 UTC
Thanks for testing, package is submitted to openSUSE:11.4, hopefully it gets accepted in time for final release.
Comment 20 Bernhard Wiedemann 2011-07-12 15:00:23 UTC
This is an autogenerated message for OBS integration:
This bug (673054) was mentioned in
https://build.opensuse.org/request/show/76126 Factory / kernel-firmware
Comment 21 Bernhard Wiedemann 2011-07-21 10:00:30 UTC
This is an autogenerated message for OBS integration:
This bug (673054) was mentioned in
https://build.opensuse.org/request/show/76617 Factory / kernel-firmware
Comment 22 Bernhard Wiedemann 2011-08-14 15:32:04 UTC
This is an autogenerated message for OBS integration:
This bug (673054) was mentioned in
https://build.opensuse.org/request/show/78711 11.4 / kernel-firmware