# mac80211 module error with Intel 4965AGN wireless card

## srunni

Hi,

I'm trying to set up my 4965AGN wireless card in Gentoo, using the iwlwifi drivers and the howto at http://gentoo-wiki.com/HARDWARE_ipw3945 . Everything works fine until I try to 

```
modprobe iwl4965
```

 when I get 

```
WARNING: Error inserting mac80211 (/lib/modules/2.6.23-gentoo-r3/kernel/net/mac80211/mac80211.ko): Unknown symbol in module, or unknown parameter (see dmesg)
```

 I checked out dmesg, and this is what I see: 

```
iwl4965: Intel(R) Wireless WiFi Link 4965AGN driver for Linux, 1.2.22ds

iwl4965: Copyright(c) 2003-2007 Intel Corporation

ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:02:00.0 to 64

iwl4965: Detected Intel Wireless WiFi Link 4965AGN

iwl4965: Tunable channels: 11 802.11bg, 13 802.11a channels

wmaster0: Selected rate control algorithm 'simple'

mac80211: Unknown symbol tcf_destroy_chain

mac80211: Unknown symbol tc_classify

mac80211: Unknown symbol unregister_qdisc

mac80211: Unknown symbol register_qdisc
```

 Any ideas on what's going on?

Thanks!

----------

## srunni

I'm also completely confused about which guide I should be using to set up the wireless. There is the Gentoo Wiki driver installation/configuration page for my wireless card ( http://gentoo-wiki.com/HARDWARE_ipw3945 ), the Gentoo Documentation on wireless networking ( http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4 ), and the Gentoo Wiki on on wireless configuration ( http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup ). Why are there multiple pages that arbitrarily cross-reference each other??

----------

## gizmm0

Hi,

Maybe you need to use the mac80211 patches from http://www.intellinuxwireless.org/ . Also, the iwlwifi drivers are included in the 2.6.24 (-rc) kernel. Both ways worked for me.

----------

## cgmd

Hi, 

I'm in the same boat as you, srunni. Exactly the same installation error.

Have you, or has anyone, made any headway with this since this post??  :Confused: 

Thanks!

----------

## d2_racing

Hi everyone, first I have found that I can use the old IPW3945 and also the new Iwlwifi with my IPW3945ABG and there is no difference with the Intel IPW4965.

----------

## d2_racing

The first thing to do is this :

```

# su -

# cd /usr/src/linux

# cp .config /root/config-backup

# make clean

# cd /root

# cp config-backup /usr/src/linux/.config

# make menuconfig

```

This will clean up your old kernel and also you will create a band new clean kernel.

Now, to be able to use the Iwlwifi driver, you need to enable the new Stack :

```

(*) Wireless

    (M) Generic IEEE 802.11 Networking Stack (mac80211)

    (M) Generic IEEE 802.11 Networking Stack

    (M) IEEE 802.11 WEP encryption (802.1x)

    (M) IEEE 802.11i CCMP support

    (M) IEEE 802.11i TKIP encryption

```

You need also the encryption setting :

```

(*) Cryptographic algorithm manager

(M)   SHA1 digest algorithm

(M)   SHA256 digest algorithm

(M)   ECB support

(M)   CBC support

(M)   PCBC support

(*)   AES cipher algorithms

(*)   AES cipher algorithms (i586)

(*)   ARC4 cipher algorithm

(*)   Michael MIC keyed digest algorithm

```

Also, I wrote a migration procedure but it's in french.

http://www.gentoo-quebec.org/index.php?page=docs&v=7

There a lot of information in that guide.

----------

## d2_racing

After that you have enable theses setting and also rebooted, you can know lunch your modprobe iwl4965

Can you post the result of the command plz ?

And for the record, the .ko error is from some old or incorrect kernel setting that were not clean up between multiple kernel compilation.

The make clean take care of that.

----------

## d2_racing

After the modprobe, if everything is fine, you will have a wlan0 and a wmaster0 in your ifconfig -a command

