kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: shrey.linux@gmail.com (Shreyansh Jain)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Problem compiling BCM Wireless driver on 2.6.37 (lib80211 symbol issue)
Date: Sun, 20 Mar 2011 21:04:21 +0530	[thread overview]
Message-ID: <AANLkTimaUY9koMsrr=ZFggjz4MSRmGpNUyvmbjkatwwa@mail.gmail.com> (raw)

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 

             reply	other threads:[~2011-03-20 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-20 15:34 Shreyansh Jain [this message]
2011-03-20 15:58 ` Problem compiling BCM Wireless driver on 2.6.37 (lib80211 symbol issue) Greg KH
2011-03-20 18:12   ` Shreyansh Jain
2011-03-20 18:50     ` Greg KH
2011-03-21  8:04       ` Shreyansh Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimaUY9koMsrr=ZFggjz4MSRmGpNUyvmbjkatwwa@mail.gmail.com' \
    --to=shrey.linux@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).