1 // SPDX-License-Identifier: GPL-2.0
2 /******************************************************************************
3 *
4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 *
6 ******************************************************************************/
7 
8 #include <linux/kernel.h>
9 #include "odm_precomp.h"
10 
CheckPositive(struct dm_odm_t * pDM_Odm,const u32 Condition1,const u32 Condition2)11 static bool CheckPositive(
12 	struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
13 )
14 {
15 	u8 _BoardType =
16 			((pDM_Odm->BoardType & BIT4) >> 4) << 0 | /*  _GLNA */
17 			((pDM_Odm->BoardType & BIT3) >> 3) << 1 | /*  _GPA */
18 			((pDM_Odm->BoardType & BIT7) >> 7) << 2 | /*  _ALNA */
19 			((pDM_Odm->BoardType & BIT6) >> 6) << 3 | /*  _APA */
20 			((pDM_Odm->BoardType & BIT2) >> 2) << 4;  /*  _BT */
21 
22 	u32 cond1 = Condition1, cond2 = Condition2;
23 	u32 driver1 =
24 		pDM_Odm->CutVersion << 24 |
25 		pDM_Odm->SupportPlatform << 16 |
26 		pDM_Odm->PackageType << 12 |
27 		pDM_Odm->SupportInterface << 8 |
28 		_BoardType;
29 
30 	u32 driver2 =
31 		pDM_Odm->TypeGLNA <<  0 |
32 		pDM_Odm->TypeGPA  <<  8 |
33 		pDM_Odm->TypeALNA << 16 |
34 		pDM_Odm->TypeAPA  << 24;
35 
36 	/*  Value Defined Check =============== */
37 	/* QFN Type [15:12] and Cut Version [27:24] need to do value check */
38 
39 	if (
40 		((cond1 & 0x0000F000) != 0) &&
41 		((cond1 & 0x0000F000) != (driver1 & 0x0000F000))
42 	)
43 		return false;
44 
45 	if (
46 		((cond1 & 0x0F000000) != 0) &&
47 		((cond1 & 0x0F000000) != (driver1 & 0x0F000000))
48 	)
49 		return false;
50 
51 	/*  Bit Defined Check ================ */
52 	/*  We don't care [31:28] and [23:20] */
53 	cond1   &= 0x000F0FFF;
54 	driver1 &= 0x000F0FFF;
55 
56 	if ((cond1 & driver1) == cond1) {
57 		u32 bitMask = 0;
58 
59 		if ((cond1 & 0x0F) == 0) /*  BoardType is DONTCARE */
60 			return true;
61 
62 		if ((cond1 & BIT0) != 0) /* GLNA */
63 			bitMask |= 0x000000FF;
64 		if ((cond1 & BIT1) != 0) /* GPA */
65 			bitMask |= 0x0000FF00;
66 		if ((cond1 & BIT2) != 0) /* ALNA */
67 			bitMask |= 0x00FF0000;
68 		if ((cond1 & BIT3) != 0) /* APA */
69 			bitMask |= 0xFF000000;
70 
71 		/*  BoardType of each RF path is matched */
72 		if ((cond2 & bitMask) == (driver2 & bitMask))
73 			return true;
74 
75 		return false;
76 	}
77 
78 	return false;
79 }
80 
CheckNegative(struct dm_odm_t * pDM_Odm,const u32 Condition1,const u32 Condition2)81 static bool CheckNegative(
82 	struct dm_odm_t *pDM_Odm, const u32  Condition1, const u32 Condition2
83 )
84 {
85 	return true;
86 }
87 
88 /******************************************************************************
89 *                           RadioA.TXT
90 ******************************************************************************/
91 
92 static u32 Array_MP_8723B_RadioA[] = {
93 		0x000, 0x00010000,
94 		0x0B0, 0x000DFFE0,
95 		0x0FE, 0x00000000,
96 		0x0FE, 0x00000000,
97 		0x0FE, 0x00000000,
98 		0x0B1, 0x00000018,
99 		0x0FE, 0x00000000,
100 		0x0FE, 0x00000000,
101 		0x0FE, 0x00000000,
102 		0x0B2, 0x00084C00,
103 		0x0B5, 0x0000D2CC,
104 		0x0B6, 0x000925AA,
105 		0x0B7, 0x00000010,
106 		0x0B8, 0x0000907F,
107 		0x05C, 0x00000002,
108 		0x07C, 0x00000002,
109 		0x07E, 0x00000005,
110 		0x08B, 0x0006FC00,
111 		0x0B0, 0x000FF9F0,
112 		0x01C, 0x000739D2,
113 		0x01E, 0x00000000,
114 		0x0DF, 0x00000780,
115 		0x050, 0x00067435,
116 	0x80002000, 0x00000000, 0x40000000, 0x00000000,
117 		0x051, 0x0006B10E,
118 	0x90003000, 0x00000000, 0x40000000, 0x00000000,
119 		0x051, 0x0006B10E,
120 	0x90004000, 0x00000000, 0x40000000, 0x00000000,
121 		0x051, 0x0006B10E,
122 	0xA0000000, 0x00000000,
123 		0x051, 0x0006B04E,
124 	0xB0000000, 0x00000000,
125 		0x052, 0x000007D2,
126 		0x053, 0x00000000,
127 		0x054, 0x00050400,
128 		0x055, 0x0004026E,
129 		0x0DD, 0x0000004C,
130 		0x070, 0x00067435,
131 	0x80002000, 0x00000000, 0x40000000, 0x00000000,
132 		0x071, 0x0006B10E,
133 	0x90003000, 0x00000000, 0x40000000, 0x00000000,
134 		0x071, 0x0006B10E,
135 	0x90004000, 0x00000000, 0x40000000, 0x00000000,
136 		0x071, 0x0006B10E,
137 	0xA0000000, 0x00000000,
138 		0x071, 0x0006B04E,
139 	0xB0000000, 0x00000000,
140 		0x072, 0x000007D2,
141 		0x073, 0x00000000,
142 		0x074, 0x00050400,
143 		0x075, 0x0004026E,
144 		0x0EF, 0x00000100,
145 		0x034, 0x0000ADD7,
146 		0x035, 0x00005C00,
147 		0x034, 0x00009DD4,
148 		0x035, 0x00005000,
149 		0x034, 0x00008DD1,
150 		0x035, 0x00004400,
151 		0x034, 0x00007DCE,
152 		0x035, 0x00003800,
153 		0x034, 0x00006CD1,
154 		0x035, 0x00004400,
155 		0x034, 0x00005CCE,
156 		0x035, 0x00003800,
157 		0x034, 0x000048CE,
158 		0x035, 0x00004400,
159 		0x034, 0x000034CE,
160 		0x035, 0x00003800,
161 		0x034, 0x00002451,
162 		0x035, 0x00004400,
163 		0x034, 0x0000144E,
164 		0x035, 0x00003800,
165 		0x034, 0x00000051,
166 		0x035, 0x00004400,
167 		0x0EF, 0x00000000,
168 		0x0EF, 0x00000100,
169 		0x0ED, 0x00000010,
170 		0x044, 0x0000ADD7,
171 		0x044, 0x00009DD4,
172 		0x044, 0x00008DD1,
173 		0x044, 0x00007DCE,
174 		0x044, 0x00006CC1,
175 		0x044, 0x00005CCE,
176 		0x044, 0x000044D1,
177 		0x044, 0x000034CE,
178 		0x044, 0x00002451,
179 		0x044, 0x0000144E,
180 		0x044, 0x00000051,
181 		0x0EF, 0x00000000,
182 		0x0ED, 0x00000000,
183 		0x07F, 0x00020080,
184 		0x0EF, 0x00002000,
185 		0x03B, 0x000380EF,
186 		0x03B, 0x000302FE,
187 		0x03B, 0x00028CE6,
188 		0x03B, 0x000200BC,
189 		0x03B, 0x000188A5,
190 		0x03B, 0x00010FBC,
191 		0x03B, 0x00008F71,
192 		0x03B, 0x00000900,
193 		0x0EF, 0x00000000,
194 		0x0ED, 0x00000001,
195 		0x040, 0x000380EF,
196 		0x040, 0x000302FE,
197 		0x040, 0x00028CE6,
198 		0x040, 0x000200BC,
199 		0x040, 0x000188A5,
200 		0x040, 0x00010FBC,
201 		0x040, 0x00008F71,
202 		0x040, 0x00000900,
203 		0x0ED, 0x00000000,
204 		0x082, 0x00080000,
205 		0x083, 0x00008000,
206 		0x084, 0x00048D80,
207 		0x085, 0x00068000,
208 		0x0A2, 0x00080000,
209 		0x0A3, 0x00008000,
210 		0x0A4, 0x00048D80,
211 		0x0A5, 0x00068000,
212 		0x0ED, 0x00000002,
213 		0x0EF, 0x00000002,
214 		0x056, 0x00000032,
215 		0x076, 0x00000032,
216 		0x001, 0x00000780,
217 
218 };
219 
ODM_ReadAndConfig_MP_8723B_RadioA(struct dm_odm_t * pDM_Odm)220 void ODM_ReadAndConfig_MP_8723B_RadioA(struct dm_odm_t *pDM_Odm)
221 {
222 	u32 i = 0;
223 	u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_RadioA);
224 	u32 *Array = Array_MP_8723B_RadioA;
225 
226 	for (i = 0; i < ArrayLen; i += 2) {
227 		u32 v1 = Array[i];
228 		u32 v2 = Array[i+1];
229 
230 		/*  This (offset, data) pair doesn't care the condition. */
231 		if (v1 < 0x40000000) {
232 			odm_ConfigRF_RadioA_8723B(pDM_Odm, v1, v2);
233 			continue;
234 		} else {
235 			/*  This line is the beginning of branch. */
236 			bool bMatched = true;
237 			u8  cCond  = (u8)((v1 & (BIT29|BIT28)) >> 28);
238 
239 			if (cCond == COND_ELSE) { /*  ELSE, ENDIF */
240 				bMatched = true;
241 				READ_NEXT_PAIR(v1, v2, i);
242 			} else if (!CheckPositive(pDM_Odm, v1, v2)) {
243 				bMatched = false;
244 				READ_NEXT_PAIR(v1, v2, i);
245 				READ_NEXT_PAIR(v1, v2, i);
246 			} else {
247 				READ_NEXT_PAIR(v1, v2, i);
248 				if (!CheckNegative(pDM_Odm, v1, v2))
249 					bMatched = false;
250 				else
251 					bMatched = true;
252 				READ_NEXT_PAIR(v1, v2, i);
253 			}
254 
255 			if (!bMatched) {
256 				/*  Condition isn't matched.
257 				*   Discard the following (offset, data) pairs.
258 				*/
259 				while (v1 < 0x40000000 && i < ArrayLen-2)
260 					READ_NEXT_PAIR(v1, v2, i);
261 
262 				i -= 2; /*  prevent from for-loop += 2 */
263 			} else {
264 				/*  Configure matched pairs and skip to end of if-else. */
265 				while (v1 < 0x40000000 && i < ArrayLen-2) {
266 					odm_ConfigRF_RadioA_8723B(pDM_Odm, v1, v2);
267 					READ_NEXT_PAIR(v1, v2, i);
268 				}
269 
270 				/*  Keeps reading until ENDIF. */
271 				cCond = (u8)((v1 & (BIT29|BIT28)) >> 28);
272 				while (cCond != COND_ENDIF && i < ArrayLen-2) {
273 					READ_NEXT_PAIR(v1, v2, i);
274 					cCond = (u8)((v1 & (BIT29|BIT28)) >> 28);
275 				}
276 			}
277 		}
278 	}
279 }
280 
281 /******************************************************************************
282 *                           TxPowerTrack_SDIO.TXT
283 ******************************************************************************/
284 
285 static u8 gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8723B[] = {
286 	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6, 6,  6,
287 	7,  7,  7, 8,  8,  9,  9, 10, 10, 11, 12, 13, 14, 15
288 };
289 static u8 gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8723B[] = {
290 	0, 0, 1, 2, 2, 3, 3, 4, 5, 5,  6,  6,  7,  7,  8,  8,
291 	9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15
292 };
293 static u8 gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8723B[] = {
294 	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6,  6,  6,
295 	7,  7,  7,  8,  8,  9,  9, 10, 10, 11, 12, 13, 14, 15
296 };
297 static u8 gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8723B[] = {
298 	0, 0, 1, 2, 2, 3, 3, 4, 5, 5,  6,  6,  7,  7,  8,  8,
299 	9,  9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15
300 };
301 static u8 gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8723B[] = {
302 	0, 0, 1, 2, 2, 3, 3, 4, 4, 5,  6,  6,  7,  7,  7,  8,
303 	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
304 };
305 static u8 gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8723B[] = {
306 	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6,  7,  7,
307 	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
308 };
309 static u8 gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8723B[] = {
310 	0, 0, 1, 2, 2, 3, 3, 4, 4, 5,  6,  6,  7,  7,  7,  8,
311 	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
312 };
313 static u8 gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8723B[] = {
314 	0, 0, 1, 2, 2, 2, 3, 3, 3, 4,  5,  5,  6,  6,  7,  7,
315 	8,  8,  9,  9,  9, 10, 10, 11, 11, 12, 12, 13, 14, 15
316 };
317 
ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct dm_odm_t * pDM_Odm)318 void ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct dm_odm_t *pDM_Odm)
319 {
320 	struct odm_rf_cal_t *pRFCalibrateInfo = &pDM_Odm->RFCalibrateInfo;
321 
322 
323 	memcpy(
324 		pRFCalibrateInfo->DeltaSwingTableIdx_2GA_P,
325 		gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8723B,
326 		DELTA_SWINGIDX_SIZE
327 	);
328 	memcpy(
329 		pRFCalibrateInfo->DeltaSwingTableIdx_2GA_N,
330 		gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8723B,
331 		DELTA_SWINGIDX_SIZE
332 	);
333 	memcpy(
334 		pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P,
335 		gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8723B,
336 		DELTA_SWINGIDX_SIZE
337 	);
338 	memcpy(
339 		pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N,
340 		gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8723B,
341 		DELTA_SWINGIDX_SIZE
342 	);
343 
344 	memcpy(
345 		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_P,
346 		gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8723B,
347 		DELTA_SWINGIDX_SIZE
348 	);
349 	memcpy(
350 		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_N,
351 		gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8723B,
352 		DELTA_SWINGIDX_SIZE
353 	);
354 	memcpy(
355 		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_P,
356 		gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8723B,
357 		DELTA_SWINGIDX_SIZE
358 	);
359 	memcpy(
360 		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_N,
361 		gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8723B,
362 		DELTA_SWINGIDX_SIZE
363 	);
364 }
365 
366 /******************************************************************************
367 *                           TXPWR_LMT.TXT
368 ******************************************************************************/
369 
370 static u8 *Array_MP_8723B_TXPWR_LMT[] = {
371 	"FCC", "20M", "CCK", "1T", "01", "32",
372 	"ETSI", "20M", "CCK", "1T", "01", "32",
373 	"MKK", "20M", "CCK", "1T", "01", "32",
374 	"FCC", "20M", "CCK", "1T", "02", "32",
375 	"ETSI", "20M", "CCK", "1T", "02", "32",
376 	"MKK", "20M", "CCK", "1T", "02", "32",
377 	"FCC", "20M", "CCK", "1T", "03", "32",
378 	"ETSI", "20M", "CCK", "1T", "03", "32",
379 	"MKK", "20M", "CCK", "1T", "03", "32",
380 	"FCC", "20M", "CCK", "1T", "04", "32",
381 	"ETSI", "20M", "CCK", "1T", "04", "32",
382 	"MKK", "20M", "CCK", "1T", "04", "32",
383 	"FCC", "20M", "CCK", "1T", "05", "32",
384 	"ETSI", "20M", "CCK", "1T", "05", "32",
385 	"MKK", "20M", "CCK", "1T", "05", "32",
386 	"FCC", "20M", "CCK", "1T", "06", "32",
387 	"ETSI", "20M", "CCK", "1T", "06", "32",
388 	"MKK", "20M", "CCK", "1T", "06", "32",
389 	"FCC", "20M", "CCK", "1T", "07", "32",
390 	"ETSI", "20M", "CCK", "1T", "07", "32",
391 	"MKK", "20M", "CCK", "1T", "07", "32",
392 	"FCC", "20M", "CCK", "1T", "08", "32",
393 	"ETSI", "20M", "CCK", "1T", "08", "32",
394 	"MKK", "20M", "CCK", "1T", "08", "32",
395 	"FCC", "20M", "CCK", "1T", "09", "32",
396 	"ETSI", "20M", "CCK", "1T", "09", "32",
397 	"MKK", "20M", "CCK", "1T", "09", "32",
398 	"FCC", "20M", "CCK", "1T", "10", "32",
399 	"ETSI", "20M", "CCK", "1T", "10", "32",
400 	"MKK", "20M", "CCK", "1T", "10", "32",
401 	"FCC", "20M", "CCK", "1T", "11", "32",
402 	"ETSI", "20M", "CCK", "1T", "11", "32",
403 	"MKK", "20M", "CCK", "1T", "11", "32",
404 	"FCC", "20M", "CCK", "1T", "12", "63",
405 	"ETSI", "20M", "CCK", "1T", "12", "32",
406 	"MKK", "20M", "CCK", "1T", "12", "32",
407 	"FCC", "20M", "CCK", "1T", "13", "63",
408 	"ETSI", "20M", "CCK", "1T", "13", "32",
409 	"MKK", "20M", "CCK", "1T", "13", "32",
410 	"FCC", "20M", "CCK", "1T", "14", "63",
411 	"ETSI", "20M", "CCK", "1T", "14", "63",
412 	"MKK", "20M", "CCK", "1T", "14", "32",
413 	"FCC", "20M", "OFDM", "1T", "01", "28",
414 	"ETSI", "20M", "OFDM", "1T", "01", "32",
415 	"MKK", "20M", "OFDM", "1T", "01", "32",
416 	"FCC", "20M", "OFDM", "1T", "02", "28",
417 	"ETSI", "20M", "OFDM", "1T", "02", "32",
418 	"MKK", "20M", "OFDM", "1T", "02", "32",
419 	"FCC", "20M", "OFDM", "1T", "03", "32",
420 	"ETSI", "20M", "OFDM", "1T", "03", "32",
421 	"MKK", "20M", "OFDM", "1T", "03", "32",
422 	"FCC", "20M", "OFDM", "1T", "04", "32",
423 	"ETSI", "20M", "OFDM", "1T", "04", "32",
424 	"MKK", "20M", "OFDM", "1T", "04", "32",
425 	"FCC", "20M", "OFDM", "1T", "05", "32",
426 	"ETSI", "20M", "OFDM", "1T", "05", "32",
427 	"MKK", "20M", "OFDM", "1T", "05", "32",
428 	"FCC", "20M", "OFDM", "1T", "06", "32",
429 	"ETSI", "20M", "OFDM", "1T", "06", "32",
430 	"MKK", "20M", "OFDM", "1T", "06", "32",
431 	"FCC", "20M", "OFDM", "1T", "07", "32",
432 	"ETSI", "20M", "OFDM", "1T", "07", "32",
433 	"MKK", "20M", "OFDM", "1T", "07", "32",
434 	"FCC", "20M", "OFDM", "1T", "08", "32",
435 	"ETSI", "20M", "OFDM", "1T", "08", "32",
436 	"MKK", "20M", "OFDM", "1T", "08", "32",
437 	"FCC", "20M", "OFDM", "1T", "09", "32",
438 	"ETSI", "20M", "OFDM", "1T", "09", "32",
439 	"MKK", "20M", "OFDM", "1T", "09", "32",
440 	"FCC", "20M", "OFDM", "1T", "10", "28",
441 	"ETSI", "20M", "OFDM", "1T", "10", "32",
442 	"MKK", "20M", "OFDM", "1T", "10", "32",
443 	"FCC", "20M", "OFDM", "1T", "11", "28",
444 	"ETSI", "20M", "OFDM", "1T", "11", "32",
445 	"MKK", "20M", "OFDM", "1T", "11", "32",
446 	"FCC", "20M", "OFDM", "1T", "12", "63",
447 	"ETSI", "20M", "OFDM", "1T", "12", "32",
448 	"MKK", "20M", "OFDM", "1T", "12", "32",
449 	"FCC", "20M", "OFDM", "1T", "13", "63",
450 	"ETSI", "20M", "OFDM", "1T", "13", "32",
451 	"MKK", "20M", "OFDM", "1T", "13", "32",
452 	"FCC", "20M", "OFDM", "1T", "14", "63",
453 	"ETSI", "20M", "OFDM", "1T", "14", "63",
454 	"MKK", "20M", "OFDM", "1T", "14", "63",
455 	"FCC", "20M", "HT", "1T", "01", "26",
456 	"ETSI", "20M", "HT", "1T", "01", "32",
457 	"MKK", "20M", "HT", "1T", "01", "32",
458 	"FCC", "20M", "HT", "1T", "02", "26",
459 	"ETSI", "20M", "HT", "1T", "02", "32",
460 	"MKK", "20M", "HT", "1T", "02", "32",
461 	"FCC", "20M", "HT", "1T", "03", "32",
462 	"ETSI", "20M", "HT", "1T", "03", "32",
463 	"MKK", "20M", "HT", "1T", "03", "32",
464 	"FCC", "20M", "HT", "1T", "04", "32",
465 	"ETSI", "20M", "HT", "1T", "04", "32",
466 	"MKK", "20M", "HT", "1T", "04", "32",
467 	"FCC", "20M", "HT", "1T", "05", "32",
468 	"ETSI", "20M", "HT", "1T", "05", "32",
469 	"MKK", "20M", "HT", "1T", "05", "32",
470 	"FCC", "20M", "HT", "1T", "06", "32",
471 	"ETSI", "20M", "HT", "1T", "06", "32",
472 	"MKK", "20M", "HT", "1T", "06", "32",
473 	"FCC", "20M", "HT", "1T", "07", "32",
474 	"ETSI", "20M", "HT", "1T", "07", "32",
475 	"MKK", "20M", "HT", "1T", "07", "32",
476 	"FCC", "20M", "HT", "1T", "08", "32",
477 	"ETSI", "20M", "HT", "1T", "08", "32",
478 	"MKK", "20M", "HT", "1T", "08", "32",
479 	"FCC", "20M", "HT", "1T", "09", "32",
480 	"ETSI", "20M", "HT", "1T", "09", "32",
481 	"MKK", "20M", "HT", "1T", "09", "32",
482 	"FCC", "20M", "HT", "1T", "10", "26",
483 	"ETSI", "20M", "HT", "1T", "10", "32",
484 	"MKK", "20M", "HT", "1T", "10", "32",
485 	"FCC", "20M", "HT", "1T", "11", "26",
486 	"ETSI", "20M", "HT", "1T", "11", "32",
487 	"MKK", "20M", "HT", "1T", "11", "32",
488 	"FCC", "20M", "HT", "1T", "12", "63",
489 	"ETSI", "20M", "HT", "1T", "12", "32",
490 	"MKK", "20M", "HT", "1T", "12", "32",
491 	"FCC", "20M", "HT", "1T", "13", "63",
492 	"ETSI", "20M", "HT", "1T", "13", "32",
493 	"MKK", "20M", "HT", "1T", "13", "32",
494 	"FCC", "20M", "HT", "1T", "14", "63",
495 	"ETSI", "20M", "HT", "1T", "14", "63",
496 	"MKK", "20M", "HT", "1T", "14", "63",
497 	"FCC", "40M", "HT", "1T", "01", "63",
498 	"ETSI", "40M", "HT", "1T", "01", "63",
499 	"MKK", "40M", "HT", "1T", "01", "63",
500 	"FCC", "40M", "HT", "1T", "02", "63",
501 	"ETSI", "40M", "HT", "1T", "02", "63",
502 	"MKK", "40M", "HT", "1T", "02", "63",
503 	"FCC", "40M", "HT", "1T", "03", "26",
504 	"ETSI", "40M", "HT", "1T", "03", "32",
505 	"MKK", "40M", "HT", "1T", "03", "32",
506 	"FCC", "40M", "HT", "1T", "04", "26",
507 	"ETSI", "40M", "HT", "1T", "04", "32",
508 	"MKK", "40M", "HT", "1T", "04", "32",
509 	"FCC", "40M", "HT", "1T", "05", "32",
510 	"ETSI", "40M", "HT", "1T", "05", "32",
511 	"MKK", "40M", "HT", "1T", "05", "32",
512 	"FCC", "40M", "HT", "1T", "06", "32",
513 	"ETSI", "40M", "HT", "1T", "06", "32",
514 	"MKK", "40M", "HT", "1T", "06", "32",
515 	"FCC", "40M", "HT", "1T", "07", "32",
516 	"ETSI", "40M", "HT", "1T", "07", "32",
517 	"MKK", "40M", "HT", "1T", "07", "32",
518 	"FCC", "40M", "HT", "1T", "08", "26",
519 	"ETSI", "40M", "HT", "1T", "08", "32",
520 	"MKK", "40M", "HT", "1T", "08", "32",
521 	"FCC", "40M", "HT", "1T", "09", "26",
522 	"ETSI", "40M", "HT", "1T", "09", "32",
523 	"MKK", "40M", "HT", "1T", "09", "32",
524 	"FCC", "40M", "HT", "1T", "10", "26",
525 	"ETSI", "40M", "HT", "1T", "10", "32",
526 	"MKK", "40M", "HT", "1T", "10", "32",
527 	"FCC", "40M", "HT", "1T", "11", "26",
528 	"ETSI", "40M", "HT", "1T", "11", "32",
529 	"MKK", "40M", "HT", "1T", "11", "32",
530 	"FCC", "40M", "HT", "1T", "12", "63",
531 	"ETSI", "40M", "HT", "1T", "12", "32",
532 	"MKK", "40M", "HT", "1T", "12", "32",
533 	"FCC", "40M", "HT", "1T", "13", "63",
534 	"ETSI", "40M", "HT", "1T", "13", "32",
535 	"MKK", "40M", "HT", "1T", "13", "32",
536 	"FCC", "40M", "HT", "1T", "14", "63",
537 	"ETSI", "40M", "HT", "1T", "14", "63",
538 	"MKK", "40M", "HT", "1T", "14", "63"
539 };
540 
ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(struct dm_odm_t * pDM_Odm)541 void ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(struct dm_odm_t *pDM_Odm)
542 {
543 	u32 i = 0;
544 	u8 **Array = Array_MP_8723B_TXPWR_LMT;
545 
546 	for (i = 0; i < ARRAY_SIZE(Array_MP_8723B_TXPWR_LMT); i += 6) {
547 		u8 *regulation = Array[i];
548 		u8 *bandwidth = Array[i+1];
549 		u8 *rate = Array[i+2];
550 		u8 *rfPath = Array[i+3];
551 		u8 *chnl = Array[i+4];
552 		u8 *val = Array[i+5];
553 
554 		odm_ConfigBB_TXPWR_LMT_8723B(
555 			pDM_Odm,
556 			regulation,
557 			bandwidth,
558 			rate,
559 			rfPath,
560 			chnl,
561 			val
562 		);
563 	}
564 }
565