# cant load ipw3945 kernel module

## Kouran

hello,

i just istalled a new gentoo on my notebook with a 2.6.19 kernel. since the latest stable version of ipw3945 use the kernel internal network stack i build the kernel with the stack and the encryption stuff. 

```

Networking --->

<*>   Generic IEEE 802.11 Networking Stack 

    [ ]     Enable full debugging output

    <*>     IEEE 802.11 WEP encryption (802.1x)

    <*>     IEEE 802.11i CCMP support

    <*>     IEEE 802.11i TKIP encryption

    < >     Software MAC add-on to the IEEE 802.11 networking stack

```

after that i emerged the ipw3945 driver + ipw3945d and wireless-tools. so far so good. when i try a 

```

modprobe ipw3945

```

all that is returned is 

```

FATAL: Error inserting ipw3945 (/lib/modules/2.6.19-gentoo-r5/net/wireless/ipw3945.ko): Unknown symbol in module, or unknown parameter (see dmesg)

 * Starting ipw3945d ...

chown: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory

chmod: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory                                                                    [ ok ]

```

if it helps:

```

dmesg | tail

ipw3945: Unknown symbol ieee80211_rx

ipw3945: Unknown symbol ieee80211_get_channel

ipw3945: Unknown symbol ieee80211_channel_to_index

ipw3945: Unknown symbol ieee80211_rx_mgt

ipw3945: Unknown symbol ieee80211_get_geo

ipw3945: Unknown symbol free_ieee80211

ipw3945: Unknown symbol ieee80211_tx_frame

ipw3945: Unknown symbol ieee80211_is_valid_channel

ipw3945: Unknown symbol ieee80211_get_channel_flags

ipw3945: Unknown symbol alloc_ieee80211

```

thx in advance 

kouran

----------

## codergeek42

Try enabling the "Software MAC add-on to the IEEE 802.11 networking stack" option and re-emerge ipw3945 to see if that fixes it.

----------

## Kouran

i tried that, but i got the same fatal error message.

----------

## schiotz

Try building the IEEE stuff as modules.   That sometimes helps.

/Jakob

----------

## bmw

Hello,

   It seems that several people have been encountering this problem.  I've been fighting this myself for some time.  Anyway, if there are any breakthroughs, please let us know.  This is an outline of my system:

gentoo-sources-2.6.29-r5

ipw3945-1.2.0

ipw3945-ucode-1.14.2

ipw3945d-1.7.22-r4

udev-104-r11

Running /etc/init.d/ipw3945d start outputs the following:

```

* Starting ipw3945d ...

chown: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory

chmod: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory                                                                 [ ok ]

```

Naturally, dmesg is the first thing to look at:

```

ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.2.0dmpr

ipw3945: Copyright(c) 2003-2006 Intel Corporation

ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection

ipw3945: ipw3945.ucode load failed: Reason -2

ipw3945: Could not read microcode: -2

ipw3945: probe of 0000:03:00.0 failed with error -2

```

Though, this is all pretty general, so let's look at /sbin/ipw3945d using strace (keeping in mind that ipw3945d needs the --foreground parameter):

