1
2
3
4
5
6
7 #ifndef __INC_HAL8188EPHYCFG_H__
8 #define __INC_HAL8188EPHYCFG_H__
9
10
11
12 #define LOOP_LIMIT 5
13 #define MAX_STALL_TIME 50
14 #define AntennaDiversityValue 0x80
15 #define MAX_TXPWR_IDX_NMODE_92S 63
16 #define Reset_Cnt_Limit 3
17
18 #define IQK_MAC_REG_NUM 4
19 #define IQK_ADDA_REG_NUM 16
20 #define IQK_BB_REG_NUM 9
21 #define HP_THERMAL_NUM 8
22
23 #define MAX_AGGR_NUM 0x07
24
25
26
27
28
29
30 enum sw_chnl_cmd_id {
31 CmdID_End,
32 CmdID_SetTxPowerLevel,
33 CmdID_BBRegWrite10,
34 CmdID_WritePortUlong,
35 CmdID_WritePortUshort,
36 CmdID_WritePortUchar,
37 CmdID_RF_WriteReg,
38 };
39
40
41 struct sw_chnl_cmd {
42 enum sw_chnl_cmd_id CmdID;
43 u32 Para1;
44 u32 Para2;
45 u32 msDelay;
46 };
47
48 enum hw90_block {
49 HW90_BLOCK_MAC = 0,
50 HW90_BLOCK_PHY0 = 1,
51 HW90_BLOCK_PHY1 = 2,
52 HW90_BLOCK_RF = 3,
53 HW90_BLOCK_MAXIMUM = 4,
54 };
55
56 enum rf_radio_path {
57 RF_PATH_A = 0,
58 RF_PATH_B = 1,
59 };
60
61 #define MAX_PG_GROUP 13
62
63 #define RF_PATH_MAX 2
64 #define MAX_RF_PATH RF_PATH_MAX
65 #define MAX_TX_COUNT 4
66
67 #define CHANNEL_MAX_NUMBER 14
68 #define MAX_CHNL_GROUP_24G 6
69
70
71
72 #define CHANNEL_GROUP_MAX_88E 6
73
74 enum wireless_mode {
75 WIRELESS_MODE_UNKNOWN = 0x00,
76 WIRELESS_MODE_A = BIT(2),
77 WIRELESS_MODE_B = BIT(0),
78 WIRELESS_MODE_G = BIT(1),
79 WIRELESS_MODE_AUTO = BIT(5),
80 WIRELESS_MODE_N_24G = BIT(3),
81 WIRELESS_MODE_N_5G = BIT(4),
82 WIRELESS_MODE_AC = BIT(6)
83 };
84
85 enum phy_rate_tx_offset_area {
86 RA_OFFSET_LEGACY_OFDM1,
87 RA_OFFSET_LEGACY_OFDM2,
88 RA_OFFSET_HT_OFDM1,
89 RA_OFFSET_HT_OFDM2,
90 RA_OFFSET_HT_OFDM3,
91 RA_OFFSET_HT_OFDM4,
92 RA_OFFSET_HT_CCK,
93 };
94
95 struct bb_reg_def {
96 u32 rfintfs;
97
98 u32 rfintfi;
99
100 u32 rfintfo;
101
102 u32 rfintfe;
103
104 u32 rf3wireOffset;
105
106 u32 rfLSSI_Select;
107
108 u32 rfTxGainStage;
109
110 u32 rfHSSIPara1;
111
112
113
114 u32 rfHSSIPara2;
115
116
117
118 u32 rfSwitchControl;
119
120 u32 rfAGCControl1;
121
122
123
124 u32 rfAGCControl2;
125
126
127
128 u32 rfRxIQImbalance;
129
130
131
132 u32 rfRxAFE;
133
134
135
136
137
138 u32 rfTxIQImbalance;
139
140
141
142 u32 rfTxAFE;
143
144
145
146 u32 rfLSSIReadBack;
147
148 u32 rfLSSIReadBackPi;
149
150
151 };
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170 void rtl8192c_PHY_GetHWRegOriginalValue(struct adapter *adapter);
171
172
173 void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
174
175 void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
176
177
178 void ChkFwCmdIoDone(struct adapter *adapter);
179
180
181 void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
182
183 void PHY_SwitchEphyParameter(struct adapter *adapter);
184
185 void PHY_EnableHostClkReq(struct adapter *adapter);
186
187 bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
188
189
190
191 #define PHY_SetMacReg PHY_SetBBReg
192
193 #define SIC_HW_SUPPORT 0
194
195 #define SIC_MAX_POLL_CNT 5
196
197 #define SIC_CMD_READY 0
198 #define SIC_CMD_WRITE 1
199 #define SIC_CMD_READ 2
200
201 #define SIC_CMD_REG 0x1EB
202 #define SIC_ADDR_REG 0x1E8
203 #define SIC_DATA_REG 0x1EC
204
205 #endif