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 __RTL8723A_DM_H__
21 #define __RTL8723A_DM_H__
22 //============================================================
25 // This file is for 8723A dynamic mechanism only
28 //============================================================
29 #define DYNAMIC_FUNC_BT BIT(0)
35 //============================================================
36 // structure and define
37 //============================================================
39 //###### duplicate code,will move to ODM #########
40 #define IQK_MAC_REG_NUM 4
41 #define IQK_ADDA_REG_NUM 16
42 #define IQK_BB_REG_NUM 9
43 #define HP_THERMAL_NUM 8
44 //###### duplicate code,will move to ODM #########
52 //* Upper and Lower Signal threshold for Rate Adaptive*/
53 int UndecoratedSmoothedPWDB;
54 int UndecoratedSmoothedCCK;
55 int EntryMinUndecoratedSmoothedPWDB;
56 int EntryMaxUndecoratedSmoothedPWDB;
57 int MinUndecoratedPWDBForDM;
58 int LastMinUndecoratedPWDBForDM;
60 s32 UndecoratedSmoothedBeacon;
61 #ifdef CONFIG_BT_COEXIST
62 s32 BT_EntryMinUndecoratedSmoothedPWDB;
63 s32 BT_EntryMaxUndecoratedSmoothedPWDB;
66 //###### duplicate code,will move to ODM #########
69 u8 bDMInitialGainEnable;
70 u8 binitialized; // for dm_initial_gain_Multi_STA use.
75 FALSE_ALARM_STATISTICS FalseAlmCnt;
77 //for rate adaptive, in fact, 88c/92c fw will handle this
79 RATE_ADAPTIVE RateAdaptive;
82 u8 bDynamicTxPowerEnable;
84 u8 DynamicTxHighPowerLvl;//Add by Jacken Tx Power Control for Near/Far Range 2008/03/06
86 //for tx power tracking
89 u8 bTXPowerTrackingInit;
90 u8 TxPowerTrackControl; //for mp mode, turn off txpwrtracking as default
93 u8 ThermalMeter[2]; // ThermalMeter, index 0 for RFIC0, and 1 for RFIC1
102 u32 APKoutput[2][2]; //path A/B; output1_1a/output1_2a
104 u8 bAPKThermalMeterIgnore;
118 u32 ADDA_backup[IQK_ADDA_REG_NUM];
119 u32 IQK_MAC_backup[IQK_MAC_REG_NUM];
120 u32 IQK_BB_backup_recover[9];
121 u32 IQK_BB_backup[IQK_BB_REG_NUM];
122 u8 PowerIndex_backup[6];
132 u8 ThermalValue_HP[HP_THERMAL_NUM];
133 u8 ThermalValue_HP_index;
141 u32 TXPowerTrackingCallbackCnt; //cosa add for debug
143 u32 prv_traffic_idx; // edca turbo
148 u32 rf_saving_Reg874;
149 u32 rf_saving_RegC70;
150 u32 rf_saving_Reg85C;
151 u32 rf_saving_RegA74;
153 //for Antenna diversity
154 #ifdef CONFIG_ANTENNA_DIVERSITY
155 // SWAT_T DM_SWAT_Table;
158 #ifdef CONFIG_SW_ANTENNA_DIVERSITY
159 // _timer SwAntennaSwitchTimer;
174 // u8 DIG_Dynamic_MIN ;
175 //###### duplicate code,will move to ODM #########
176 // Add for Reading Initial Data Rate SEL Register 0x484 during watchdog. Using for fill tx desc. 2011.3.21 by Thomas
181 //============================================================
182 // function prototype
183 //============================================================
185 void rtl8723a_init_dm_priv(PADAPTER padapter);
186 void rtl8723a_deinit_dm_priv(PADAPTER padapter);
188 void rtl8723a_InitHalDm(PADAPTER padapter);
189 void rtl8723a_HalDmWatchDog(PADAPTER padapter);