# No more ipw3945 wireless network

## nyk

I suddently have no more wireless network with my IBM X60 laptop after having used it for about half a year with the ipw3945 driver.

What I did is making some changes to make.conf (I post it at the end of this message) and then recompiling the entire system. After that, I also switched to the new kernel, because I couldn't compile the ipw3945 module.

But then I followed the gentoo-wiki howto on ipw3945 to configure the kernel to use the inkernel ieee80211. Then the ipw3945 module compiled and I also recompiled the ipw3945d and ipw3935-ucode and did a modules-update.

Now the ipw3945 module gets loaded by udev at boot, but the ipw3945d does not start up. And the worst is: I don't even see an error message anywhere, /var/log/messages or dmesg.

That's what happens:

```

thinkpad nyk # /etc/init.d/ipw3945d start

 * 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:03:00.0

Daemon launched as pid 6747.  Exiting.                                                                                 [ !! ]

```

Edit: I get some more infos when I reload the module:

```

thinkpad ~ # modprobe  -r ipw3945

 * WARNING:  ipw3945d has not yet been started.

thinkpad ~ # modprobe -v ipw3945

insmod /lib/modules/2.6.19-gentoo-r5/kernel/drivers/base/firmware_class.ko 

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

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

install /sbin/modprobe --ignore-install ipw3945; sleep 0.5; /etc/init.d/ipw3945d start

insmod /lib/modules/2.6.19-gentoo-r5/net/wireless/ipw3945.ko 

 * 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:03:00.0

Daemon launched as pid 7207.  Exiting.                                                                                 [ !! ]

FATAL: Error running install command for ipw3945

```

And this is /etc/make.conf:

```

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

MAKEOPTS="-j3"

USE="qt3support nptl postgres mozbranding glitz cups musepack wma mmx modplug timidity vim nsplugin apache2 pcre session unicode mysql java intel i810 dri xorg sdl fam imagemagick flac hal gd exif bzip2 tetex mad asf win32codecs ffmpeg mpeg encode alsa usb mp3 gphoto2 -kde png avi gnome xvid perl -ithreads imap -ipv6 unicode wxwindows vorbis pdf svg truetype"

GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ http://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo"

INPUT_DEVICES="keyboard mouse"

VIDEO_CARDS="i810 vesa"

ALSA_CARDS="snd-hda-intel"

```

Any ideas? I really NEED wireless network!  :Smile: 

Edit: When I try to start ipw3945d on the command line with the correct pidfile /var/run/ipw3945d/ipw3945.pid (non default), then laptop freezes and can only be hard-reset. ...but at least the WLAN LED has started flickering!  :Smile: 

----------

## ziggysquatch

if the WAN light is flickering then the driver must have loaded fine but it seems that it is not associating with any access point.  Do you have a nonsecure wireless AP or is it secured.  If it is secured then you should check your config to  make sure the key was not overwritten or anything.

----------

## nyk

The light is flickering (only when I start the daemon by hand), but then the laptop is also FROZEN and I have to hard-reset it. No way to connect to an AP or do anything at all...

----------

## hilbert_space

The problem is that now ipw3945 (version 1.2) uses ieee80211 built-in support in kernel 2.6.19 and above. 

But there are also the old ieee8011 modules in in your kernel sources, so you have to unmerge _completely_ gentoo-sources, remove all modules and files in /usr/src/linux  (a backup of your .config is useful) and then re-emerge gentoo-sources again.

This worked for my T60 with ipw3945.

----------

## nyk

Yes, I tought so too and tried this. But it's STILL the same error!

But to clean out all modules do I also have to delete everything in /lib/modules ?

Edit: Tried also deleting those, but still same error.

----------

## karmaking

FULL ACK - same problem here (system freezes & no connect possible anymore).

cheers

Daniel

----------

## nyk

I'm out of ideas.... Just speculating: Could it be because I enabled nptl and/or am using the new glibc 2.5? Or rather some kernel options? Maybe that udev loads my e1000 wired network (not using it) module , which I didn't load automaticaly before? Or some kernel option?

Could someone who has it working with gentoo-sources 2.6.19-r5, ipw3945 1.2.0, ipw3945d 1.7.22-r4 and ipw3945-ucode 1.14.2 (is this even needed?) post their kernel configuration and USE (and maybe compile) flags? This could be VERY helpfull!

----------

## hilbert_space

