I have a pair of WaveLan/Orinoco 11mb/s cards, and have been successfully communicating in AdHoc mode, between my 486dx/66 server+firewall machine running Linux 2.0.38+pcmcia-cs-3.1.19 and my PowerBook G3 1998 machine running LinuxPPC 2000, 2.2.17-pre5 kernel and patched pcmcia-cs-3.1.19.
It also works with MacOS 9.04 using the Lucent drivers (as opposed to the airport drivers). It took me a long time to realize that I had to set the channel to 3 before it would work between MacOS and linux.
Not willing to leave well enough alone, I've started to look into fixing the PPC driver patches so they can be incorporated into the mainline pcmcia-cs code.
What I've found is that the wvlan_hcfcfg.h file is using macros under #ifdef __linux__ which assume an x86 platform. The IN_PORT_WORD and OUT_PORT_WORD macros are defined to use inw and outw and the IN_PORT_STRING and OUT_PORT_STRING macros are defined in terms of the IN_PORT_WORD and OUT_PORT_WORD macros. On x86 platforms, this is fine, but clumsy given the availability of insw and outsw (and the insw_ns and outsw_ns macros in include/pcmcia/k_compat.h).
On the PPC, the inw and outw macros do byteswapping. This is fine if the code expects it, but in this case the IN_ and OUT_PORT_STRING macros end up reswapping everything. The available driver patch makes up for this by reunswapping everywhere the data should have been treated as byte strings.
I am trying to work out a cleaner solution where the __linux__ section of wvlan_hcfcfg.h makes better use of <asm/io.h> and avoids as much swapping back and forth and back again as possible, using insw_ns and outsw_ns for raw data and cpu_to_le16 and le16_to_cpu where it needs to be interpreted as short integers.
I haven't got it quite right yet (hangs my machine when a packet comes in), but it does configure properly via iwconfig. But when I can get the same source to work on x86 and PPC, I'd like to have it rolled back into the distribution.
So, any comments or objections to my going ahead? Is anyone else working along these same lines? Who should I forward the patches to for review?
Dave Johnson email@example.com
[ Edit This Forum ]