1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
20 /* MAX_TX_COUNT must always be set to 4, otherwise the read efuse table
21 * sequence will be wrong.
23 #define MAX_TX_COUNT 4
25 /* For VHT series TX power by rate table. */
26 /* VHT TX power by rate off setArray = */
27 /* Band:-2G&5G = 0 / 1 */
28 /* RF: at most 4*4 = ABCD = 0/1/2/3 */
29 /* CCK = 0 OFDM = 1/2 HT-MCS 0-15 =3/4/56 VHT =7/8/9/10/11 */
30 #define TX_PWR_BY_RATE_NUM_BAND 2
31 #define TX_PWR_BY_RATE_NUM_RF 4
32 #define TX_PWR_BY_RATE_NUM_RATE 84
33 #define MAX_RF_PATH_NUM 2
34 #define MAX_CHNL_GROUP_24G 6
35 #define EEPROM_DEFAULT_BOARD_OPTION 0x00
37 /* EEPROM/Efuse PG Offset for 8723BE/8723BU/8723BS */
38 /* 0x10 ~ 0x63 = TX power area. */
39 #define EEPROM_TX_PWR_INX_8723B 0x10
40 /* New EFUSE default value */
41 #define EEPROM_DEFAULT_24G_INDEX 0x2D
42 #define EEPROM_DEFAULT_24G_HT20_DIFF 0X02
43 #define EEPROM_DEFAULT_24G_OFDM_DIFF 0X04
44 #define EEPROM_Default_ThermalMeter_8723B 0x18
45 #define EEPROM_Default_CrystalCap_8723B 0x20
47 #define EEPROM_ChannelPlan_8723B 0xB8
48 #define EEPROM_XTAL_8723B 0xB9
49 #define EEPROM_THERMAL_METER_8723B 0xBA
51 #define EEPROM_RF_BOARD_OPTION_8723B 0xC1
52 #define EEPROM_RF_BT_SETTING_8723B 0xC3
53 #define EEPROM_VERSION_8723B 0xC4
54 #define EEPROM_CustomID_8723B 0xC5
55 #define EEPROM_DEFAULT_DIFF 0XFE
58 #define EEPROM_MAC_ADDR_8723BS 0x11A
59 #define EEPROM_Voltage_ADDR_8723B 0x8
60 #define RTL_EEPROM_ID 0x8129
62 struct TxPowerInfo24G {
63 u8 IndexCCK_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G];
64 u8 IndexBW40_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G];
65 /* If only one tx, only BW20 and OFDM are used. */
66 s8 CCK_Diff[MAX_RF_PATH][MAX_TX_COUNT];
67 s8 OFDM_Diff[MAX_RF_PATH][MAX_TX_COUNT];
68 s8 BW20_Diff[MAX_RF_PATH][MAX_TX_COUNT];
69 s8 BW40_Diff[MAX_RF_PATH][MAX_TX_COUNT];