FS#9202 - madwifi patch for Atheros 5007EG

Attached to Project: Arch Linux
Opened by Shrutarshi Basu (Basu) - Monday, 14 January 2008, 03:39 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 31 May 2009, 10:31 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Alexander Baldeck (kth5)
Thomas Bächler (brain0)
Architecture i686
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:The current madwifi driver does not work with the Atheros 5007EG chipset -- the ndiswrapper driver sometimes work. I've found this patch which will make the madwifi driver work reliably.

http://madwifi.org/ticket/1679

the normal network and wicd daemons work and nothing has been broken.

All the instructions are in the URL
This task depends upon

Closed by  Thomas Bächler (brain0)
Sunday, 31 May 2009, 10:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  This is very old. ath5k and ath9k should cover all atheros devices nowadays.
Comment by Nathan Crandall (cactus.ed) - Monday, 14 January 2008, 10:41 GMT
It does work, I have been using this on my Acer 3680 Laptop for the past month. Just an FYI **It does not support x86_64** -- breaks the ABI for all non-i386 HAL binaries. AUR?
Comment by Branko Vukelic (foxbunny) - Wednesday, 16 April 2008, 09:57 GMT
I confirm the issue in the original ticket. There are Atheros 5007EG chipsets that are recognized as Atheros 5006EG. Those do not work with stock madwifi drivers in the [CORE]. Could there be another package with the patch?

I built the drivers using this tarball:

http://snapshots.madwifi.org/special/madwifi-nr-r3366+ar5007.tar.gz

That was the only driver my wifi card would work with.

(Acer Aspire 4315 here)
Comment by Greg (dolby) - Saturday, 05 July 2008, 14:33 GMT Comment by Branko Vukelic (foxbunny) - Saturday, 05 July 2008, 14:46 GMT
This AUR package works on both i686 and x86_64.

http://aur.archlinux.org/packages.php?ID=17392
Comment by Thomas Bächler (brain0) - Saturday, 05 July 2008, 16:24 GMT
I'm not using madwifi, so I can't really make that decision. I leave it up to Alex or Aaron.
Comment by Börje Holmberg (linfan) - Tuesday, 05 August 2008, 19:00 GMT
I can second the discussion above, both mentioned madwifis work for my hp laptop (madwifi-nr-r3366+ar5007.tar.gz and http://aur.archlinux.org/packages.php?ID=17392), but NONE OF THE OTHER MADWIFIS that archlinux offers, not even the new one in testing.

But it is a good thing that AUR has a madwifi package that will work with ar5006/5007eg and then there is the second possibility to download the .tar.gz and run make and make install as root and insert the modules to /lib/modules.
Comment by Aaron Griffin (phrakture) - Tuesday, 05 August 2008, 19:16 GMT
Can anyone verify that this patch doesn't break other chipsets, and only adds support for the ar5007 chipset?
Comment by Börje Holmberg (linfan) - Tuesday, 05 August 2008, 19:23 GMT
I am not that familiar with the technical aspects - but I would recommend a visit to FreeNode #madwifi - they know for sure.
Comment by Börje Holmberg (linfan) - Wednesday, 06 August 2008, 18:28 GMT
Here is my query on FreeNode #madwifi. I hope it is of some use.
_______________________

<linfan> The madwifi maintainer on Archlinux wonders about the /ticket/1192: "Can anyone verify that this patch doesn't break other chipsets, and only adds support for the ar5007 chipset?"
<linfan> What should I answer him?
<nbd> nobody can without actually testing all chipsets
<linfan> ok, then i will answer him that madwifi better not be updated
<alisonken1> also, make sure of the actual chipset he's using
<linfan> it is not a question about that - it is a question about replacing stock madwifi with the http://madwifi.org/ticket/1192
* axelm71 has quit (Remote closed the connection)
<alisonken1> the only reason for ticket 1192 is the upgrade to newer chipsets via the new hal. if you're not using a chipset that _requires_ the new hal (as noted, some chipsets are incorrectly reported via lspci), then there's no reason to upgrade to the new hal
<alisonken1> if you're currently using madwifi stock (stable), then there should be no reason to upgrade to ticket 1192 other than testing
* wackl_ is now known as wackl
* topse has quit (Remote closed the connection)
* topse (n=topse@p5B2B2E5C.dip0.t-ipconnect.de) has joined #madwifi
<linfan> well, many have laptops with ar5006/5007/242*agb and they cannot use madwifi per se. They either have to use the madwifi-nr-r3366+ar5007.tar.gz or madwifi-newhal-svn 3704-1. So, if this new hal package is to become the only madwifi package, will all atheros chipsets work with it?
<alisonken1> ok - with that caveat - the new hal will be merged into trunk as soon as it gets tested enough to at least not kill older chipsets :)
<alisonken1> as noted, there have been some api changes with the new hal, and they have to be verified with the older code before it gets merged
<linfan> ok, thanks - then I will cut and paste this info to the bug report.
<topse> @ linfan I was only able to get my ar5006 working with the newest hal ^^
<marvin42> 10-4, topse.
<linfan> yeah, me, too - but there are other atheros users too that have other chipsets
_______________