```

execve("/sbin/ipw3945d", ["/sbin/ipw3945d", "--foreground"], [/* 44 vars */]) = 0

brk(0)                                  = 0x805b000

fcntl64(0, F_GETFD)                     = 0

fcntl64(1, F_GETFD)                     = 0

fcntl64(2, F_GETFD)                     = 0

access("/etc/suid-debug", F_OK)         = -1 ENOENT (No such file or directory)

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f21000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=49014, ...}) = 0

mmap2(NULL, 49014, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f15000

close(3)                                = 0

open("/lib/libc.so.6", O_RDONLY)        = 3

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300Y\1"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=1197180, ...}) = 0

mmap2(NULL, 1168764, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7df7000

mmap2(0xb7f0e000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x116) = 0xb7f0e000

mmap2(0xb7f12000, 9596, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f12000

close(3)                                = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7df6000

set_thread_area({entry_number:-1 -> 6, base_addr:0xb7df66b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0

mprotect(0xb7f0e000, 8192, PROT_READ)   = 0

mprotect(0xb7f3d000, 4096, PROT_READ)   = 0

munmap(0xb7f15000, 49014)               = 0

brk(0)                                  = 0x805b000

brk(0x807e000)                          = 0x807e000

fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f20000

write(1, "ipw3945d - regulatory daemon\n", 29ipw3945d - regulatory daemon

) = 29

write(1, "Copyright (C) 2005-2006 Intel Co"..., 64Copyright (C) 2005-2006 Intel Corporation. All rights reserved.

) = 64

write(1, "version: 1.7.22\n", 16version: 1.7.22

)       = 16

open("/var/run/ipw3945d.pid", O_RDONLY) = -1 ENOENT (No such file or directory)

getcwd("/home/brandon", 4096)           = 14

open("/sys/bus/pci/drivers/ipw3945", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3

fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0

fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0

chdir("/sys/bus/pci/drivers/ipw3945")   = 0

getdents(3, /* 7 entries */, 4096)      = 132

stat64("debug_level", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0

stat64("new_id", {st_mode=S_IFREG|0200, st_size=4096, ...}) = 0

stat64("bind", {st_mode=S_IFREG|0200, st_size=4096, ...}) = 0

stat64("unbind", {st_mode=S_IFREG|0200, st_size=4096, ...}) = 0

stat64("module", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0

chdir("module")                         = 0

stat64("cmd", 0xbfdadb5c)               = -1 ENOENT (No such file or directory)

chdir("/sys/bus/pci/drivers/ipw3945")   = 0

getdents(3, /* 0 entries */, 4096)      = 0

close(3)                                = 0

chdir("/home/brandon")                  = 0

time(NULL)                              = 1172836297

open("/etc/localtime", O_RDONLY)        = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f1f000

read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 1267

close(3)                                = 0

munmap(0xb7f1f000, 4096)                = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0

write(2, "2007-03-02 06:51:37: ERROR: Coul"..., 892007-03-02 06:51:37: ERROR: Could not find Intel PRO/Wireless 3945ABG Network Connection

) = 89

unlink("/var/run/ipw3945d.pid")         = -1 ENOENT (No such file or directory)

exit_group(0)                           = ?

```

To me it seems that the last write call in the culprit, though what is specifically causing this... I don't know.  Maybe someone more 1337 that I can see more into the strace.  Ideas, anyone?

Thanks

----------

## bmw

FIXED!

Problem was somewhat related to an fglrx problem.  I had unintentionally kept kernel debugging support enabled in the kernel.  However, this merely complicated matters.  The root of the problem seems to be permission errors.  After disabling kernel debugging support, rebooting with the newly-configured kernel, I then reinstalled ipw3945, ipw3945d, ipw3945-ucode.  Some of the errors had disappears, but my hardware was still not being detected, so I performed another strace on ipw3945d, which had differed sightly, complaining about permission errors while creating a pid file.  This is easy to fix:

```

chmod g+w /var/run/ipw3945d

```

That's it!  All you need to do then is restart /etc/init.d/ipw3945d and your hardware should be detected.

----------

## Kouran

hm it didnt fix the problem for me though, heres some more output,.. i did get the module to load, but theres no eth1 interface

```

Azalea init.d # lsmod

Module                  Size  Used by

ipw3945               184164  0 

Azalea init.d # ./net.eth1 start

 * Starting eth1

 *   Bringing up eth1

 *     dhcp

 *       network interface eth1 does not exist

 *       Please verify hardware or kernel module (driver)                 [ !! ]

Azalea init.d # ./ipw3945d stop

 * WARNING:  ipw3945d has not yet been started.

Azalea init.d # ./ipw3945d start

 * The pidfile (/var/run/ipw3945d/ipw3945d.pid) is still present.

 * Please check that the daemon isn't running!

 * Starting ipw3945d ...

chown: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory

chmod: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory

/sbin/ipw3945d already running.                                           [ !! ]

```

