Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 459208

Summary: net-wireless/broadcom-sta-5.100.82.112-r2 fails to compile against sys-kernel/gentoo-sources-3.8.0
Product: Gentoo Linux Reporter: Maxim Polunin <m.n.polunin+gentoo>
Component: [OLD] LibraryAssignee: M. B. <tomboy64>
Status: RESOLVED FIXED    
Severity: normal CC: asl, bkohler, proxy-maint, zerochaos, ziebell_marco
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 468388    
Attachments: emerge log
possible patch
broadcom-sta-5.100.82.112-linux-3.8.patch

Description Maxim Polunin 2013-02-25 20:43:12 UTC
net-wireless/broadcom-sta-5.100.82.112-r2 fails to compile against sys-kernel/gentoo-sources-3.8.0 on my amd64 laptop:

  CC [M]  /var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.o
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c: In function 'wl_cfg80211_join_ibss':
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:745:26: error: 'struct cfg80211_ibss_params' has no member named 'channel'
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c: At top level:
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:1644:2: warning: initialization from incompatible pointer type [enabled by default]
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:1644:2: warning: (near initialization for 'wl_cfg80211_ops.scan') [enabled by default]
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:1649:2: warning: initialization from incompatible pointer type [enabled by default]
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:1649:2: warning: (near initialization for 'wl_cfg80211_ops.set_tx_power') [enabled by default]
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:1650:2: warning: initialization from incompatible pointer type [enabled by default]
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:1650:2: warning: (near initialization for 'wl_cfg80211_ops.get_tx_power') [enabled by default]
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c: In function 'wl_update_bss_info':
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:2077:11: error: 'struct cfg80211_bss' has no member named 'information_elements'
/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r2/work/src/wl/sys/wl_cfg80211.c:2078:15: error: 'struct cfg80211_bss' has no member named 'len_information_elements'

Full emerge log and possible patch to be attached

Reproducible: Always
Comment 1 Maxim Polunin 2013-02-25 20:44:19 UTC
Created attachment 340112 [details]
emerge log
Comment 2 Maxim Polunin 2013-02-25 20:45:28 UTC
Created attachment 340114 [details, diff]
possible patch
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-27 14:12:33 UTC
> maintainer-needed@gentoo.org

This package currently has no maintainer, it may take some time for this package to be fixed; probably once a developer that uses broadcom-sta switches to 3.8.0 and experiences this as well.

> possible patch

Hmm, did you just found this or did you try it and confirmed whether it works?
Comment 4 Maxim Polunin 2013-02-27 16:55:56 UTC
>> possible patch
> Hmm, did you just found this or did you try it and confirmed whether it works?
I've just fixed compilation errors and added old patch to fix kernel panic in wl_cfg80211_scan.
Works for me.
Comment 5 Pacho Ramos gentoo-dev 2013-02-27 21:04:46 UTC
What complementary patch are you applying also? Is there a bug for that panic issue?
Comment 6 Maxim Polunin 2013-02-28 04:11:51 UTC
Actually I don't remember where I did get this wl_cfg80211_scan patch from.
It seems there are no gentoo bug.

What I can google for (by "wl_cfg80211_scan kernel panic") is https://bugzilla.rpmfusion.org/show_bug.cgi?id=2526 describing the issue and having exactly the same patch I used to apply (see "Patch fixing the issue" attachement). The only difference is that I've added
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
to it.
Comment 7 Maxim Polunin 2013-02-28 05:17:13 UTC
Double-checked the patch attached, it is missing '#ifdef' for linux version in functions. Can provide new one if someone needs it to work with kernel<3.8.0 (which I doubt:))
Comment 8 Pacho Ramos gentoo-dev 2013-02-28 07:35:53 UTC
It's much better to make it work with as much kernel versions as possible as it's a bit difficult to ensure people will build AND RUN it on desired kernel

Thanks
Comment 9 Maxim Polunin 2013-03-01 19:18:57 UTC
Created attachment 340682 [details, diff]
broadcom-sta-5.100.82.112-linux-3.8.patch

Added '#ifdef' to support pre-3.8 kernels
Comment 10 Ben Kohler gentoo-dev 2013-03-07 17:53:24 UTC
This might be a good time to add epatch_user to make these issues a bit easier for end-users to apply workarounds until the maintainer has time to find/add the proper backwards-compatible patches.
Comment 11 Sergey Popov gentoo-dev 2013-03-08 05:00:06 UTC
+  08 Mar 2013; Sergey Popov <pinkbyte@gentoo.org>
+  broadcom-sta-5.100.82.112-r2.ebuild:
+  Add epatch_user, as suggested by Ben Kohler in bug #459208
Comment 12 Jakub Novak 2013-04-08 12:06:29 UTC
I confirm that patch in attachment 340682 [details, diff] works for me, thanks
Gentoo (amd64) on Acer Aspire 5755G
Comment 13 Rick Farina (Zero_Chaos) gentoo-dev 2013-04-08 14:27:12 UTC
(In reply to comment #9)
> Created attachment 340682 [details, diff] [details, diff]
> broadcom-sta-5.100.82.112-linux-3.8.patch
> 
> Added '#ifdef' to support pre-3.8 kernels

I don't mean to look a gift horse in the mouth, but can you please separate these patches into 1 for the scan fix and 1 for the 3.8 build fix?  I'll get this moved into the tree if you do.
Comment 15 Marco Ziebell 2013-04-17 21:36:36 UTC
If you make any changes to this package you could consider this one too.

https://bugs.sabayon.org/show_bug.cgi?id=3779
Comment 16 M. B. 2013-05-03 00:07:51 UTC
Now even compiles against 3.9.0. Weeeeeeeeee!
Thanks for reporting it.
It should hit upstream as soon as a dev commits it. Please refer to #438622 for further details.

Until then, get them from my overlay; tbc in layman.
Comment 17 Rick Farina (Zero_Chaos) gentoo-dev 2013-05-03 04:39:10 UTC
As stated above, if someone has split the patch I'll be happy to commit it...
Comment 18 M. B. 2013-05-03 10:14:14 UTC
broadcom-sta-5.100.82.112-linux-3.8.patch in bug #468388 contains the sole fix for making it work with 3.8.
Comment 19 Rick Farina (Zero_Chaos) gentoo-dev 2013-05-03 11:20:19 UTC
That's great, now what about the extra functionality described in https://bugs.gentoo.org/show_bug.cgi?id=459208#c6 ?
Comment 20 M. B. 2013-05-03 11:43:22 UTC
included in the same bug as net-wireless/broadcom-sta-5.100.82.112-linux-3.6.patch.
Comment 21 Rick Farina (Zero_Chaos) gentoo-dev 2013-05-04 01:52:33 UTC
(In reply to comment #20)
> included in the same bug as
> net-wireless/broadcom-sta-5.100.82.112-linux-3.6.patch.

Yes, and that's why I'm not accepting it.  Please reread comment 13.
Comment 22 Marco Ziebell 2013-07-30 12:00:47 UTC
The patch is already in the tree, so this report can be closed
Comment 23 Pacho Ramos gentoo-dev 2013-08-23 11:16:26 UTC
(In reply to MJJoker from comment #22)
> The patch is already in the tree, so this report can be closed