1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef __RTL8712_HAL_H__
15#define __RTL8712_HAL_H__
16
17enum _HW_VERSION {
18 RTL8712_FPGA,
19 RTL8712_1stCUT,
20 RTL8712_2ndCUT,
21 RTL8712_3rdCUT,
22};
23
24enum _LOOPBACK_TYPE {
25 RTL8712_AIR_TRX = 0,
26 RTL8712_MAC_LBK,
27 RTL8712_BB_LBK,
28 RTL8712_MAC_FW_LBK = 4,
29 RTL8712_BB_FW_LBK = 8,
30};
31
32enum RTL871X_HCI_TYPE {
33 RTL8712_SDIO,
34 RTL8712_USB,
35};
36
37enum RTL8712_RF_CONFIG {
38 RTL8712_RF_1T1R,
39 RTL8712_RF_1T2R,
40 RTL8712_RF_2T2R
41};
42
43enum _RTL8712_HCI_TYPE_ {
44 RTL8712_HCI_TYPE_PCIE = 0x01,
45 RTL8712_HCI_TYPE_AP_PCIE = 0x81,
46 RTL8712_HCI_TYPE_USB = 0x02,
47 RTL8712_HCI_TYPE_92USB = 0x02,
48 RTL8712_HCI_TYPE_AP_USB = 0x82,
49 RTL8712_HCI_TYPE_72USB = 0x12,
50 RTL8712_HCI_TYPE_SDIO = 0x04,
51 RTL8712_HCI_TYPE_72SDIO = 0x14
52};
53
54struct fw_priv {
55
56 unsigned char signature_0;
57 unsigned char signature_1;
58 unsigned char hci_sel;
59
60
61 unsigned char chip_version;
62 unsigned char customer_ID_0;
63 unsigned char customer_ID_1;
64 unsigned char rf_config;
65
66
67 unsigned char usb_ep_num;
68
69 unsigned char regulatory_class_0;
70 unsigned char regulatory_class_1;
71 unsigned char regulatory_class_2;
72 unsigned char regulatory_class_3;
73 unsigned char rfintfs;
74 unsigned char def_nettype;
75 unsigned char turbo_mode;
76 unsigned char low_power_mode;
77
78 unsigned char lbk_mode;
79 unsigned char mp_mode;
80 unsigned char vcs_type;
81 unsigned char vcs_mode;
82 unsigned char rsvd022;
83 unsigned char rsvd023;
84 unsigned char rsvd024;
85 unsigned char rsvd025;
86
87 unsigned char qos_en;
88 unsigned char bw_40MHz_en;
89 unsigned char AMSDU2AMPDU_en;
90
91
92 unsigned char AMPDU_en;
93 unsigned char rate_control_offload;
94 unsigned char aggregation_offload;
95 unsigned char rsvd030;
96 unsigned char rsvd031;
97
98 unsigned char beacon_offload;
99 unsigned char MLME_offload;
100 unsigned char hwpc_offload;
101 unsigned char tcp_checksum_offload;
102 unsigned char tcp_offload;
103 unsigned char ps_control_offload;
104 unsigned char WWLAN_offload;
105 unsigned char rsvd040;
106
107 unsigned char tcp_tx_frame_len_L;
108 unsigned char tcp_tx_frame_len_H;
109 unsigned char tcp_rx_frame_len_L;
110 unsigned char tcp_rx_frame_len_H;
111 unsigned char rsvd050;
112 unsigned char rsvd051;
113 unsigned char rsvd052;
114 unsigned char rsvd053;
115};
116
117struct fw_hdr {
118 unsigned short signature;
119 unsigned short version;
120
121
122 unsigned int dmem_size;
123 unsigned int img_IMEM_size;
124 unsigned int img_SRAM_size;
125 unsigned int fw_priv_sz;
126 unsigned short efuse_addr;
127 unsigned short h2ccnd_resp_addr;
128 unsigned int SVNRevision;
129 unsigned int release_time;
130 struct fw_priv fwpriv;
131};
132
133struct hal_priv {
134
135 struct net_device *pipehdls_r8712[10];
136 u8 (*hal_bus_init)(struct _adapter *adapter);
137};
138
139uint rtl8712_hal_init(struct _adapter *padapter);
140int rtl871x_load_fw(struct _adapter *padapter);
141
142#endif
143