ZD1211 TX operational

After a couple of weeks of head-scratching, I managed to get the rewritten USB-wireless ZD1211 driver transmitting data.

The code has been written for a while, and although it seems to work (the device doesn’t indicate any form of failure), the frames simply weren’t “hitting the air”.

The problem originates from the huge number of undocumented physical registers in the vendor driver. Rather than list all 200 of them in our driver source in the ugly manner which ZyDAS do so, we devised a quick one-line macro to perform the same task:

#define CR(reg)                CTL_REG((reg)*4)

However, it appears that ZyDAS have some trouble counting. A snippet from the vendor driver:

#define        ZD_CR1            0x0004
#define        ZD_CR2            0x0008
#define        ZD_CR3            0x000C
#define        ZD_CR5            0x0010
#define        ZD_CR6            0x0014
#define        ZD_CR7            0x0018
#define        ZD_CR8            0x001C
#define        ZD_CR4            0x0020
#define        ZD_CR9            0x0024

1,2,3,5,6,7,8,4,9… Our macro obviously doesn’t match the unordered nature of those low CR addresses.
After inserting the appropriate hacks into our driver, packets start flying, as confirmed by another wireless card in monitor mode.

Be warned: although we have transmit and receive working to some degree, the driver isn’t ready for users wanting to connect to networks yet.

I’m attending the OSDL Wireless Developer Summit in the first week of April, and I’m hoping that we’ll have a partially usable driver in time for that.

2 Responses to “ZD1211 TX operational”

  1. zwoch Says:

    great news again. after 4 weeks of git tree inactivity i was worried that the project may have died. keep on the good work! but why are the registers undocumented? i thought that zydas has released some documents to the developers the the zd1211.sf.net project to develop a driver. are those docs incomplete or no longer available to the community?

  2. dsd Says:

    There hasn’t been any git tree inactivity, I’ve just been working in a branch. My tree is at http://dsd.object4.net/git/?p=zd1211.git – and view the softmac branch (http://dsd.object4.net/git/?p=zd1211.git;a=shortlog;h=softmac) for my recent hacking. I’m going to merge the softmac branch to HEAD today, as softmac is now included in Linus’ tree.

    As for the registers, they are undocumented. The vendor driver references them by numeric index, with only the occasional comment hinting what the odd register might be doing. We do have the ZyDAS documents, but they omit the entire CR register namespace. Handy.

Leave a Reply

You must be logged in to post a comment.