Getting atheros wifi into ad-hoc mode with network manager?

Hello SuSErs.

I’ve been using SuSE 11 for a little while now and I’m pretty pleased with it. The network manager works well and it switches between my university wifi, work wifi, friend’s house wifi etc. automatically, which is great.

However; my atheros wifi card (or the driver for it) is broken in the sense that to switch from managed mode to ad-hoc mode or vice versa, I have to issue the commands:

wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode [adhoc|managed]

The normal way of doing it simply fails:

iwconfig ath0 mode ad-hoc
Error for wireless request "Set Mode" (8B06) :
    SET failed on device ath0 ; Invalid argument.

This is a known problem and I found the above solution on the madwifi website.

Of course, SuSE’s network manager doesn’t know this strange way of switching modes, and if I try to use an ad-hoc network, it just fails.


So, I have two questions:

  1. Is there a fix available so that iwconfig or SuSE’s network manager can change the infrastructure mode in the normal way, without having to use wlanconfig destroy / create?

  2. Is there a way to get the network manager to issue an arbitrary command (such as wlanconfig ath0 destroy, etc.) when switching from one network profile to another?

If yes to either of these, it could solve my last remaining wifi woe rotfl!.

Cheers,
David

So, does anyone know where the network manager developers live, or what the homepage for that tool is, so I can go and pester them?

All I really need is to get the network manager to execute the “wlanconfig destroy ath0” etc. commands when I choose a particular network connection, so that it can unload and re-load the atheros driver as necessary.

If I was using the ifup way of doing it, I’d put:

pre-up wlanconfig destroy ath0
etc

in the /etc/network/interfaces file, and that might do the trick. But I like using network manager.

Any wise SuSErs about who can help?