----------

## d2_racing

And for the record, I had little problem to make this driver working even with my IPW3945 card...so the version before the new 4965 Intel WIFI card.

----------

## cgmd

d2_racing wrote: *Quote:*   

>  I can use the old IPW3945 and also the new Iwlwifi

 

Does this mean you do not remove the ipw3945, before you install the iwlwifi driver?

Thanks for your suggestions!  :Smile: 

----------

## d2_racing

you can remove the ipw3945 after you have downloaded your iwlwifi package.

----------

## cgmd

 *d2_racing wrote:*   

> you can remove the ipw3945 after you have downloaded your iwlwifi package.

 

OK... I followed d2_racing's above instructions, completely, and was then able to load the mac80211 flawlessly.

Upon completion of the setup (following the wiki guide), my wireless (eth2) refused to load because of an absent ipw3945d. That was fixed with by simply  emerging ipw3945d. Now, for the first few attempts, eth2 is loading, and my wireless connection is good!  :Very Happy: 

I'm very appreciative of d2_racing for helping with this!!

A full step by step guide for migration from ipw3945 to iwlwifi (in English) would certainly seem of benefit, given the number of forum posts I now see with ipw3945 problems...

Thanks, again!!

----------

## d2_racing

Yeah I know, but since I'm French Canadien, I think that I can write more in French then in English.

By the way, are you using the full manual script that is present inside the doc ? It's wifi.sh

Also, if some moderators see that has a good subject for a wiki or a howto inside the forum, I will translate it.

No problem, but I know that there is a lot of threads inside the forum about the IPW3945 or 4965 hell  :Smile: 

I'm glad that was able to help you  :Smile: 

----------

## cgmd

What do you mean by... *Quote:*   

> using the full manual script that is present inside the doc ? It's wifi.sh

 

Inside which doc? What action is provided by the script?

I still have some inconsistency in whether or not my wireless connection becomes established during boot, and I often have to manually start the wifi connection after boot, using the net.eth2 -> net.lo init script. Might wifi.sh be of help in that regard?  :Confused: 

----------

## d2_racing

Hi, sorry here's my script :

wiki.sh

```

#!/bin/bash

if [ "$(/etc/init.d/net.eth1 status | grep started)" ]; then

        echo "Stopping the net.eth1 interface"

        /etc/init.d/net.eth1 stop

        echo "Stopping the deamon ipw3945d"

        sleep 2

        /etc/init.d/ipw3945d stop

        echo "Cleanup of the module ipw3945"

        sleep 1

        rmmod ipw3945

        echo "Your wifi is dead´"

else

        echo "Loading Ipw3945 module"

        modprobe ipw3945

        sleep 2

        echo "Starting the eth1 interface"

        sleep 2

        /etc/init.d/net.eth1 start

        echo "Your wifi is alive"

fi

```

Save this file in your /root as wifi.sh

```

# chmod +744 wiﬁ.sh

```

But to use this, you need to blacklist the ipw3945 module from udev.... but at the boot time, udev will try to load the wifi and it will crash...so with this patch, you will use your wifi connection with your own hands.

```

nano -w /etc/modprobe.d/blacklist

blacklist ipw3945

```

Also, what is the result when you do this

```

# iwlist scan

```

For my concern I have this : 

```

gentootux ~ # iwlist scan

lo        Interface doesn't support scanning.

irda0     Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

eth1      Scan completed :

          Cell 01 - Address: 00:1A:70:62:40:88

                    ESSID:"gentoonet"

                    Protocol:IEEE 802.11bg

                    Mode:Master

                    Frequency:2.437 GHz (Channel 6)

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s

                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Quality=93/100  Signal level=-36 dBm  Noise level=-36 dBm

                    Extra: Last beacon: 72ms ago

```

93/100 for the quality is excellent.

----------

## cgmd

Thank you for posting the script. With a little modification, I have it working on my system.   :Smile: 

Now, one further concern...

