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 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
20 #ifndef __HAL_COM_PHYCFG_H__
21 #define __HAL_COM_PHYCFG_H__
23 #define PathA 0x0 // Useless
28 typedef enum _RF_TX_NUM {
31 RF_TX_NUM_NONIMPLEMENT,
34 #define MAX_POWER_INDEX 0x3F
36 typedef enum _REGULATION_TXPWR_LMT {
42 TXPWR_LMT_MAX_REGULATION_NUM = 4
43 } REGULATION_TXPWR_LMT;
45 #define TX_PWR_LMT_REF_VHT_FROM_HT BIT0
46 #define TX_PWR_LMT_REF_HT_FROM_VHT BIT1
48 /*------------------------------Define structure----------------------------*/
49 typedef struct _BB_REGISTER_DEFINITION{
50 u32 rfintfs; // set software control:
51 // 0x870~0x877[8 bytes]
53 u32 rfintfo; // output data:
54 // 0x860~0x86f [16 bytes]
56 u32 rfintfe; // output enable:
57 // 0x860~0x86f [16 bytes]
59 u32 rf3wireOffset; // LSSI data:
60 // 0x840~0x84f [16 bytes]
62 u32 rfHSSIPara2; // wire parameter control2 :
63 // 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes]
65 u32 rfLSSIReadBack; //LSSI RF readback data SI mode
66 // 0x8a0~0x8af [16 bytes]
68 u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
70 }BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
73 //----------------------------------------------------------------------
75 PHY_GetTxPowerByRateBase(
80 IN RATE_SECTION RateSection
83 #ifdef TX_POWER_BY_RATE_OLD
85 PHY_GetRateSectionIndexOfTxPowerByRate(
90 #endif /* TX_POWER_BY_RATE_OLD */
93 PHY_GetRateValuesOfTxPowerByRate(
104 PHY_GetRateIndexOfTxPowerByRate(
109 PHY_SetTxPowerIndexByRateSection(
110 IN PADAPTER pAdapter,
117 _PHY_GetTxPowerByRate(
118 IN PADAPTER pAdapter,
126 PHY_GetTxPowerByRate(
127 IN PADAPTER pAdapter,
135 PHY_SetTxPowerByRate(
136 IN PADAPTER pAdapter,
145 PHY_SetTxPowerLevelByPath(
152 PHY_SetTxPowerIndexByRateArray(
153 IN PADAPTER pAdapter,
155 IN CHANNEL_WIDTH BandWidth,
162 PHY_InitTxPowerByRate(
167 PHY_StoreTxPowerByRate(
168 IN PADAPTER pAdapter,
178 PHY_TxPowerByRateConfiguration(
183 PHY_GetTxPowerIndexBase(
184 IN PADAPTER pAdapter,
187 IN CHANNEL_WIDTH BandWidth,
197 IN CHANNEL_WIDTH Bandwidth,
204 PHY_ConvertTxPowerLimitToPowerIndex(
209 PHY_InitTxPowerLimit(
214 PHY_GetTxPowerTrackingOffset(
222 IN PADAPTER pAdapter,
225 IN CHANNEL_WIDTH BandWidth,
231 IN PADAPTER pAdapter,
237 int phy_load_tx_power_by_rate(_adapter *adapter);
238 int phy_load_tx_power_limit(_adapter *adapter);
239 void phy_load_tx_power_ext_info(_adapter *adapter);
241 void dump_tx_power_ext_info(void *sel, _adapter *adapter);
242 void dump_target_tx_power(void *sel, _adapter *adapter);
243 void dump_tx_power_by_rate(void *sel, _adapter *adapter);
244 void dump_tx_power_limit(void *sel, _adapter *adapter);
246 #endif /* __HAL_COMMON_H__ */