1 //===========================================
\r
2 // The following is for 8821A 2Ant BT Co-exist definition
\r
3 //===========================================
\r
4 #define BT_AUTO_REPORT_ONLY_8821A_2ANT 1
\r
7 #define BT_INFO_8821A_2ANT_B_FTP BIT7
\r
8 #define BT_INFO_8821A_2ANT_B_A2DP BIT6
\r
9 #define BT_INFO_8821A_2ANT_B_HID BIT5
\r
10 #define BT_INFO_8821A_2ANT_B_SCO_BUSY BIT4
\r
11 #define BT_INFO_8821A_2ANT_B_ACL_BUSY BIT3
\r
12 #define BT_INFO_8821A_2ANT_B_INQ_PAGE BIT2
\r
13 #define BT_INFO_8821A_2ANT_B_SCO_ESCO BIT1
\r
14 #define BT_INFO_8821A_2ANT_B_CONNECTION BIT0
\r
16 #define BTC_RSSI_COEX_THRESH_TOL_8821A_2ANT 2
\r
19 #define BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES 42 //WiFi RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
\r
20 #define BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES 46 //BT RSSI Threshold for 2-Ant TDMA/1-Ant PS-TDMA translation
\r
22 typedef enum _BT_INFO_SRC_8821A_2ANT{
\r
23 BT_INFO_SRC_8821A_2ANT_WIFI_FW = 0x0,
\r
24 BT_INFO_SRC_8821A_2ANT_BT_RSP = 0x1,
\r
25 BT_INFO_SRC_8821A_2ANT_BT_ACTIVE_SEND = 0x2,
\r
26 BT_INFO_SRC_8821A_2ANT_MAX
\r
27 }BT_INFO_SRC_8821A_2ANT,*PBT_INFO_SRC_8821A_2ANT;
\r
29 typedef enum _BT_8821A_2ANT_BT_STATUS{
\r
30 BT_8821A_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
\r
31 BT_8821A_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
\r
32 BT_8821A_2ANT_BT_STATUS_INQ_PAGE = 0x2,
\r
33 BT_8821A_2ANT_BT_STATUS_ACL_BUSY = 0x3,
\r
34 BT_8821A_2ANT_BT_STATUS_SCO_BUSY = 0x4,
\r
35 BT_8821A_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
\r
36 BT_8821A_2ANT_BT_STATUS_MAX
\r
37 }BT_8821A_2ANT_BT_STATUS,*PBT_8821A_2ANT_BT_STATUS;
\r
39 typedef enum _BT_8821A_2ANT_COEX_ALGO{
\r
40 BT_8821A_2ANT_COEX_ALGO_UNDEFINED = 0x0,
\r
41 BT_8821A_2ANT_COEX_ALGO_SCO = 0x1,
\r
42 BT_8821A_2ANT_COEX_ALGO_HID = 0x2,
\r
43 BT_8821A_2ANT_COEX_ALGO_A2DP = 0x3,
\r
44 BT_8821A_2ANT_COEX_ALGO_A2DP_PANHS = 0x4,
\r
45 BT_8821A_2ANT_COEX_ALGO_PANEDR = 0x5,
\r
46 BT_8821A_2ANT_COEX_ALGO_PANHS = 0x6,
\r
47 BT_8821A_2ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
\r
48 BT_8821A_2ANT_COEX_ALGO_PANEDR_HID = 0x8,
\r
49 BT_8821A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
\r
50 BT_8821A_2ANT_COEX_ALGO_HID_A2DP = 0xa,
\r
51 BT_8821A_2ANT_COEX_ALGO_MAX = 0xb,
\r
52 }BT_8821A_2ANT_COEX_ALGO,*PBT_8821A_2ANT_COEX_ALGO;
\r
54 typedef struct _COEX_DM_8821A_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 bResetTdmaAdjust;
\r
67 BOOLEAN bAutoTdmaAdjust;
\r
68 BOOLEAN bPrePsTdmaOn;
\r
69 BOOLEAN bCurPsTdmaOn;
\r
70 BOOLEAN bPreBtAutoReport;
\r
71 BOOLEAN bCurBtAutoReport;
\r
74 BOOLEAN bPreRfRxLpfShrink;
\r
75 BOOLEAN bCurRfRxLpfShrink;
\r
76 u4Byte btRf0x1eBackup;
\r
77 BOOLEAN bPreLowPenaltyRa;
\r
78 BOOLEAN bCurLowPenaltyRa;
\r
79 BOOLEAN bPreDacSwingOn;
\r
80 u4Byte preDacSwingLvl;
\r
81 BOOLEAN bCurDacSwingOn;
\r
82 u4Byte curDacSwingLvl;
\r
83 BOOLEAN bPreAdcBackOff;
\r
84 BOOLEAN bCurAdcBackOff;
\r
85 BOOLEAN bPreAgcTableEn;
\r
86 BOOLEAN bCurAgcTableEn;
\r
95 BOOLEAN bLimitedDig;
\r
97 // algorithm related
\r
98 u1Byte preAlgorithm;
\r
99 u1Byte curAlgorithm;
\r
101 u1Byte wifiChnlInfo[3];
\r
103 BOOLEAN bNeedRecover0x948;
\r
104 u4Byte backup0x948;
\r
110 } COEX_DM_8821A_2ANT, *PCOEX_DM_8821A_2ANT;
\r
112 typedef struct _COEX_STA_8821A_2ANT{
\r
113 BOOLEAN bBtLinkExist;
\r
115 BOOLEAN bA2dpExist;
\r
121 u4Byte highPriorityTx;
\r
122 u4Byte highPriorityRx;
\r
123 u4Byte lowPriorityTx;
\r
124 u4Byte lowPriorityRx;
\r
126 BOOLEAN bBtTxRxMask;
\r
127 u1Byte preBtRssiState;
\r
128 u1Byte preWifiRssiState[4];
\r
129 BOOLEAN bC2hBtInfoReqSent;
\r
130 u1Byte btInfoC2h[BT_INFO_SRC_8821A_2ANT_MAX][10];
\r
131 u4Byte btInfoC2hCnt[BT_INFO_SRC_8821A_2ANT_MAX];
\r
132 BOOLEAN bBtWhckTest;
\r
133 BOOLEAN bC2hBtInquiryPage;
\r
140 u4Byte nCRCOK_11nAgg;
\r
142 u4Byte nCRCErr_CCK;
\r
143 u4Byte nCRCErr_11g;
\r
144 u4Byte nCRCErr_11n;
\r
145 u4Byte nCRCErr_11nAgg;
\r
147 u1Byte nCoexTableType;
\r
148 BOOLEAN bForceLpsOn;
\r
150 u1Byte disVerInfoCnt;
\r
151 }COEX_STA_8821A_2ANT, *PCOEX_STA_8821A_2ANT;
\r
153 //===========================================
\r
154 // The following is interface which will notify coex module.
\r
155 //===========================================
\r
157 EXhalbtc8821a2ant_PowerOnSetting(
\r
158 IN PBTC_COEXIST pBtCoexist
\r
161 EXhalbtc8821a2ant_PreLoadFirmware(
\r
162 IN PBTC_COEXIST pBtCoexist
\r
165 EXhalbtc8821a2ant_InitHwConfig(
\r
166 IN PBTC_COEXIST pBtCoexist,
\r
167 IN BOOLEAN bWifiOnly
\r
170 EXhalbtc8821a2ant_InitCoexDm(
\r
171 IN PBTC_COEXIST pBtCoexist
\r
174 EXhalbtc8821a2ant_IpsNotify(
\r
175 IN PBTC_COEXIST pBtCoexist,
\r
179 EXhalbtc8821a2ant_LpsNotify(
\r
180 IN PBTC_COEXIST pBtCoexist,
\r
184 EXhalbtc8821a2ant_ScanNotify(
\r
185 IN PBTC_COEXIST pBtCoexist,
\r
189 EXhalbtc8821a2ant_ConnectNotify(
\r
190 IN PBTC_COEXIST pBtCoexist,
\r
194 EXhalbtc8821a2ant_MediaStatusNotify(
\r
195 IN PBTC_COEXIST pBtCoexist,
\r
199 EXhalbtc8821a2ant_SpecialPacketNotify(
\r
200 IN PBTC_COEXIST pBtCoexist,
\r
204 EXhalbtc8821a2ant_BtInfoNotify(
\r
205 IN PBTC_COEXIST pBtCoexist,
\r
210 EXhalbtc8821a2ant_HaltNotify(
\r
211 IN PBTC_COEXIST pBtCoexist
\r
214 EXhalbtc8821a2ant_PnpNotify(
\r
215 IN PBTC_COEXIST pBtCoexist,
\r
219 EXhalbtc8821a2ant_Periodical(
\r
220 IN PBTC_COEXIST pBtCoexist
\r
223 EXhalbtc8821a2ant_DisplayCoexInfo(
\r
224 IN PBTC_COEXIST pBtCoexist
\r