With the module issues I experienced using my 2.6.23-r3 kernel, what must I do to create a smooth upgrade to the new 2.6.23-r6 gentoo sources, which just arrived? Must I do anything, in particular, with mac80211, ipw3945, and the iwlwifi driver? Must these be reinstalled or otherwise treated?

Thanks, again...

----------

## d2_racing

Oh yeah  :Smile: 

First before upgrading you need to redownload your source package.

```

# emerge -fv ipw3945 ipw3945d

```

Also, you can copy your .config inside your new kernel and run make oldconfig and compile like usual.

On the reboot, you will not have the wifi, because the ipw3945 driver needs to be compile againts the running kernel.

So, after that, you need to reemerge your ipw3945 and the ipw3945d.

Finally, you need to reboot your box and if the wifi doesn't work, your reemerge the ipw3945 ipw3945d again and test right away with the wifi.sh script.

If you have any trouble, just let me know  :Smile: 

----------

## cgmd

You have been a tremendous help!

I'll try this over the weekend...   :Very Happy: 

Merci beaucoup!!

----------

## tibyke

i have some issues with the iwl4965 on amd64. i can fire up the whole thing, it seems to be all ok, i can see the interface, card detected, ip address set, but network activity is very poor... very slow...  very instable, totally unusable.

(im on iwlwifi 1.2.23 and gentoo sources 2.6.23-r6, all required modules present in the kenel)

it sputs my syslog full with: 

```
wlan0: CTS protection enabled (BSSID=.......)

wlan0: CTS protection disabled (BSSID=.......)
```

any idea?

tia!

t

----------

## tibyke

it wont even work with the latest mac80211 from intellinuxwireless.org

(produces the same behavior)

t

----------

## d2_racing

 *cgmd wrote:*   

>  Merci beaucoup!!

 

De rien mon ami  :Smile: 

----------

## d2_racing

 *tibyke wrote:*   

> it wont even work with the latest mac80211 from intellinuxwireless.org
> 
> (produces the same behavior)

 

Have you seen this thread : https://forums.gentoo.org/viewtopic-t-614189-highlight-cts+protection+enabled.html

----------

## marjan

Please remember to re emerge the iwlwifi everytime you compile the kernel and make sure you got those crypt and crc in the kernel. And for some reason you need to make the mac driver as module to work.. I can see you have that in place already. This is how I did it at my HP Compaq

http://marjan.blogsome.com/2008/01/26/howto-to-make-iwl4965-works-the-gentoo-way/

I don't think AMD64 have anything got to do with your problem. You might want to double check on how you configure your crypt,crc dan mac module in your kernel. ...

----------

## d2_racing

Yeah, the most important part is the kernel, for the rest, it's just some easy things to setup.

----------

## cgmd

 *d2_racing wrote:*   

> Oh yeah 
> 
> First before upgrading you need to redownload your source package.
> 
> ```
> ...

 

Following this advice, my kernel upgrade to 2.6.23-r6 was relatively smooth...

I might add, however, that after following the advice of d2_racing to...

```

# emerge -fv ipw3945 ipw3945d
```

...it was also necessary for me to modprobe ipw3945 before I could make wireless work.  :Confused: 

Should I have anticipated this need to modprobe ipw3945?

Thanks!

----------

## tibyke

d2_racing: thanks for the url, this qos thing seems to have fixed my iwl4965 issue. my only pain left is that every time i start net.wlan0, i always get something like: 

```
# /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not 

supported        [ ok ]th param 5 value 0x1 -

 *   Starting wpa_cli on wlan0 

...                                        [ ok ]

 *     Backgrounding ...
```

despite this error/warning everthin seems to be working fine.

what could be done?

t

----------

## tibyke

...the funny thing is that im still getting those nasty CTS protection enabled/disabled messages, but my wireless connection is stable and working fine.

im on

- 2.6.23-r6

- iwlwifi 1.2.23

relevant part of wpa_supplicant.conf:

```
network={

   ssid="whatever"

   proto=WPA RSN

   key_mgmt=WPA-PSK

   psk=foobar

   priority=1

}
```

t

----------

## d2_racing

Well I don't know what to say   :Confused: 

----------

## d2_racing

 *cgmd wrote:*   

> 
> 
> I might add, however, that after following the advice of d2_racing to...
> 
> ```
> ...

 

