diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-03-30 05:58:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:33 -0400 |
commit | a119cc492fc720de7fcaf7c1b9394d6c025d276d (patch) | |
tree | 9a755b4c68bda8afef7b7f19a23805728a3750e7 /drivers/net/wireless/ath9k/ath9k.h | |
parent | a22be22ab8fe571cce88d0d30b49f297a563c4a7 (diff) |
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.h | 13 |
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 { | |||
74 | /*************************/ | 74 | /*************************/ |
75 | 75 | ||
76 | #define ATH_TXBUF_RESET(_bf) do { \ | 76 | #define ATH_TXBUF_RESET(_bf) do { \ |
77 | (_bf)->bf_status = 0; \ | 77 | (_bf)->bf_stale = false; \ |
78 | (_bf)->bf_lastbf = NULL; \ | 78 | (_bf)->bf_lastbf = NULL; \ |
79 | (_bf)->bf_next = NULL; \ | 79 | (_bf)->bf_next = NULL; \ |
80 | memset(&((_bf)->bf_state), 0, \ | 80 | memset(&((_bf)->bf_state), 0, \ |
81 | sizeof(struct ath_buf_state)); \ | 81 | sizeof(struct ath_buf_state)); \ |
82 | } while (0) | 82 | } while (0) |
83 | 83 | ||
84 | #define ATH_RXBUF_RESET(_bf) do { \ | ||
85 | (_bf)->bf_stale = false; \ | ||
86 | } while (0) | ||
87 | |||
84 | /** | 88 | /** |
85 | * enum buffer_type - Buffer type flags | 89 | * enum buffer_type - Buffer type flags |
86 | * | 90 | * |
@@ -106,7 +110,7 @@ struct ath_buf_state { | |||
106 | int bfs_seqno; | 110 | int bfs_seqno; |
107 | int bfs_tidno; | 111 | int bfs_tidno; |
108 | int bfs_retries; | 112 | int bfs_retries; |
109 | u32 bf_type; | 113 | u8 bf_type; |
110 | u32 bfs_keyix; | 114 | u32 bfs_keyix; |
111 | enum ath9k_key_type bfs_keytype; | 115 | enum ath9k_key_type bfs_keytype; |
112 | }; | 116 | }; |
@@ -134,15 +138,12 @@ struct ath_buf { | |||
134 | struct ath_desc *bf_desc; /* virtual addr of desc */ | 138 | struct ath_desc *bf_desc; /* virtual addr of desc */ |
135 | dma_addr_t bf_daddr; /* physical addr of desc */ | 139 | dma_addr_t bf_daddr; /* physical addr of desc */ |
136 | dma_addr_t bf_buf_addr; /* physical addr of data buffer */ | 140 | dma_addr_t bf_buf_addr; /* physical addr of data buffer */ |
137 | u32 bf_status; | 141 | bool bf_stale; |
138 | u16 bf_flags; | 142 | u16 bf_flags; |
139 | struct ath_buf_state bf_state; | 143 | struct ath_buf_state bf_state; |
140 | dma_addr_t bf_dmacontext; | 144 | dma_addr_t bf_dmacontext; |
141 | }; | 145 | }; |
142 | 146 | ||
143 | #define ATH_RXBUF_RESET(_bf) ((_bf)->bf_status = 0) | ||
144 | #define ATH_BUFSTATUS_STALE 0x00000002 | ||
145 | |||
146 | struct ath_descdma { | 147 | struct ath_descdma { |
147 | const char *dd_name; | 148 | const char *dd_name; |
148 | struct ath_desc *dd_desc; | 149 | struct ath_desc *dd_desc; |