Problem compiling BCM Wireless driver on 2.6.37 (lib80211 symbol issue)

Shreyansh Jain shrey.linux at gmail.com
Sun Mar 20 11:34:21 EDT 2011


Dear List,

I recently compiled and booted up the 2.6.37 kernel on my Ubuntu
(10.04), from 2.6.36.1. I have been trying to compile the Broadcom
Wireless driver on 2.6.37, after making some changes in the source
code. Just to add, this driver has been working fine on 2.6.36.1 which
my machine ran earlier.

---8<---
$> uname -a
Linux Tiger-L 2.6.37 #2 SMP Thu Mar 3 22:45:04 IST 2011 i686 GNU/Linux
$> lspci | grep Broadcom
03:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
---8<---

I have been trying to compile the Broadcom driver
hybrid-portsrc-x86_32-v5.60.48.36.tar.gz, which I got from Broadcom
website. [ It is quite possible that newer version is available on the
same website, but I intend to get this version up, if possible.]

This driver requires the 80211 Library kernel module (lib80211.ko) to
be loaded as it accesses the security (crypto) algo functions which
are available in this library. Thus:

---8<---
$> modprobe lib80211
$> lsmod | grep lib80211
lib80211                5058  0
---8<---

Then, I made some changes in the code (as the code base was not
getting directly compiled on this new kernel). I have attached the
patch with this email in case that is required. Furtheron, on
compiling the module, following is what I get:

---8<--- (in the driver directory)
$> make clean
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]: Entering directory `/opt/kernels/linux-2.6.37'
  CLEAN   /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/.tmp_versions
  CLEAN   /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/Module.symvers
make[1]: Leaving directory `/opt/kernels/linux-2.6.37'
$> make
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/opt/kernels/linux-2.6.37'
  LD      /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/built-in.o
  CC [M]  /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/src/shared/linux_osl.o
  CC [M]  /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/src/wl/sys/wl_linux.o
  CC [M]  /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/src/wl/sys/wl_iw.o
  LD [M]  /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "lib80211_get_crypto_ops"
[/home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.ko]
undefined!
  CC      /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.mod.o
  LD [M]  /home/shrey/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37/wl.ko
make[1]: Leaving directory `/opt/kernels/linux-2.6.37'
---8<---

On searching for the lib80211_get_crypto_ops symbol:

---8<---
$> cat /proc/kallsyms | grep lib80211_get_crypto_ops
f826273c r __ksymtab_lib80211_get_crypto_ops	[lib80211]
f82627b4 r __kstrtab_lib80211_get_crypto_ops	[lib80211]
f826278c r __kcrctab_lib80211_get_crypto_ops	[lib80211]
f8262020 T lib80211_get_crypto_ops	[lib80211] <<<#####
$>
$> zcat /proc/config.gz | grep -i lib80211
CONFIG_LIB80211=m                                             <<<#####
CONFIG_LIB80211_CRYPT_WEP=m
CONFIG_LIB80211_CRYPT_CCMP=m
CONFIG_LIB80211_CRYPT_TKIP=m
# CONFIG_LIB80211_DEBUG is not set
$>
---8<---

This is what I get when I inserted the kernel:

---8<---
$> sudo insmod ./wl.ko
[sudo] password for shrey:
insmod: error inserting './wl.ko': -1 Invalid parameters
shrey at Tiger-L:~/work/Things_for_Wifi_on_Linux/wifi_driver_broadcom_2.6.37$
dmesg | tail | grep wl
[ 1025.190669] wl: no symbol version for lib80211_get_crypto_ops
[ 1025.190674] wl: Unknown symbol lib80211_get_crypto_ops (err -22)
$>
---8<---

As far as I understand the symbol for lib80211_get_crypto_ops function
is available is exported:

---8<---
251     return alg->ops;
252 }
253 EXPORT_SYMBOL(lib80211_get_crypto_ops);
254
255 static void *lib80211_crypt_null_init(int keyidx)
256 {
257     return (void *)1;
"net/wireless/lib80211.c" 284 lines --89%--
---8<---

and hence, it should be available to my module on request. I am not
sure what is happening or where should I look next. Can anyone on the
list point me out as to what I could be missing. Also, initially the
compilation was giving issues about MODULE_LICENSE not being GPL,
which I explicitly did by adding in the code (that is not part of the
patch I have attached). I don't think that would affect this situation
as the symbol lib80211_get_crypto_ops is not restricted to GPL modules
only.

Any help would be deeply appreciated.

TIA,
Shreyansh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcm_driver_2.6.37.patch
Type: text/x-patch
Size: 2173 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110320/55d42f24/attachment.bin 


More information about the Kernelnewbies mailing list