Here is my configuration, working for kernel 

```
Linux neo 2.6.19-gentoo-r5 #2 SMP PREEMPT Thu Feb 15 16:31:53 CET 2007 i686 Genuine Intel(R) CPU           T2500  @ 2.00GHz GenuineIntel GNU/Linux
```

```
neo thg # eix ipw3945

[I] net-wireless/ipw3945 

     Available versions:  ~0.0.69 1.0.5 (~)1.2.0

     Installed:           1.2.0(13:52:18 02/11/07)(-debug kernel_linux)

     Homepage:            http://ipw3945.sourceforge.net/

     Description:         Driver for the Intel PRO/Wireless 3945ABG miniPCI express adapter

[I] net-wireless/ipw3945-ucode 

     Available versions:  1.13 (~)1.14.2

     Installed:           1.14.2(13:35:35 02/11/07)

     Homepage:            http://www.bughost.org/ipw3945/

     Description:         Microcode for the Intel PRO/Wireless 3945ABG miniPCI express adapter

[I] net-wireless/ipw3945d 

     Available versions:  ~0.7.16 1.7.18 (~)1.7.22-r4

     Installed:           1.7.22-r4(13:13:27 02/11/07)

     Homepage:            http://www.bughost.org/ipw3945/

     Description:         Regulatory daemon for the Intel PRO/Wireless 3945ABG miniPCI express adapter

* net-wireless/ipw3945-firmware

     Available versions:  (1.13)  ~1.13

     Homepage:            http://ipw3945.sourceforge.net

     Description:         Microcode for the Intel PRO/Wireless 3945ABG Network Connection 

Found 4 matches.

neo thg # 
```

/etc/make.conf:

```
CFLAGS="-O2 -march=prescott -msse3 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j3"

GENTOO_MIRRORS="http://gentoo.thgersdorf.net/ http://mirror.switch.ch/mirror/gentoo"

USE="libusb bluetooth xine lirc dvb usb xosd hdaps ibm server wddx acpi \

     pcmcia asf pdf scanner nagios-dns nagios-game nagios-ntp \

     nagios-ping nagios-ssh snmp pda ppds samba slp mozilla -blackdown \

     nsplugin browserplugin jack logitech-mouse \

     visualizationlogitech-mouse visualization xinerama kdeenablefinal win32codecs \

     mplayer vcd aac dvd dvdread sse sse2 3dnow firefox alsa \

     apache2 apm avi cups eds emboss encode esd foomaticdb gdbm gif \

     gnome gpm gstreamer gtk gtk2 imlib jpeg kde libg++ libwww mad \

     mikmod motif mp3 mpeg nptl ogg opengl oss pdflib png qt \

     quicktime sdl spell truetype udev vorbis X xml xmms xv cd dvdr perl \

     java php bitmap-fonts truetype-fonts type1-fonts cli ctype dba \

     expat fastbuild force-cgi-redirect ftp gd memlimit nls pcre \

     posix session simplexml soap sockets spl ssl tokenizer \

     truetype xml xsl zlib mysql nptlonly mmx dedicated parse-clocks dvi \

     nautilus tiff unicode -arts -lm_sensors fat ntfs reiserfs \

     xfs -ipv6 -nntp postgres -ldap altauth musicbrainz directfb \

     aalib dts imagemagick toolbar bzip2 svg plib openexr graphviz \

     flac mtp njb activefilter atm dhcp eap-tls mppe-mppc radius \

     iontruetype msn sound cairo bash-completion srv -dbus -hal \

     ffmpeg -openntpd"

ALSA_CARDS="hda-intel usb-audio"

VIDEO_CARDS="vesa vmware ati fglrx fbdev"

INPUT_DEVICES="mouse keyboard synaptics vmmouse"

```

My .config is here: http://www.thomasgersdorf.com/linux/.config

Importang part of emerge --info:

```
Portage 2.1.2-r9 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 i686)

=================================================================

System uname: 2.6.19-gentoo-r5 i686 Genuine Intel(R) CPU           T2500  @ 2.00GHz

Gentoo Base System version 1.12.6

Timestamp of tree: Thu, 15 Feb 2007 15:20:01 +0000

dev-java/java-config: 1.3.7, 2.0.31

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.14

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2
```

----------

## nyk

