Next-in-Thread Next Message

Idea wvlan_cs PPC port/patches 

Forum: PCMCIA Wireless Network Adapter Issues
Date: 2000, Aug 09
From: David D. Johnson ddj

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?


	-- ddj

	Dave Johnson

Next-in-Thread Next Message

Select this message: wvlan_cs PPC port/patches

Messages Inline: 1 All Outline: 1 2 All

1. None Sounds great to me... by David Hinds, 2000, Aug 09
1. News Hum, better patch... by Jean Tourrilhes, 2000, Aug 09
2. Angry Please check PPC patch ! by Jean Tourrilhes, 2000, Aug 09
1. Feedback Yes, I've checked the PPC patches... by David D. Johnson, 2000, Aug 09
(_ Sad Oups ! by Jean Tourrilhes, 2000, Aug 09

Message Administration

This form allows you to delete, move, or copy one or more messages. You can move messages by copying and deleting the original. The action will be applied to the messages you select above and all replies to those selected messages.

If you want to copy or move messages, specify the HyperNews path of a destination forum or message that all messages will be copied or moved to. The destination must already exist, so maybe create it first.

Path of Destination (a Forum or Message): (e.g. "test")

Notify Subscribers at destination

If you want to delete messages (the default), specify that here. If you want to move messages, you need to delete the original messages; placeholders will be left pointing to where they were moved.

Delete Messages

Caution: After deleteing messages (the default), if you have not copied them (i.e. no destination above), then the selected messages are not be recoverable.

Members Subscribe No Admin Mode Show Frames Help for HyperNews at 1.10
[ Edit This Forum ]