I tried to use the iwconfig tool as you said. I had the same problem. The only mode I could get it working was master mode. The strange thing is that iwconfig shows the right configuration when called without an argument. When I changed eth2 to ad-hoc modus, my windows laptop could even see it. The windows laptop could even associate to the ad-hoc-wrt54g, at least it told me so. However, pinging the ad-hoc-wrt54g did not work.
Did you see the linksys when it was in (iwconfig-set) master mode? My powerbook completely ignored the linksys when I set it to master mode via either iwconfig or "wl".
The same is true for setting a linksys into managed mode and having it associate as a client to another master-linksys. The managed linksys can see the master linksys, at least it tells one so by the correct "Access Point:"-Field in the output of iwconfig:
Access Point: 00:06:25:FF:77:FF
00:06:25:FF:77:FF is the mac address of the master linksys (I verified this). However pinging between client and master linksys does work either.
I couldn't even get my (second) linksys to associate with the master when using iwconfig. I would show
Access Point: 00:00:00:00:00:00
most of the time. Sometimes this would change to the mac address of my (first) linksys for a few seconds, but then jump back to 00:00:00:00:00:00.
Strange enough, it worked when doing "wl join <first-linksys-mac>". Even "wl join <first-linksys-mac> key <wep-key>" worked, and correctly associated in encrypted mode.
Florian, was it the same for you, I mean, that associating seemed to work, but ping did not?
I never tried pinging, since it didn't even associate (using iwconfig). Using "wl join ...", ping worked.
Are you sure that you configured the correct ip-addresses & netmasks when you tried pinging? Maybe you assigned the ip only to the bridge device (br0), but not to eth2, and forgot to add eth2 to your bridge (brctl addif br0 eth2). Since this bridging stuff add another layer of complexity, I would suggest that you test this association stuff without bridging enabled. Just assign ip-addresses to the (physical) interfaces eth0, eth1, eth2 directly - and also assign the ip-address on your notebook manually, just in case it's only the dhcpserver that doesn't work, not the wireless lan.
If I have time, I'll look at the sources of wlconf to see what they do different. Seems like the only way to find out...
Until those strange issues are resolved, I suggest you configure the wlan interface via nvram variables, and just call wlconf to configure it. I use that on openwrt now (together with wl to add some wds links), and it works great.
greetings, Florian Pflug