Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184804 - net-wireless/madwifi-ng does not compile on kernel 2.6.22
Summary: net-wireless/madwifi-ng does not compile on kernel 2.6.22
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL: http://madwifi.org/ticket/1315
Whiteboard:
Keywords:
Depends on:
Blocks: kernel-2.6.22
  Show dependency tree
 
Reported: 2007-07-10 03:59 UTC by Murph
Modified: 2007-07-13 07:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New madwifi-2.6.22.patch (madwifi-2.6.22.patch,3.51 KB, patch)
2007-07-10 09:26 UTC, Thomas S. Howard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Murph 2007-07-10 03:59:29 UTC
Madwifi-ng doesn't compile on kernel 2.6.22 (specially, for me, gentoo-sources-2.6.22). This is a known bug (see URL for madwifi's ticket). there is a patch posted (I haven't tested it), so maybe we should use that untill the next version of madwifi is out?

Reproducible: Always

Steps to Reproduce:
1.Run 2.6.22
2.emerge madwifi-ng

Actual Results:  
The same error as in the attached ticket.

Expected Results:  
It should have compiled.

I was using AMD64. I think this qualifies as 'major' since my desktop is unable to access the internet w/ the latest kernel, but feel free to change that.
Comment 1 Murph 2007-07-10 06:10:47 UTC
Sorry, forgot to name the package that didn't compile. 
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2007-07-10 06:28:54 UTC
What is your madwifi version? It works perfectly fine for me.
Comment 3 Stefan Schweizer (RETIRED) gentoo-dev 2007-07-10 06:30:29 UTC
http://madwifi.org/attachment/ticket/1315/141-Madwifi-fixes.patch

does that patch help for you?
Comment 4 Thomas S. Howard 2007-07-10 07:31:29 UTC
(In reply to comment #3)
> http://madwifi.org/attachment/ticket/1315/141-Madwifi-fixes.patch
> 
> does that patch help for you?
> 

In regards to that patch, it needed some tweaking to apply in an ebuild.  The line numbers aren't quite right, the headers needed altering, it had a section meant for in-kernel use, part of it was already in the madwifi-2.6.22.patch in portage, and it used some hacky #if's so it would build against 2.6.22_rc1.  Also, it created an interesting problem.  I'm using two Trendnet NICs with AR5212 chips.  My linux machine is the AP, with hostapd, using iptables to do masquerading (and using ip forwarding, of course.  The Atheros NIC is bridged with my onboard NIC (e1000).  So far, I haven't had much trouble with it, until applying the patch and rebooting with a 2.6.22-gentoo kernel.  Hostapd still started, the bridge was fine, the station associated (XP box), and packets came merrily through the air, marched over the bridge, and out ppp0 into the great big internet. Unfortunately, the reverse was not true.  Nothing would pass back over the bridge and to the station.  From that end, everything just timed out.
Since it was needed, I had to go reboot with the 2.6.21 kernel, so I didn't get a chance to test some stuff I wanted to. There's another station, a Wii, which wasn't on at the time, and I plan to check that.  I also didn't get around to sniffing the wireless NIC.  Currently, I've been checking the madwifi tree on the net.  There's a couple changes that aren't in the patch that I'm going to try tomorrow. Well, there's actually been a lot of changes, but I've isolated a couple small ones that I think may at least alter the current behavior.

Comment 5 Murph 2007-07-10 07:56:31 UTC
I'm sorry, I can't seem to get that patch to apply cleanly at all (as comment #4 indicated, it's kinda trick). I'm using
madwifi-ng-0.9.3 and gentoo sources 2.6.22 and linux headers 2.6.22 as well.

drivers/net/wireless/madwifi/net80211/ieee80211_input.c: In function
'ieee80211_defrag':
drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1051: error: invalid
operands to binary -
drivers/net/wireless/madwifi/net80211/ieee80211_input.c:1054: error: invalid
operands to binary -

.. and then a bunch of warnings before it errors out.
Comment 6 Thomas S. Howard 2007-07-10 09:26:35 UTC
Created attachment 124404 [details, diff]
New madwifi-2.6.22.patch

OK, tried out the changes. No dice.  Packets go out, they don't come back in.
Same story for the Wii.  I tcpdumped ath0, and realized arp was working. I had forgotten that it would show up there.  So, I was seeing llc traffic, arp, 802.11 stuff, and outgoing IP traffic. Just nothing incoming on IP. Not a surprise, since it wasn't showing up on br0. Then I realized: I forgot to rebuild hostapd against the new kernel. Son of a..anyway, since I can't test this in station mode, I'm posting it for someone else to try. It replaces the current madwifi-2.6.22 patch in portage (/usr/portage/net-wireless/madwifi-ng/files/madwifi-2.6.22.patch, for your pasting convenience)

I'll rebuild hostapd and retest tomorrow (well, technically, later today). Sleep now.
Comment 7 Murph 2007-07-10 14:55:26 UTC
Thanks for the updated patch, Thomas. It compiled on my machine and seems to be working pretty good :)

I'm not using the driver for anything like routing, though - just connecting to an access point and using the internet. I won't close the bug since Thomas is still having an issue.
Comment 8 Thomas S. Howard 2007-07-11 01:08:32 UTC
Ok, rebuilt hostapd, which had it's own problems (see bug #184830, for those who care).  Rebuilt bridge-utils, just in case.  Nope. Nothing can cross back over the bridge to the stations.  Reboot with the 2.6.21 kernel, everything works. I traced a ping.  The ICMP reply packets come into eth0, which is the ppp0 link, and go...somewhere. At this point, I don't know if madwifi is to blame, so maybe this bug should be closed. It could be hostapd, the kernel, madwifi, or all three. I'd like to know if anyone is using a different wireless driver w/a bridge and seeing the same behavior.
Comment 9 Emilie Roberts 2007-07-12 22:49:11 UTC
The new patch works for me too, just a basic wifi internet connection setup with NetworkManger, none of the fancy routing stuff.  Seems like the other issues are probably outside of madwifi-ng.  

Is it possible to get the latest version of the patch into portage before fixing    all the other problems?  That way at least the basic functions will work which is better than it not being able to compile and will do it for most folks.

Thanks a lot! 
Comment 10 Stefan Schweizer (RETIRED) gentoo-dev 2007-07-13 07:57:50 UTC
thank you, I added the new patch.