OpenWrt Forum Archive

Topic: new madwifi 0.9.3

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I noticed that there is new release of madwifi driver available on madwifi.org - 0.9.3.
There are many improvments and bug fixes, and among theme long awaited wlan mac changing fix.
Could you developers update the madwifi in Kamikaze buildroot?

Thanks!
Marek

there is another important issue fixed in 0.9.3: the tx rate control - in current version its not working, altough the txrate indicator in 'iwconfig' shows right value.

Maybe I can do it myself, but I don't know how...

(Last edited by Marek on 26 Mar 2007, 12:27)

I tried the 0.9.3 version this weekend. Some patches are not needed anymore, and some need trivial changes. In addition,  you need to change the path of one of the kernel modules in the Makefile ("hal/ath_hal.ko" --> "ath_hal/ath_hal.ko" if I remembered it correctly). However, it doesn't seem to work. On the first boot, "wifi detect" is run to generate the default wireless config file, but that didn't produce any output.

the hal with madwifi 0.9.3 - breaks xscale targets. (I have tried it seemed to work right on broadcom but not on xscale)
same issue with the refcount branch

I don't know if this is correct or not, but it seems to work.  It's probably a hack job, but here goes...

vi trunk/package/wpa_supplicant/files/config.mipsel  (i use a wgt634u, so mipsel is my arch type)

# Driver interface for madwifi driver
CONFIG_DRIVER_MADWIFI=y  <---enable this
# Change include directories to match with the local setup
#CFLAGS += -I../madwifi/wpa
CFLAGS += -I/home/joe/madwifi-0.9.2.1  <---specify source path

I guessed here and got it right.  I had to download the source code for madwifi-ng.  the cflags path
is the path to where i extracted that code.  There may be a better way to do this, but it works at least.

I didn't use the 9.3 release you are speaking about, but I'd assume that it would work the same if you
repeated the process for your code level.  I really don't know why I had to edit this file b/c I compiled
the kmod-madwifi module and even after loading it, wpa_supplicant complained about not having the
madwifi driver.  After changing this config file, it stopped.

Like I said, i'm not really sure about half the stuff I do on my router, I just keep trying until I get it working.
Hope this helps you, if not, sorry! smile

I'm trying to get the 2.6.20 kernel to compile (for ag108/mips) and was forced to use madwifi 0.9.3 as it seems a better match for it. I don't have a functional build yet, but madwifi compiles properly. Will keep you posted on the mips/atheros success rate.

mesher, can you give step by step guide how you compile 0.9.3 ?

Marek wrote:

mesher, can you give step by step guide how you compile 0.9.3 ?

Madwifi is a package. You need to change the version in the Makefile. Then apply the patches from 0.9.2.1 by hand and adapt them to 0.9.3. This way you get a new patch set... You'll need to fix some minor things (the hal drivers have new home). I would attach an archive with the modded madwifi package if the forum allowed me to :-(

