wifi: renew patch drivers/net/wireless
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rtl8188eu / hal / OUTSRC / HalPhyRf.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
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.
8  *
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
12  * more details.
13  *
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
17  *
18  *
19  ******************************************************************************/
20  
21  #ifndef __HAL_PHY_RF_H__
22  #define __HAL_PHY_RF_H__
23  
24 typedef enum _SPUR_CAL_METHOD {
25         PLL_RESET,
26         AFE_PHASE_SEL
27 } SPUR_CAL_METHOD;
28
29 typedef enum _PWRTRACK_CONTROL_METHOD {
30         BBSWING,
31         TXAGC,
32         MIX_MODE
33 } PWRTRACK_METHOD;
34
35 typedef VOID    (*FuncSetPwr)(PDM_ODM_T, PWRTRACK_METHOD, u1Byte, u1Byte);
36 typedef VOID    (*FuncIQK)(PDM_ODM_T, u1Byte, u1Byte, u1Byte);
37 typedef VOID    (*FuncLCK)(PDM_ODM_T);
38 typedef VOID    (*FuncSwing)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*);
39
40 typedef struct _TXPWRTRACK_CFG {
41         u1Byte          SwingTableSize_CCK;     
42         u1Byte          SwingTableSize_OFDM;
43         u1Byte          Threshold_IQK;  
44         u1Byte          AverageThermalNum;
45         u1Byte          RfPathCount;
46         u4Byte          ThermalRegAddr; 
47         FuncSetPwr      ODM_TxPwrTrackSetPwr;
48         FuncIQK         DoIQK;
49         FuncLCK         PHY_LCCalibrate;
50         FuncSwing       GetDeltaSwingTable;     
51 } TXPWRTRACK_CFG, *PTXPWRTRACK_CFG;
52
53 void ConfigureTxpowerTrack(
54         IN      PDM_ODM_T               pDM_Odm,
55         OUT     PTXPWRTRACK_CFG pConfig
56         );
57
58
59 VOID
60 ODM_ClearTxPowerTrackingState(
61         IN PDM_ODM_T            pDM_Odm
62         );
63
64 VOID
65 ODM_TXPowerTrackingCallback_ThermalMeter(
66 #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
67         IN PDM_ODM_T            pDM_Odm
68 #else
69         IN PADAPTER     Adapter
70 #endif
71         );
72
73
74
75 #define ODM_TARGET_CHNL_NUM_2G_5G       59
76
77
78 VOID
79 ODM_ResetIQKResult(
80         IN PDM_ODM_T    pDM_Odm 
81 );
82 u1Byte 
83 ODM_GetRightChnlPlaceforIQK(
84     IN u1Byte chnl
85 );
86
87                                                                 
88 #endif  // #ifndef __HAL_PHY_RF_H__
89