Yeah, after your kernel is up and running, I always reinstall the driver and since you haven't reboot your box, the modprobe is necessary, because udev only modprobe the module at the boot time.

----------

## d2_racing

 *tibyke wrote:*   

> ...the funny thing is that im still getting those nasty CTS protection enabled/disabled messages, but my wireless connection is stable and working fine.
> 
> im on
> 
> - 2.6.23-r6
> ...

 

Can you post the result of :

```

#iwlist scan

```

What is the quality of your signal ?

----------

## tibyke

 *d2_racing wrote:*   

> Can you post the result of :
> 
> ```
> 
> #iwlist scan
> ...

 the ap is about 1 meter away from the notebook, so the signal quality is about 90-95%, it cant be the problem...

t

----------

## d2_racing

So, your problem is almost resolve....maybe in the next release of the gentoo-sources 2.6.24, your problem will be solve.

----------

## at

d2_racing, thank you for the great instructions!

I am trying to make the new stack work with iwl4965 driver.

I can make it work with wpa_supplicant, but that seems to be doing all the encryption in the userspace as the wireless encryption modules (ieee80211_crypt, etc.) are not even loaded:

```
# lsmod | grep 80211

mac80211              125772  1 iwl4965

cfg80211               13008  1 mac80211
```

Yet I have a functional WPA2 wireless connection running:

```
# ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:10:D2:A9:55:33  

          inet addr:192.168.0.208  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:4078882 (3.8 Mb)  TX bytes:1007656 (984.0 Kb)

# iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:"my_network"  

          Mode:Managed  Frequency:2.442 GHz  Access Point: 00:09:23:66:08:11   

          Bit Rate=54 Mb/s   Tx-Power=27 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B   

          Encryption key:7333-5349-0834-100A-3884-43D2-1032-B999 [3]

          Link Quality=100/100  Signal level=-31 dBm  Noise level=-93 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

So I have disabled wpa_supplicant, hoping that it would force ieee80211_crypt module to be used. I have manually loaded ieee80211_crypt_ccmp:

```
# lsmod | grep 80211

ieee80211_crypt_ccmp     6912  0 

ieee80211_crypt         5568  1 ieee80211_crypt_ccmp

mac80211              125772  0 

cfg80211               13008  1 mac80211
```

But now it would not connect to an encrypted network:

```
# dmesg

wlan0: Initial auth_alg=0

wlan0: authenticate with AP 00:09:23:66:08:11

wlan0: authenticate with AP 00:09:23:66:08:11

wlan0: authenticate with AP 00:09:23:66:08:11

wlan0: authentication with AP 00:09:23:66:08:11 timed out
```

Any idea of what is going on? How do I pass encryption keys to the wireless encryption module?

Could you please also post your /etc/conf.d/net and /etc/conf.d/wireless files?

Thank you!

----------

## d2_racing

 *at wrote:*   

> Could you please also post your /etc/conf.d/net and /etc/conf.d/wireless files?

 

No problem, I will post it tonight (Eastern Time).

And for the record, I use a WEP key...so maybe it will not be reliable for you.

----------

## meulie

 *marjan wrote:*   

> This is how I did it at my HP Compaq
> 
> http://marjan.blogsome.com/2008/01/26/howto-to-make-iwl4965-works-the-gentoo-way/
> 
> 

 

No longer available?

----------

## d2_racing

In fact.

----------

## srunni

@at:

How did you do it with wpa_supplicant?

I installed and configured it using http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup#Configuration_using_wpa_supplicant , but when I run 

```
/etc/init.d/net.wlan0 restart
```

 I get "Wireless radio has been killed for interface wlan0".

----------

