Luciano Coelho | 274c66c | 2012-05-10 12:13:13 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of wl18xx |
| 3 | * |
| 4 | * Copyright (C) 2011 Texas Instruments Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * version 2 as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 18 | * 02110-1301 USA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #ifndef __WL18XX_PRIV_H__ |
| 23 | #define __WL18XX_PRIV_H__ |
| 24 | |
Luciano Coelho | 23ee9bf | 2012-05-10 12:13:29 +0300 | [diff] [blame] | 25 | #include "conf.h" |
Luciano Coelho | 274c66c | 2012-05-10 12:13:13 +0300 | [diff] [blame] | 26 | |
| 27 | #define WL18XX_CMD_MAX_SIZE 740 |
| 28 | |
| 29 | struct wl18xx_priv { |
| 30 | /* buffer for sending commands to FW */ |
| 31 | u8 cmd_buf[WL18XX_CMD_MAX_SIZE]; |
Arik Nemtsov | 872b345 | 2012-05-10 12:13:25 +0300 | [diff] [blame] | 32 | |
Luciano Coelho | 23ee9bf | 2012-05-10 12:13:29 +0300 | [diff] [blame] | 33 | struct wl18xx_priv_conf conf; |
| 34 | |
Arik Nemtsov | 872b345 | 2012-05-10 12:13:25 +0300 | [diff] [blame] | 35 | /* Index of last released Tx desc in FW */ |
| 36 | u8 last_fw_rls_idx; |
Luciano Coelho | a9c130d | 2012-05-10 12:13:37 +0300 | [diff] [blame^] | 37 | |
| 38 | u8 board_type; |
Luciano Coelho | 274c66c | 2012-05-10 12:13:13 +0300 | [diff] [blame] | 39 | }; |
| 40 | |
Arik Nemtsov | 1fab39d | 2012-05-10 12:13:21 +0300 | [diff] [blame] | 41 | #define WL18XX_FW_MAX_TX_STATUS_DESC 33 |
| 42 | |
| 43 | struct wl18xx_fw_status_priv { |
| 44 | /* |
| 45 | * Index in released_tx_desc for first byte that holds |
| 46 | * released tx host desc |
| 47 | */ |
| 48 | u8 fw_release_idx; |
| 49 | |
| 50 | /* |
| 51 | * Array of host Tx descriptors, where fw_release_idx |
| 52 | * indicated the first released idx. |
| 53 | */ |
| 54 | u8 released_tx_desc[WL18XX_FW_MAX_TX_STATUS_DESC]; |
| 55 | |
| 56 | u8 padding[2]; |
| 57 | }; |
| 58 | |
Luciano Coelho | 274c66c | 2012-05-10 12:13:13 +0300 | [diff] [blame] | 59 | #endif /* __WL18XX_PRIV_H__ */ |