Linux
--
Questions
--
Followers
Top Experts
I am trying to enable injection on my Toshiba Satellite laptop the wireless card is ipw 3945 as experienced users might know that the driver that comes with Ubuntu does not support injection and the driver needs to be patched.
I have followed http://aircrack-ng.org/doku.php?id=ipw3945Â from the aircrack site.
I did not get very far with the process although it is simple and straight forward :
I did
wget http://homepages.tu-darmstadt.de/~p_larbig/wlan/ipwraw-ng-2.0.0-10072007.tar.bz2
tar -xjf ipwraw-ng*
cd ipwraw-ng
make
but make returns the errors presented.
I did the following steps to make sure I have all the needed dependencie:
apt-get install build-essential
I have downloaded the correct kernel headers and the linux source for my kernel using apt-get...I could not find anything useful using Google..
any hints ?
/home/alinux/ipwraw-ng/ipwraw.c: In function ‘ipw_bg_up’:
/home/alinux/ipwraw-ng/ipwraw.c:8212: error: dereferencing pointer to incomplete type
/home/alinux/ipwraw-ng/ipwraw.c:8212: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/alinux/ipwraw-ng/ipwraw.c:8212: warning: initialization from incompatible pointer type
/home/alinux/ipwraw-ng/ipwraw.c:8212: error: invalid use of undefined type ‘struct delayed_work’
/home/alinux/ipwraw-ng/ipwraw.c:8213: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/alinux/ipwraw-ng/ipwraw.c:8213: warning: initialization from incompatible pointer type
/home/alinux/ipwraw-ng/ipwraw.c: In function ‘ipw_bg_restart’:
/home/alinux/ipwraw-ng/ipwraw.c:8226: error: dereferencing pointer to incomplete type
/home/alinux/ipwraw-ng/ipwraw.c:8226: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/alinux/ipwraw-ng/ipwraw.c:8226: warning: initialization from incompatible pointer type
/home/alinux/ipwraw-ng/ipwraw.c:8226: error: invalid use of undefined type ‘struct delayed_work’
/home/alinux/ipwraw-ng/ipwraw.c:8227: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/alinux/ipwraw-ng/ipwraw.c:8227: warning: initialization from incompatible pointer type
/home/alinux/ipwraw-ng/ipwraw.c: In function ‘ipw_pci_probe’:
/home/alinux/ipwraw-ng/ipwraw.c:8737: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
make[2]: *** [/home/alinux/ipwraw-ng/ipwraw.o] Error 1
make[1]: *** [_module_/home/alinux/ipwraw-ng] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.17-12-386'
make: *** [modules] Error 2
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
make -C /lib/modules/2.6.22.9fba/b
make[1]: Entering directory `/usr/src/linux-2.6.22.9'
 CC [M]  /tmp/ipwraw-ng/ipwraw.o
/tmp/ipwraw-ng/ipwraw.c: In function `ipw_pci_probe':
/tmp/ipwraw-ng/ipwraw.c:87
/tmp/ipwraw-ng/ipwraw.c:87
make[2]: *** [/tmp/ipwraw-ng/ipwraw.o] Error 1
make[1]: *** [_module_/tmp/ipwraw-ng] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22.9'
make: *** [modules] Error 2
What version of linux are you building against? The INSTALL file mentions 2.6.13 - that might be a good one to try (rather old though). 2.6.15 and current sources both have the element "`wireless_handlers'" in *some* structures. Current source has a whole new directory net/wireless/ (as well as drivers/net/wireless/) so maybe my kernel is a bit too new.
I suspect your kernel is too old (according to ipwraw-ng/INSTALL). Â Either that or /lib/modules/$(uname -r)/build is not a symbolic link to your current kernel's source. Please check these items and post your findings
http://tinyshell.be/aircrackng/forum/index.php?topic=924.0
http://tinyshell.be/aircrackng/forum/index.php?topic=1985.120
Well concerning you question about the symlink I did
root@alinux-laptop:/lib/mo
2.6.15-28-386/ Â 2.6.17-12-386/ Â 2.6.17-12-generic/ Â
They do look like directories not like symlinks..did I do something wrong here ?
Anyway I am glad you are helping me I respect your expertise.
Thx
First we install the firmware files (first finding where to install
them):
    % wget http://bughost.org/ipw3945/ucode/iwlwifi-ucode-2.14.1.tgz .
    % DIR=$(sed -ne "s:^FIRMWARE_DIR=\([^, ]*\).*:\1:p" \
        /etc/hotplug/firmware.agen
    % tar xzvf iwlwifi-ucode-2.14.1.tgz
    % less iwlwifi-ucode-2.14.1/LICEN
    # cp ipwlwifi-ucode-2.14.1/iwlw
NOTE: Â 'DIR' above typically works out to /lib/firmware.
Next you can build the driver sources:
    % make
However..I do not have a /etc/hotplug/firmware.agen
would that be correct...?
What is this firmware.agent for anyway ? And why aint it included in ubuntu os






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Unfortunately your ls is not actually what I wanted, although it does show that your linux revs are adequately new. Try these:
ls -l /lib/modules/$(uname -r)/build
ls -l /lib/modules/$(uname -r)/build/
The forward slash at the end of the second one should list directory contents.
lrwxrwxrwx 1 root root 36 2007-11-22 16:16 /lib/modules/2.6.17-12-386
root@alinux-laptop:/home/a
total 340
lrwxrwxrwx 1 root root   31 2007-11-22 16:16 arch -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   32 2007-11-22 16:16 block -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   33 2007-11-22 16:16 crypto -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   34 2007-11-22 16:16 drivers -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   35 2007-11-22 16:16 firmware -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   29 2007-11-22 16:16 fs -> ../linux-headers-2.6.17-12
drwxr-xr-x 4 root root  4096 2007-11-22 16:16 include
lrwxrwxrwx 1 root root   31 2007-11-22 16:16 init -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   30 2007-11-22 16:16 ipc -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   33 2007-11-22 16:16 kernel -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   30 2007-11-22 16:16 lib -> ../linux-headers-2.6.17-12
-rw-r--r-- 1 root root  45475 2007-09-24 02:10 Makefile
lrwxrwxrwx 1 root root   29 2007-11-22 16:16 mm -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   34 2007-11-22 16:16 modules -> ../linux-headers-2.6.17-12
-rw-r--r-- 1 root root 286242 2007-09-24 00:25 Module.symvers
lrwxrwxrwx 1 root root   30 2007-11-22 16:16 net -> ../linux-headers-2.6.17-12
drwxr-xr-x 8 root root  4096 2007-11-22 16:16 scripts
lrwxrwxrwx 1 root root   35 2007-11-22 16:16 security -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   32 2007-11-22 16:16 sound -> ../linux-headers-2.6.17-12
lrwxrwxrwx 1 root root   30 2007-11-22 16:16 usr -> ../linux-headers-2.6.17-12
20:27:05$ ls -l /lib/modules/$(uname -r)/build
lrwxrwxrwx  1 root root 23 2007-10-10 22:48 /lib/modules/2.6.22.9fba/b
20:11:04$ ls -l /lib/modules/$(uname -r)/build/
total 5752
-rw-r--r--  1 dunc users  18693 2007-09-27 04:03 COPYING
-rw-r--r--  1 dunc users  91435 2007-09-27 04:03 CREDITS
drwxr-xr-x  64 dunc users   8192 2007-09-27 04:03 Documentation
-rw-r--r--  1 dunc users   1530 2007-09-27 04:03 Kbuild
-rw-r--r--  1 dunc users  89876 2007-09-27 04:03 MAINTAINERS
-rw-r--r--  1 dunc users  50406 2007-10-10 22:29 Makefile
-rw-r--r--  1 dunc users  207333 2007-10-10 22:45 Module.symvers
lrwxrwxrwx  1 dunc users    27 2007-10-06 18:00 RCS -> /home/dunc/rcsdirs/linux_6
-rw-r--r--  1 dunc users  16930 2007-09-27 04:03 README
-rw-r--r--  1 dunc users   3119 2007-09-27 04:03 REPORTING-BUGS
drwxr-xr-x  28 dunc users   4096 2007-09-27 04:03 arch
drwxr-xr-x  2 dunc users   4096 2007-10-10 22:45 block
drwxr-xr-x  2 dunc users   4096 2007-10-10 22:45 crypto
drwxr-xr-x  67 dunc users   4096 2007-10-10 22:45 drivers
drwxr-xr-x  62 dunc users   8192 2007-10-10 22:45 fs
drwxr-xr-x  44 dunc users   4096 2007-10-10 22:35 include
drwxr-xr-x  2 dunc users   4096 2007-10-10 22:45 init
drwxr-xr-x  2 dunc users   4096 2007-10-10 22:45 ipc
drwxr-xr-x  5 dunc users   8192 2007-10-10 22:45 kernel
drwxr-xr-x  5 dunc users   8192 2007-10-10 22:45 lib
drwxr-xr-x  2 dunc users   4096 2007-10-10 22:45 mm
drwxr-xr-x  41 dunc users   4096 2007-10-10 22:45 net
drwxr-xr-x  9 dunc users   4096 2007-10-10 22:35 scripts
drwxr-xr-x  4 dunc users   4096 2007-10-10 22:45 security
drwxr-xr-x  18 dunc users   4096 2007-10-10 22:46 sound
drwxr-xr-x  2 dunc users   4096 2007-10-10 22:35 usr
-rwxr-xr-x  1 dunc users 7369124 2007-10-10 22:45 vmlinux
The makefile depends on the symlink /lib/modules/$(uname -r)/build pointing to the actual directory where the kernel was built. Your directory isn't that - there's no vmlinux or Kbuild (a necessary makefile).
I think you'd do best to get linux-2.6.17.12.tar.bz2 from ftp.kernel.org, rebuild and reinstall from that. With luck you can get the current .config from /proc/config.gz, or there may be one in your current "source" directory.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I appreciate your help.
Deflate compression algorithm (CRYPTO_DEFLATE) [M/y/?] m
 Michael MIC keyed digest algorithm (CRYPTO_MICHAEL_MIC) [M/y/?] m
 CRC32c CRC algorithm (CRYPTO_CRC32C) [M/y/?] m
 Testing module (CRYPTO_TEST) [M/n/y/?] m
*
* Hardware crypto devices
*
Support for VIA PadLock ACE (CRYPTO_DEV_PADLOCK) [M/n/y/?] m
Support for AES in VIA PadLock (CRYPTO_DEV_PADLOCK_AES) [Y/n/?] y
etc..
What struck me as very confusing is that my build dir contains total 340 while yours contains total 5752
I will try to build it myself as suggested..I just want to ask you if this could be because the headers were isntalled using apt-get ?
thx
Rename the old 2.6.17-12-386 in /lib/modules (to 2.6.17-12-386.orig say)
In the build dir, assuming "make" ran to completion, do (as root):
make modules_install
Now cd back to /lib/modules and do
diff -r 2.6.17-12-386.orig 2.6.17-12-386
Expect some differences due to date/time, but the .ko files should compare equal - AFAIK they have no date/time stuff in them. If any binary files compare different, compare them with "cmp -l" and make sure only a few locations are changed.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Linux
--
Questions
--
Followers
Top Experts
Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.