latest CVS legacy works for me but kills my madwifi

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4570

impdonkey

17-01-2008 14:44:11

I already said this in another thread but feel like it needs a thread of its own

I tested three distinct hardware systems (with different versions of Fedora -- 6.0, 7.9 and 8.0). On all three we had madwifi ( http//madwifi.org/ ) working stably for quite some time (versions 0.9.3.1 through 0.9.3.3), with Belkin and Netgear cards (atheros chip)

As I began to install the legacy CVS rt73 module on each machine, the madwifi stopped working in every case. (So far, i tried the cvs-2008010800 and cvs-2008011609).

The machine freezes stone cold when i try to "ifconfig" up the device.

I issue " wlanconfig ath0 create wlandev wifi0 wlanmode adhoc ", then "ifconfig ath0 up" and the system locks up completely.

This never happened before. Nor did it happen with the RT73_Linux_STA_Drv1.0.4.0 driver from the "official" website, nor with the rt2x00 driver when I briefly tried the latter.

With all the other RT driver versions, the rausb0 device coexisted peacefully with madwifi. Once while testing I briefly had both rausb0 and ath0 active simultaneously, with no apparent problems.

Also, with the culprit(?) CVS legacy driver, the rausb0 (or aliased wlan0) device need not be activated nor connected, for my system to freeze on activation of the madwifi device.

Please help!

I have no clue as to how/where one can intrude on the other, where the overlap is.

What should I do to debug the situation? What could possibly have been overwritten, such that this happens without the rt73 module even being loaded??

thanks in advance

Spy84464

22-01-2008 13:57:03

Hello,
Generate a debug trace, as explained in the TESTING file coming with the driver, and post it. It should reveal what's going wrong.

Regards,
ROmain

Vern

23-01-2008 19:38:10

Please respond per Spy's request.

Thanks,

impdonkey

23-01-2008 21:40:16

Sorry, I just saw your request, a few seconds ago. I'll do a trace as soon as possible. I don't know the procedure off the top of my head. I'll research how to do it; if you want to expedite it, you could post back a tip about how exactly to do a trace.

thanks again

IvD

23-01-2008 21:50:53

As Spy asked, please read the TESTING file it contains all steps to create a debug trace.

impdonkey

24-01-2008 19:54:59

I followed the procedure in TESTING to generate /var/log/debug entries

This contains mostly entries from the rt73 module

http//www.flight.us/debug/rt73/rt73_de ... 29.txt.gz (275k, ~7MB uncompressed)

Of course, the rt73 module itself does not cause my freezes when it is activated; it goes up fine with ifconfig.

It is the "ifconfig ath0 up" command that has been causing the freezes, after a "wlanconfig ath0 create wlandev wifi0 wlanmode adhoc" (ifconfig ath0 up" does NOT cause freezing when the ath0 hardware is first detected and an iwconfig entry is created, with "Manged" mode)

I briefly tried and failed to, similarly, generate debugging messages for the madwifi driver, but, before spending more time on the latter, I spotted the following in /var/log/messages. I believe the following was written to /var/log/messages upon the fatal "ifconfig ath0 up" command (after i physically inserted the Netgear WPN511 card (w/atheros chip), did the destroy and create, and tried to "ifconfig ath0 up")

http//www.flight.us/debug/rt73/var_log ... nippet.txt

Note the line with

"kernel kobject_add failed for ath_pci with -EEXIST, don't try to register things with the same name in the same directory.",

and the lines surrounding it. I believe the line "Jan 24 130918 swerdos kernel ath_pci can't register pci driver" is JUST a split second before the freeze. (Not 100% certain, however)

Thanks!

impdonkey

29-01-2008 18:16:49

is there any hope for a fix?

were the log files i provided adequate?

I got no response from anyone since my post four days ago, except a reply to my private message from someone saying they aren't the one overseeing this development thread and encouraging me to turn to those who are. I wasn't sure what else i could do except wait, so I am just "pinging the status quo"

impdonkey

04-02-2008 15:50:32

Could somebody among the developers please tell me the status of this?
Is it on your todo list?
Have you determined it can't be fixed? Or that it [b2n9syrpa]can[/b2n9syrpa] be?
Any progress?
Have you totally dismissed it as a non-issue?

thanks

pytheas22

04-02-2008 20:01:17

An update would be helpful for me too, as I also have problems with madwifi-rt73 compatibility, as outlined in my post at http//rt2x00.serialmonkey.com/phpBB2/v ... php?t=4571 . I know that the developers have a lot of work to do and are volunteering their efforts, which I appreciate greatly. If someone gets the chance, however, an update on whether or not the madwifi problem is being worked on would be useful in helping me to decide which route to go with my wireless hardware.

IvD

04-02-2008 22:16:59

This issue does not seem to be present in the rt2x00 drivers, or at least nobody reported it yet for those drivers. This means the issue is a legacy driver only.

Personally I don't work on the legacy drivers (only on rt2x00), so I can't say anything about the development priorities of those drivers (Neither do I have any influence over prioritization of the development effort in this project).

So if no other developer can confirm this issue is worked on, then I suggest you try the rt2x00 drivers which can be found in kernel 2.6.24 or use out kernel repository with the latest rt2x00 version rt2x00.git.

impdonkey

05-02-2008 21:01:09

This issue does not seem to be present in the rt2x00 drivers, [/quote3u8xdu3y]

that is what [i3u8xdu3y]I[/i3u8xdu3y] reported, from the start.


This means the issue is a legacy driver only.
[/quote3u8xdu3y]

Well, is this not the rt73 usb legacy forum? I don't understand why you are imposing the other topic (driver) onto this forum.

Unless you are implying that the development of the legacy driver and this forum are being closed. Is that the case?


Personally I don't work on the legacy drivers (only on rt2x00), so I can't say anything about the development priorities of those drivers (Neither do I have any influence over prioritization of the development effort in this project).

So if no other developer can confirm this issue is worked on, then I suggest you try the rt2x00 drivers which can be found in kernel 2.6.24 or use out kernel repository with the latest rt2x00 version rt2x00.git.[/quote3u8xdu3y]

I got a message from a developer suggesting he may be capable of solving this; however, he also said he was very busy, so that's the most I know about the status.

If anyone else is capable to resolve this PLEASE help asap!

thanks!

IvD

05-02-2008 21:45:04

I'm sorry for offering an alternative for the legacy drivers. I didn't understand from your previous post that you desperatly want the legacy drivers instead of in-kernel drivers.

Don't worry there are still developers working on the legacy drivers, so that is an ongoing progress.

Vern

06-02-2008 18:45:45

impdonkey

I've downloaded your logs (btw, it's also possible to attach files to a post in the forum) and will look at them as time becomes available.

Thanks,

doctia

08-02-2008 13:50:31

ok listen to me ,
i spent 10 hours in front of pc yesterday,
i have an ubiquiti src 300 mw card and an edimax-7318usg.


googling u will not receive answers for this,

because probably u will have errors when doing

iwconfig ath0 key <some-key> ,
something like operation not permitted ........

and probably

iwlist ath0 scan will not give u results ...?

continue listening to me... i cannot be sure your problem is mine problem but i think your rt73 device is called wlan0,
and probably the driver set this.........->> wlan* alias rt73 in modprobing working................

so the problem was that
this is funny
modprobe ath_pci for atheros device search for dependent modules and when find that he must do "modprobe wlan_wep" he find that wlan_wep = wlan* --> and funny he do the modprobing of the rt73 module in spite of the others right modules to load....

this is why this night i slept only a bit cry

the fact that the rt73 driver put wlan* as alias for rt73 is really a crazy crazy thing


F.to Il Dottore

doctia

09-02-2008 11:59:09

p.s. if you are lazy to read my post and think,
do simply that...-> go in /etc/modprobe.conf and change the alias from wlan* to wlan0, or re-compile the rt73 module changing the name of the interface from wlan* to wlan0 how u prefer.. enjoy it )