regards

linfan
Comment by Aaron Griffin (phrakture) - Thursday, 07 August 2008, 17:29 GMT
Well, I'm fine with using a patched version in extra here, considering this is major functionality. The channel doesn't seem to scream "oh god it breaks everything!", but we should still keep it in testing a bit longer
Comment by Xavier (shining) - Thursday, 07 August 2008, 18:18 GMT
<alisonken1> ok - with that caveat - the new hal will be merged into trunk as soon as it gets tested enough to at least not kill older chipsets :)
<alisonken1> as noted, there have been some api changes with the new hal, and they have to be verified with the older code before it gets merged

Based on this information, doesn't it look safer to keep the two madwifi versions (madwifi from core and madwifi-newhal-svn from AUR)?
Comment by name withheld (Gullible Jones) - Saturday, 30 August 2008, 16:23 GMT
FWIW, Debian is currently using the patch in lenny/Testing. So far nobody seems to have reported any problems.
Comment by Gavin Bisesi (Daenyth) - Saturday, 21 March 2009, 14:14 GMT
What's the status on this?
Comment by Börje Holmberg (linfan) - Sunday, 12 April 2009, 15:44 GMT
with the new kernel 2.6.29 wifi does not work at all any more for my atheros - and it is even impossible to build the madwifi-newhal-svn from AUR.

Further it seems there is all the madwifi stuff in the kernel and madwifi is obsolete, but that leaves my laptop without wifi unfortunately as the kernel does not support my atheros chip.
Comment by Branko Vukelic (foxbunny) - Sunday, 12 April 2009, 16:01 GMT
I have successfully compiled r3835-20080801 and it kept working through all kernel updates since a few months ago. I don't know what the kernel version was that I first built the driver against, but it still works without problems.

The said version can still be obtained here (from the look of it, I didn't get mine there):

http://code.google.com/p/eeedora/source/browse/trunk/generate-rpms/madwifi/?r=138
Comment by Börje Holmberg (linfan) - Sunday, 12 April 2009, 17:08 GMT
Found the fault on google - had to edit the src and tell it to build despite errors. The if_ath.c had to be edited in src/madwifi-hal-0.10.5.6/ath

change int i, lclass = 0; to int i;

http://georgia.ubuntuforums.org/showthread.php?p=7057640
Comment by Branko Vukelic (foxbunny) - Friday, 17 April 2009, 20:12 GMT
With kernel 2.6.29 the ath5k works for my wireless. I no longer use madwifi with patch for my 5007EG.
Comment by Frederic Bezies (fredbezies) - Wednesday, 06 May 2009, 13:17 GMT
Since kernel 2.6.28 there is no need of madwifi for atheros 5007eg driver. Which is a great thing.
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 13:31 GMT
I did a reinstall on my laptop about 2 weeks ago, and I could not get wifi to work without installing madwifi-newhal-svn from AUR.

When you say that you "no longer user madwifi with patch..." do you mean, you don't even use madwifi?
Comment by Frederic Bezies (fredbezies) - Wednesday, 06 May 2009, 13:37 GMT
I meant this.

Just add ath5k in your modules line in /etc/rc.conf.

It enable wifi hardware support.
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 13:49 GMT
I could be wrong but ath5k doesn't exist (as 'ath5k' at least). WiFi works, though, even with loading of ath5k failing.
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 13:53 GMT
I did pacman -R madwifi-newhal-svn madwifi-utils and added ath5k to rc.conf and it failed:

Interface ath0 is not a wireless inerface :(
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 14:07 GMT
It's not ath0. It's wlan0 or wifi0 or something. Not at home right now so can't say for sure.
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 14:12 GMT
yeah, figured that out, but now my network is unreachable - will restart modem and router and check again. Thanx.
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 14:49 GMT
I'm sure it will work eventually. Mine did. Just had to subst /ath0/wlan0/ everywhere, in all scripts, and... well, you get the idea... Should have used env vars :P
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 14:58 GMT
just now it finds everybody else's networks but not mine - hehe

Is it absolutely 100 % sure that i don't need to install some madwifi and/or madwifi-utils pkgs and or wpa_supplicant?
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 15:01 GMT
Yes. Did you try to reinstall the kernel after removing madwifi? I know it doesn't make much sense, but it could work... I worked on my box after updating the kernel w/o reinstalling/recompiling madwifi, as well as on a clean install.
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 15:15 GMT
doesn't work just now -- it just cannot connect to network - will check the mac address in the router
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 15:50 GMT
cannot get ath5k to work out of the box. I have reverted to madwifi-newhal-svn and ath-pci and wlan-scan-sta in rc.conf. It works without tweaks.
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 18:13 GMT
lspci -v output:

04:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
Subsystem: Device 1a32:0105
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at f8000000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath5k
Kernel modules: ath5k

ifconfig output:

wlan0 IEEE 802.11bg ESSID:"XXXX"
Mode:Managed Frequency:2.437 GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate=24 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=100/100 Signal level:-38 dBm Noise level=-99 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Here are the logs:

May 5 19:20:27 minifox kernel: ath5k phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY: 0x70)
May 6 20:01:34 minifox kernel: ath5k 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
May 6 20:01:34 minifox kernel: ath5k 0000:04:00.0: setting latency timer to 64
May 6 20:01:34 minifox kernel: ath5k 0000:04:00.0: registered as 'phy0'
May 6 20:01:34 minifox kernel: wmaster0 (ath5k): not using net_device_ops yet
May 6 20:01:34 minifox kernel: wlan0 (ath5k): not using net_device_ops yet
May 6 20:01:34 minifox kernel: ath5k phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY: 0x70)

