diff options
author | Avinash Patil <patila@marvell.com> | 2013-02-08 21:18:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-11 15:34:57 -0500 |
commit | e05dc3e93c136ecd329ed2d57d4eb2e82f530304 (patch) | |
tree | dd1fca715955c8670939780871d1aa398222882d /drivers/net/wireless/mwifiex/pcie.h | |
parent | 0732484b47b57ef90bb08408d60fddbad0262d82 (diff) |
mwifiex: define generic data type for PCIe ring buffers
This patch defines PCIe ring buffer array pointer as void instead
of mwifiex_pcie_buf_desc. This will enable us to use same pointers
for ring operations instead of new structures if buffer descriptor
structure changes.
Also split out event buffer descriptor structure from struct
mwifiex_pcie_buf_desc. For PCIe8766 TX/RX buffer descriptor is
same as evevt buffer descriptor. Newer chips could use different
TX/RX buffer descriptor while event descriptor remains the same.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/pcie.h')
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h index 7ef660ec058e..7ebdc74f2bbf 100644 --- a/drivers/net/wireless/mwifiex/pcie.h +++ b/drivers/net/wireless/mwifiex/pcie.h | |||
@@ -155,6 +155,12 @@ static const struct mwifiex_pcie_device mwifiex_pcie8766 = { | |||
155 | .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD, | 155 | .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD, |
156 | }; | 156 | }; |
157 | 157 | ||
158 | struct mwifiex_evt_buf_desc { | ||
159 | u64 paddr; | ||
160 | u16 len; | ||
161 | u16 flags; | ||
162 | } __packed; | ||
163 | |||
158 | struct mwifiex_pcie_buf_desc { | 164 | struct mwifiex_pcie_buf_desc { |
159 | u64 paddr; | 165 | u64 paddr; |
160 | u16 len; | 166 | u16 len; |
@@ -172,7 +178,7 @@ struct pcie_service_card { | |||
172 | u32 txbd_ring_size; | 178 | u32 txbd_ring_size; |
173 | u8 *txbd_ring_vbase; | 179 | u8 *txbd_ring_vbase; |
174 | dma_addr_t txbd_ring_pbase; | 180 | dma_addr_t txbd_ring_pbase; |
175 | struct mwifiex_pcie_buf_desc *txbd_ring[MWIFIEX_MAX_TXRX_BD]; | 181 | void *txbd_ring[MWIFIEX_MAX_TXRX_BD]; |
176 | struct sk_buff *tx_buf_list[MWIFIEX_MAX_TXRX_BD]; | 182 | struct sk_buff *tx_buf_list[MWIFIEX_MAX_TXRX_BD]; |
177 | 183 | ||
178 | u32 rxbd_wrptr; | 184 | u32 rxbd_wrptr; |
@@ -180,7 +186,7 @@ struct pcie_service_card { | |||
180 | u32 rxbd_ring_size; | 186 | u32 rxbd_ring_size; |
181 | u8 *rxbd_ring_vbase; | 187 | u8 *rxbd_ring_vbase; |
182 | dma_addr_t rxbd_ring_pbase; | 188 | dma_addr_t rxbd_ring_pbase; |
183 | struct mwifiex_pcie_buf_desc *rxbd_ring[MWIFIEX_MAX_TXRX_BD]; | 189 | void *rxbd_ring[MWIFIEX_MAX_TXRX_BD]; |
184 | struct sk_buff *rx_buf_list[MWIFIEX_MAX_TXRX_BD]; | 190 | struct sk_buff *rx_buf_list[MWIFIEX_MAX_TXRX_BD]; |
185 | 191 | ||
186 | u32 evtbd_wrptr; | 192 | u32 evtbd_wrptr; |
@@ -188,7 +194,7 @@ struct pcie_service_card { | |||
188 | u32 evtbd_ring_size; | 194 | u32 evtbd_ring_size; |
189 | u8 *evtbd_ring_vbase; | 195 | u8 *evtbd_ring_vbase; |
190 | dma_addr_t evtbd_ring_pbase; | 196 | dma_addr_t evtbd_ring_pbase; |
191 | struct mwifiex_pcie_buf_desc *evtbd_ring[MWIFIEX_MAX_EVT_BD]; | 197 | void *evtbd_ring[MWIFIEX_MAX_EVT_BD]; |
192 | struct sk_buff *evt_buf_list[MWIFIEX_MAX_EVT_BD]; | 198 | struct sk_buff *evt_buf_list[MWIFIEX_MAX_EVT_BD]; |
193 | 199 | ||
194 | struct sk_buff *cmd_buf; | 200 | struct sk_buff *cmd_buf; |