impdonkey

12-02-2008 20:08:21

p.s. if you are lazy to read my post and think,
do simply that...-> go in /etc/modprobe.conf and change the alias from wlan* to wlan0, or re-compile the rt73 module changing the name of the interface from wlan* to wlan0 how u prefer.. enjoy it )[/quote1tgn8j32]

I will try your instructions asap. Sorry about the delaying to check for replies (i was beginning to lose hope).

(wish there were email notifications of replies)

thanks a lot!

a.

IvD

12-02-2008 20:36:40


(wish there were email notifications of replies)
[/quoteizdsuq2n]

Check your profile, 3d question in "preferences"
[quoteizdsuq2n]Always notify me of replies
Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.[/quoteizdsuq2n]

pytheas22

13-02-2008 00:41:26

I followed doctia's instructions as I understood them and it didn't seem to help, although it's possible that I didn't understand what he meant completely. I changed /etc/modprobe.conf so that it now reads "alias rausb* rt73" which I think would have the same effect as changing it to "alias wlan0 rt73" ... basically the alias name that gets assigned to the rt73 device just needs to be something other than arbitrary iterations of wlanX, right?

Anyway, please post your results impdonkey; hopefully you'll have some luck.

impdonkey

13-02-2008 20:57:18

-------------------------
Doctia! You're the man, the warrior-hero, the MVP, and my role model. (Hopefully my probability/statics-based guess on your gender was correct -))