I connect using iwconfig command supplying the AP's MAC, ESSID and pwd. And this works on clean install out of the box.
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 18:18 GMT
Ok, here's an update:

Just made sure there is NO 'ath5k' in MODULES list, and it works. Here's the relevant snippet from rc.conf:

MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(!snd_pcsp)
Comment by Börje Holmberg (linfan) - Wednesday, 06 May 2009, 18:45 GMT
Do you have any madwifi, madwifi-utils or wpa_supplicant installed?

My output looks like this:

lspci -v output:

03:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
Subsystem: Hewlett-Packard Company Device 137b
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f2000000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath_pci
Kernel modules: ath5k, ath_pci

ifconfig output:
ath0 Link encap:Ethernet HWaddr xxxxxxxxx
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:4cff:fe86:a2d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1192 errors:0 dropped:0 overruns:0 frame:0
TX packets:635 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:985376 (962.2 Kb) TX bytes:82076 (80.1 Kb)

wifi0 Link encap:UNSPEC HWaddr xxxxxxxx-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15248 errors:0 dropped:0 overruns:0 frame:882
TX packets:826 errors:59 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:280
RX bytes:2347291 (2.2 Mb) TX bytes:118994 (116.2 Kb)
Interrupt:16
I cannot find any logs to post.

I have madwifi-utils, madwifi-newhal-svn (AUR) and wpa_supplicant installed. I use mac filters in the router and wpa.

My net-profile looks like this:
CONNECTION="wireless"
INTERFACE=ath0
QUIRKS=(prescan preessid)
SCAN="yes"
SECURITY="wpa"
ESSID="xxxx"
KEY="xxxx"
IP="dhcp"
TIMEOUT=30

and rc.conf:

MODULES=(!ath5k !wlan0 ath-pci wlan-scan-sta ...)
INTERFACES=(lo !eth0 !ath0)
NETWORKS=(Sawers)
#NETWORKS=(ethernet)
DAEMONS=(syslog-ng !network net-profiles...)
Comment by Branko Vukelic (foxbunny) - Wednesday, 06 May 2009, 18:52 GMT
I have no trace of madwifi on my box.
Comment by Börje Holmberg (linfan) - Thursday, 14 May 2009, 18:37 GMT
What do you have in your net-profiles?

It seems ath5k can scan, but it cannot find my router AP. I have wpa and passphrase set up in the router and I use mac filters. Turning off the security options I can get connected to one of my neighbors' router.

Is ath5k relying on wpa_supplicant for wpa? Many questions and no clues or wikis for the new ath5k setup with security options.
Comment by Branko Vukelic (foxbunny) - Thursday, 14 May 2009, 18:47 GMT
I haven't touched net profiles. As I said, I connect using the iwconfig command and dhcpcd.

#!/bin/bash
sudo ifconfig wlan0 down
sudo dhcpcd wlan0 --release
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid XXXXXX channel 6 key XXXXXXXXX ap XX:XX:XX:XX:XX:XX
sudo dhcpcd wlan0

That gets the job done for me. For the record, I used to get only 60% signal strength using madwifi with the patch, now I'm constantly 100%, which is as it should be because my AP is less than 10 feet from my laptop.
Comment by Börje Holmberg (linfan) - Thursday, 14 May 2009, 21:02 GMT Comment by Branko Vukelic (foxbunny) - Thursday, 14 May 2009, 21:05 GMT
Ah, fck, sorry, dude. I wasn't paying attention. I use a WEP network, so I don't have the prob....
Comment by Börje Holmberg (linfan) - Monday, 18 May 2009, 14:23 GMT
Finally got ath5k to work after a lot of fiddling. I just removed all ath* modules from rc.conf.
Comment by Tobias Powalowski (tpowa) - Monday, 18 May 2009, 16:27 GMT
closing this one then?
Comment by Branko Vukelic (foxbunny) - Monday, 18 May 2009, 18:31 GMT
Glad to hear it worked, Börje.
Comment by Börje Holmberg (linfan) - Tuesday, 19 May 2009, 13:42 GMT
Yes, as for me, this bug can be closed. Thank you for all support and help.

Loading...