[PATCH] zd1211rw: Remove addressing abstraction
authorDaniel Drake <dsd@gentoo.org>
Tue, 12 Dec 2006 01:26:11 +0000 (01:26 +0000)
committerJeff Garzik <jeff@garzik.org>
Mon, 5 Feb 2007 21:58:42 +0000 (16:58 -0500)
commit0ce34bc8f7d906d66ce6803f63399ef9bbe54012
tree1326f9105842fc81f89bf8ab1a435ab13a4d72d5
parentee30276774451d657407855d95d9393ee8bc0bac
[PATCH] zd1211rw: Remove addressing abstraction

Instead of passing our own custom 32-bit addresses around and
translating them, this patch makes all our register address constants
absolute and removes the translation.

There are two ugly parts:
 - fw_reg_addr() is needed to compute addresses of firmware registers, as this
   is dynamic based upon firmware
 - inc_addr() needs a small hack to handle byte vs word addressing

However, both of those are only small, and we don't use fw_regs a whole
lot anyway.

The bonuses here include simplicity and improved driver readability. Also, the
fact that registers are now referenced by 16-bit absolute addresses (as
opposed to 32-bit pseudo addresses) means that over 2kb compiled code size has
been shaved off.

Includes some touchups and sparse fixes from Ulrich Kunitz.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/zd1211rw/zd_chip.c
drivers/net/wireless/zd1211rw/zd_chip.h
drivers/net/wireless/zd1211rw/zd_def.h
drivers/net/wireless/zd1211rw/zd_ieee80211.h
drivers/net/wireless/zd1211rw/zd_rf.h
drivers/net/wireless/zd1211rw/zd_types.h [deleted file]
drivers/net/wireless/zd1211rw/zd_usb.c
drivers/net/wireless/zd1211rw/zd_usb.h