Seems like it is/was, indeed, an aliasing glitch.

I tinkered with it last night and managed to remove the conflict using your instructions.

First i tried to simply change the following line in the file /etc/modprobe.d/ralink
from "alias wlan* rt73"
to "alias wlan0 rt73"

However, I don't think that helped. (BTW, /etc/modprobe.conf didn't mention rt73)

Because -- and here's what i discovered only last night while tinkering -- every time i'd physically insert my Atheros (madwifi) card, dmesg would report

... rtusb init ====>
... usbcore registered new driver rt73
... unable to load wlan_scan_sta
... wifi0 Atheros 5212 mem=0x34000000, irq=185

go figure! The rt73 was being incorrectly associated with madwifi/atheros module(s), and the rt73 module was being loaded for the other hardware and, apparently, conflicted and used either in place of or in conjunction with the madwifi module(s).

Next I altered the source, as you had suggested

--------------------------------
in

.../rt73-cvs-2008011609/Module/Makefile

i changed

IF_NAME = wlan*

to
IF_NAME = wlan0


I did "make && make install" several times, bringing up and down "ath0". Several times, strangely, the incorrect association persisted. I had to manually delete the rt73.ko in /lib/modules/2.6.18-1..../extra/

then i had to manually copy the newly compiled rt73.ko under /lib/modules/2.6.18-1..../extra/

