LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 09-01-2007, 04:16 PM   #1
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
iwl-4965 compliation problem


Hi,

I'm trying to get wireless to work on my new Thinkpad R61. It has an Intel 4965 wireless card, and I am running Debian Lenny, with the 2.6.22-1-686 kernel.

2.6.22 supposedly comes with the mac80211 subsystem, and besides when I tried to compile it myself I didn't get anywhere, so I only have whatever the default mac80211 stuff in the kernel is.

I downloaded the latest ucode (4.44.1.18), and the latest driver (0.1.14) from Intel's site. I installed the linux-headers-2.6.22-1-686 and linux-source-2.6.22 packages and untar'd the source package in /usr/src. I did
ln -s /usr/src/linux-headers-`uname -r` /lib/modules/`uname -r`/source and ln -s /lib/modules/`uname -r`/source /usr/src/linux-source-2.6.22.

I installed the microcode file to /lib/firmware.

I then tried to compile the driver:
Code:
alucard@thrawn:~/iwlwifi-0.1.14$ make
Checking kernel compatibility in:
        /lib/modules/2.6.22-1-686/source
grep: /lib/modules/2.6.22-1-686/source/lib/hexdump.c: No such file or directory
grep: /lib/modules/2.6.22-1-686/source/kernel/workqueue.c: No such file or directory
 * Kernel requires compatibility version:
   - Requires IEEE80211_CONF_CHANNEL_SWITCH compat.
   - Remove CONFIG_IWLWIFI_HT option if defined
   - Requires hex_dump compat
   - Requires cancel_work_sync avoidance
Building compatibility version in 'compatible/' directory:
Copying compatible/ from origin/...done
 + Applying: patches/06-csa.patch
        Add IEEE80211_CONF_CHANNEL_SWITCH define into iwlwifi.h
 + Applying: patches/07-hex_dump.patch
        diff -urp origin/iwl-base.c compatible/iwl-base.c
 + Applying: patches/09-cancel_work_sync.patch
        diff -urp origin/iwl-base.c compatible/iwl-base.c

