staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings
[firefly-linux-kernel-4.4.55.git] / drivers / staging / rtl8192e / rtl8192e / r8192E_firmware.h
1 /******************************************************************************
2  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
3  *
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
7  * more details.
8  *
9  * The full GNU General Public License is included in this distribution in the
10  * file called LICENSE.
11  *
12  * Contact Information:
13  * wlanfae <wlanfae@realtek.com>
14 ******************************************************************************/
15 #ifndef __INC_FIRMWARE_H
16 #define __INC_FIRMWARE_H
17
18 #define GET_COMMAND_PACKET_FRAG_THRESHOLD(v)    (4*(v/4) - 8)
19
20 #define RTL8192E_BOOT_IMG_FW    "RTL8192E/boot.img"
21 #define RTL8192E_MAIN_IMG_FW    "RTL8192E/main.img"
22 #define RTL8192E_DATA_IMG_FW    "RTL8192E/data.img"
23
24 enum firmware_init_step {
25         FW_INIT_STEP0_BOOT = 0,
26         FW_INIT_STEP1_MAIN = 1,
27         FW_INIT_STEP2_DATA = 2,
28 };
29
30 enum opt_rst_type {
31         OPT_SYSTEM_RESET = 0,
32         OPT_FIRMWARE_RESET = 1,
33 };
34
35 enum desc_packet_type {
36         DESC_PACKET_TYPE_INIT = 0,
37         DESC_PACKET_TYPE_NORMAL = 1,
38 };
39
40 enum firmware_status {
41         FW_STATUS_0_INIT = 0,
42         FW_STATUS_1_MOVE_BOOT_CODE = 1,
43         FW_STATUS_2_MOVE_MAIN_CODE = 2,
44         FW_STATUS_3_TURNON_CPU = 3,
45         FW_STATUS_4_MOVE_DATA_CODE = 4,
46         FW_STATUS_5_READY = 5,
47 };
48
49 struct rt_firmware {
50         enum firmware_status firmware_status;
51         u16               cmdpacket_frag_thresold;
52 #define RTL8190_MAX_FIRMWARE_CODE_SIZE  64000
53 #define MAX_FW_INIT_STEP                3
54         u8 firmware_buf[MAX_FW_INIT_STEP][RTL8190_MAX_FIRMWARE_CODE_SIZE];
55         u16               firmware_buf_size[MAX_FW_INIT_STEP];
56 };
57
58 bool rtl92e_init_fw(struct net_device *dev);
59 void rtl92e_init_fw_param(struct net_device *dev);
60
61 #endif