aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/ath9k.h
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-30 15:28:38 +0530
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:33 -0400
commita119cc492fc720de7fcaf7c1b9394d6c025d276d (patch)
tree9a755b4c68bda8afef7b7f19a23805728a3750e7 /drivers/net/wireless/ath9k/ath9k.h
parentath9k: Avoid unneeded casts (diff)
downloadlinux-dev-a119cc492fc720de7fcaf7c1b9394d6c025d276d.tar.xz
linux-dev-a119cc492fc720de7fcaf7c1b9394d6c025d276d.zip
ath9k: Cleanup buffer status handling
Using a u32 to store a single flag is overkill. Use a bool to store whether the buffer is stale or not. Also, use u8 instead of u32 to store the buffer type. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/ath9k.h')
-rw-r--r--drivers/net/wireless/ath9k/ath9k.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath9k/ath9k.h b/drivers/net/wireless/ath9k/ath9k.h
index 9adc991cb05f..e6c39c1c1a28 100644
--- a/drivers/net/wireless/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath9k/ath9k.h
@@ -74,13 +74,17 @@ struct ath_config {
/*************************/
#define ATH_TXBUF_RESET(_bf) do { \
- (_bf)->bf_status = 0; \
+ (_bf)->bf_stale = false; \
(_bf)->bf_lastbf = NULL; \
(_bf)->bf_next = NULL; \
memset(&((_bf)->bf_state), 0, \
sizeof(struct ath_buf_state)); \
} while (0)
+#define ATH_RXBUF_RESET(_bf) do { \
+ (_bf)->bf_stale = false; \
+ } while (0)
+
/**
* enum buffer_type - Buffer type flags
*
@@ -106,7 +110,7 @@ struct ath_buf_state {
int bfs_seqno;
int bfs_tidno;
int bfs_retries;
- u32 bf_type;
+ u8 bf_type;
u32 bfs_keyix;
enum ath9k_key_type bfs_keytype;
};
@@ -134,15 +138,12 @@ struct ath_buf {
struct ath_desc *bf_desc; /* virtual addr of desc */
dma_addr_t bf_daddr; /* physical addr of desc */
dma_addr_t bf_buf_addr; /* physical addr of data buffer */
- u32 bf_status;
+ bool bf_stale;
u16 bf_flags;
struct ath_buf_state bf_state;
dma_addr_t bf_dmacontext;
};
-#define ATH_RXBUF_RESET(_bf) ((_bf)->bf_status = 0)
-#define ATH_BUFSTATUS_STALE 0x00000002
-
struct ath_descdma {
const char *dd_name;
struct ath_desc *dd_desc;