LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Broadcom Wireless driver on kernel 2.6.35 (https://www.linuxquestions.org/questions/linux-networking-3/broadcom-wireless-driver-on-kernel-2-6-35-a-827646/)

rengo.Java 08-21-2010 10:46 AM

Broadcom Wireless driver on kernel 2.6.35
 
Hi all!!
Im trying to compile the Broadcom Wireless driver in the 2.6.35.2 kernel
(on a Slackware 13.1 64bits)
the driver Im using is the Broadcom STA driver (here)

My problem is when I run 'make' I get:

Code:

/home/user/driver/src/wl/sys/wl_iw.c:2134: error: unknown field 'num_private' specified in initializer
/home/user/driver/src/wl/sys/wl_iw.c:2134: warning: initialization makes pointer from integer without a cast
/home/user/driver/src/wl/sys/wl_iw.c:2135: error: unknown field 'num_private_args' specified in initializer
/home/user/driver/src/wl/sys/wl_iw.c:2135: warning: excess elements in struct initializer
/home/user/driver/src/wl/sys/wl_iw.c:2135: warning: (near initialization for 'wl_iw_handler_def')
/home/user/driver/src/wl/sys/wl_iw.c:2137: error: unknown field 'private' specified in initializer
/home/user/driver/src/wl/sys/wl_iw.c:2137: warning: initialization makes integer from pointer without a cast
/home/user/driver/src/wl/sys/wl_iw.c:2137: error: initializer element is not computable at load time
/home/user/driver/src/wl/sys/wl_iw.c:2137: error: (near initialization for 'wl_iw_handler_def.num_standard')
/home/user/driver/src/wl/sys/wl_iw.c:2138: error: unknown field 'private_args' specified in initializer
/home/user/driver/src/wl/sys/wl_iw.c:2138: warning: initialization from incompatible pointer type
/home/user/driver/src/wl/sys/wl_iw.c:2140: error: 'wl_get_wireless_stats' undeclared here (not in a function)
make[2]: *** [/home/user/driver/src/wl/sys/wl_iw.o] Error 1
make[1]: *** [_module_/home/user/driver] Error 2
make[1]: Leaving directory '/usr/src/linux-2.6.35.2'
make: *** [all] Error 2

Here is the code of the file:
Code:

const struct iw_handler_def wl_iw_handler_def =
{
        .num_standard = ARRAYSIZE(wl_iw_handler),
        .num_private = ARRAY_SIZE(wl_iw_priv_handler),
        .num_private_args = ARRAY_SIZE(wl_iw_priv_args),
        .standard = (iw_handler *) wl_iw_handler,
        .private = wl_iw_priv_handler,
        .private_args = wl_iw_priv_args,
        get_wireless_stats: wl_get_wireless_stats,
        };

When I compiled this same driver in the 2.6.33 kernel, works fine (on the same pc and SO version)
what is happening? Any help please?

Thanks!

Peacedog 08-21-2010 01:09 PM

Hi rengo.Java, Welcome to LQ. Did you try applying either of the patches that are on that page for kernels above 2.6.33? Have a look at the last two downloads.

Good luck. ;-)

rengo.Java 08-21-2010 03:13 PM

Hi Peacedog!
Sorry, I forget to say that I patched the driver using those files.
But still I get the error.

Thanks!

Peacedog 08-21-2010 07:08 PM

The documentation states the driver is only tested on 2.6.32 or <. You might contact the developers.

Good luck. ;-)

rengo.Java 08-21-2010 10:17 PM

Thanks!
I will do that.

thanks for the replies!

piratesmack 08-21-2010 11:28 PM

The broadcom sta driver compiles fine for me on kernel 2.6.35.3 (also worked with .2). I did need to apply those two patches though.

Can you post your kernel .config?

exvor 08-22-2010 08:20 PM

I am also getting these errors when trying to compile this driver. However I was getting the WIRELESS_EXT error before that and fixed it by including linux/wireless.h which seams to be a new header definition or something I am unsure. It seams the kernel devs are trying there best to screw up the wireless crap these days.