----------

## jmachado

See my posting over here https://forums.gentoo.org/viewtopic-t-544327-highlight-.html#top

----------

## Kouran

tried that,... didnt work for me though

----------

## jmachado

 *Kouran wrote:*   

> tried that,... didnt work for me though

 

Have you tried to compile the kernel ieee encryption as modules?

----------

## damage1986

i am in the same situation...

googling for a long time, and nothing...

hope somenone solves this problem

thanks

----------

## Kouran

yap i tried that too,.. now i just tried to not compile the kernel stack blah at all and just use the one from the portage, but when i try to load that module it only says 

```

/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211_crypt_wep.ko

/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211_crypt_ccmp.ko

/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211.ko

/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211_crypt.ko

/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211_crypt_tkip.ko

Azalea linux # modprobe ieee80211

WARNING: Error inserting ieee80211_crypt (/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211_crypt.ko): Invalid module format

FATAL: Error inserting ieee80211 (/lib/modules/2.6.19-gentoo-r5/net/ieee80211/ieee80211.ko): Invalid module format

```

----------

## damage1986

i am tired of this.. and i really need the wireless card..

if someone could give some help...

thanks anyway

----------

## davidvd

I got some weird problems with my card too.

I had to tweak and reinstall a lot of things to get it working...

```
CONFIG_IEEE80211=y

CONFIG_IEEE80211_DEBUG=y

CONFIG_IEEE80211_CRYPT_WEP=m

CONFIG_IEEE80211_CRYPT_CCMP=m

CONFIG_IEEE80211_CRYPT_TKIP=m

CONFIG_IEEE80211_SOFTMAC=m

CONFIG_IEEE80211_SOFTMAC_DEBUG=y
```

Now when I try to start it, I get:

```
coldshots ~ # /etc/init.d/ipw3945d start

 * One of the files in /etc/{conf.d,init.d} or /etc/rc.conf

 * has a modification time in the future!

 * Starting ipw3945d ...

ipw3945d - regulatory daemon

Copyright (C) 2005-2006 Intel Corporation. All rights reserved.

version: 1.7.22

Intel PRO/Wireless 3945ABG Network Connection found at:

 /sys/bus/pci/drivers/ipw3945/0000:05:00.0

2007-03-17 01:42:29: ERROR: Unable to create pid file '/var/run/ipw3945d/ipw3945d.pid'
```

```
coldshots ~ # ls -ltra /var/run/ipw3945d/

total 8

drwxrwxr-x  2 ipw3945d ipw3945d 4096 Mar 17 01:29 .

drwxr-xr-x 10 root     root     4096 Mar 17 01:29 ..
```

Am I missing something? I'm going to try without any debug at all and see..

----------

## davidvd

FIXED!

Removed the debug modules and remerged the ipw3945* packages!

----------

## damage1986

which modules are you talking about?

are you using ipw3845-1.2.0?

----------

## azote

 *damage1986 wrote:*   

> which modules are you talking about?
> 
> are you using ipw3845-1.2.0?

 

I think he means this 2:

```
CONFIG_IEEE80211_DEBUG=y

CONFIG_IEEE80211_SOFTMAC_DEBUG=y
```

to:

```

# CONFIG_IEEE80211_DEBUG is not set

# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
```

in your 

```
/usr/src/linux/.config
```

----------

## azote

 *damage1986 wrote:*   

> which modules are you talking about?
> 
> are you using ipw3845-1.2.0?

 

I think he means this 2:

```
CONFIG_IEEE80211_DEBUG=y

CONFIG_IEEE80211_SOFTMAC_DEBUG=y
```

to:

```

# CONFIG_IEEE80211_DEBUG is not set

# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
```

in your 

```
/usr/src/linux/.config
```

----------

## Ant

Finally found the solution in this thread.

Its a strange fix (especially since after undoing the fix ipw3945d continues to work for me). Maybe there is a strange ctrl char in one of the ipw3945 config files but that's a wild random guess.

Good luck.

----------

