1 //===========================================
\r
2 // The following is for 8812A 2Ant BT Co-exist definition
\r
3 //===========================================
\r
4 #define BT_AUTO_REPORT_ONLY_8812A_2ANT 0
\r
6 #define BT_INFO_8812A_2ANT_B_FTP BIT7
\r
7 #define BT_INFO_8812A_2ANT_B_A2DP BIT6
\r
8 #define BT_INFO_8812A_2ANT_B_HID BIT5
\r
9 #define BT_INFO_8812A_2ANT_B_SCO_BUSY BIT4
\r
10 #define BT_INFO_8812A_2ANT_B_ACL_BUSY BIT3
\r
11 #define BT_INFO_8812A_2ANT_B_INQ_PAGE BIT2
\r
12 #define BT_INFO_8812A_2ANT_B_SCO_ESCO BIT1
\r
13 #define BT_INFO_8812A_2ANT_B_CONNECTION BIT0
\r
15 #define BT_INFO_8812A_2ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
\r
16 (((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
\r
18 #define BTC_RSSI_COEX_THRESH_TOL_8812A_2ANT 2
\r
20 typedef enum _BT_INFO_SRC_8812A_2ANT{
\r
21 BT_INFO_SRC_8812A_2ANT_WIFI_FW = 0x0,
\r
22 BT_INFO_SRC_8812A_2ANT_BT_RSP = 0x1,
\r
23 BT_INFO_SRC_8812A_2ANT_BT_ACTIVE_SEND = 0x2,
\r
24 BT_INFO_SRC_8812A_2ANT_MAX
\r
25 }BT_INFO_SRC_8812A_2ANT,*PBT_INFO_SRC_8812A_2ANT;
\r
27 typedef enum _BT_8812A_2ANT_BT_STATUS{
\r
28 BT_8812A_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
\r
29 BT_8812A_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
\r
30 BT_8812A_2ANT_BT_STATUS_INQ_PAGE = 0x2,
\r
31 BT_8812A_2ANT_BT_STATUS_ACL_BUSY = 0x3,
\r
32 BT_8812A_2ANT_BT_STATUS_SCO_BUSY = 0x4,
\r
33 BT_8812A_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
\r
34 BT_8812A_2ANT_BT_STATUS_MAX
\r
35 }BT_8812A_2ANT_BT_STATUS,*PBT_8812A_2ANT_BT_STATUS;
\r
37 typedef enum _BT_8812A_2ANT_COEX_ALGO{
\r
38 BT_8812A_2ANT_COEX_ALGO_UNDEFINED = 0x0,
\r
39 BT_8812A_2ANT_COEX_ALGO_SCO = 0x1,
\r
40 BT_8812A_2ANT_COEX_ALGO_SCO_HID = 0x2,
\r
41 BT_8812A_2ANT_COEX_ALGO_HID = 0x3,
\r
42 BT_8812A_2ANT_COEX_ALGO_A2DP = 0x4,
\r
43 BT_8812A_2ANT_COEX_ALGO_A2DP_PANHS = 0x5,
\r
44 BT_8812A_2ANT_COEX_ALGO_PANEDR = 0x6,
\r
45 BT_8812A_2ANT_COEX_ALGO_PANHS = 0x7,
\r
46 BT_8812A_2ANT_COEX_ALGO_PANEDR_A2DP = 0x8,
\r
47 BT_8812A_2ANT_COEX_ALGO_PANEDR_HID = 0x9,
\r
48 BT_8812A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0xa,
\r
49 BT_8812A_2ANT_COEX_ALGO_HID_A2DP_PANHS = 0xb,
\r
50 BT_8812A_2ANT_COEX_ALGO_HID_A2DP = 0xc,
\r
51 BT_8812A_2ANT_COEX_ALGO_MAX = 0xd
\r
52 }BT_8812A_2ANT_COEX_ALGO,*PBT_8812A_2ANT_COEX_ALGO;
\r
54 typedef struct _COEX_DM_8812A_2ANT{
\r
56 u1Byte preBtDecPwrLvl;
\r
57 u1Byte curBtDecPwrLvl;
\r
58 u1Byte preFwDacSwingLvl;
\r
59 u1Byte curFwDacSwingLvl;
\r
60 BOOLEAN bCurIgnoreWlanAct;
\r
61 BOOLEAN bPreIgnoreWlanAct;
\r
64 u1Byte psTdmaPara[5];
\r
65 u1Byte psTdmaDuAdjType;
\r
66 BOOLEAN bAutoTdmaAdjust;
\r
67 BOOLEAN bAutoTdmaAdjustLowRssi;
\r
68 BOOLEAN bPrePsTdmaOn;
\r
69 BOOLEAN bCurPsTdmaOn;
\r
70 BOOLEAN bPreBtAutoReport;
\r
71 BOOLEAN bCurBtAutoReport;
\r
78 BOOLEAN bPreRfRxLpfShrink;
\r
79 BOOLEAN bCurRfRxLpfShrink;
\r
80 u4Byte btRf0x1eBackup;
\r
81 BOOLEAN bPreLowPenaltyRa;
\r
82 BOOLEAN bCurLowPenaltyRa;
\r
83 BOOLEAN bPreDacSwingOn;
\r
84 u4Byte preDacSwingLvl;
\r
85 BOOLEAN bCurDacSwingOn;
\r
86 u4Byte curDacSwingLvl;
\r
87 BOOLEAN bPreAdcBackOff;
\r
88 BOOLEAN bCurAdcBackOff;
\r
89 BOOLEAN bPreAgcTableEn;
\r
90 BOOLEAN bCurAgcTableEn;
\r
99 BOOLEAN bLimitedDig;
\r
100 u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
\r
101 u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
\r
102 u2Byte backupRetryLimit;
\r
103 u1Byte backupAmpduMaxTime;
\r
105 // algorithm related
\r
106 u1Byte preAlgorithm;
\r
107 u1Byte curAlgorithm;
\r
109 u1Byte wifiChnlInfo[3];
\r
113 u1Byte curRaMaskType;
\r
114 u1Byte preArfrType;
\r
115 u1Byte curArfrType;
\r
116 u1Byte preRetryLimitType;
\r
117 u1Byte curRetryLimitType;
\r
118 u1Byte preAmpduTimeType;
\r
119 u1Byte curAmpduTimeType;
\r
120 } COEX_DM_8812A_2ANT, *PCOEX_DM_8812A_2ANT;
\r
122 typedef struct _COEX_STA_8812A_2ANT{
\r
123 BOOLEAN bBtLinkExist;
\r
125 BOOLEAN bA2dpExist;
\r
131 u4Byte highPriorityTx;
\r
132 u4Byte highPriorityRx;
\r
133 u4Byte lowPriorityTx;
\r
134 u4Byte lowPriorityRx;
\r
136 u1Byte preBtRssiState;
\r
137 u1Byte preWifiRssiState[4];
\r
138 BOOLEAN bC2hBtInfoReqSent;
\r
139 u1Byte btInfoC2h[BT_INFO_SRC_8812A_2ANT_MAX][10];
\r
140 u4Byte btInfoC2hCnt[BT_INFO_SRC_8812A_2ANT_MAX];
\r
141 u4Byte btInfoQueryCnt;
\r
142 BOOLEAN bC2hBtInquiryPage;
\r
145 }COEX_STA_8812A_2ANT, *PCOEX_STA_8812A_2ANT;
\r
147 //===========================================
\r
148 // The following is interface which will notify coex module.
\r
149 //===========================================
\r
151 EXhalbtc8812a2ant_PowerOnSetting(
\r
152 IN PBTC_COEXIST pBtCoexist
\r
155 EXhalbtc8812a2ant_InitHwConfig(
\r
156 IN PBTC_COEXIST pBtCoexist,
\r
157 IN BOOLEAN bWifiOnly
\r
160 EXhalbtc8812a2ant_InitCoexDm(
\r
161 IN PBTC_COEXIST pBtCoexist
\r
164 EXhalbtc8812a2ant_IpsNotify(
\r
165 IN PBTC_COEXIST pBtCoexist,
\r
169 EXhalbtc8812a2ant_LpsNotify(
\r
170 IN PBTC_COEXIST pBtCoexist,
\r
174 EXhalbtc8812a2ant_ScanNotify(
\r
175 IN PBTC_COEXIST pBtCoexist,
\r
179 EXhalbtc8812a2ant_ConnectNotify(
\r
180 IN PBTC_COEXIST pBtCoexist,
\r
184 EXhalbtc8812a2ant_MediaStatusNotify(
\r
185 IN PBTC_COEXIST pBtCoexist,
\r
189 EXhalbtc8812a2ant_SpecialPacketNotify(
\r
190 IN PBTC_COEXIST pBtCoexist,
\r
194 EXhalbtc8812a2ant_BtInfoNotify(
\r
195 IN PBTC_COEXIST pBtCoexist,
\r
200 EXhalbtc8812a2ant_HaltNotify(
\r
201 IN PBTC_COEXIST pBtCoexist
\r
204 EXhalbtc8812a2ant_Periodical(
\r
205 IN PBTC_COEXIST pBtCoexist
\r
208 EXhalbtc8812a2ant_DisplayCoexInfo(
\r
209 IN PBTC_COEXIST pBtCoexist
\r
212 EXhalbtc8812a2ant_DbgControl(
\r
213 IN PBTC_COEXIST pBtCoexist,
\r