I am currently in the process of trying to figure out why were getting unknown field errors, I suspect it has something to do with that include file needing to be included in other header files. Ill get back to yall if I can find a solution. If not then I may just need to go back to kernel 2.6.32 and say the hell with it until the kernel devs settle down or broadcom re-evaluates there driver package.

exvor 08-22-2010 09:03 PM

I have figured this out and its a strange problem indeed.

Ok in order to fix this driver so that it will compile in a 2.6.35.3 kernel you need to make sure you have something compiled into your kernel and edit one of the files.

First off you need to edit src/wl/sys/wl_linux.c

You need to add
#include <linux/wireless.h>

You can either add it at the very top before any of the if stuff or below #include <wlc_key.h> like I did.


Second thing you need to do is make sure you have CONFIG_WIRELESS_EXT=y in your .config before you compile the kernel. Note that this option is no longer visible on the menuconfig and will not enable by default. If you dont want to manually edit your file just enable one of the older wireless drivers like the intel prowirelss ip2001 or something. When you tell the kernel to include this it will enable wireless extensions.

For some reason they only enable these if you are compileing another older wireless driver and only allow you to enable extensions in the sysfs interface. Probably just overlooked by someone but at least you can get it working by doing this.


I hope this helps and if your sill having issues please respond and we can help you out.

:)

rengo.Java 08-30-2010 08:06 AM

Hi exvor.
I add what you said (linux/wireless.h and wlc_key.h) but now i get this:

Code:

myhome@notebook:driver$ sudo make
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-2.6.35.3'
  CC [M]  driver/src/wl/sys/wl_linux.o
In file included from driver/src/wl/sys/wl_linux.c:20:
driver/src/wl/sys/wlc_key.h:21: error: expected specifier-qualifier-list before ‘uint32’
driver/src/wl/sys/wlc_key.h:28: error: field ‘ea’ has incomplete type
driver/src/wl/sys/wlc_key.h:29: error: expected specifier-qualifier-list before ‘uint8’
driver/src/wl/sys/wl_linux.c: In function ‘wl_tkip_keyset’:
driver/src/wl/sys/wl_linux.c:1943: error: ‘wsec_key_t’ has no member named ‘len’
driver/src/wl/sys/wl_linux.c:1945: error: ‘wsec_key_t’ has no member named ‘algo’
driver/src/wl/sys/wl_linux.c:1964: error: ‘wsec_key_t’ has no member named ‘len’
driver/src/wl/sys/wl_linux.c:1965: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1968: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1969: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1972: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1975: error: ‘wsec_key_t’ has no member named ‘rxiv’
driver/src/wl/sys/wl_linux.c:1976: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:1977: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:1977: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:1978: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:1979: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:1979: error: ‘wsec_key_t’ has no member named ‘len’
driver/src/wl/sys/wl_linux.c:1980: error: ‘wsec_key_t’ has no member named ‘rxiv’
driver/src/wl/sys/wl_linux.c:1980: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1984: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1986: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1987: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:1992: error: ‘wsec_key_t’ has no member named ‘len’
driver/src/wl/sys/wl_linux.c:1996: error: ‘wsec_key_t’ has no member named ‘id’
driver/src/wl/sys/wl_linux.c:2002: error: ‘wsec_key_t’ has no member named ‘rxiv’
driver/src/wl/sys/wl_linux.c:2003: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:2004: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:2004: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:2005: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:2006: error: ‘wsec_key_t’ has no member named ‘data’
driver/src/wl/sys/wl_linux.c:2006: error: ‘wsec_key_t’ has no member named ‘len’
driver/src/wl/sys/wl_linux.c:2007: error: ‘wsec_key_t’ has no member named ‘rxiv’
make[2]: *** [driver/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_driver] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.35.3'

the line 20 of the src/wl/sys/wl_linux.c file is the "#include wlc_key.h" line