and run "depmod -a" (still mystified why it wouldn't be copied by "make install")

on the second or third attempt, insertion of the atheros hardware would no longer trigger the loading of the rt73 module. This, probably coincided with the elimination of the freezes; dmesg began to report proper madwifi stuff

kernel pccard CardBus card inserted into slot 0
kernel PCI Enabling device 00000200.0 (0000 -> 0002)
kernel ACPI PCI Interrupt 00000200.0[A] -> GSI 22 (level, low) -> IRQ 185
kernel wifi0 11b rates 1Mbps 2Mbps 5.5Mbps 11Mbps
kernel wifi0 11g rates 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
kernel wifi0 turboG rates 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
kernel wifi0 H/W encryption support WEP AES AES_CCM TKIP
kernel wifi0 mac 7.9 phy 4.5 radio 5.6
kernel wifi0 Use hw queue 1 for WME_AC_BE traffic
kernel wifi0 Use hw queue 0 for WME_AC_BK traffic
kernel wifi0 Use hw queue 2 for WME_AC_VI traffic
kernel wifi0 Use hw queue 3 for WME_AC_VO traffic
kernel wifi0 Use hw queue 8 for CAB traffic
kernel wifi0 Use hw queue 9 for beacons
kernel wifi0 Atheros 5212 mem=0x34000000, irq=185

-------------------------

and the ath0 interface was once again functioning! I plugged in my usb ralink card as well, simultaneously with ath0, and they appeared to happily coexist. NOTE as far as coexistence, I have not had time for extensive testing. "iwlist scan" would occasionally give expected results (both interfaces scanned and detected surrounding networks and each other); at other times, not.

-------------------------

Question why not ...

IF_NAME = rausb*

?

That way, this device won't need to intrude on the apparently generic namespace "wlan0"

Also, I presume the wild card ('*') is part of a smart algorithm that assigns the incrementing numeric suffix, in case one has MULTIPLE devices needing the same module/driver (rausb0, rausb1, rausb2, etc.) (?). Thus, using the constant "0" would hamper this functionality (?)

So, my question to the gurus is Although it now seems to work for me with "wlan0", would "rausb*" work, and work optimally (in the Makefile)?

thanks a LOT for the hard work!
a.

impdonkey

13-02-2008 21:10:50

correction In my previous (long) post I meant to say that i plugged in my "usb ralink STICK" or "DONGLE" -- NOT CARD.

(i guess, with an extension cord, it can be called a dongle)

Vern

15-02-2008 18:38:27

Hi impdonkey,

I see we have a self healing forum here If I ignore things long enough, they fix themselves. Nice work.
[quote1zj4bv8g]and run "depmod -a" (still mystified why it wouldn't be copied by "make install") [/quote1zj4bv8g]
"make install" looks like it should install the module. If you have time, could you attach script output of "make && make install" (doing the latter as root, of course) to a posting here?

Re.
[code1zj4bv8g]IF_NAME := rausb*[/code1zj4bv8g]
As long as you arrange to do "modprobe rt73 ifname=rausb%", things should be OK.

The "*" and "%", respectively, mean "use the next available number. e.g. If wlan0 is used, then this instance will be wlan1, and so on.

doctia

15-02-2008 23:33:24

I followed doctia's instructions as I understood them and it didn't seem to help, although it's possible that I didn't understand what he meant completely. I changed /etc/modprobe.conf so that it now reads "alias rausb* rt73" which I think would have the same effect as changing it to "alias wlan0 rt73" ... basically the alias name that gets assigned to the rt73 device just needs to be something other than arbitrary iterations of wlanX, right?

Anyway, please post your results impdonkey; hopefully you'll have some luck.[/quote1oo1zzje]


mmm ok,
to understand if your problem is the conflict i meant do simply that

go in the folder of the kernel modules of madwifi...
search for them in /lib/modules/*your_kernel*/, u will find all the modules for atheros device in a unique folder;
so try to load all those modules (except those for rates load only one of rate modules, ex. if u do "insmode /path.../ath_rate_sample.ko", don't load others ath_rate_amrr.ko or ath_rate_onoe.ko).

Do this loading manually, using Insmode, not Modprobe.


when u finish to load all the modules, test your madwifi device...if it works, and post here the result.
if it works the problem is exactly a dependencies problem in modprobe, if not..should be another problem...

doctia

15-02-2008 23:43:31

-------------------------
Doctia! You're the man, the warrior-hero, the MVP, and my role model. (Hopefully my probability/statics-based guess on your gender was correct -))

Seems like it is/was, indeed, an aliasing glitch.

So, my question to the gurus is Although it now seems to work for me with "wlan0", would "rausb*" work, and work optimally (in the Makefile)?

thanks a LOT for the hard work!
a.[/quote1w790lee]

ahah, funny ..a warrior-hero? thank u,

as for your question, i think or i hope it should work with every name u choose, but i really did not test other names; i keep wlan0, now that works.
the problem in wlan* was simply that.... wlan* is too much generic! so atheros drivers for a strange case chose names that begin for wlan... but other devices could have modules beginning for wlan... in the future.., generating new dependencies problems with modprobe and aliases

pytheas22

16-02-2008 04:48:45

Thanks for all of the instructions. Unfortunately I'm still not having luck. Here's what I did

1. downloaded the latest CVS (15 February) of the rt73 driver
2. edited the Makefile of the driver to replace "IF_NAME = wlan*" with "IF_NAME = wlan0"
3. manually deleted rt73.ko in my /lib/modules/2.6.22-14-generic/extra directory
4. compiled the driver with make
5. did a sudo make install
6. unlike in impmonkey's case, make install placed the rt73.ko module into my /lib/modules.../extra directory
7. removed my rt73 device and rebooted--my Atheros device, which is internal, remained plugged in
8. after reboot, my Atheros device was still not working properly; it will not work in 11g mode, only 11b

I tried reinserting the madwifi modules, removing the rt73 module, bringing ath0 up and down a few times, but no luck. Did I miss something?

Note that my problem was never exactly the same as impdonkey's; for me, installing the rt73 module from CVS made my madwifi device refuse to operate in 11g mode, but I did not have system crashes or anything of that nature. Nonetheless, it seems probable that my and impmonkey's experiences are related.

Any suggestions on what else I could do would be much appreciated.

Thanks to all.

doctia

16-02-2008 12:36:25

ok your problem seems complex,
simply do this test if u can

remove all modules with rmmod , relative to atheros and rt73.
don't attach the rt73 device, but re-plug the atheros device or re-do
simply "modprobe ath_pci".
do lsmod and post here if now u see the rt73 module loaded.
so we know if your atheros device load incorrectly the rt73 module in spite of some other correct module.
this was my problem and this (seems that )was for impdonkey too.
so we can see if your problem is another one and think something else

pytheas22

17-02-2008 00:06:08

Thanks doctia for the response. I did what you said, and indeed, it's the same problem inserting the ath_pci module also causes rt73 to be inserted.

However, as I said in my last post, I followed your instructions to fix this problem, and yet it persists. Any idea what else I could try?

impdonkey

18-02-2008 01:04:21

Hello, all

thanks for the responses

I tried to repeat and enhance the fix on a Fedora 7.9 (kernel 2.6.23-0.61.rc1.git9.fc8, a pre-release system very similar to Fedora 8, that functions well). My previous post describing success referred to a Fedora Core 6.

For the IF_NAME in the Makefile i tried "rausb*" and "rausb0", but that did NOT disassociate the atheros modules from rt73; the latter is still loaded with the former.

So far, the only IF_NAME value that has worked has been "wlan0", on both systems.

After compiling it with "rausb*" I tried "modprobe rt73 ifname=rausb%", as suggested, but that did not work. Moreover, it caused a module load glitch that i was only able to fix with a reboot. I thenceforth was unable either to remove the rt73 module (i tried "force"), nor use it (plugging in hardware had no effect).

dmesg would say

FIX kmalloc-2048 Object at 0xceaba840 not freed
rt73 exit
rt73 init
idVendor = 0x148f, idProduct = 0x2573
register_netdev failed err=-22
rt73 probe of 1-11.0 failed with error -22

and also a bunch of kernel trace stuff. And lsmod showed

rt73 197248 4294967294

(the last long number was in place of what is normally a small integer)

---------------

It would be nice to be able to assign/control the device name; i personally would prefer to have a non-generic name like "rausb0" for the rt73 device.

(or perhaps i am overestimating the benefit of that?)

Nonetheless, it seems we are zeroing in on the problem.

so, my /etc/modprobe.d/ralink currently has
alias wlan0 rt73

I am sending this post on the fedora 7.9, over the atheros card, but with the rt73 usb stick also plugged in and, by all indicators, functioning well.

pytheas22, did you actually try to compile rt73 cvs with exactly "wlan0" in the Makefile? As I say above, that and only that value seems to work so far, and NOT "rausb0" or "rausb*"

thanks
a.

pytheas22

18-02-2008 03:50:02

yessss, it works!

I compiled it again with today's CVS. Not sure what I did wrong before, although it turned out that my /etc/modprobe.d/ralink file said

alias wlan* rt73
alias wlan0 rt73

so I deleted the line with wlan* in it. Maybe that made the difference...otherwise I did the same thing today that I tried two days ago, only this time it works.

I have both my Ralink and Atheros devices up; ath0 is associated with my AP in 11g mode, and rt73 appears to be working fine scanning.

Thanks so much to everyone, and especially doctia, for figuring this problem out. I do hope we can figure out exactly what the problem is and get a better fix; if there's anything I can do to help the developers do that, please let me know. When I get a chance, I will try compiling with names other than wlan0 in the makefile and see what happens, to confirm what impdonkey says above.