I can't test if madwifi 0.9.3 runs on ag108 yet.... because I have redboot problems with kernel 2.6.19.2 (it won't read the partition) and I'm porting the 2.6.20 from dd-wrt in the hope that it will work, but there're other issues (the kernel compiles but has problems during the link phase). This is another story (any help is appreciated... see http://forum.openwrt.org/viewtopic.php?id=10081).

(Last edited by mesher on 27 Mar 2007, 22:10)

Stilll I can't compile madwifi 0.9.3 under kamikaze without errors - there is something I do not in the right way. Can someone who succesfully compiled it to kazmikaze broadcom 2.6 post it here? I really need this new release due to mac changing fix.
PLEAS HELP!

http://openwrt.vcp-springe.de/experimen … -files.tar

110-init_fix_PR_914.patch
111-wds_fix_PR_914.patch

(the above 2 patches do apply but with quite a bit of fuzz - probably should be regenerated from the madwifi-ng-refcount branch)

200-no_debug.patch

(that is optional)

Rest of been merged or no longer needed or are in the tarball and the whitespace updated etc.

Thanks for your quick replay!
As for sure: are this patches you metioned nessesary to compile? I cannot find theme in .tar

(Last edited by Marek on 3 Apr 2007, 13:35)

All the ones you need are in there the other three I never got round to doing you can accept the risk of those patches when they might not apply right
(and take them straight from the current ones or take them from madwifi-ng-refcount)

You don't need them but you can have them if you wish.

Today I'll try to compile and test this stuff.

Thanks, again.

Greetings,

you may find the source package for madwifi-0.9.3 here: kamikaze and a backport for whiterussian

ipk for kamikaze is here

both packages have been tested on production systems on AWMN with good results !!

I have tested 0.9.3 and there is still problem with WLAN card MAC changing...
Maybe I did some mistake?:

ifconfig ath0 down
ifconfig ath0 hw ether XX:XX:XX:XX:XX:XX
ifconfig ath0 up

after that 'ifconfig' shows the new MAC but 'iwconfig' the old one. The client WLAN card sees the old MAC too....

whats is going on?

(Last edited by Marek on 7 Apr 2007, 19:38)

I can't get the 0.9.3 package to build from the sources posted above, r6874:

patching file Makefile
Hunk #1 succeeded at 56 (offset 2 lines).
Patch failed!  Please fix ./patches/100-kernel_cflags.patch!

capouch wrote:

I can't get the 0.9.3 package to build from the sources posted above, r6874:

patching file Makefile
Hunk #1 succeeded at 56 (offset 2 lines).
Patch failed!  Please fix ./patches/100-kernel_cflags.patch!

you have a point.  you also need to do the following change:

trunk/openwrt/scripts/patch-kernel.sh

find the line with the:
patch -p1

and change it to:
patch -l -p1

(Last edited by acoul on 8 Apr 2007, 17:53)

Maybe someone can help me here. I'm trying to compile this new version of madwifi here with acoul's linked source code for an atheros target system. All seems to go peachy doing a standalone recompile of madwifi itself. did the above edit of the patch-kernel.sh file. But I'm running into a few errors after that:

First hiccup it stops on patch 105-security_patch_fix saying something about a previously applied or reversed patch in ieee80211_wireless.c . When I try to tell it NOT to assume -r and not to apply anyhow, it errors out the make. Thinking more into it and considering I already did a full firmware image compile with all these packages built and whatnot, I figure this file was already patched so next round I tell it to, YES, assume -R. Ok. that completes without error.

Next hiccup after that is on 107-autoconf saying something about not finding a file to patch. in the 'text leading upto this', it looks to be linking back to old 0.9.2 files. More specifically files related to the atheros HAL driver named ah_osdep.c . At this point it asks me for a specific file to patch that it cannot find itself and that's where I'm stuck.

Btw, this is on the absolute latest kamikaze revision (or at least should be) of 7009. I understand this is probably where my confusion is stemming from. Would be nice if someone could simply merge the new madwifi source into the svn and get it over with. What with the new features and fixes and whatnot. Sure many wouold appreciate it. smile

Vchat20, madwifi-0.9.3 does not need patches 105 & 107.  The source I gave you does not include them.  Make sure that you first remove the old madwifi directory on the package directory before unpacking my madwifi source.  Good luck.

Edit: I just made a binary madwifi-0.9.3 package for the atheros-2.6.  You can get it here

(Last edited by acoul on 21 Apr 2007, 09:51)

I'd like to test 0.9.3 but your patches are broken on Kamikaze r7062.

ubuntu@OpenWrt-DevEnv:~/atheros-2.6$ make package/madwifi-{clean,prepare} V=99
make -C package madwifi-clean
make[1]: Entering directory `/home/ubuntu/atheros-2.6/package'
make -C madwifi clean
make[2]: Entering directory `/home/ubuntu/atheros-2.6/package/madwifi'
rm -f /home/ubuntu/atheros-2.6/bin/packages/kmod-madwifi_*
rm -rf  /home/ubuntu/atheros-2.6/staging_dir_mips/usr/include/madwifi
make[2]: Leaving directory `/home/ubuntu/atheros-2.6/package/madwifi'
make[1]: Leaving directory `/home/ubuntu/atheros-2.6/package'
make -C package madwifi-prepare
make[1]: Entering directory `/home/ubuntu/atheros-2.6/package'
make -C madwifi prepare
find: /home/ubuntu/atheros-2.6/build_mips/linux-2.6-atheros/madwifi-0.9.3: No such file or directory
make[2]: Entering directory `/home/ubuntu/atheros-2.6/package/madwifi'
bzcat /home/ubuntu/atheros-2.6/dl/madwifi-0.9.3.tar.bz2 | /bin/tar -C /home/ubuntu/atheros-2.6/build_mips/linux-2.6-atheros/madwifi-0.9.3/.. -xf -

Applying ./patches/100-kernel_cflags.patch using plaintext: 
patching file hal/public/mips-be-elf.inc
patching file hal/public/mips-le-elf.inc
patching file hal/public/xscale-be-elf.inc
Hunk #1 FAILED at 77.
1 out of 1 hunk FAILED -- saving rejects to file hal/public/xscale-be-elf.inc.rej
patching file hal/public/xscale-le-elf.inc
Hunk #1 FAILED at 78.
1 out of 1 hunk FAILED -- saving rejects to file hal/public/xscale-le-elf.inc.rej
patching file Makefile
Hunk #1 succeeded at 56 (offset 2 lines).
Patch failed!  Please fix ./patches/100-kernel_cflags.patch!
make[2]: *** [/home/ubuntu/atheros-2.6/build_mips/linux-2.6-atheros/madwifi-0.9.3/.prepared] Error 1
make[2]: Leaving directory `/home/ubuntu/atheros-2.6/package/madwifi'
make[1]: *** [madwifi-prepare] Error 2
make[1]: Leaving directory `/home/ubuntu/atheros-2.6/package'
make: *** [package/madwifi-prepare] Error 2
ubuntu@OpenWrt-DevEnv:~/atheros-2.6$

hmm, so. i've cleaned up the patches but madwifi 0.9.3 does not work at all for me on the fonera. maybe i did some mistake during the cleaning.

anyway, for now i'll stick to the madwifi driver included in kamikaze subversion.

Jan  1 00:01:53 (none) user.info kernel: wlan: 0.8.4.2 (0.9.3)
Jan  1 00:01:54 (none) user.warn kernel: ath_hal: module license 'Proprietary' taints kernel.
Jan  1 00:01:54 (none) user.info kernel: ath_hal: 0.9.18.0 (AR5212, AR5312, RF2316, TX_DESC_SWAP)
Jan  1 00:01:54 (none) user.info kernel: ath_rate_sample: 1.2 (0.9.3)
Jan  1 00:01:54 (none) user.info kernel: wlan: mac acl policy registered
Jan  1 00:01:55 (none) user.warn kernel: ath_ahb: Unknown symbol get_system_type

EDIT: i cannot get madwifi 0.9.3 working. i tried a self compiled image with the source tarball (madwifi-0.9.3-kam.tar.gz) and a image with the binary package (kmod-madwifi_2.6.19.2+0.9.3-atheros-1_mips.ipk) for Atheros 2.6 (using the ImageBuilder) using kamikaze revision 7062. both does not work. with madwifi 0.9.2.1 everything is fine.

(Last edited by forum2006 on 28 Apr 2007, 22:50)

sorry, I don't have an atheros cpu based board for further testing.  the main developers though should be able to get to the latest madwifi version since relative patches are available for some time now ... :-)

(Last edited by acoul on 29 Apr 2007, 23:48)

I can't believe all-knowing forum2006 can't figure out how to patch.  The madwifi 0.9.3 you found requires an adapted version of the "120-soc_fix.patch" from madwifi-ng.  Basically you'd make all of the changes the patch utility would make, by hand (or find a smart utility to make this easier), save the resultant file, and do: "diff -Naur oldfile newfile > soc.patch" between the original version and the one you made yourself.  You're not finished yet.  Then you'd edit the patch with vi, vim, or nano (or another text editor) and make sure it goes to the right file and directory ("madwifi-0.9.3.1" , not madwifi-ng-rXXXX-XXXXXXXX, and here we need the file to be "if_ath_ahb.c").  You also should need to add the 'Index:....' so that the patch utility knows what file to patch.  See the other patch files bundled with NG as a reference.  If YOU ARE LAZY (or sensible, depending upon how you look at it), look to the DD-WRT forums and search for "0.9.3.1" or "0.9.3" and you will find the redone package there along with an ipkg for 2.6.21.1.
HERE IS THE DD-WRT THREAD:

http://www.dd-wrt.com/phpBB2/viewtopic. … 7015#87015

Do not edit text files with WinSCP.  It does not refresh automatically and leaves you with a headache.

(Last edited by Meltyblood on 12 Jul 2007, 20:40)

This madwifi is now deprecated.  It won't even compile under new 2.6.22.X kernels.  The new madwifi-ng drivers seem to have taken a shift and now support packet injection without additional patches.

(Last edited by Meltyblood on 27 Jul 2007, 19:33)

The discussion might have continued from here.