# problem with wireless adapter iwlagn [SOLVED]

## albright

After a memory chip failed in my thinkpad x300 I had

to reinstall ... 

The only thing that has not returned to normal is

the wireless card, an intel PRO/Wireless 4965 AG.

I rebuilt the kernel and the proper modules, iwlagn

and iwlcore. I emerged the micro-code, iwl4965-ucode

version 228.61.2.24.

When I modprobe iwlagn, dmesg reports:

```
iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 2.6.33-zen1-kds

iwlagn: Copyright(c) 2003-2009 Intel Corporation

iwlagn 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

iwlagn 0000:03:00.0: setting latency timer to 64

iwlagn 0000:03:00.0: Detected Intel Wireless WiFi Link 4965AGN REV=0x4

iwlagn 0000:03:00.0: Tunable channels: 11 802.11bg, 13 802.11a channels

iwlagn 0000:03:00.0: irq 31 for MSI/MSI-X

phy1: Selected rate control algorithm 'iwl-agn-rs'

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-4965-2.ucode

iwlagn 0000:03:00.0: loaded firmware version 228.61.2.24

```

But when I try to start wpa_supplicant, I get this error,

after it correctly parses wpa_supplicant.conf:

```
WEXT: cfg80211-based driver detected

Could not set interface wlan0 flags: Unknown error 132

Failed to initialize driver interface

Failed to add interface wlan0

Cancelling scan request

Cancelling authentication timeout
```

here's what ifconfig says about wlan0:

```
wlan0     Link encap:Ethernet  HWaddr 00:1f:3b:27:68:bd  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
```

and here's what iwconfig says:

```
wlan0     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated   

          Tx-Power=off   

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off
```

Needless to say, this was working perfectly just a few days ago

(after the memory chip failed the computer would still work

but was subject to random errors - the wireless worked

however)

I can't think of anything else to check - any help very appreciated. TIA

----------

## albright

A crucial additional fact:

I had a Mandriva 2010.0 disk laying around so booted it

up on the thinkpad.

Wireless works flawlessly / instantly "out of the box".

So my hardware is definitely OK, but this is embarrassing.

BTW, the Mandriva is a 2.6.31 kernel but, as I said in the OP,

wireless was working a few days ago on my 2.6.33 zen kernel.

----------

## albright

I'm just talking to myself I guess  :Smile: 

Anyway, I installed gentoo-sources-2.6.33-r1, used

the same .config file and built a new kernel and

modules. 

Now wireless works. Does zen-sources have some

patches in the iwlang/iwlcore sources? I doubt it.

However, although wireless works, it only does so if

I manually start wpa_supplicant and manually start

dhcpcd for wlan0. I guess now a config file is wrong

somewhere.

----------

## shigeo

yo.

i just startet a new gentoo install on my new system.

i pretty much got the same problem as you. (unknown error 132).

with me, wireless works when i start the system. but after i lose connection i get the unknown error 132.

when you google around, a lot of users from other distros try to sell you their "solution" with rmmod ...; rfkill block all; modprobe ...; rfkill unblock all; or they start some ifconfig voodo.

my opinion is that this debian-bug-report ist the most conclusive: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559040

it has to do with kernel 2.6.31, and the "software rfkill switch" or something.

the gentoo handbook says in section "Wireless Tools" something about  ' scan_mode_wlan0"ad-hoc" ' since some wifi cards don't support scanning in other modes. maybe one should also check the other options in "wireless tools"?

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

regards, shigeo.

----------

## shigeo

update:

maybe this thread also gives a hint

https://forums.gentoo.org/viewtopic-t-820535-postdays-0-postorder-asc-highlight-unknown+error+132-start-25.html

(the message Posted: Wed Mar 31, 2010 10:00 pm)

basically, it says that you should recompile your kernel without an rfkill-switch.

----------

## albright

thanks for the links - I did not have rfkill set in the kernel

OK - here is the answer; there is a line in a very obscure

file /lib/rc/cache/nettree which has the wrong location for

wpa_supplicant's binary. (see bugs.gentoo.org/277594)

Now everything works - who would have guessed   :Rolling Eyes: 

----------

## shigeo

great work.

if you read further on in the bugreports, there may be a solution to just remerge openrc (and maybe also wpa supplicant or wireless tools).

maybe you could also put [solved] to the forum topic, to spread the word out there...

----------

