PDA

View Full Version : [SOLVED] ieee802.11 compiled!



dracayr
April 30th, 2010, 10:11 PM
Hi,

I was able to correctly compile ieee802.11 1.2.18 on Lucid. I'm posting this because I know many people had problems doing that. The problems I resolved were:

-new net_device_ops syntax in kernel 2.6.31+ (resolves error "struct net_device has no member named hard_start_xmit" etc)
-"proc_net undeclared"
-‘struct sk_buff’ has no member named ‘nh’(this only occurs in older versions of ieee, I resolved the error simply by trying the latest version)
-"error: too few arguments to function ‘iwe_stream_add_event’"
-netdevice.h:84: error: expected identifier before numeric constant
-error: ‘struct scatterlist’ has no member named ‘page’

I hope I haven't forgotten any :P

If anyone is interested in details, just reply, I'll be following this thread.

dracayr

Whinegum
May 2nd, 2010, 06:14 PM
Hi,
I'm realy interested in your solution. I've got the same errors as metioned and would like to know how to compile it without them.

Thanks,
Whinegum

dracayr
May 2nd, 2010, 08:03 PM
I'll have to warn you though: In the end, wireless didn't work for me, which may or may not be because of the changes I made to the source of ieee80211 (It could also be because of the changes to ipw2200, the wireless driver, my hardware, the wireless firmware, or something completely different)

Also, I hope you have some technical knowledge/experience, because frankly, otherwise you shouldn't be doing this..

for the error "too few arguments to function ‘iwe_stream_add_event'": use this patch:
http://ubuntu-virginia.ubuntuforums.org/attachment.php?attachmentid=98810&d=1231150420

for the proc_net and the ‘struct scatterlist’ has no member named ‘page’ errors: I fixed them manually, but later found a patch somewhere (I'm quite sure it was on the forums) search for it (post again if you can't find it)

the netdevice.h error: It seems that certain constants are declared twice. (once in include/linux/net_device.h and once in compat.h).

Comment out the definitions for NETDEV_TX_OK and NETDEV_TX_BUSY in compat.h, and replace every ocurrence of NETDEV_TX_OK in all source/header files with 0, and all occurrences of NETDEV_TX_BUSY with 1. (you can use grep to find them; I think there was only one though)

now the struct net_device has no member named hard_start_xmit error:
This was the only error for which I significantly changed the source (which is why I'm going to explain why I did what, so that someone wiser than me might point out potential errors ;) ). Here is what I did:
Apparantly in kernels 2.6.31 and up, a new syntax for the struct net_device was used: certain methods that drivers had to define/replace were moved from net_device.method to net_device.netdev_ops.ndo_method, where netdev_ops is a net_device_ops, and declared const. because of netdev_ops being const, those methods now can't be simply replaced by doing net_device->method = new_method; Instead, a new instance of net_device_ops has to be created with the new methods, which may then replace the old netdev_ops.
Which is what I did in the source.
In ieee80211_module.c, in the function alloc_ieee80211, declare a new net_device_ops:

struct net_device_ops *dev_ops;
You can put that line somewhere at the beginning of the function.
comment out these lines:
dev->hard_start_xmit = ieee80211_xmit;
dev->get_stats = ieee80211_generic_get_stats;
Instead, use these:
dev_ops = &(dev->netdev_ops);
dev_ops->ndo_start_xmit = ieee80211_xmit;
dev_ops->ndo_get_stats = ieee80211_generic_get_stats;
dev->netdev_ops = dev_ops;

whew. I guess that was it. But, if you want to compile a driver (like ipw2200) also, that last error will quite possibly occur again. The fix will be the same, although maybe a bit more complicated, because more functions have to be changed.

Good luck ;)
dracayr

Whinegum
May 4th, 2010, 06:01 PM
Thank you for answering so quickly.

It seems to be a long and difficult way to get everything patched and compiled. If I had more time, would try it for sure. But that's not the case.
Another point is that my wireless connection runs well and I don't want to risk errors. I only wanted to compile it by myself because of "injection".

I hope you aren't disappointed. I let you know, if I have time to try it. But certainly I will follow this thread.

Whinegum


(I hope my English is not as bad as I suspect)

Dominiq
May 20th, 2010, 02:47 AM
Hi,
I've just upgraded to Debian Testing with a 2.6.32-3-686 and I am facing some of the problems you mention in your post. I am trying to make my intel 3945abg wireless card work. I edited the ieee80211_module.c following your instructions. Most of the errors were gone, but I got a new one.


Makefile:17:
Makefile:18: WARNING: $SHELL not set to bash.
Makefile:19: If you experience build errors, try
Makefile:20: 'make SHELL=/bin/bash'.
Makefile:21:
Checking in /lib/modules/2.6.32-3-686 for ieee80211 components...
make -C /lib/modules/2.6.32-3-686/build M=/home/dom/Downloads/ieee80211-1.2.18 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-3-686'
/home/dom/Downloads/ieee80211-1.2.18/Makefile:17:
/home/dom/Downloads/ieee80211-1.2.18/Makefile:18: WARNING: $SHELL not set to bash.
/home/dom/Downloads/ieee80211-1.2.18/Makefile:19: If you experience build errors, try
/home/dom/Downloads/ieee80211-1.2.18/Makefile:20: 'make SHELL=/bin/bash'.
/home/dom/Downloads/ieee80211-1.2.18/Makefile:21:
CC [M] /home/dom/Downloads/ieee80211-1.2.18/ieee80211_module.o
/home/dom/Downloads/ieee80211-1.2.18/ieee80211_module.c: In function ‘alloc_ieee80211’:
/home/dom/Downloads/ieee80211-1.2.18/ieee80211_module.c:150: error: ‘struct net_device’ has no member named ‘change_mtu’
/home/dom/Downloads/ieee80211-1.2.18/ieee80211_module.c:152: warning: assignment from incompatible pointer type
make[4]: *** [/home/dom/Downloads/ieee80211-1.2.18/ieee80211_module.o] Error 1
make[3]: *** [_module_/home/dom/Downloads/ieee80211-1.2.18] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-3-686'
make: *** [modules] Error 2Can you help me please?

chili555
May 20th, 2010, 02:52 AM
I am trying to make my intel 3945abg wireless card work.It works out of the box unless you have underlying problems of some other kind. Are you really referring to injection?

Dominiq
May 20th, 2010, 03:10 AM
I don't know actually. This is what I get in my dmesg

[ 19.710669] iwl3945 0000:05:00.0: firmware: requesting iwlwifi-3945-2.ucode
[ 19.872178] iwl3945 0000:05:00.0: iwlwifi-3945-2.ucode firmware file req failed: -2
[ 19.875734] iwl3945 0000:05:00.0: firmware: requesting iwlwifi-3945-1.ucode
[ 19.884878] iwl3945 0000:05:00.0: iwlwifi-3945-1.ucode firmware file req failed: -2
[ 19.888705] iwl3945 0000:05:00.0: Could not read microcode: -2
[ 20.457515] iwl3945 0000:05:00.0: firmware: requesting iwlwifi-3945-2.ucode
[ 20.461943] iwl3945 0000:05:00.0: iwlwifi-3945-2.ucode firmware file req failed: -2
[ 20.466543] iwl3945 0000:05:00.0: firmware: requesting iwlwifi-3945-1.ucode
[ 20.470591] iwl3945 0000:05:00.0: iwlwifi-3945-1.ucode firmware file req failed: -2
[ 20.472430] iwl3945 0000:05:00.0: Could not read microcode: -2

And this is what I get with iwconfig

lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11abg ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

How do I get it to work then?

chili555
May 20th, 2010, 03:57 AM
It seems to be missing firmware. What does this say?
ls /lib/firmware | grep ucodeIt ought to find iwlwifi-3945-2.ucode.

Can you move it over to the router and install linux-backports-modules-lucid-generic? It has firmware and a later driver in it.

Dominiq
May 20th, 2010, 04:06 AM
Yes I just figured that out. It's the firmware that was missing. I just had to download the ucode, and now it works. It was so simple. Thanks for your help!

yuneng_95
August 3rd, 2011, 04:26 PM
hey. i got some problems too when installing this driver. the first problem was the missing autoconf.h file, which i eventually found it in the kernel so i copied it and it was detected. but then further problems messed me up. this was the code.

yuneng@yuneng-Inspiron-1420:~/ipwraw-ng$ make SHELL=/bin/bash
make -C /lib/modules/2.6.38-10-generic/build M=/home/yuneng/ipwraw-ng modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.38-10-generic'
CC [M] /home/yuneng/ipwraw-ng/ipwraw.o
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_send_cmd’:
/home/yuneng/ipwraw-ng/ipwraw.c:1015:8: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c:1015:8: note: each undeclared identifier is reported only once for each function it appears in
/home/yuneng/ipwraw-ng/ipwraw.c:1015:3: error: implicit declaration of function ‘signal_pending’
/home/yuneng/ipwraw-ng/ipwraw.c:1015:3: error: implicit declaration of function ‘schedule_timeout’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘show_temperature’:
/home/yuneng/ipwraw-ng/ipwraw.c:1360:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘show_status’:
/home/yuneng/ipwraw-ng/ipwraw.c:2432:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘show_cfg’:
/home/yuneng/ipwraw-ng/ipwraw.c:2443:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘dump_error_log’:
/home/yuneng/ipwraw-ng/ipwraw.c:2460:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘dump_event_log’:
/home/yuneng/ipwraw-ng/ipwraw.c:2474:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘show_rf_kill’:
/home/yuneng/ipwraw-ng/ipwraw.c:2488:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘store_rf_kill’:
/home/yuneng/ipwraw-ng/ipwraw.c:2545:46: error: ‘struct device’ has no member named ‘driver_data’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_irq_handle_error’:
/home/yuneng/ipwraw-ng/ipwraw.c:2596:2: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_nic_reset’:
/home/yuneng/ipwraw-ng/ipwraw.c:4991:2: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_handle_promiscuous_tx’:
/home/yuneng/ipwraw-ng/ipwraw.c:6526:24: error: ‘IEEE80211_RADIOTAP_HDRLEN’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_tx_complete’:
/home/yuneng/ipwraw-ng/ipwraw.c:6841:3: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_rx_handle’:
/home/yuneng/ipwraw-ng/ipwraw.c:7187:6: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_bg_rf_kill’:
/home/yuneng/ipwraw-ng/ipwraw.c:7751:2: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_down’:
/home/yuneng/ipwraw-ng/ipwraw.c:8160:2: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_prom_alloc’:
/home/yuneng/ipwraw-ng/ipwraw.c:8375:20: error: ‘struct net_device’ has no member named ‘open’
/home/yuneng/ipwraw-ng/ipwraw.c:8376:20: error: ‘struct net_device’ has no member named ‘stop’
/home/yuneng/ipwraw-ng/ipwraw.c:8377:20: error: ‘struct net_device’ has no member named ‘get_stats’
/home/yuneng/ipwraw-ng/ipwraw.c:8378:20: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/yuneng/ipwraw-ng/ipwraw.c: In function ‘ipw_pci_probe’:
/home/yuneng/ipwraw-ng/ipwraw.c:8897:9: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/home/yuneng/ipwraw-ng/ipwraw.c:8898:9: error: ‘struct net_device’ has no member named ‘open’
/home/yuneng/ipwraw-ng/ipwraw.c:8899:9: error: ‘struct net_device’ has no member named ‘stop’
/home/yuneng/ipwraw-ng/ipwraw.c:8900:9: error: ‘struct net_device’ has no member named ‘get_stats’
/home/yuneng/ipwraw-ng/ipwraw.c:8901:9: error: ‘struct net_device’ has no member named ‘set_mac_address’
make[2]: *** [/home/yuneng/ipwraw-ng/ipwraw.o] Error 1
make[1]: *** [_module_/home/yuneng/ipwraw-ng] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-10-generic'
make: *** [modules] Error 2
yuneng@yuneng-Inspiron-1420:~/ipwraw-ng$


can u pls help me resolve my problem?? thx alot :D