Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296920 - sys-kernel/gentoo-sources-2.6.32: compile error with CONFIG_RTL8187SE and CONFIG_MAC80211
Summary: sys-kernel/gentoo-sources-2.6.32: compile error with CONFIG_RTL8187SE and CON...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-12-14 18:52 UTC by Marshall Banana
Modified: 2010-02-19 17:22 UTC (History)
0 users

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


Attachments
dirty patch (fix.patch,13.71 KB, patch)
2009-12-15 01:42 UTC, George Kadianakis (RETIRED)
Details | Diff
Patch to avoid kernel compile errors (rtl8187se.patch,7.97 KB, text/plain)
2009-12-15 15:31 UTC, George Kadianakis (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marshall Banana 2009-12-14 18:52:59 UTC
when both options CONFIG_RTL8187SE and CONFIG_MAC80211 are set, make fails with the following error (worked in 2.6.31-r6):

#> make               
  CHK     include/linux/version.h     
  CHK     include/linux/utsrelease.h  
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh      
  CHK     include/linux/compile.h       
  LD      vmlinux.o                     
net/built-in.o: In function `ieee80211_wake_queue':
(.text+0xde67e): multiple definition of `ieee80211_wake_queue'
drivers/built-in.o:(.text+0x188f6b): first defined here       
net/built-in.o: In function `ieee80211_rx':                   
(.text+0xda39b): multiple definition of `ieee80211_rx'        
drivers/built-in.o:(.text+0x18b47b): first defined here       
net/built-in.o: In function `ieee80211_stop_queue':           
(.text+0xdda26): multiple definition of `ieee80211_stop_queue'
drivers/built-in.o:(.text+0x1870a3): first defined here       
make: *** [vmlinux.o] Error 1                                 




Reproducible: Always

Steps to Reproduce:
1. set:
-> Networking support
 │ -> Wireless
 │ │ -> Generic IEEE 802.11 Networking Stack (mac80211)
2. set:
-> Device Drivers
 │ -> Staging driver
 │ │ -> RealTek RTL8187SE Wireless LAN NIC driver

3. hell breaks loose ;-)

Actual Results:  
make fails with
net/built-in.o: In function `ieee80211_wake_queue':
(.text+0xde67e): multiple definition of `ieee80211_wake_queue'
drivers/built-in.o:(.text+0x188f6b): first defined here       
net/built-in.o: In function `ieee80211_rx':                   
(.text+0xda39b): multiple definition of `ieee80211_rx'        
drivers/built-in.o:(.text+0x18b47b): first defined here       
net/built-in.o: In function `ieee80211_stop_queue':           
(.text+0xdda26): multiple definition of `ieee80211_stop_queue'
drivers/built-in.o:(.text+0x1870a3): first defined here       
make: *** [vmlinux.o] Error 1                                 



Expected Results:  
make builds kernel
Comment 1 Marshall Banana 2009-12-14 19:14:38 UTC
CONFIG_MAC80211 is not needed though for the RTL8187SE staging driver to work (in 2.6.32... not sure right now about 2.6.31-* if it was needed there)
Comment 2 George Kadianakis (RETIRED) gentoo-dev 2009-12-15 01:36:03 UTC
Thanks for spotting this bug Marshall Banana!

I passed it upstream to the linux-wireless gentlemen:
http://article.gmane.org/gmane.linux.kernel.wireless.general/44483
Comment 3 George Kadianakis (RETIRED) gentoo-dev 2009-12-15 01:42:14 UTC
Created attachment 213056 [details, diff]
dirty patch

Attached you will find a *really* *really* dirty hotfix for your problem.
I have not compiled or tested it and I'm really not sure whether it will work.

It's basically three sed commands ran on the rtl8187se directory to rename the defective functions to something a bit more unique to avoid collisions.
I really can't stress how dirty and awful it is (sed renamed 5-6 functions that were not defective but matched the regexp) but it *may* get the job done 'till upstream gets to it.
Comment 4 Marshall Banana 2009-12-15 02:56:16 UTC
<snip>
> Attached you will find a *really* *really* dirty hotfix for your problem.
> I have not compiled or tested it and I'm really not sure whether it will work.
<snip>

please bear with me if i won't compile/test that "dirtfix" right now either.
since i don't actually need mac80211 right now, i took the easy way and just removed that option momentarily (didn't try compiling it as module), waiting for upstream to fix it...
Comment 5 George Kadianakis (RETIRED) gentoo-dev 2009-12-15 15:31:34 UTC
Created attachment 213090 [details]
Patch to avoid kernel compile errors

Hello, could you try patching your 2.6.32 kernel with the attached patch and see if it compiles and runs fine?
Comment 6 Marshall Banana 2009-12-16 21:26:56 UTC
(In reply to comment #5)
> Created an attachment (id=213090) [details]
> Patch to avoid kernel compile errors
> 
> Hello, could you try patching your 2.6.32 kernel with the attached patch and
> see if it compiles and runs fine?
> 

ok, so i don't have to work on my projects i procrastinated a bit by trying it and so far it is working fine...

one question though: in what circumstances are the wake_queue and stop_queue functions called, so i know how to test if those work properly?
Comment 7 George Kadianakis (RETIRED) gentoo-dev 2009-12-16 22:23:51 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Created an attachment (id=213090) [details] [details]
> > Patch to avoid kernel compile errors
> > 
> > Hello, could you try patching your 2.6.32 kernel with the attached patch and
> > see if it compiles and runs fine?
> > 
> 
> ok, so i don't have to work on my projects i procrastinated a bit by trying it
> and so far it is working fine...
> 
> one question though: in what circumstances are the wake_queue and stop_queue
> functions called, so i know how to test if those work properly?
> 

Unfortunately, I cannot help you with that 'cause my knowledge is quite limited.

As far as I know, wake_queue and stop_queue are referring to the netif queue. They are  used to wake and stop the queue accordingly when needed, like when the interface can't take any more data (whatever the reason) or when flow control is enforced.

You could try sending a message to the kernelnewbies [1] mailing list and you will get a reply soon enough :)

Thanks for testing the patch.
This bug report is gonna stay open 'till the patch gets approved from upstream and gets added to the genpatches SVN trunk.

[1]: http://kernelnewbies.org/ML
Comment 8 George Kadianakis (RETIRED) gentoo-dev 2009-12-16 23:33:12 UTC
Patches submitted upstream:
http://driverdev.linuxdriverproject.org/pipermail/devel/2009-December/003419.html
Comment 9 Mike Pagano gentoo-dev 2010-02-19 17:22:29 UTC
Released in gentoo-sources-2.6.32-r6