Thanks, I tried your kernel config, but it's STILL the same error. I took some hours to look at all my kernel options and removed unneeded stuff, but it's still exactly the same problem with ipw3945d. Between that I unmerged gentoo-sources, emptied /usr/src and /lib/modules and then emerged ipw3945 again after compiling the new kernel.

I also looked at your USE flags, but there doesn't seem to be any difference signifiant to this problem. Your gcc, glibc, etc versions are also the same. 

One difference I found: I use Gentoo Base System release 1.12.9 and you 1.12.6, but don't know/think if it matters.

So why does the ipw3945d work for you but not here?

I activated debug mode of ipw3945 and got one more message from it in dmesg:

```

ipw3945:

 is not in hex or decimal form.
```

No idea what this should mean...

I also recently changed my CHOST from 386 to 686, but everything worked well when recompiling world and I get no compile errors now. So I don't think that's the reason, but correct me if I'm wrong...

----------

## nyk

Very strange (but GOOD!), now it works when I start it by hand!

Like this, it does not start:

```

thinkpad nyk # rmmod ipw3945

thinkpad nyk # modprobe ipw3945

 * 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:03:00.0

Daemon launched as pid 5366.  Exiting.                                    [ !! ]

FATAL: Error running install command for ipw3945

```

But like this it works:

```
thinkpad nyk # ipw3945d --pid-file=/var/run/ipw3945d/ipw3945d.pid

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:03:00.0

Daemon launched as pid 5408.  Exiting.

```

NO idea why it's like that. Maybe it didn't work at all before, because I ran depmod now, or is that done automatically by some gentoo instance?

And what can I do to make the daemon launched automatically by the module loaded by udev?

It also doesn't work when I put it in "rc-update add ipw3945d default". Somehow it doesn't seem to like being started by the start-stop-daemon in the init script.

----------

## TenPin

I would suggest upgrading to 2.6.20 and emerging the latest versions of baselayout and module-init-tools

----------

## nyk

You mean the unstable ~x86 versions?

I currently use sys-apps/baselayout-1.12.9 and sys-apps/module-init-tools-3.2.2-r2.

Already tried kernel 2.6.20, but it didn't change anything about this WLAN problem.

----------

## karmaking

Hm an upgrade to 2.6.20 indeed did the job for me now. Thanks guys.

Daniel

----------

## nyk

I tried to upgrade to 2.6.20 again, but can't compile the truecrypt module against it:

```

CC [M]  /var/tmp/portage/app-crypt/truecrypt-4.2a-r1/work/truecrypt-4.2a/Linux/Kernel/Dm-target.o

/var/tmp/portage/app-crypt/truecrypt-4.2a-r1/work/truecrypt-4.2a/Linux/Kernel/Dm-target.c:444:41: error: macro "INIT_WORK" passed 3 arguments, but takes just 2

/var/tmp/portage/app-crypt/truecrypt-4.2a-r1/work/truecrypt-4.2a/Linux/Kernel/Dm-target.c: In function 'truecrypt_endio':

/var/tmp/portage/app-crypt/truecrypt-4.2a-r1/work/truecrypt-4.2a/Linux/Kernel/Dm-target.c:444: error: 'INIT_WORK' undeclared (first use in this function)

/var/tmp/portage/app-crypt/truecrypt-4.2a-r1/work/truecrypt-4.2a/Linux/Kernel/Dm-target.c:444: error: (Each undeclared identifier is reported only once

/var/tmp/portage/app-crypt/truecrypt-4.2a-r1/work/truecrypt-4.2a/Linux/Kernel/Dm-target.c:444: error: for each function it appears in.)
```

And I can't use it if that doesn't work, because my home folder is compressed by truecrypt...  :Smile: 

BTW: The drm modules also fails to compile:

```

CC [M]  /var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core/drm_stub.o

/var/tmp/portage/x11-base/x11-drm-20060608/work/drm/linux-core/drm_stub.c:51: error: size of array 'type name' is negative

```

----------

## karmaking

hm maybe try to emerge the newer truecrypt-4.2a-r2?

Daniel

----------

## nyk

Thanks! I already put it in /etc/portage/package.keywords, but module-rebuild didn't pull in the new version. Had to emerge it seperately, but now it works!

Edit: Booted into 2.6.20 now. Everything is the same like in 2.6.19, the ipw9345 still doesn't start normally.

The drm and the thinkpad module still fail to compile against 2.6.20.

----------

