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