Makefile has been modified by generate_compatible, please run `make' again

make: *** [compatible/kversion] Error 1
alucard@thrawn:~/iwlwifi-0.1.14$ make
make -C /lib/modules/2.6.22-1-686/source O=/lib/modules/2.6.22-1-686/build M=/home/alucard/iwlwifi-0.1.14/compatible/ modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-1-686'
  CC [M]  /home/alucard/iwlwifi-0.1.14/compatible/base-3945.o
  CC [M]  /home/alucard/iwlwifi-0.1.14/compatible/iwl-3945.o
  CC [M]  /home/alucard/iwlwifi-0.1.14/compatible/iwl-3945-rs.o
In file included from include/../net/mac80211/ieee80211_rate.h:18,
                 from /home/alucard/iwlwifi-0.1.14/compatible/iwl-3945-rs.c:43:
include/../net/mac80211/ieee80211_i.h:500: error: ‘NUM_TX_DATA_QUEUES_11N’ undeclared here (not in a function)
include/../net/mac80211/ieee80211_i.h:876: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
include/../net/mac80211/ieee80211_i.h:876: warning: its scope is only this definition or declaration, which is probably not what you want
include/../net/mac80211/ieee80211_i.h:879: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
include/../net/mac80211/ieee80211_i.h:882: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
include/../net/mac80211/ieee80211_i.h:885: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
make[3]: *** [/home/alucard/iwlwifi-0.1.14/compatible/iwl-3945-rs.o] Error 1
make[2]: *** [_module_/home/alucard/iwlwifi-0.1.14/compatible] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-1-686'
make: *** [modules] Error 2
I have build-essential and libc6-dev installed too.

Any idea what the problem is?

Note: ndiswrapper does work, but it's slow to detect networks and uses 2-5% of both cores constantly, which is not so good for a laptop. So I want to try to get the Linux drivers working.

Last edited by AlucardZero; 09-08-2007 at 07:56 PM. Reason: removing e-mail notification
 
Old 09-02-2007, 04:48 PM   #2
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
I don't know exactly what the problem is, only two comments, where the second might help:

1) I run kernel 2.6.22.5 opensuse 10.2 with iwlwifi-1.0.0 (not 0.1.14) and it works like a charm!
2) I was confused by the iwlwifi-page and the fact that there occurs a "latest snapshot" as well as some other one called "iwlwifi-1.0.0". According to the version numbers, I suggest 1.0.0 is the latest version and 0.1.14 is some earlier one, but term "latest snapshot" of course suggests, that this is the latest version... so, perhaps you try iwlwifi-1.0.0
 
Old 09-02-2007, 04:54 PM   #3
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
by the way, I also own a thinkpad R61...*g

ndiswrapper for me worked also but had the same problem...

opensuse has a nice new kernel incl. iwlwifi kernel module already included in their factory distribution which is the same tree as debian testing... did you already try to have a look in the testing tree of debian, if there is something analogue?

by the way, perhaps you already know or not: from a friend also running debian I know that xbacklight is included in debian etch and can be used to control the backlight of your display in the r61 since the hardware keys don't work. unfortunately this is not included neither compiling in opensuse...
 
Old 09-02-2007, 05:50 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Well, Debian Lenny is the the current name of the Testing branch. And I even went so far as to install 2.6.22 from the Unstable (Sid) branch.

If I just boot, even with the firmware-iwlwifi package installed, NetworkManager can't see that I have a wireless card.

Googling around, I may have to wait for 2.6.23, but that's not a great option -.-
 
Old 09-02-2007, 07:34 PM   #5
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
I also had the problem with Networkmanager. did you try to use the "normal" setup NOT using networkmanager? I followed the iwlwifi homepage, they present a first test for the card using (but of course this only works if the driver compiles...):

% dmesg -c > /dev/null
% ./load debug=0x43fff
Verify that loading succeeds without any errors in the kernel:
% dmesg -c
Bring up the interface so it can be configured:
% ifconfig wlan0 up
Verify that you can scan and see access points:
% iwlist wlan0 scan
Associate to your network:
% iwconfig wlan0 essid XXXXXX
If you use WEP encryption, configure your key:
% iwconfig wlan0 key [1] ...your key in hex...
% iwconfig <-- Verify that you are associated
% dhcpcd wlan0

this worked quite well for me...

Last edited by seelenbild28; 09-02-2007 at 07:48 PM.
 
Old 09-02-2007, 07:39 PM   #6
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
one sentence to Networkmanager: in my case Networkmanager does also not see my card independent of the network configuration tool you use (console, yast etc.). there is only a "Lenovo Network Controller". Nevertheless, the above mentioned commands did work for me. I recognized that you have to restart Networkmanager in order to get the card working. Should definetely work after a reboot.
 
Old 09-02-2007, 07:44 PM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Hi,

Code:
alucard@thrawn:~/iwlwifi-0.1.14$ sudo dmesg -c
alucard@thrawn:~/iwlwifi-0.1.14$ sudo ./load debug=0x43fff
Unloaded: mac80211 cfg80211 
No modules loaded.
alucard@thrawn:~/iwlwifi-0.1.14$ dmesg
alucard@thrawn:~/iwlwifi-0.1.14$ sudo iwconfig wlan0 up
iwconfig: unknown command "up"
alucard@thrawn:~/iwlwifi-0.1.14$ sudo iwconfig wlan0
wlan0     No such device

alucard@thrawn:~/iwlwifi-0.1.14$ sudo iwlist wlan0 scan
wlan0     Interface doesn't support scanning.

alucard@thrawn:~/iwlwifi-0.1.14$
Note that at this point, firmware-iwlwifi is installed, and iwlwifi-0.1.14 is not compiled (because it still won't).

Thanks for the ideas though
 
Old 09-02-2007, 07:46 PM   #8
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
one other thing reading again intel's site: did you check that the mac80211 module is loaded?

also, I would try to download iwlwifi-1.0.0. If I remember well, the 0.1.xx versions did also neither compile nor work with my 2.6.22 opensuse kernel....
 
Old 09-02-2007, 07:48 PM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by seelenbild28 View Post
also, I would try to download iwlwifi-1.0.0. If I remember well, the 0.1.xx versions did also neither compile nor work with my 2.6.22 opensuse kernel....
Their versions confuse me. iwlwifi-1.0.0.tgz was released Jul 25 2007, but the latest snapshot is iwlwifi 0.1.14 - Aug 30 2007. 0.1.14 > 1.0.0? Who knows?

I'll try 1.0.0 though.
 
Old 09-02-2007, 07:51 PM   #10
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
hmm strange... then the only idea is that you really try the other version...

on the site http://intellinuxwireless.org/?p=iwl...=HOWTO-iwlwifi there is a column on the right side showing "What's new". There you find iwlwifi-0.1.14 as latest snapshot. if I use this one, it doesn't work, I already tried it again. You have to go down in the column to "Latest iwlwifi snapshot: 25 July 2007". There you find the version iwlwifi-1.0.0 and a little bit below the corresonding firmware iwlwifi-4965-ucode-4.44.17.tgz from July 15th. Please try this one.

I have these two versions and it works!

and yes: the version numbering is really stupid*g. It is by the way interesting that the examples they give in their howto include exactly these two versions of iwlwifi and the firmware... hmm.

If you succeed compiling please tell me and try the above mentioned commands to see if something happens!

Last edited by seelenbild28; 09-02-2007 at 07:55 PM.
 
Old 09-02-2007, 08:14 PM   #11
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Thanks.. here are the results:

Code:
alucard@thrawn:~$ sudo modprobe mac80211
alucard@thrawn:~$ tar xzf iwlwifi-4965-ucode-4.44.17.tgz 
alucard@thrawn:~$ sudo cp iwlwifi-4965-ucode-4.44.17/iwlwifi-4965.ucode /lib/firmware/
alucard@thrawn:~$ tar xzf iwlwifi-1.0.0.tgz 
alucard@thrawn:~$ cd iwlwifi-1.0.0/
alucard@thrawn:~/iwlwifi-1.0.0$ make
Checking kernel compatibility in:
        /lib/modules/2.6.22-1-686/source
 * Kernel supports required features for 'tip' version.
Building compatibility version in 'compatible/' directory:
Copying compatible/ from origin/...done
make -C /lib/modules/2.6.22-1-686/source O=/lib/modules/2.6.22-1-686/build M=/home/alucard/iwlwifi-1.0.0/compatible/ modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-1-686'
  CC [M]  /home/alucard/iwlwifi-1.0.0/compatible/base-3945.o
  CC [M]  /home/alucard/iwlwifi-1.0.0/compatible/iwl-3945.o
  CC [M]  /home/alucard/iwlwifi-1.0.0/compatible/iwl-3945-rs.o
In file included from include/../net/mac80211/ieee80211_rate.h:18,
                 from /home/alucard/iwlwifi-1.0.0/compatible/iwl-3945-rs.c:43:
include/../net/mac80211/ieee80211_i.h:500: error: ‘NUM_TX_DATA_QUEUES_11N’ undeclared here (not in a function)
include/../net/mac80211/ieee80211_i.h:876: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
include/../net/mac80211/ieee80211_i.h:876: warning: its scope is only this definition or declaration, which is probably not what you want
include/../net/mac80211/ieee80211_i.h:879: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
include/../net/mac80211/ieee80211_i.h:882: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
include/../net/mac80211/ieee80211_i.h:885: warning: ‘struct ieee80211_elem_tspec’ declared inside parameter list
make[3]: *** [/home/alucard/iwlwifi-1.0.0/compatible/iwl-3945-rs.o] Error 1
make[2]: *** [_module_/home/alucard/iwlwifi-1.0.0/compatible] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-1-686'
make: *** [modules] Error 2
And at this point, firmware-iwlwifi is NOT installed, and I had just rebooted.

Now, for kicks:
Code:
alucard@thrawn:~/iwlwifi-1.0.0$ sudo ifconfig wlan0 up
wlan0: ERROR while getting interface flags: No such device
(did you change that from iwconfig to ifconfig on me?)
 
Old 09-02-2007, 08:36 PM   #12
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
1) concerning the firmware it doesn't matter if you install it first or after the make, make install of iwlwifi
2) the output of my compilation is the following:

03:35 dhcppc8:../ThinkpadR61/iwlwifi-1.0.0 # make
Checking kernel compatibility in:
/lib/modules/2.6.22.5-2-default/source
* Kernel supports required features for 'tip' version.
Building compatibility version in 'compatible/' directory:
Copying compatible/ from origin/...done
make -C /lib/modules/2.6.22.5-2-default/source O=/lib/modules/2.6.22.5-2-default/build M=/soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/ modules
make[1]: Entering directory `/usr/src/linux-2.6.22.5-2'
CC [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/base-3945.o
CC [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl-3945.o
CC [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl-3945-rs.o
CC [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/base-4965.o
CC [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl-4965.o
CC [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl-4965-rs.o
LD [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl3945.o
LD [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl4965.o
Building modules, stage 2.
MODPOST 2 modules
CC /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl3945.mod.o
LD [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl3945.ko
CC /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl4965.mod.o
LD [M] /soft/OS10.2/ThinkpadR61/iwlwifi-1.0.0/compatible/iwl4965.ko
make[1]: Leaving directory `/usr/src/linux-2.6.22.5-2'
03:35 dhcppc8:../ThinkpadR61/iwlwifi-1.0.0 # make install

Module compatible/iwl4965.ko compatible/iwl3945.ko (s) installed into:
/lib/modules/2.6.22.5-2-default/kernel/drivers/net/wireless

Don't forget to copy firmware to your hotplug's firmware directory
and have the hotplug tools in place.

See INSTALL for more information.
03:36 dhcppc8:../ThinkpadR61/iwlwifi-1.0.0 #


the kernel 2.6.22 need gcc42... is that the problem?
 
Old 09-02-2007, 08:38 PM   #13
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
in your make output there is an error after

In file included from include/../net/mac80211/ieee80211_rate.h:18,
from /home/alucard/iwlwifi-1.0.0/compatible/iwl-3945-rs.c:43:

could it be that the version of mac80211 is the wrong one? is it loaded as module? perhaps you try to explicitely follow the instructions on intel page WITH installation of the mac80211 module... did you already try that?

iwconfig wlan0 up was a typo, it has to be ifconfig...

Last edited by seelenbild28; 09-02-2007 at 08:44 PM.
 
Old 09-03-2007, 01:46 PM   #14
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
So ieee80211_rate.h isn't in linux-headers-2.6.22. But it turns out it is in linux-source-2.6.22. I untar-bzip'd the source, and did
Code:
ln -s /usr/src/linux-source-2.6.22 /lib/modules/`uname -r`/source
I then compiled the driver (0.1.14).. AND IT WORKED.

And I did ./load AND IT LOADED THE MODULES.

And I checked Network Manager and I can see my school's wireless network!!! (but I can't connect because this PC isn't registered with the system).

Oh my god. I'll make sure I can connect to my WLAN in my apartment tonight.

To summarize, I had to
- Use a kernel >= 2.6.22 (now on 2.6.22-2-686)
- Install the firmware-iwlwifi (Debian) package
- Do the above so that the driver can find the headers it needs.

Thanks all for your help.

Last edited by AlucardZero; 09-03-2007 at 01:53 PM.
 
Old 09-03-2007, 02:55 PM   #15
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
very good!!! congratulations... this is the damn good thing suse provides, it's even for stupid newbies like me, laugh, you do not have to think about compiling like in debian*g

so, I am pleased to hear from you a success report tonight...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect to school WEP network on Intel 4965 skale Linux - Wireless Networking 1 08-26-2007 05:07 PM
Livecd with 4965 support bobotoes Linux - Distributions 0 08-21-2007 12:35 PM
Intel Wireless PRO 4965 with NDISwrapper just doesn't want to work! S15_88 Linux - Wireless Networking 1 06-18-2007 09:18 AM
SoQt with QT compliation problem fadelhomsi Programming 1 04-13-2006 03:22 AM
garnome hal compliation problem fafis Linux - Software 0 04-09-2006 07:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration