LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Compiling wireless compat for kernel 2.6.38-9 (https://www.linuxquestions.org/questions/linux-networking-3/compiling-wireless-compat-for-kernel-2-6-38-9-a-880143/)

green_dood 05-11-2011 12:56 PM

Compiling wireless compat for kernel 2.6.38-9
 
Hi guys!

I have been trying to compile the latest version of wireless compat (2011-05-05) listed here

http://wireless.kernel.org/download/...-wireless-2.6/

With the kernel shipped with Ubuntu Natty ( 2.6.38-9-generic ). I also applied the patches needed for WEP cracking

wl_frag+ack_v1.patch
nel-negative-one-maxim.patch

The problem is, the compliation process always return error, I tried going back with gcc 4.4 (as ubuntu 11.04 uses 4.5), it complies about some functions not declared. Here is the error:


Code:

CC [M]  /home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.o
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c: In function ‘___ieee80211_stop_tx_ba_session’:
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c:158: error: implicit declaration of function ‘kfree_rcu’
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c:158: error: ‘rcu_head’ undeclared (first use in this function)
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c:158: error: (Each undeclared identifier is reported only once
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c:158: error: for each function it appears in.)
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c: In function ‘ieee80211_tx_ba_session_handle_start’:
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c:317: error: ‘rcu_head’ undeclared (first use in this function)
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c: In function ‘ieee80211_stop_tx_ba_cb’:
/home/saeioul/compat-wireless-2011-05-04/net/mac80211/agg-tx.c:696: error: ‘rcu_head’ undeclared (first use in this function)

Before upgrading to Natty, I could compile the compat wireless. I should point out that I used an older version of wireless-compat, but that version also does not compile under the new kernel, and thats the reason I tried with the new version.

Any help will be appreciated, thanks in advance

corp769 05-12-2011 06:45 AM

Hello,

See here regarding this issue: http://comments.gmane.org/gmane.linu....general/69332

Cheers,

Josh

green_dood 05-13-2011 11:12 AM

I will give it a shot later, thanks!

corp769 05-13-2011 11:15 AM

Quote:

Originally Posted by green_dood (Post 4355440)
I will give it a shot later, thanks!

No problem man! If you have any questions regarding compat-wireless, ask away ;)

Josh

green_dood 05-13-2011 11:26 AM

Patch didn't work
 
Hi!

I tried to apply the patch listed in your post, but it refuses to work. It gives me this error

Code:

saeioul@saeioul-natty:~/compat-wireless-2011-05-05$ patch -p1 < tip-core-rcu-71-86-net-rcu-convert-call_rcu-kfree_tid_tx-to-kfree_rcu.patch
patching file net/mac80211/agg-tx.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n] y
Hunk #1 FAILED at 136.
Hunk #2 FAILED at 163.
Hunk #3 FAILED at 322.
Hunk #4 FAILED at 701.
4 out of 4 hunks FAILED -- saving rejects to file net/mac80211/agg-tx.c.rej

Perhaps I have to patch against a different wireless compat version, maybe one of before may? (as the patch has that date)

green_dood 05-13-2011 11:32 AM

Patch is ... ignored?
 
Hi, I also tried to patch against a version dated before may (the date of the patch), but unlike the other patches applied, this one does not list the offset or the lines that changed. Of course, it does not compile.

Any direction you can point to check for another patch maybe?

Thanks!!

corp769 05-13-2011 11:37 AM

Hello,

Have you tried an older version? I know the version I have listed in my blog worked without a hitch for me, and I used it for compiling many drivers for different chipsets. I would definitely try that before you go trying to apply a different version of a patch, and/or just a different patch in general.

Edit - Or, you can do what I did and modify the file manually and insert the changes by hand. The file might be a bit different, and that might be why it is giving you problems.

green_dood 05-13-2011 11:48 AM

Perhaps the dates are correct ...
 
Quote:

Originally Posted by corp769 (Post 4355443)
No problem man! If you have any questions regarding compat-wireless, ask away ;)

Josh

Thanks very MUCHO for the link with the patch.

I have read the information, and seems correct, because the date is May the 5th, the same date on the wireless compat package. I'm starting to think that maybe I'm not applying correctly the patch. I have always patched like this:

Code:

patch -p1 < diff_file.patch
Maybe there is something wrong with this.

green_dood 05-13-2011 11:50 AM

Choosing a version
 
Quote:

Originally Posted by corp769 (Post 4355458)
Hello,

Have you tried an older version? I know the version I have listed in my blog worked without a hitch for me, and I used it for compiling many drivers for different chipsets. I would definitely try that before you go trying to apply a different version of a patch, and/or just a different patch in general.

Edit - Or, you can do what I did and modify the file manually and insert the changes by hand. The file might be a bit different, and that might be why it is giving you problems.

Yep, I tried older versions of the wireless compat. I will try to introduce the changes by hand. In the meanwhile, can you tell me which version you used to compile?

Best regards!

corp769 05-13-2011 11:50 AM

To be completely honest with you, I normally look at the original file and hand edit like I said before. Could you post both the original file and the patch file? I can take a look to see if there is any compatibility issues, and even patch it for you and test it.

green_dood 05-13-2011 11:59 AM

Attachments
 
2 Attachment(s)
Quote:

Originally Posted by corp769 (Post 4355470)
To be completely honest with you, I normally look at the original file and hand edit like I said before. Could you post both the original file and the patch file? I can take a look to see if there is any compatibility issues, and even patch it for you and test it.


Okay, here we go. It would be great if you can tell me how to read those patch files so I can do this in the future. The only thing I get is that the diff file has the offset in which the changes go.

The attachments are in .txt , as .c and .patch are not accepted.

green_dood 05-13-2011 12:00 PM

1 Attachment(s)
Quote:

Originally Posted by corp769 (Post 4355470)
To be completely honest with you, I normally look at the original file and hand edit like I said before. Could you post both the original file and the patch file? I can take a look to see if there is any compatibility issues, and even patch it for you and test it.

I missed the correct file, this is the patch!!

Sorry for the inconvenience

corp769 05-13-2011 12:09 PM

As I look through the files right now as I type, the way I do is open both the patch file and original file in two separate terminals, and I swithc between them, looking at the patch file and navigating to the lines identified in the file. From there, I just match the text that correlates with the correct position, and then I copy and paste. I hope that makes sense to you, I'm a horrible explainer :p

green_dood 05-13-2011 12:10 PM

Check this out
 
Perhaps the patch you gave is already applied in the 2011-05-05 version I'm using.

http://www.spinics.net/lists/linux-w.../msg69073.html

The discussion stops where someone reverted the patch, I will try that, will tell later if works.

corp769 05-13-2011 12:17 PM

Haha, you beat me to it. The patch IS already applied. Maybe try reverting back to a previous version and go from there? It might be a compatibility issue, since compat-wireless is built around compatibility itself.


All times are GMT -5. The time now is 02:16 AM.