1 /******************************************************************************
2 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
4 * This program is distributed in the hope that it will be useful, but WITHOUT
5 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
9 * You should have received a copy of the GNU General Public License along with
10 * this program; if not, write to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
13 * The full GNU General Public License is included in this distribution in the
14 * file called LICENSE.
16 * Contact Information:
17 * wlanfae <wlanfae@realtek.com>
18 ******************************************************************************/
19 #ifndef __INC_FIRMWARE_H
20 #define __INC_FIRMWARE_H
22 #define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) (4*(v/4) - 8)
24 #define RTL8192E_BOOT_IMG_FW "RTL8192E/boot.img"
25 #define RTL8192E_MAIN_IMG_FW "RTL8192E/main.img"
26 #define RTL8192E_DATA_IMG_FW "RTL8192E/data.img"
28 enum firmware_init_step {
29 FW_INIT_STEP0_BOOT = 0,
30 FW_INIT_STEP1_MAIN = 1,
31 FW_INIT_STEP2_DATA = 2,
36 OPT_FIRMWARE_RESET = 1,
39 enum desc_packet_type {
40 DESC_PACKET_TYPE_INIT = 0,
41 DESC_PACKET_TYPE_NORMAL = 1,
44 enum firmware_status {
46 FW_STATUS_1_MOVE_BOOT_CODE = 1,
47 FW_STATUS_2_MOVE_MAIN_CODE = 2,
48 FW_STATUS_3_TURNON_CPU = 3,
49 FW_STATUS_4_MOVE_DATA_CODE = 4,
50 FW_STATUS_5_READY = 5,
54 enum firmware_status firmware_status;
55 u16 cmdpacket_frag_thresold;
56 #define RTL8190_MAX_FIRMWARE_CODE_SIZE 64000
57 #define MAX_FW_INIT_STEP 3
58 u8 firmware_buf[MAX_FW_INIT_STEP][RTL8190_MAX_FIRMWARE_CODE_SIZE];
59 u16 firmware_buf_size[MAX_FW_INIT_STEP];
62 bool rtl92e_init_fw(struct net_device *dev);
63 void rtl92e_init_fw_param(struct net_device *dev);