Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 544138 - net-wireless/broadcom-sta-6.30.223.248 with linux >=4.0 - src/wl/sys/wl_cfg80211_hybrid.c:1455:20: error: ‘STATION_INFO_TX_BITRATE’ undeclared > (first use in this function)
Summary: net-wireless/broadcom-sta-6.30.223.248 with linux >=4.0 - src/wl/sys/wl_cfg80...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 20:00 UTC by mike@marineau.org
Modified: 2015-05-05 17:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
broadcom-sta-6.30.223.248-r3-linux-4.0.patch (broadcom-sta-6.30.223.248-r3-linux-4.0.patch,797 bytes, patch)
2015-03-22 20:00 UTC, mike@marineau.org
Details | Diff
broadcom-sta-6.30.223.248-r3.ebuild.patch (broadcom-sta-6.30.223.248-r3.ebuild.patch,702 bytes, patch)
2015-03-22 20:02 UTC, mike@marineau.org
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mike@marineau.org 2015-03-22 20:00:03 UTC
Created attachment 399496 [details, diff]
broadcom-sta-6.30.223.248-r3-linux-4.0.patch

With linux 4.0-rc the module fails with the following errors:

> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_cfg80211_get_station’:
> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c:1455:20: error: ‘STATION_INFO_TX_BITRATE’ undeclared > (first use in this function)
>    sinfo->filled |= STATION_INFO_TX_BITRATE;
>                     ^
> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c:1455:20: note: each undeclared identifier is reported only once for each function it appears in
> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c:1468:20: error: ‘STATION_INFO_SIGNAL’ undeclared (first use in this function)
>    sinfo->filled |= STATION_INFO_SIGNAL;
>                     ^
> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c: At top level:
> cc1: warning: unrecognized command line option "-Wno-date-time" [enabled by default]
> scripts/Makefile.build:258: recipe for target '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.o' failed

Incompatibility introduced by 319090bf6c75e3ad42a8c74973be5e78ae4f948f
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=319090bf6c75e3ad42a8c74973be5e78ae4f948f
Comment 1 mike@marineau.org 2015-03-22 20:02:10 UTC
Created attachment 399498 [details, diff]
broadcom-sta-6.30.223.248-r3.ebuild.patch
Comment 2 Francisco J. Vazquez 2015-03-24 16:56:46 UTC
Been using a similar patch for a while without problems, so +1 from me.

Also, are the warnings about PREEMPT and PREEMPT_RCU being enabled in-kernel (introduced since bug #488772) still necessary? At least in my system net-wireless/broadcom-sta-6.30.223.248-r3 compiles and works fine with PREEMPT+PREEMPT_RCU in 4.0-rc. The last post from the ubuntu bugzilla [1] also seems to suggest that there shouldn't be any problem with PREEMPT since more than a year ago because the kernel was "fixed"...

[1] https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1156138
Comment 3 Jeff 2015-04-14 16:10:53 UTC
Hi, how to apply this ebuild patch?

I'm currently running Gentoo on a MacBook Air and I can't get this broadcom module to compile.

Thanks!
Comment 4 Joe Kappus 2015-04-17 09:07:47 UTC
Nice catch Francisco!  I just tested removing the preempt warning and building with PREEMPT and PREEMPT_RCU and it's all good.

Please remove the check when this patch makes it into portage.  (patch works fine)
Comment 5 Paul Cox 2015-04-19 18:42:47 UTC
(In reply to Jeff from comment #3)
> Hi, how to apply this ebuild patch?
> 
> I'm currently running Gentoo on a MacBook Air and I can't get this broadcom
> module to compile.
> 
> Thanks!

Here is a forum post about using a local overlay to apply a patch before it's in portage (it's for pavucontrol but should point you in the right direction)

https://forums.gentoo.org/viewtopic-p-7683974.html#7683974
Comment 6 Rafal Kupiec 2015-05-03 18:16:24 UTC
 * Preparing wl module
make -j20 -s HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' -C /usr/src/linux M=/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work wl.ko 
CFG80211 API is prefered for this kernel version
Using CFG80211 API
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c: In function 'wl_cfg80211_get_station':
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c:1455:20: error: 'STATION_INFO_TX_BITRATE' undeclared (first use in this function)
   sinfo->filled |= STATION_INFO_TX_BITRATE;
                    ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c:1455:20: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c:1468:20: error: 'STATION_INFO_SIGNAL' undeclared (first use in this function)
   sinfo->filled |= STATION_INFO_SIGNAL;
                    ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_linux.c:792:1: warning: 'wl_suspend' defined but not used [-Wunused-function]
 wl_suspend(struct device *dev)
 ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_linux.c:824:1: warning: 'wl_resume' defined but not used [-Wunused-function]
 wl_resume(struct device *dev)
 ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.c: At top level:
cc1: warning: unrecognized command line option "-Wno-date-time" [enabled by default]
scripts/Makefile.build:258: recipe for target '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.o' failed
make[1]: *** [/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work/src/wl/sys/wl_cfg80211_hybrid.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: warning: unrecognized command line option "-Wno-date-time" [enabled by default]
Makefile:1559: recipe for target 'wl.ko' failed
make: *** [wl.ko] Error 2
 * ERROR: net-wireless/broadcom-sta-6.30.223.248-r3::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-wireless/broadcom-sta-6.30.223.248-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-wireless/broadcom-sta-6.30.223.248-r3::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-wireless:broadcom-sta-6.30.223.248-r3:20150503-181349.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work'
 * S: '/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r3/work'
Comment 7 Vitaliy 2015-05-04 15:29:06 UTC
confirm, this patch works fine
Comment 8 Mike Pagano gentoo-dev 2015-05-05 17:26:41 UTC
Patch included and ebuild updated. Thank-you to Mike Marineau.