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 ******************************************************************************/
15 #ifndef __RTL8723A_DM_H__
16 #define __RTL8723A_DM_H__
20 /* This file is for 8723A dynamic mechanism only */
24 #define DYNAMIC_FUNC_BT BIT(0)
31 /* structure and define */
34 /* duplicate code,will move to ODM ######### */
35 #define IQK_MAC_REG_NUM 4
36 #define IQK_ADDA_REG_NUM 16
37 #define IQK_BB_REG_NUM 9
38 #define HP_THERMAL_NUM 8
39 /* duplicate code,will move to ODM ######### */
43 /* Upper and Lower Signal threshold for Rate Adaptive*/
44 int UndecoratedSmoothedPWDB;
45 int UndecoratedSmoothedCCK;
46 int EntryMinUndecoratedSmoothedPWDB;
47 int EntryMaxUndecoratedSmoothedPWDB;
48 int MinUndecoratedPWDBForDM;
49 int LastMinUndecoratedPWDBForDM;
51 s32 UndecoratedSmoothedBeacon;
52 #ifdef CONFIG_8723AU_BT_COEXIST
53 s32 BT_EntryMinUndecoratedSmoothedPWDB;
54 s32 BT_EntryMaxUndecoratedSmoothedPWDB;
58 u8 DynamicTxHighPowerLvl;/* Add by Jacken Tx Power Control for Near/Far Range 2008/03/06 */
60 /* for tx power tracking */
63 u8 bTXPowerTrackingInit;
64 u8 TxPowerTrackControl; /* for mp mode, turn off txpwrtracking as default */
67 u8 ThermalMeter[2]; /* ThermalMeter, index 0 for RFIC0, and 1 for RFIC1 */
76 u32 APKoutput[2][2]; /* path A/B; output1_1a/output1_2a */
78 u8 bAPKThermalMeterIgnore;
92 u32 ADDA_backup[IQK_ADDA_REG_NUM];
93 u32 IQK_MAC_backup[IQK_MAC_REG_NUM];
94 u32 IQK_BB_backup_recover[9];
95 u32 IQK_BB_backup[IQK_BB_REG_NUM];
96 u8 PowerIndex_backup[6];
106 u8 ThermalValue_HP[HP_THERMAL_NUM];
107 u8 ThermalValue_HP_index;
109 /* for TxPwrTracking */
115 u32 TXPowerTrackingCallbackCnt; /* cosa add for debug */
117 u32 prv_traffic_idx; /* edca turbo */
121 /* u8 DIG_Dynamic_MIN ; */
122 /* duplicate code,will move to ODM ######### */
123 /* Add for Reading Initial Data Rate SEL Register 0x484 during watchdog. Using for fill tx desc. 2011.3.21 by Thomas */
129 /* function prototype */
132 void rtl8723a_init_dm_priv(struct rtw_adapter *padapter);
134 void rtl8723a_InitHalDm(struct rtw_adapter *padapter);
135 void rtl8723a_HalDmWatchDog(struct rtw_adapter *padapter);