29 #define COMP_HDR_LEN 4 30 #define COMP_CKSUM_LEN 2 32 #define AR_CH0_TOP (0x00016288) 33 #define AR_CH0_TOP_XPABIASLVL (0x300) 34 #define AR_CH0_TOP_XPABIASLVL_S (8) 36 #define AR_CH0_THERM (0x00016290) 37 #define AR_CH0_THERM_XPABIASLVL_MSB 0x3 38 #define AR_CH0_THERM_XPABIASLVL_MSB_S 0 39 #define AR_CH0_THERM_XPASHORT2GND 0x4 40 #define AR_CH0_THERM_XPASHORT2GND_S 2 42 #define AR_SWITCH_TABLE_COM_ALL (0xffff) 43 #define AR_SWITCH_TABLE_COM_ALL_S (0) 45 #define AR_SWITCH_TABLE_COM2_ALL (0xffffff) 46 #define AR_SWITCH_TABLE_COM2_ALL_S (0) 48 #define AR_SWITCH_TABLE_ALL (0xfff) 49 #define AR_SWITCH_TABLE_ALL_S (0) 51 #define LE16(x) (uint16_t)(x) 52 #define LE32(x) (uint32_t)(x) 55 #define EXT_ADDITIVE (0x8000) 56 #define CTL_11A_EXT (CTL_11A | EXT_ADDITIVE) 57 #define CTL_11G_EXT (CTL_11G | EXT_ADDITIVE) 58 #define CTL_11B_EXT (CTL_11B | EXT_ADDITIVE) 59 #define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 60 #define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 61 #define PWRINCR_3_TO_1_CHAIN 9 62 #define PWRINCR_3_TO_2_CHAIN 3 63 #define PWRINCR_2_TO_1_CHAIN 6 65 #define SUB_NUM_CTL_MODES_AT_5G_40 2 66 #define SUB_NUM_CTL_MODES_AT_2G_40 3 68 #define CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6)) 70 #define EEPROM_DATA_LEN_9485 1088 79 .macAddr = {1, 2, 3, 4, 5, 6},
80 .custData = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
90 .blueToothOptions = 0,
94 .params_for_tuning_caps = {0, 0},
95 .featureEnable = 0x0c,
104 .miscConfiguration = 0,
105 .eepromWriteEnableGpio = 3,
106 .wlanDisableGpio = 0,
108 .rxBandSelectGpio = 0xff,
115 .antCtrlCommon =
LE32(0x110),
117 .antCtrlCommon2 =
LE32(0x22222),
123 .antCtrlChain = {
LE16(0x150),
LE16(0x150),
LE16(0x150) },
129 .xatten1DB = {0, 0, 0},
135 .xatten1Margin = {0, 0, 0},
143 .spurChans = {0, 0, 0, 0, 0},
149 .noiseFloorThreshCh = {-1, 0, 0},
151 .db_stage2 = {1, 1, 1},
152 .db_stage3 = {0, 0, 0},
153 .db_stage4 = {0, 0, 0},
155 .txFrameToDataStart = 0x0e,
156 .txFrameToPaOn = 0x0e,
159 .switchSettling = 0x2c,
160 .adcDesiredSize = -30,
163 .txFrameToXpaOn = 0xe,
165 .papdRateMaskHt20 =
LE32(0x0cf0e0e0),
166 .papdRateMaskHt40 =
LE32(0x6cf0e0e0),
168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
172 .ant_div_control = 0,
173 .future = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
182 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
183 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
184 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
186 .calTarget_freqbin_Cck = {
190 .calTarget_freqbin_2G = {
195 .calTarget_freqbin_2GHT20 = {
200 .calTarget_freqbin_2GHT40 = {
205 .calTargetPowerCck = {
207 { {36, 36, 36, 36} },
208 { {36, 36, 36, 36} },
210 .calTargetPower2G = {
212 { {32, 32, 28, 24} },
213 { {32, 32, 28, 24} },
214 { {32, 32, 28, 24} },
216 .calTargetPower2GHT20 = {
217 { {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
218 { {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
219 { {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
221 .calTargetPower2GHT40 = {
222 { {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
223 { {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
224 { {32, 32, 32, 32, 28, 20, 32, 32, 28, 20, 32, 32, 28, 20} },
227 0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
228 0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
331 .antCtrlCommon =
LE32(0x110),
333 .antCtrlCommon2 =
LE32(0x22222),
339 .xatten1DB = {0, 0, 0},
345 .xatten1Margin = {0, 0, 0},
349 .spurChans = {0, 0, 0, 0, 0},
351 .noiseFloorThreshCh = {-1, 0, 0},
353 .db_stage2 = {3, 3, 3},
354 .db_stage3 = {3, 3, 3},
355 .db_stage4 = {3, 3, 3},
357 .txFrameToDataStart = 0x0e,
358 .txFrameToPaOn = 0x0e,
361 .switchSettling = 0x2d,
362 .adcDesiredSize = -30,
365 .txFrameToXpaOn = 0xe,
367 .papdRateMaskHt20 =
LE32(0x0c80c080),
368 .papdRateMaskHt40 =
LE32(0x0080c080),
370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
376 .xatten1DBLow = {0, 0, 0},
377 .xatten1MarginLow = {0, 0, 0},
378 .xatten1DBHigh = {0, 0, 0},
379 .xatten1MarginHigh = {0, 0, 0}
424 .calTarget_freqbin_5G = {
434 .calTarget_freqbin_5GHT20 = {
444 .calTarget_freqbin_5GHT40 = {
454 .calTargetPower5G = {
456 { {20, 20, 20, 10} },
457 { {20, 20, 20, 10} },
458 { {20, 20, 20, 10} },
459 { {20, 20, 20, 10} },
460 { {20, 20, 20, 10} },
461 { {20, 20, 20, 10} },
462 { {20, 20, 20, 10} },
463 { {20, 20, 20, 10} },
465 .calTargetPower5GHT20 = {
470 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
471 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
472 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
473 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
474 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
475 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
476 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
477 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
479 .calTargetPower5GHT40 = {
484 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
485 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
486 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
487 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
488 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
489 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
490 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
491 { {20, 20, 10, 10, 0, 0, 10, 10, 0, 0, 10, 10, 0, 0} },
494 0x10, 0x16, 0x18, 0x40, 0x46,
495 0x48, 0x30, 0x36, 0x38
656 .templateVersion = 6,
657 .macAddr = {0x00, 0x03, 0x7f, 0x0, 0x0, 0x0},
658 .custData = {
"x113-023-f0000"},
667 .blueToothOptions = 0,
671 .params_for_tuning_caps = {0, 0},
672 .featureEnable = 0x0d,
681 .miscConfiguration = 0,
682 .eepromWriteEnableGpio = 6,
683 .wlanDisableGpio = 0,
685 .rxBandSelectGpio = 0xff,
692 .antCtrlCommon =
LE32(0x110),
694 .antCtrlCommon2 =
LE32(0x44444),
700 .antCtrlChain = {
LE16(0x150),
LE16(0x150),
LE16(0x150) },
706 .xatten1DB = {0, 0, 0},
712 .xatten1Margin = {0, 0, 0},
720 .spurChans = {
FREQ2FBIN(2464, 1), 0, 0, 0, 0},
726 .noiseFloorThreshCh = {-1, 0, 0},
728 .db_stage2 = {1, 1, 1},
729 .db_stage3 = {0, 0, 0},
730 .db_stage4 = {0, 0, 0},
732 .txFrameToDataStart = 0x0e,
733 .txFrameToPaOn = 0x0e,
736 .switchSettling = 0x2c,
737 .adcDesiredSize = -30,
740 .txFrameToXpaOn = 0xe,
742 .papdRateMaskHt20 =
LE32(0x0c80c080),
743 .papdRateMaskHt40 =
LE32(0x0080c080),
745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
749 .ant_div_control = 0,
750 .future = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
759 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
760 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
761 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
763 .calTarget_freqbin_Cck = {
767 .calTarget_freqbin_2G = {
772 .calTarget_freqbin_2GHT20 = {
777 .calTarget_freqbin_2GHT40 = {
782 .calTargetPowerCck = {
784 { {34, 34, 34, 34} },
785 { {34, 34, 34, 34} },
787 .calTargetPower2G = {
789 { {34, 34, 32, 32} },
790 { {34, 34, 32, 32} },
791 { {34, 34, 32, 32} },
793 .calTargetPower2GHT20 = {
794 { {32, 32, 32, 32, 32, 28, 32, 32, 30, 28, 0, 0, 0, 0} },
795 { {32, 32, 32, 32, 32, 28, 32, 32, 30, 28, 0, 0, 0, 0} },
796 { {32, 32, 32, 32, 32, 28, 32, 32, 30, 28, 0, 0, 0, 0} },
798 .calTargetPower2GHT40 = {
799 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
800 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
801 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
804 0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
805 0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
908 .antCtrlCommon =
LE32(0x220),
910 .antCtrlCommon2 =
LE32(0x11111),
916 .xatten1DB = {0, 0, 0},
922 .xatten1Margin = {0, 0, 0},
926 .spurChans = {
FREQ2FBIN(5500, 0), 0, 0, 0, 0},
928 .noiseFloorThreshCh = {-1, 0, 0},
930 .db_stage2 = {3, 3, 3},
931 .db_stage3 = {3, 3, 3},
932 .db_stage4 = {3, 3, 3},
934 .txFrameToDataStart = 0x0e,
935 .txFrameToPaOn = 0x0e,
938 .switchSettling = 0x2d,
939 .adcDesiredSize = -30,
942 .txFrameToXpaOn = 0xe,
944 .papdRateMaskHt20 =
LE32(0x0cf0e0e0),
945 .papdRateMaskHt40 =
LE32(0x6cf0e0e0),
947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
952 .tempSlopeHigh = 105,
953 .xatten1DBLow = {0, 0, 0},
954 .xatten1MarginLow = {0, 0, 0},
955 .xatten1DBHigh = {0, 0, 0},
956 .xatten1MarginHigh = {0, 0, 0}
1001 .calTarget_freqbin_5G = {
1011 .calTarget_freqbin_5GHT20 = {
1021 .calTarget_freqbin_5GHT40 = {
1031 .calTargetPower5G = {
1033 { {42, 40, 40, 34} },
1034 { {42, 40, 40, 34} },
1035 { {42, 40, 40, 34} },
1036 { {42, 40, 40, 34} },
1037 { {42, 40, 40, 34} },
1038 { {42, 40, 40, 34} },
1039 { {42, 40, 40, 34} },
1040 { {42, 40, 40, 34} },
1042 .calTargetPower5GHT20 = {
1047 { {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1048 { {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1049 { {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1050 { {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1051 { {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1052 { {40, 40, 40, 40, 32, 28, 40, 40, 32, 28, 40, 40, 32, 20} },
1053 { {38, 38, 38, 38, 32, 28, 38, 38, 32, 28, 38, 38, 32, 26} },
1054 { {36, 36, 36, 36, 32, 28, 36, 36, 32, 28, 36, 36, 32, 26} },
1056 .calTargetPower5GHT40 = {
1061 { {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1062 { {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1063 { {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1064 { {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1065 { {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1066 { {40, 40, 40, 38, 30, 26, 40, 40, 30, 26, 40, 40, 30, 24} },
1067 { {36, 36, 36, 36, 30, 26, 36, 36, 30, 26, 36, 36, 30, 24} },
1068 { {34, 34, 34, 34, 30, 26, 34, 34, 30, 26, 34, 34, 30, 24} },
1071 0x10, 0x16, 0x18, 0x40, 0x46,
1072 0x48, 0x30, 0x36, 0x38
1173 .ctlPowerData_5G = {
1234 .templateVersion = 3,
1235 .macAddr = {0x00, 0x03, 0x7f, 0x0, 0x0, 0x0},
1236 .custData = {
"h112-241-f0000"},
1245 .blueToothOptions = 0,
1249 .params_for_tuning_caps = {0, 0},
1250 .featureEnable = 0x0d,
1259 .miscConfiguration = 0,
1260 .eepromWriteEnableGpio = 6,
1261 .wlanDisableGpio = 0,
1263 .rxBandSelectGpio = 0xff,
1270 .antCtrlCommon =
LE32(0x110),
1272 .antCtrlCommon2 =
LE32(0x44444),
1278 .antCtrlChain = {
LE16(0x150),
LE16(0x150),
LE16(0x150) },
1284 .xatten1DB = {0, 0, 0},
1290 .xatten1Margin = {0, 0, 0},
1298 .spurChans = {
FREQ2FBIN(2464, 1), 0, 0, 0, 0},
1304 .noiseFloorThreshCh = {-1, 0, 0},
1306 .db_stage2 = {1, 1, 1},
1307 .db_stage3 = {0, 0, 0},
1308 .db_stage4 = {0, 0, 0},
1310 .txFrameToDataStart = 0x0e,
1311 .txFrameToPaOn = 0x0e,
1314 .switchSettling = 0x2c,
1315 .adcDesiredSize = -30,
1318 .txFrameToXpaOn = 0xe,
1320 .papdRateMaskHt20 =
LE32(0x80c080),
1321 .papdRateMaskHt40 =
LE32(0x80c080),
1323 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1327 .ant_div_control = 0,
1328 .future = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
1337 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1338 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1339 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1341 .calTarget_freqbin_Cck = {
1345 .calTarget_freqbin_2G = {
1350 .calTarget_freqbin_2GHT20 = {
1355 .calTarget_freqbin_2GHT40 = {
1360 .calTargetPowerCck = {
1362 { {34, 34, 34, 34} },
1363 { {34, 34, 34, 34} },
1365 .calTargetPower2G = {
1367 { {34, 34, 32, 32} },
1368 { {34, 34, 32, 32} },
1369 { {34, 34, 32, 32} },
1371 .calTargetPower2GHT20 = {
1372 { {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 28, 28, 28, 24} },
1373 { {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 28, 28, 28, 24} },
1374 { {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 28, 28, 28, 24} },
1376 .calTargetPower2GHT40 = {
1377 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 26, 26, 26, 22} },
1378 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 26, 26, 26, 22} },
1379 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 26, 26, 26, 22} },
1382 0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
1383 0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
1467 .ctlPowerData_2G = {
1468 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1469 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1470 { {
CTL(60, 1),
CTL(60, 0),
CTL(60, 0),
CTL(60, 1) } },
1473 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1474 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1476 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 0) } },
1477 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1478 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1480 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
1481 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 1) } },
1482 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 1) } },
1486 .antCtrlCommon =
LE32(0x220),
1488 .antCtrlCommon2 =
LE32(0x44444),
1494 .xatten1DB = {0, 0, 0},
1500 .xatten1Margin = {0, 0, 0},
1504 .spurChans = {0, 0, 0, 0, 0},
1506 .noiseFloorThreshCh = {-1, 0, 0},
1508 .db_stage2 = {3, 3, 3},
1509 .db_stage3 = {3, 3, 3},
1510 .db_stage4 = {3, 3, 3},
1512 .txFrameToDataStart = 0x0e,
1513 .txFrameToPaOn = 0x0e,
1516 .switchSettling = 0x2d,
1517 .adcDesiredSize = -30,
1520 .txFrameToXpaOn = 0xe,
1522 .papdRateMaskHt20 =
LE32(0x0cf0e0e0),
1523 .papdRateMaskHt40 =
LE32(0x6cf0e0e0),
1525 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1530 .tempSlopeHigh = 50,
1531 .xatten1DBLow = {0, 0, 0},
1532 .xatten1MarginLow = {0, 0, 0},
1533 .xatten1DBHigh = {0, 0, 0},
1534 .xatten1MarginHigh = {0, 0, 0}
1579 .calTarget_freqbin_5G = {
1589 .calTarget_freqbin_5GHT20 = {
1599 .calTarget_freqbin_5GHT40 = {
1609 .calTargetPower5G = {
1611 { {30, 30, 28, 24} },
1612 { {30, 30, 28, 24} },
1613 { {30, 30, 28, 24} },
1614 { {30, 30, 28, 24} },
1615 { {30, 30, 28, 24} },
1616 { {30, 30, 28, 24} },
1617 { {30, 30, 28, 24} },
1618 { {30, 30, 28, 24} },
1620 .calTargetPower5GHT20 = {
1625 { {30, 30, 30, 28, 24, 20, 30, 28, 24, 20, 20, 20, 20, 16} },
1626 { {30, 30, 30, 28, 24, 20, 30, 28, 24, 20, 20, 20, 20, 16} },
1627 { {30, 30, 30, 26, 22, 18, 30, 26, 22, 18, 18, 18, 18, 16} },
1628 { {30, 30, 30, 26, 22, 18, 30, 26, 22, 18, 18, 18, 18, 16} },
1629 { {30, 30, 30, 24, 20, 16, 30, 24, 20, 16, 16, 16, 16, 14} },
1630 { {30, 30, 30, 24, 20, 16, 30, 24, 20, 16, 16, 16, 16, 14} },
1631 { {30, 30, 30, 22, 18, 14, 30, 22, 18, 14, 14, 14, 14, 12} },
1632 { {30, 30, 30, 22, 18, 14, 30, 22, 18, 14, 14, 14, 14, 12} },
1634 .calTargetPower5GHT40 = {
1639 { {28, 28, 28, 26, 22, 18, 28, 26, 22, 18, 18, 18, 18, 14} },
1640 { {28, 28, 28, 26, 22, 18, 28, 26, 22, 18, 18, 18, 18, 14} },
1641 { {28, 28, 28, 24, 20, 16, 28, 24, 20, 16, 16, 16, 16, 12} },
1642 { {28, 28, 28, 24, 20, 16, 28, 24, 20, 16, 16, 16, 16, 12} },
1643 { {28, 28, 28, 22, 18, 14, 28, 22, 18, 14, 14, 14, 14, 10} },
1644 { {28, 28, 28, 22, 18, 14, 28, 22, 18, 14, 14, 14, 14, 10} },
1645 { {28, 28, 28, 20, 16, 12, 28, 20, 16, 12, 12, 12, 12, 8} },
1646 { {28, 28, 28, 20, 16, 12, 28, 20, 16, 12, 12, 12, 12, 8} },
1649 0x10, 0x16, 0x18, 0x40, 0x46,
1650 0x48, 0x30, 0x36, 0x38
1751 .ctlPowerData_5G = {
1812 .templateVersion = 5,
1813 .macAddr = {0x00, 0x03, 0x7f, 0x0, 0x0, 0x0},
1814 .custData = {
"x112-041-f0000"},
1823 .blueToothOptions = 0,
1827 .params_for_tuning_caps = {0, 0},
1828 .featureEnable = 0x0d,
1837 .miscConfiguration = 0,
1838 .eepromWriteEnableGpio = 6,
1839 .wlanDisableGpio = 0,
1841 .rxBandSelectGpio = 0xff,
1848 .antCtrlCommon =
LE32(0x110),
1850 .antCtrlCommon2 =
LE32(0x22222),
1856 .antCtrlChain = {
LE16(0x10),
LE16(0x10),
LE16(0x10) },
1862 .xatten1DB = {0x1b, 0x1b, 0x1b},
1868 .xatten1Margin = {0x15, 0x15, 0x15},
1876 .spurChans = {
FREQ2FBIN(2464, 1), 0, 0, 0, 0},
1882 .noiseFloorThreshCh = {-1, 0, 0},
1884 .db_stage2 = {1, 1, 1},
1885 .db_stage3 = {0, 0, 0},
1886 .db_stage4 = {0, 0, 0},
1888 .txFrameToDataStart = 0x0e,
1889 .txFrameToPaOn = 0x0e,
1892 .switchSettling = 0x2c,
1893 .adcDesiredSize = -30,
1896 .txFrameToXpaOn = 0xe,
1898 .papdRateMaskHt20 =
LE32(0x0c80c080),
1899 .papdRateMaskHt40 =
LE32(0x0080c080),
1901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1905 .ant_div_control = 0,
1906 .future = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
1915 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1916 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1917 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
1919 .calTarget_freqbin_Cck = {
1923 .calTarget_freqbin_2G = {
1928 .calTarget_freqbin_2GHT20 = {
1933 .calTarget_freqbin_2GHT40 = {
1938 .calTargetPowerCck = {
1940 { {38, 38, 38, 38} },
1941 { {38, 38, 38, 38} },
1943 .calTargetPower2G = {
1945 { {38, 38, 36, 34} },
1946 { {38, 38, 36, 34} },
1947 { {38, 38, 34, 32} },
1949 .calTargetPower2GHT20 = {
1950 { {36, 36, 36, 36, 36, 34, 34, 32, 30, 28, 28, 28, 28, 26} },
1951 { {36, 36, 36, 36, 36, 34, 36, 34, 32, 30, 30, 30, 28, 26} },
1952 { {36, 36, 36, 36, 36, 34, 34, 32, 30, 28, 28, 28, 28, 26} },
1954 .calTargetPower2GHT40 = {
1955 { {36, 36, 36, 36, 34, 32, 32, 30, 28, 26, 26, 26, 26, 24} },
1956 { {36, 36, 36, 36, 34, 32, 34, 32, 30, 28, 28, 28, 28, 24} },
1957 { {36, 36, 36, 36, 34, 32, 32, 30, 28, 26, 26, 26, 26, 24} },
1960 0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
1961 0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
2045 .ctlPowerData_2G = {
2046 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2047 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2048 { {
CTL(60, 1),
CTL(60, 0),
CTL(60, 0),
CTL(60, 1) } },
2051 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2052 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2054 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 0) } },
2055 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2056 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2058 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2059 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 1) } },
2060 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 1) } },
2064 .antCtrlCommon =
LE32(0x110),
2066 .antCtrlCommon2 =
LE32(0x22222),
2072 .xatten1DB = {0x13, 0x19, 0x17},
2078 .xatten1Margin = {0x19, 0x19, 0x19},
2082 .spurChans = {0, 0, 0, 0, 0},
2084 .noiseFloorThreshCh = {-1, 0, 0},
2086 .db_stage2 = {3, 3, 3},
2087 .db_stage3 = {3, 3, 3},
2088 .db_stage4 = {3, 3, 3},
2090 .txFrameToDataStart = 0x0e,
2091 .txFrameToPaOn = 0x0e,
2094 .switchSettling = 0x2d,
2095 .adcDesiredSize = -30,
2098 .txFrameToXpaOn = 0xe,
2100 .papdRateMaskHt20 =
LE32(0x0cf0e0e0),
2101 .papdRateMaskHt40 =
LE32(0x6cf0e0e0),
2103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2108 .tempSlopeHigh = 105,
2109 .xatten1DBLow = {0x10, 0x14, 0x10},
2110 .xatten1MarginLow = {0x19, 0x19 , 0x19},
2111 .xatten1DBHigh = {0x1d, 0x20, 0x24},
2112 .xatten1MarginHigh = {0x10, 0x10, 0x10}
2157 .calTarget_freqbin_5G = {
2167 .calTarget_freqbin_5GHT20 = {
2177 .calTarget_freqbin_5GHT40 = {
2187 .calTargetPower5G = {
2189 { {32, 32, 28, 26} },
2190 { {32, 32, 28, 26} },
2191 { {32, 32, 28, 26} },
2192 { {32, 32, 26, 24} },
2193 { {32, 32, 26, 24} },
2194 { {32, 32, 24, 22} },
2195 { {30, 30, 24, 22} },
2196 { {30, 30, 24, 22} },
2198 .calTargetPower5GHT20 = {
2203 { {32, 32, 32, 32, 28, 26, 32, 28, 26, 24, 24, 24, 22, 22} },
2204 { {32, 32, 32, 32, 28, 26, 32, 28, 26, 24, 24, 24, 22, 22} },
2205 { {32, 32, 32, 32, 28, 26, 32, 28, 26, 24, 24, 24, 22, 22} },
2206 { {32, 32, 32, 32, 28, 26, 32, 26, 24, 22, 22, 22, 20, 20} },
2207 { {32, 32, 32, 32, 28, 26, 32, 26, 24, 22, 20, 18, 16, 16} },
2208 { {32, 32, 32, 32, 28, 26, 32, 24, 20, 16, 18, 16, 14, 14} },
2209 { {30, 30, 30, 30, 28, 26, 30, 24, 20, 16, 18, 16, 14, 14} },
2210 { {30, 30, 30, 30, 28, 26, 30, 24, 20, 16, 18, 16, 14, 14} },
2212 .calTargetPower5GHT40 = {
2217 { {32, 32, 32, 30, 28, 26, 30, 28, 26, 24, 24, 24, 22, 22} },
2218 { {32, 32, 32, 30, 28, 26, 30, 28, 26, 24, 24, 24, 22, 22} },
2219 { {32, 32, 32, 30, 28, 26, 30, 28, 26, 24, 24, 24, 22, 22} },
2220 { {32, 32, 32, 30, 28, 26, 30, 26, 24, 22, 22, 22, 20, 20} },
2221 { {32, 32, 32, 30, 28, 26, 30, 26, 24, 22, 20, 18, 16, 16} },
2222 { {32, 32, 32, 30, 28, 26, 30, 22, 20, 16, 18, 16, 14, 14} },
2223 { {30, 30, 30, 30, 28, 26, 30, 22, 20, 16, 18, 16, 14, 14} },
2224 { {30, 30, 30, 30, 28, 26, 30, 22, 20, 16, 18, 16, 14, 14} },
2227 0x10, 0x16, 0x18, 0x40, 0x46,
2228 0x48, 0x30, 0x36, 0x38
2329 .ctlPowerData_5G = {
2389 .templateVersion = 4,
2390 .macAddr = {0x00, 0x03, 0x7f, 0x0, 0x0, 0x0},
2391 .custData = {
"h116-041-f0000"},
2400 .blueToothOptions = 0,
2404 .params_for_tuning_caps = {0, 0},
2405 .featureEnable = 0x0d,
2414 .miscConfiguration = 0,
2415 .eepromWriteEnableGpio = 6,
2416 .wlanDisableGpio = 0,
2418 .rxBandSelectGpio = 0xff,
2425 .antCtrlCommon =
LE32(0x110),
2427 .antCtrlCommon2 =
LE32(0x44444),
2433 .antCtrlChain = {
LE16(0x10),
LE16(0x10),
LE16(0x10) },
2439 .xatten1DB = {0x1f, 0x1f, 0x1f},
2445 .xatten1Margin = {0x12, 0x12, 0x12},
2453 .spurChans = {
FREQ2FBIN(2464, 1), 0, 0, 0, 0},
2459 .noiseFloorThreshCh = {-1, 0, 0},
2461 .db_stage2 = {1, 1, 1},
2462 .db_stage3 = {0, 0, 0},
2463 .db_stage4 = {0, 0, 0},
2465 .txFrameToDataStart = 0x0e,
2466 .txFrameToPaOn = 0x0e,
2469 .switchSettling = 0x2c,
2470 .adcDesiredSize = -30,
2473 .txFrameToXpaOn = 0xe,
2475 .papdRateMaskHt20 =
LE32(0x0c80C080),
2476 .papdRateMaskHt40 =
LE32(0x0080C080),
2478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2482 .ant_div_control = 0,
2483 .future = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
2492 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
2493 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
2494 { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0} },
2496 .calTarget_freqbin_Cck = {
2500 .calTarget_freqbin_2G = {
2505 .calTarget_freqbin_2GHT20 = {
2510 .calTarget_freqbin_2GHT40 = {
2515 .calTargetPowerCck = {
2517 { {34, 34, 34, 34} },
2518 { {34, 34, 34, 34} },
2520 .calTargetPower2G = {
2522 { {34, 34, 32, 32} },
2523 { {34, 34, 32, 32} },
2524 { {34, 34, 32, 32} },
2526 .calTargetPower2GHT20 = {
2527 { {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 0, 0, 0, 0} },
2528 { {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 0, 0, 0, 0} },
2529 { {32, 32, 32, 32, 32, 30, 32, 32, 30, 28, 0, 0, 0, 0} },
2531 .calTargetPower2GHT40 = {
2532 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
2533 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
2534 { {30, 30, 30, 30, 30, 28, 30, 30, 28, 26, 0, 0, 0, 0} },
2537 0x11, 0x12, 0x15, 0x17, 0x41, 0x42,
2538 0x45, 0x47, 0x31, 0x32, 0x35, 0x37,
2622 .ctlPowerData_2G = {
2623 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2624 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2625 { {
CTL(60, 1),
CTL(60, 0),
CTL(60, 0),
CTL(60, 1) } },
2628 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2629 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2631 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 0) } },
2632 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2633 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2635 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 0),
CTL(60, 0) } },
2636 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 1) } },
2637 { {
CTL(60, 0),
CTL(60, 1),
CTL(60, 1),
CTL(60, 1) } },
2641 .antCtrlCommon =
LE32(0x220),
2643 .antCtrlCommon2 =
LE32(0x44444),
2649 .xatten1DB = {0x19, 0x19, 0x19},
2655 .xatten1Margin = {0x14, 0x14, 0x14},
2659 .spurChans = {0, 0, 0, 0, 0},
2661 .noiseFloorThreshCh = {-1, 0, 0},
2663 .db_stage2 = {3, 3, 3},
2664 .db_stage3 = {3, 3, 3},
2665 .db_stage4 = {3, 3, 3},
2667 .txFrameToDataStart = 0x0e,
2668 .txFrameToPaOn = 0x0e,
2671 .switchSettling = 0x2d,
2672 .adcDesiredSize = -30,
2675 .txFrameToXpaOn = 0xe,
2677 .papdRateMaskHt20 =
LE32(0x0cf0e0e0),
2678 .papdRateMaskHt40 =
LE32(0x6cf0e0e0),
2680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2685 .tempSlopeHigh = 50,
2686 .xatten1DBLow = {0, 0, 0},
2687 .xatten1MarginLow = {0, 0, 0},
2688 .xatten1DBHigh = {0, 0, 0},
2689 .xatten1MarginHigh = {0, 0, 0}
2734 .calTarget_freqbin_5G = {
2744 .calTarget_freqbin_5GHT20 = {
2754 .calTarget_freqbin_5GHT40 = {
2764 .calTargetPower5G = {
2766 { {30, 30, 28, 24} },
2767 { {30, 30, 28, 24} },
2768 { {30, 30, 28, 24} },
2769 { {30, 30, 28, 24} },
2770 { {30, 30, 28, 24} },
2771 { {30, 30, 28, 24} },
2772 { {30, 30, 28, 24} },
2773 { {30, 30, 28, 24} },
2775 .calTargetPower5GHT20 = {
2780 { {30, 30, 30, 28, 24, 20, 30, 28, 24, 20, 0, 0, 0, 0} },
2781 { {30, 30, 30, 28, 24, 20, 30, 28, 24, 20, 0, 0, 0, 0} },
2782 { {30, 30, 30, 26, 22, 18, 30, 26, 22, 18, 0, 0, 0, 0} },
2783 { {30, 30, 30, 26, 22, 18, 30, 26, 22, 18, 0, 0, 0, 0} },
2784 { {30, 30, 30, 24, 20, 16, 30, 24, 20, 16, 0, 0, 0, 0} },
2785 { {30, 30, 30, 24, 20, 16, 30, 24, 20, 16, 0, 0, 0, 0} },
2786 { {30, 30, 30, 22, 18, 14, 30, 22, 18, 14, 0, 0, 0, 0} },
2787 { {30, 30, 30, 22, 18, 14, 30, 22, 18, 14, 0, 0, 0, 0} },
2789 .calTargetPower5GHT40 = {
2794 { {28, 28, 28, 26, 22, 18, 28, 26, 22, 18, 0, 0, 0, 0} },
2795 { {28, 28, 28, 26, 22, 18, 28, 26, 22, 18, 0, 0, 0, 0} },
2796 { {28, 28, 28, 24, 20, 16, 28, 24, 20, 16, 0, 0, 0, 0} },
2797 { {28, 28, 28, 24, 20, 16, 28, 24, 20, 16, 0, 0, 0, 0} },
2798 { {28, 28, 28, 22, 18, 14, 28, 22, 18, 14, 0, 0, 0, 0} },
2799 { {28, 28, 28, 22, 18, 14, 28, 22, 18, 14, 0, 0, 0, 0} },
2800 { {28, 28, 28, 20, 16, 12, 28, 20, 16, 12, 0, 0, 0, 0} },
2801 { {28, 28, 28, 20, 16, 12, 28, 20, 16, 12, 0, 0, 0, 0} },
2804 0x10, 0x16, 0x18, 0x40, 0x46,
2805 0x48, 0x30, 0x36, 0x38
2906 .ctlPowerData_5G = {
2975 #define N_LOOP (sizeof(ar9300_eep_templates) / sizeof(ar9300_eep_templates[0])) 2978 for (it = 0; it <
N_LOOP; it++)
2991 return (
u16) ((is2GHz) ? (2300 + fbin) : (4800 + 5 * fbin));
3001 int bf, factor, plus;
3003 bf = 2 * (yb - ya) * (
x - xa) / (xb - xa);
3006 return ya + factor + plus;
3033 return (pBase->
txrxMask >> 4) & 0xf;
3037 #define AR9300_EEP_BASE_DRIV_STRENGTH 0x1 3089 "eeprom address not in range\n");
3105 for (i = 0; i <
count / 2; i++) {
3121 "unable to read eeprom region at offset %d\n",
address);
3143 for (i = 0; i <
count; i++) {
3158 unsigned long value[4];
3165 *reference = (
value[0] & 0x001f) | ((
value[1] >> 2) & 0x0020);
3175 for (it = 0; it < dsize; it++) {
3203 if (
length > 0 && spot >= 0 && spot+
length <= mdataSize) {
3205 "Restore at %d: spot=%d offset=%d length=%d\n",
3211 "Bad restore at %d: spot=%d offset=%d length=%d\n",
3230 if (
length != mdata_size) {
3232 "EEPROM structure size mismatch memory=%d eeprom=%d\n",
3238 "restored eeprom %d: uncompressed, length %d\n",
3242 if (reference == 0) {
3247 "can't find reference eeprom struct %d\n",
3251 memcpy(mptr, eep, mdata_size);
3254 "restore eeprom %d: block, reference %d, length %d\n",
3261 "unknown compression code %d\n",
code);
3273 return !(*
word == 0 || *
word == (
unsigned int)~0);
3294 for (i = 0; i < mdata_size / 2; i++,
data++)
3307 u8 *mptr,
int mdata_size)
3335 "Trying EEPROM access at Address 0x%04x\n", cptr);
3341 "Trying EEPROM access at Address 0x%04x\n", cptr);
3348 "Trying OTP access at Address 0x%04x\n", cptr);
3354 "Trying OTP access at Address 0x%04x\n", cptr);
3361 DBG2(
"ath9k: Found valid EEPROM data\n");
3363 for (it = 0; it <
MSTATE; it++) {
3373 "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n",
3378 "Skipping bad header\n");
3389 "checksum %x %x\n",
checksum, mchecksum);
3395 "skipping block with bad checksum\n");
3415 u8 *mptr = (
u8 *) &
ah->eeprom.ar9300_eep;
3427 return ah->eeprom.ar9300_eep.eepromVersion;
3522 if ((
ah->rxchainmask &
BIT(chain)) ||
3523 (
ah->txchainmask &
BIT(chain))) {
3542 regval |= ((
value >> 6) & 0x1) <<
3549 regval |= ((
value >> 7) & 0x1) <<
3555 if ((ant_div_ctl1 >> 0x6) == 0x3) {
3585 if (!drive_strength)
3626 if (chain >= 0 && chain < 3) {
3654 if (chain >= 0 && chain < 3) {
3684 for (i = 0; i < 3; i++) {
3685 if (
ah->txchainmask &
BIT(i)) {
3702 while ((
unsigned int)pmu_set !=
REG_READ(
ah, pmu_reg)) {
3714 int internal_regulator =
3717 if (internal_regulator) {
3726 reg_pmu_set = (5 << 1) | (7 << 4) | (1 << 8) |
3727 (2 << 14) | (6 << 17) | (1 << 20) |
3728 (3 << 24) | (1 << 28);
3788 tuning_caps_param &= 0x7f;
3827 int lx = 0, ly = 0, lhave = 0;
3828 int hx = 0, hy = 0, hhave = 0;
3836 for (
ip = 0;
ip < np;
ip++) {
3841 if (!hhave ||
dx > (
x - hx)) {
3850 if (!lhave ||
dx < (
x - lx)) {
3878 u16 rateIndex,
u16 freq,
int is2GHz)
3901 for (i = 0; i < numPiers; i++) {
3902 freqArray[i] =
FBIN2FREQ(pFreqBin[i], is2GHz);
3903 targetPowerArray[i] = pEepromTargetPwr[i].
tPow2x[rateIndex];
3909 targetPowerArray, numPiers);
3914 u16 freq,
int is2GHz)
3937 for (i = 0; i < numPiers; i++) {
3938 freqArray[i] =
FBIN2FREQ(pFreqBin[i], is2GHz);
3939 targetPowerArray[i] = pEepromTargetPwr[i].
tPow2x[rateIndex];
3945 targetPowerArray, numPiers);
3950 u16 freq,
int is2GHz)
3973 for (i = 0; i < numPiers; i++) {
3974 freqArray[i] =
FBIN2FREQ(pFreqBin[i], is2GHz);
3975 targetPowerArray[i] = pEepromTargetPwr[i].
tPow2x[rateIndex];
3981 targetPowerArray, numPiers);
3998 for (i = 0; i < numPiers; i++) {
3999 freqArray[i] =
FBIN2FREQ(pFreqBin[i], 1);
4000 targetPowerArray[i] = pEepromTargetPwr[i].
tPow2x[rateIndex];
4006 targetPowerArray, numPiers);
4012 #define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) 4128 u8 *targetPowerValT2)
4131 u8 ht40PowerIncForPdadc = 0;
4203 is2GHz) + ht40PowerIncForPdadc;
4207 is2GHz) + ht40PowerIncForPdadc;
4210 is2GHz) + ht40PowerIncForPdadc;
4213 is2GHz) + ht40PowerIncForPdadc;
4216 is2GHz) + ht40PowerIncForPdadc;
4219 is2GHz) + ht40PowerIncForPdadc;
4222 is2GHz) + ht40PowerIncForPdadc;
4225 is2GHz) + ht40PowerIncForPdadc;
4228 is2GHz) + ht40PowerIncForPdadc;
4231 is2GHz) + ht40PowerIncForPdadc;
4234 is2GHz) + ht40PowerIncForPdadc;
4237 is2GHz) + ht40PowerIncForPdadc;
4240 is2GHz) + ht40PowerIncForPdadc;
4243 is2GHz) + ht40PowerIncForPdadc;
4247 "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]);
4257 int *ptemperature,
int *pvoltage)
4266 "Invalid chain index, must be less than %d\n",
4274 "Invalid 5GHz cal pier index, must be less than %d\n",
4284 "Invalid 2GHz cal pier index, must be less than %d\n",
4294 *pfrequency =
FBIN2FREQ(*pCalPier, is2GHz);
4295 *pcorrection = pCalPierStruct->
refPower;
4296 *ptemperature = pCalPierStruct->
tempMeas;
4297 *pvoltage = pCalPierStruct->
voltMeas;
4305 int *voltage
__unused,
int *temperature)
4314 if (
ah->caps.tx_chainmask &
BIT(1))
4318 if (
ah->caps.tx_chainmask &
BIT(2))
4327 if (
ah->caps.tx_chainmask &
BIT(1))
4331 if (
ah->caps.tx_chainmask &
BIT(2))
4340 if (frequency < 4000)
4364 int ichain, ipier, npier;
4375 int pfrequency, pcorrection, ptemperature, pvoltage;
4377 mode = (frequency >= 4000);
4384 lfrequency[ichain] = 0;
4385 hfrequency[ichain] = 100000;
4389 for (ipier = 0; ipier < npier; ipier++) {
4391 &pfrequency, &pcorrection,
4392 &ptemperature, &pvoltage)) {
4393 fdiff = frequency - pfrequency;
4400 if (hfrequency[ichain] <= 0 ||
4401 hfrequency[ichain] >= 100000 ||
4403 (frequency - hfrequency[ichain])) {
4408 hfrequency[ichain] = pfrequency;
4409 hcorrection[ichain] =
4411 htemperature[ichain] =
4413 hvoltage[ichain] = pvoltage;
4417 if (lfrequency[ichain] <= 0
4419 (frequency - lfrequency[ichain])) {
4424 lfrequency[ichain] = pfrequency;
4425 lcorrection[ichain] =
4427 ltemperature[ichain] =
4429 lvoltage[ichain] = pvoltage;
4439 "ch=%d f=%d low=%d %d h=%d %d\n",
4440 ichain, frequency, lfrequency[ichain],
4441 lcorrection[ichain], hfrequency[ichain],
4442 hcorrection[ichain]);
4444 if (hfrequency[ichain] == lfrequency[ichain]) {
4445 correction[ichain] = lcorrection[ichain];
4446 voltage[ichain] = lvoltage[ichain];
4447 temperature[ichain] = ltemperature[ichain];
4450 else if (frequency - lfrequency[ichain] < 1000) {
4452 if (hfrequency[ichain] - frequency < 1000) {
4457 lcorrection[ichain],
4458 hcorrection[ichain]);
4463 ltemperature[ichain],
4464 htemperature[ichain]);
4474 correction[ichain] = lcorrection[ichain];
4475 temperature[ichain] = ltemperature[ichain];
4476 voltage[ichain] = lvoltage[ichain];
4480 else if (hfrequency[ichain] - frequency < 1000) {
4481 correction[ichain] = hcorrection[ichain];
4482 temperature[ichain] = htemperature[ichain];
4483 voltage[ichain] = hvoltage[ichain];
4485 correction[ichain] = 0;
4486 temperature[ichain] = 0;
4487 voltage[ichain] = 0;
4495 "for frequency=%d, calibration correction = %d %d %d\n",
4496 frequency, correction[0], correction[1], correction[2]);
4524 u8 *ctl_freqbin = is2GHz ?
4545 u16 freq,
int idx,
int is2GHz)
4548 u8 *ctl_freqbin = is2GHz ?
4551 u16 num_edges = is2GHz ?
4568 }
else if ((edge > 0) &&
4582 return twiceMaxEdgePower;
4587 u8 *pPwrArray,
u16 cfgCtl,
4588 u8 twiceAntennaReduction,
4589 u8 twiceMaxRegulatoryPower,
4595 static const u16 tpScaleReductionTable[5] = {
4600 u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
4601 static const u16 ctlModesFor11a[] = {
4604 static const u16 ctlModesFor11g[] = {
4609 const u16 *pCtlMode;
4614 u16 twiceMinEdgePower;
4625 twiceLargestAntenna = (
int16_t)
min((twiceAntennaReduction) -
4626 twiceLargestAntenna, 0);
4632 maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
4635 maxRegAllowedPower -=
4636 (tpScaleReductionTable[(regulatory->
tp_scale)] * 2);
4639 scaledPower =
min(powerLimit, maxRegAllowedPower);
4662 scaledPower =
max((
u16)0, scaledPower);
4673 pCtlMode = ctlModesFor11g;
4682 pCtlMode = ctlModesFor11a;
4696 for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) {
4697 int isHt40CtlMode = (pCtlMode[ctlMode] ==
CTL_5GHT40) ||
4707 "LOOP-Mode ctlMode %d < %d, isHt40CtlMode %d, EXT_ADDITIVE %d\n",
4708 ctlMode, numCtlModes, isHt40CtlMode,
4720 for (i = 0; (i < ctlNum) && ctlIndex[i]; i++) {
4722 "LOOP-Ctlidx %d: cfgCtl 0x%2.2x pCtlMode 0x%2.2x ctlIndex 0x%2.2x chan %d\n",
4723 i, cfgCtl, pCtlMode[ctlMode], ctlIndex[i],
4750 min(twiceMaxEdgePower,
4761 minCtlPower = (
u8)
min(twiceMaxEdgePower, scaledPower);
4764 "SEL-Min ctlMode %d pCtlMode %d 2xMaxEdge %d sP %d minCtlPwr %d\n",
4765 ctlMode, pCtlMode[ctlMode], twiceMaxEdgePower,
4766 scaledPower, minCtlPower);
4769 switch (pCtlMode[ctlMode]) {
4815 u8 mod_idx = mcs_idx % 8;
4818 return mod_idx ? (base_pwridx + 1) : base_pwridx;
4820 return base_pwridx + 4 * (mcs_idx / 8) + mod_idx - 2;
4825 u8 twiceAntennaReduction,
4826 u8 twiceMaxRegulatoryPower,
4834 unsigned int i = 0, paprd_scale_factor = 0;
4835 u8 pwr_idx, min_pwridx = 0;
4845 ah->paprd_ratemask =
4849 ah->paprd_ratemask_ht40 =
4857 if (!
ah->paprd_table_write_done) {
4858 memcpy(target_power_val_t2_eep, targetPowerValT2,
4859 sizeof(targetPowerValT2));
4860 for (i = 0; i < 24; i++) {
4862 if (
ah->paprd_ratemask & (1 << i)) {
4863 if (targetPowerValT2[pwr_idx] &&
4864 targetPowerValT2[pwr_idx] ==
4865 target_power_val_t2_eep[pwr_idx])
4866 targetPowerValT2[pwr_idx] -=
4871 memcpy(target_power_val_t2_eep, targetPowerValT2,
4872 sizeof(targetPowerValT2));
4876 targetPowerValT2, cfgCtl,
4877 twiceAntennaReduction,
4878 twiceMaxRegulatoryPower,
4883 if ((
ah->paprd_ratemask & (1 << i)) &&
4884 ((
unsigned int)
abs(targetPowerValT2[i] -
4885 target_power_val_t2_eep[i]) >
4886 paprd_scale_factor)) {
4887 ah->paprd_ratemask &= ~(1 << i);
4889 "paprd disabled for mcs %d\n", i);
4905 "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]);
4925 ah->txpower_limit = targetPowerValT2[i];
4943 ah->paprd_target_power = targetPowerValT2[i];
4988 else if (chan->
channel >= 5400)
#define AR9300_MAX_CHAINS
u8 ctlIndex_2G[AR9300_NUM_CTLS_2G]
static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq, u8 *targetPowerValT2)
#define AR9300_NUM_5G_CAL_PIERS
u8 calTarget_freqbin_2GHT20[AR9300_NUM_2G_20_TARGET_POWERS]
struct option_descriptor read[1]
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN
#define AR_PHY_9485_ANT_DIV_MAIN_LNACONF
u8 calTarget_freqbin_2GHT40[AR9300_NUM_2G_40_TARGET_POWERS]
uint8_t checksum
Checksum.
static const struct ar9300_eeprom ar9300_default
#define AR_CH0_THERM_XPASHORT2GND
#define AR_SWITCH_TABLE_COM2_ALL
#define AR_PHY_9485_ANT_DIV_MAIN_LNACONF_S
u8 calFreqPier2G[AR9300_NUM_2G_CAL_PIERS]
static unsigned int unsigned int reg
#define ar5416_get_ntxchains(_txchainmask)
static const struct ar9300_eeprom ar9300_h116
#define AR_PHY_POWER_TX_RATE(_d)
u8 calTarget_freqbin_2G[AR9300_NUM_2G_20_TARGET_POWERS]
static int interpolate(int x, int xa, int xb, int ya, int yb)
#define AR9300_EEPROM_SIZE
static u16 ath9k_hw_ar9300_get_spur_channel(struct ath_hw *ah __unused, u16 i __unused, int is2GHz __unused)
static int ath9k_hw_ar9300_fill_eeprom(struct ath_hw *ah)
#define AR_PHY_TPC_OLPC_GAIN_DELTA
static const struct ar9300_eeprom * ar9003_eeprom_struct_find_by_id(int id)
#define AR_RTC_REG_CONTROL1
#define AR_PHY_65NM_CH0_BIAS2
s32 ar9003_hw_get_rx_gain_idx(struct ath_hw *ah)
static const struct ar9300_eeprom ar9300_h112
#define AR_CH0_TOP_XPABIASLVL
#define AR9300_NUM_2G_CCK_TARGET_POWERS
static void ath9k_hw_ar9300_set_addac(struct ath_hw *ah __unused, struct ath9k_channel *chan __unused)
static const struct ar9300_eeprom ar9300_x113
#define CTL_EDGE_FLAGS(_ctl)
uint16_t mode
Acceleration mode.
static int ar9003_hw_cal_pier_get(struct ath_hw *ah, int mode, int ipier, int ichain, int *pfrequency, int *pcorrection, int *ptemperature, int *pvoltage)
uint64_t address
Base address.
static void ar9003_hw_internal_regulator_apply(struct ath_hw *ah)
static int ar9003_hw_power_control_override(struct ath_hw *ah, int frequency, int *correction, int *voltage __unused, int *temperature)
struct arbelprm_completion_with_error error
uint16_t size
Buffer size.
#define AR9300_PWR_TABLE_OFFSET
#define SUB_NUM_CTL_MODES_AT_5G_40
static int ar9003_hw_calibration_apply(struct ath_hw *ah, int frequency)
u8 xatten1DBLow[AR9300_MAX_CHAINS]
static u8 ar9003_hw_eeprom_get_cck_tgt_pwr(struct ath_hw *ah, u16 rateIndex, u16 freq)
#define REG_RMW(_ah, _reg, _set, _clr)
#define AR9300_NUM_5G_20_TARGET_POWERS
#define CTL(_tpower, _flag)
u8 xatten1MarginLow[AR9300_MAX_CHAINS]
#define AR_SREV_9485(_ah)
#define AR_SWITCH_TABLE_ALL
struct eepFlags opCapFlags
#define AR_PHY_SWITCH_CHAIN_1
static int ar9300_compress_decision(struct ath_hw *ah, int it, int code, int reference, u8 *mptr, u8 *word, int length, int mdata_size)
static int ar9300_eeprom_restore_internal(struct ath_hw *ah, u8 *mptr, int mdata_size)
struct cal_tgt_pow_legacy calTargetPowerCck[AR9300_NUM_2G_CCK_TARGET_POWERS]
#define AR_PHY_TX_FORCED_GAIN
unsigned int ar9003_get_paprd_scale_factor(struct ath_hw *ah, struct ath9k_channel *chan)
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
#define AR_PHY_TPC_6_ERROR_EST_MODE
#define AR_RTC_REG_CONTROL0
#define AR9300_OTP_STATUS_VALID
static int ar9300_eeprom_read_byte(struct ath_common *common, int address, u8 *buffer)
u8 ctlIndex_5G[AR9300_NUM_CTLS_5G]
#define AR9300_NUM_BAND_EDGES_5G
static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 *pPwrArray)
#define AR9300_PAPRD_SCALE_1
static u8 ar9003_hw_eeprom_get_ht40_tgt_pwr(struct ath_hw *ah, u16 rateIndex, u16 freq, int is2GHz)
static const struct ar9300_eeprom ar9300_x112
static unsigned int code
Response code.
u8 ctl_freqbin_2G[AR9300_NUM_CTLS_2G][AR9300_NUM_BAND_EDGES_2G]
struct cal_tgt_pow_ht calTargetPower5GHT20[AR9300_NUM_5G_20_TARGET_POWERS]
#define REG_RMW_FIELD(_a, _r, _f, _v)
#define AR9300_OTP_STATUS_TYPE
Dynamic memory allocation.
static u16 ar9003_hw_get_max_edge_power(struct ar9300_eeprom *eep, u16 freq, int idx, int is2GHz)
#define AR_RTC_REG_CONTROL1_SWREG_PROGRAM
static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, int is2ghz)
static u8 ar9003_hw_eeprom_get_ht20_tgt_pwr(struct ath_hw *ah, u16 rateIndex, u16 freq, int is2GHz)
#define AR_PHY_SWITCH_COM
#define AR_PHY_EXT_ATTEN_CTL_2
u8 xatten1MarginHigh[AR9300_MAX_CHAINS]
void * memcpy(void *dest, const void *src, size_t len) __nonnull
uint32_t major
Major version.
uint32_t minor
Minor version.
#define AR9300_OTP_STATUS
#define AR9300_NUM_CTLS_5G
#define AR_PHY_SWITCH_COM_2
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN
#define AR_PHY_9485_ANT_DIV_LNA2
#define AR9300_EEP_BASE_DRIV_STRENGTH
#define AR9300_OTP_READ_DATA
#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN
pseudo_bit_t value[0x00020]
#define AR5416_OPFLAGS_11A
#define __unused
Declare a variable or data structure as unused.
#define AR9300_BASE_ADDR_4K
static struct ath_regulatory * ath9k_hw_regulatory(struct ath_hw *ah)
static int ar9003_hw_power_interpolate(int32_t x, int32_t *px, int32_t *py, uint16_t np)
const struct eeprom_ops eep_ar9300_ops
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
static int ath9k_hw_ar9300_check_eeprom(struct ath_hw *ah __unused)
#define AR_RTC_FORCE_SWREG_PRD
static unsigned int count
Number of entries.
static u16 ar9003_hw_atten_chain_get(struct ath_hw *ah, int chain, struct ath9k_channel *chan)
u8 calTarget_freqbin_5GHT20[AR9300_NUM_5G_20_TARGET_POWERS]
#define AR_PHY_EXT_ATTEN_CTL_0
#define AR_SREV_9340(_ah)
static int ar9300_check_eeprom_header(struct ath_hw *ah, eeprom_read_op read, int base_addr)
struct cal_tgt_pow_ht calTargetPower2GHT20[AR9300_NUM_2G_20_TARGET_POWERS]
#define EEPROM_DATA_LEN_9485
#define AR_CH0_XTAL_CAPOUTDAC
static void ar9003_hw_apply_tuning_caps(struct ath_hw *ah)
#define ath9k_hw_use_flash(_ah)
#define AR_PHY_9485_ANT_DIV_LNA1
#define AR_PHY_9485_ANT_DIV_ALT_GAINTB
static void(* free)(struct refcnt *refcnt))
static s32 ar9003_hw_xpa_bias_level_get(struct ath_hw *ah, int is2ghz)
#define AR_PHY_TPC_19_ALPHA_THERM
int ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
static u16 ar9003_hw_get_indirect_edge_power(struct ar9300_eeprom *eep, int idx, unsigned int edge, u16 freq, int is2GHz)
void * zalloc(size_t size)
Allocate cleared memory.
static int is_pmu_set(struct ath_hw *ah, u32 pmu_reg, int pmu_set)
#define AR5416_BCHAN_UNUSED
static u32 ath9k_hw_ar9300_get_eeprom(struct ath_hw *ah, enum eeprom_param param)
#define AR_CH0_THERM_XPABIASLVL_MSB
#define AR_CH0_TOP2_XPABIASLVL
static void ar9003_hw_drive_strength_apply(struct ath_hw *ah)
#define AR_PHY_EXT_ATTEN_CTL_1
struct hv_monitor_parameter param[4][32]
Parameters.
static int ar9300_check_header(void *data)
#define AR_FAST_DIV_ENABLE
uint32_t addr
Buffer address.
u8 xatten1DBHigh[AR9300_MAX_CHAINS]
static int ar9300_read_otp(struct ath_hw *ah, int address, u8 *buffer, int count)
static int ar9300_read_eeprom(struct ath_hw *ah, int address, u8 *buffer, int count)
u8 ctlEdges[AR9300_NUM_BAND_EDGES_2G]
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
IP4_t ip
Destination IP address.
u8 calTarget_freqbin_5GHT40[AR9300_NUM_5G_40_TARGET_POWERS]
struct ar9300_modal_eep_header modalHeader2G
struct ar9300_BaseExtension_1 base_ext1
static int ath9k_hw_ar9300_get_eeprom_ver(struct ath_hw *ah)
struct ar9300_modal_eep_header modalHeader5G
#define AR_PHY_CCK_DETECT
#define AR9300_PAPRD_SCALE_2
static u8 ar9003_hw_eeprom_get_tgt_pwr(struct ath_hw *ah, u16 rateIndex, u16 freq, int is2GHz)
static void ar9003_hw_xpa_bias_level_apply(struct ath_hw *ah, int is2ghz)
#define AR9300_NUM_2G_20_TARGET_POWERS
static u16 ar9003_hw_atten_chain_get_margin(struct ath_hw *ah, int chain, struct ath9k_channel *chan)
u8 calTarget_freqbin_Cck[AR9300_NUM_2G_CCK_TARGET_POWERS]
static void ath9k_hw_ar9300_set_board_values(struct ath_hw *ah, struct ath9k_channel *chan)
struct ar9300_BaseExtension_2 base_ext2
struct ib_cm_common common
#define AR_PHY_TPC_OLPC_GAIN_DELTA_S
int(* check_eeprom)(struct ath_hw *hw)
#define REG_READ(_ah, _reg)
struct cal_tgt_pow_ht calTargetPower5GHT40[AR9300_NUM_5G_40_TARGET_POWERS]
#define AR9300_NUM_BAND_EDGES_2G
struct cal_ctl_data_2g ctlPowerData_2G[AR9300_NUM_CTLS_2G]
static const struct ar9300_eeprom * ar9300_eep_templates[]
struct cal_tgt_pow_legacy calTargetPower2G[AR9300_NUM_2G_20_TARGET_POWERS]
u8 calTarget_freqbin_5G[AR9300_NUM_5G_20_TARGET_POWERS]
#define AR5416_OPFLAGS_11G
static u16 ar9003_hw_ant_ctrl_chain_get(struct ath_hw *ah, int chain, int is2ghz)
static u16 ar9300_comp_cksum(u8 *data, int dsize)
#define AR_PHY_TPC_18_THERM_CAL_VALUE
static int ath9k_hw_ar9300_get_eeprom_rev(struct ath_hw *ah __unused)
#define SUB_NUM_CTL_MODES_AT_2G_40
u8 params_for_tuning_caps[2]
static int ar9300_otp_read_word(struct ath_hw *ah, int addr, u32 *data)
#define AR_ANT_DIV_CTRL_ALL
static u32 ar9003_hw_ant_ctrl_common_get(struct ath_hw *ah, int is2ghz)
struct cal_tgt_pow_legacy calTargetPower5G[AR9300_NUM_5G_20_TARGET_POWERS]
s32 ar9003_hw_get_tx_gain_idx(struct ath_hw *ah)
#define AR_PHY_9485_ANT_DIV_LNADIV
#define AR9300_BASE_ADDR_512
static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test)
uint8_t block[3][8]
DES-encrypted blocks.
int(* eeprom_read_op)(struct ath_hw *ah, int address, u8 *buffer, int count)
#define AR_PHY_SWITCH_CHAIN_2
int ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout)
#define REG_WRITE(_ah, _reg, _val)
#define AR9300_NUM_2G_CAL_PIERS
static u16 ar9003_hw_get_direct_edge_power(struct ar9300_eeprom *eep, int idx, int edge, int is2GHz)
static unsigned int unsigned int y
struct ena_llq_option header
Header locations.
#define REG_READ_FIELD(_a, _r, _f)
struct ar9300_cal_data_per_freq_op_loop calPierData2G[AR9300_MAX_CHAINS][AR9300_NUM_2G_CAL_PIERS]
static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
struct cal_ctl_data_5g ctlPowerData_5G[AR9300_NUM_CTLS_5G]
uint8_t data[48]
Additional event data.
u8 * ar9003_get_spur_chan_ptr(struct ath_hw *ah, int is_2ghz)
#define AR_PHY_65NM_CH0_BIAS1
u8 calFreqPier5G[AR9300_NUM_5G_CAL_PIERS]
void ath9k_hw_get_channel_centers(struct ath_hw *ah __unused, struct ath9k_channel *chan, struct chan_centers *centers)
struct ar9300_base_eep_hdr baseEepHeader
#define AR9300_NUM_CTLS_2G
static u16 ath9k_hw_fbin2freq(u8 fbin, int is2GHz)
#define AR_PHY_SWITCH_CHAIN_0
#define AR9300_NUM_5G_40_TARGET_POWERS
static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah, struct ath9k_channel *chan, u8 *pPwrArray, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u16 powerLimit)
struct ar9300_cal_data_per_freq_op_loop calPierData5G[AR9300_MAX_CHAINS][AR9300_NUM_5G_CAL_PIERS]
static u8 mcsidx_to_tgtpwridx(unsigned int mcs_idx, u8 base_pwridx)
#define AR_PHY_MC_GAIN_CTRL
#define AR9300_PAPRD_RATE_MASK
uint16_t offset
Offset to command line.
static int ar9300_eeprom_restore_flash(struct ath_hw *ah, u8 *mptr, int mdata_size)
#define AR9300_NUM_2G_40_TARGET_POWERS
#define AR_PHY_9485_ANT_DIV_LNADIV_S
struct cal_tgt_pow_ht calTargetPower2GHT40[AR9300_NUM_2G_40_TARGET_POWERS]
#define DBG(...)
Print a debugging message.
static void ar9300_comp_hdr_unpack(u8 *best, int *code, int *reference, int *length, int *major, int *minor)
#define AR_ANT_DIV_CTRL_ALL_S
#define AR_SWITCH_TABLE_COM_ALL
#define CTL_EDGE_TPOWER(_ctl)
#define AR_PHY_9485_ANT_DIV_ALT_LNACONF
#define NULL
NULL pointer (VOID *)
#define AR_PHY_65NM_CH0_BIAS4
#define AR_PHY_9485_ANT_DIV_ALT_LNACONF_S
#define AR_FAST_DIV_ENABLE_S
#define AR_CH0_XTAL_CAPINDAC
static int ar9300_eeprom_read_word(struct ath_common *common, int address, u8 *buffer)
static int ar9300_uncompress_block(struct ath_hw *ah __unused, u8 *mptr, int mdataSize, u8 *block, int size)
#define AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB
static u32 ar9003_hw_ant_ctrl_common_2_get(struct ath_hw *ah, int is2ghz)
u8 ctl_freqbin_5G[AR9300_NUM_CTLS_5G][AR9300_NUM_BAND_EDGES_5G]
if(natsemi->flags &NATSEMI_64BIT) return 1
#define AR_PHY_TPC_6_ERROR_EST_MODE_S
#define AR_PHY_9485_ANT_DIV_MAIN_GAINTB