summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/b43.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-12-10 00:34:59 +0300
committerDavid S. Miller <davem@davemloft.net>2008-01-29 02:05:58 +0300
commit8ed7fc48eb31e583bb31c2bcfdd3a9c557bad5d0 (patch)
tree43ece4c73d9e563c9a06b8fd7cde8cc8f72bbabb /drivers/net/wireless/b43/b43.h
parentbb54244be7d12c2a5985226061d598edb49c9078 (diff)
downloadlinux-8ed7fc48eb31e583bb31c2bcfdd3a9c557bad5d0.tar.xz
b43: Fix ofdmtab write regression
commit f04b3787bbce4567e28069a9ec97dcd804626ac7 introduced a regression for the ofdmtable writing. It incorrectly removed the writing of the high 16bits for a 32bit table write and initialized the direction identifier too late. This patch does also some cleanups to make the code much more readable and adds a few comments, so non rocket scientists are also able to understand what this address caching is all about. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/b43.h')
-rw-r--r--drivers/net/wireless/b43/b43.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index d07b56e5ea69..813b2409f0c3 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -547,12 +547,18 @@ struct b43_phy {
u16 initval; //FIXME rename?
- /* OFDM address read/write caching for hardware auto-increment. */
- u16 ofdm_addr;
- u8 ofdm_valid; /* 0: invalid, 1: read, 2: write */
-
/* PHY TX errors counter. */
atomic_t txerr_cnt;
+
+ /* The device does address auto increment for the OFDM tables.
+ * We cache the previously used address here and omit the address
+ * write on the next table access, if possible. */
+ u16 ofdmtab_addr; /* The address currently set in hardware. */
+ enum { /* The last data flow direction. */
+ B43_OFDMTAB_DIRECTION_UNKNOWN = 0,
+ B43_OFDMTAB_DIRECTION_READ,
+ B43_OFDMTAB_DIRECTION_WRITE,
+ } ofdmtab_addr_direction;
};
/* Data structures for DMA transmission, per 80211 core. */