Regards!

exvor 08-30-2010 07:35 PM

You need to make sure that you have TKIP encryption compiled into your kernel or at least have it compiled as a module. This looks as to why your getting this message.

Note: The encryption stuff for wireless and other things is not located in the wireless or driver area of the menuconfig. it is located in security options on the main screen.

rengo.Java 09-02-2010 08:21 PM

Sorry, I search in the .config file and don't see any reference to "TKIP" :(
Besides, I add a lot of modules of the security options menu, but the result is the same.

I guess that the point is in this lines:

Quote:

driver/src/wl/sys/wlc_key.h:21: error: expected specifier-qualifier-list before ‘uint32’
driver/src/wl/sys/wlc_key.h:28: error: field ‘ea’ has incomplete type
driver/src/wl/sys/wlc_key.h:29: error: expected specifier-qualifier-list before ‘uint8’
My question is, why in the 2.6.33 kernel it compiles but not with the 2.6.35?

rengo.Java 09-03-2010 05:03 PM

It works!
you right exvor. I recompiled my kernel with the IEEE 802.11 for HostAP(Prism2/2.5/3 and WEP/TKIP/CCMP) option and it compile!

Thanks a lot!
You are my new hero haha

Thanks to all!

extendon 10-31-2010 02:08 PM

having the same problem with 2.6.34-12
 
Hi guys

I have added all the include files, checked .config for the WIRELESS_EXT parameter but it still gives me:
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-2.6.34-12-obj/i386/desktop'
LD /home/extendon/Downloads/hybrid_wl/built-in.o
CC [M] /home/extendon/Downloads/hybrid_wl/src/shared/linux_osl.o
CC [M] /home/extendon/Downloads/hybrid_wl/src/wl/sys/wl_linux.o
/home/extendon/Downloads/hybrid_wl/src/wl/sys/wl_linux.c: In function ‘_wl_set_multicast_list’:
/home/extendon/Downloads/hybrid_wl/src/wl/sys/wl_linux.c:1452:3: warning: assignment from incompatible pointer type
/home/extendon/Downloads/hybrid_wl/src/wl/sys/wl_linux.c:1452:3: error: ‘struct netdev_hw_addr’ has no member named ‘next’
make[4]: *** [/home/extendon/Downloads/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make[3]: *** [_module_/home/extendon/Downloads/hybrid_wl] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.34-12-obj/i386/desktop'
make: *** [all] Error 2

any help will be appreciated.

JazzItSelf 04-01-2011 01:59 PM

I know this is 6 months old, but I'll just add a +1 here. The mentioned patches, plus the added include, plus adding an older driver in my kernel (to get the CONFIG_WIRELESS_EXT=y into the .config) allowed me to compile and use the driver on kernel 2.6.37.5.

Thanks,
--Cp

Quote:

Originally Posted by exvor (Post 4074568)
...

First off you need to edit src/wl/sys/wl_linux.c

You need to add
#include <linux/wireless.h>

...

Second thing you need to do is make sure you have CONFIG_WIRELESS_EXT=y in your .config before you compile the kernel. Note that this option is no longer visible on the menuconfig and will not enable by default. If you dont want to manually edit your file just enable one of the older wireless drivers like the intel prowirelss ip2001 or something. When you tell the kernel to include this it will enable wireless extensions.
...


exvor 08-21-2011 02:31 AM

Sorry if I am necro on this old thread but I wanted to get back with this adapter and let you guys know that you shouldn't have to do any of this crazy voodo anymore. You just need to enable staging drivers in the kernel and make sure you have 4 of the firmware files somewhere the kernel can find them /usr/lib/firmware I think.

There is a broadcom driver listed in the those staging drivers that works really well. You can of course still use broadcom-wl drivers as they work a bit better with tkip I believe, but your a bit on your own on getting them working well with newer kernels. Broadcom may be slaking off a bit now since the kernel devs have a working driver in the staging area.


All times are GMT -5. The time now is 09:50 PM.