1 //===========================================
\r
2 // The following is for 8192E 1ANT BT Co-exist definition
\r
3 //===========================================
\r
4 #define BT_AUTO_REPORT_ONLY_8192E_1ANT 1
\r
6 #define BT_INFO_8192E_1ANT_B_FTP BIT7
\r
7 #define BT_INFO_8192E_1ANT_B_A2DP BIT6
\r
8 #define BT_INFO_8192E_1ANT_B_HID BIT5
\r
9 #define BT_INFO_8192E_1ANT_B_SCO_BUSY BIT4
\r
10 #define BT_INFO_8192E_1ANT_B_ACL_BUSY BIT3
\r
11 #define BT_INFO_8192E_1ANT_B_INQ_PAGE BIT2
\r
12 #define BT_INFO_8192E_1ANT_B_SCO_ESCO BIT1
\r
13 #define BT_INFO_8192E_1ANT_B_CONNECTION BIT0
\r
15 #define BT_INFO_8192E_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
\r
16 (((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)
\r
18 #define BTC_RSSI_COEX_THRESH_TOL_8192E_1ANT 2
\r
20 #define BT_8192E_1ANT_WIFI_NOISY_THRESH 30 //max: 255
\r
22 typedef enum _BT_INFO_SRC_8192E_1ANT{
\r
23 BT_INFO_SRC_8192E_1ANT_WIFI_FW = 0x0,
\r
24 BT_INFO_SRC_8192E_1ANT_BT_RSP = 0x1,
\r
25 BT_INFO_SRC_8192E_1ANT_BT_ACTIVE_SEND = 0x2,
\r
26 BT_INFO_SRC_8192E_1ANT_MAX
\r
27 }BT_INFO_SRC_8192E_1ANT,*PBT_INFO_SRC_8192E_1ANT;
\r
29 typedef enum _BT_8192E_1ANT_BT_STATUS{
\r
30 BT_8192E_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
\r
31 BT_8192E_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
\r
32 BT_8192E_1ANT_BT_STATUS_INQ_PAGE = 0x2,
\r
33 BT_8192E_1ANT_BT_STATUS_ACL_BUSY = 0x3,
\r
34 BT_8192E_1ANT_BT_STATUS_SCO_BUSY = 0x4,
\r
35 BT_8192E_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
\r
36 BT_8192E_1ANT_BT_STATUS_MAX
\r
37 }BT_8192E_1ANT_BT_STATUS,*PBT_8192E_1ANT_BT_STATUS;
\r
39 typedef enum _BT_8192E_1ANT_WIFI_STATUS{
\r
40 BT_8192E_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
\r
41 BT_8192E_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
\r
42 BT_8192E_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
\r
43 BT_8192E_1ANT_WIFI_STATUS_CONNECTED_SPECIAL_PKT = 0x3,
\r
44 BT_8192E_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
\r
45 BT_8192E_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
\r
46 BT_8192E_1ANT_WIFI_STATUS_MAX
\r
47 }BT_8192E_1ANT_WIFI_STATUS,*PBT_8192E_1ANT_WIFI_STATUS;
\r
49 typedef enum _BT_8192E_1ANT_COEX_ALGO{
\r
50 BT_8192E_1ANT_COEX_ALGO_UNDEFINED = 0x0,
\r
51 BT_8192E_1ANT_COEX_ALGO_SCO = 0x1,
\r
52 BT_8192E_1ANT_COEX_ALGO_HID = 0x2,
\r
53 BT_8192E_1ANT_COEX_ALGO_A2DP = 0x3,
\r
54 BT_8192E_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
\r
55 BT_8192E_1ANT_COEX_ALGO_PANEDR = 0x5,
\r
56 BT_8192E_1ANT_COEX_ALGO_PANHS = 0x6,
\r
57 BT_8192E_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
\r
58 BT_8192E_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
\r
59 BT_8192E_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
\r
60 BT_8192E_1ANT_COEX_ALGO_HID_A2DP = 0xa,
\r
61 BT_8192E_1ANT_COEX_ALGO_MAX = 0xb,
\r
62 }BT_8192E_1ANT_COEX_ALGO,*PBT_8192E_1ANT_COEX_ALGO;
\r
64 typedef struct _COEX_DM_8192E_1ANT{
\r
66 BOOLEAN bCurIgnoreWlanAct;
\r
67 BOOLEAN bPreIgnoreWlanAct;
\r
70 u1Byte psTdmaPara[5];
\r
71 u1Byte psTdmaDuAdjType;
\r
72 BOOLEAN bAutoTdmaAdjust;
\r
73 BOOLEAN bPrePsTdmaOn;
\r
74 BOOLEAN bCurPsTdmaOn;
\r
75 BOOLEAN bPreBtAutoReport;
\r
76 BOOLEAN bCurBtAutoReport;
\r
83 BOOLEAN bPreLowPenaltyRa;
\r
84 BOOLEAN bCurLowPenaltyRa;
\r
93 BOOLEAN bLimitedDig;
\r
95 u4Byte backupArfrCnt1; // Auto Rate Fallback Retry cnt
\r
96 u4Byte backupArfrCnt2; // Auto Rate Fallback Retry cnt
\r
97 u2Byte backupRetryLimit;
\r
98 u1Byte backupAmpduMaxTime;
\r
100 // algorithm related
\r
101 u1Byte preAlgorithm;
\r
102 u1Byte curAlgorithm;
\r
104 u1Byte wifiChnlInfo[3];
\r
108 u1Byte preArfrType;
\r
109 u1Byte curArfrType;
\r
110 u1Byte preRetryLimitType;
\r
111 u1Byte curRetryLimitType;
\r
112 u1Byte preAmpduTimeType;
\r
113 u1Byte curAmpduTimeType;
\r
116 u1Byte errorCondition;
\r
117 } COEX_DM_8192E_1ANT, *PCOEX_DM_8192E_1ANT;
\r
119 typedef struct _COEX_STA_8192E_1ANT{
\r
120 BOOLEAN bBtLinkExist;
\r
122 BOOLEAN bA2dpExist;
\r
128 u4Byte specialPktPeriodCnt;
\r
129 u4Byte highPriorityTx;
\r
130 u4Byte highPriorityRx;
\r
131 u4Byte lowPriorityTx;
\r
132 u4Byte lowPriorityRx;
\r
134 BOOLEAN bBtTxRxMask;
\r
135 u1Byte preBtRssiState;
\r
136 u1Byte preWifiRssiState[4];
\r
137 BOOLEAN bC2hBtInfoReqSent;
\r
138 u1Byte btInfoC2h[BT_INFO_SRC_8192E_1ANT_MAX][10];
\r
139 u4Byte btInfoC2hCnt[BT_INFO_SRC_8192E_1ANT_MAX];
\r
140 BOOLEAN bC2hBtInquiryPage;
\r
141 BOOLEAN bC2hBtPage; //Add for win8.1 page out issue
\r
142 BOOLEAN bWiFiIsHighPriTask; //Add for win8.1 page out issue
\r
145 u4Byte popEventCnt;
\r
151 u4Byte nCRCOK_11nAgg;
\r
153 u4Byte nCRCErr_CCK;
\r
154 u4Byte nCRCErr_11g;
\r
155 u4Byte nCRCErr_11n;
\r
156 u4Byte nCRCErr_11nAgg;
\r
159 BOOLEAN bPreCCKLock;
\r
160 u1Byte nCoexTableType;
\r
162 BOOLEAN bForceLpsOn;
\r
163 }COEX_STA_8192E_1ANT, *PCOEX_STA_8192E_1ANT;
\r
165 //===========================================
\r
166 // The following is interface which will notify coex module.
\r
167 //===========================================
\r
169 EXhalbtc8192e1ant_PowerOnSetting(
\r
170 IN PBTC_COEXIST pBtCoexist
\r
173 EXhalbtc8192e1ant_PreLoadFirmware(
\r
174 IN PBTC_COEXIST pBtCoexist
\r
177 EXhalbtc8192e1ant_InitHwConfig(
\r
178 IN PBTC_COEXIST pBtCoexist,
\r
179 IN BOOLEAN bWifiOnly
\r
182 EXhalbtc8192e1ant_InitCoexDm(
\r
183 IN PBTC_COEXIST pBtCoexist
\r
186 EXhalbtc8192e1ant_IpsNotify(
\r
187 IN PBTC_COEXIST pBtCoexist,
\r
191 EXhalbtc8192e1ant_LpsNotify(
\r
192 IN PBTC_COEXIST pBtCoexist,
\r
196 EXhalbtc8192e1ant_ScanNotify(
\r
197 IN PBTC_COEXIST pBtCoexist,
\r
201 EXhalbtc8192e1ant_ConnectNotify(
\r
202 IN PBTC_COEXIST pBtCoexist,
\r
206 EXhalbtc8192e1ant_MediaStatusNotify(
\r
207 IN PBTC_COEXIST pBtCoexist,
\r
211 EXhalbtc8192e1ant_SpecialPacketNotify(
\r
212 IN PBTC_COEXIST pBtCoexist,
\r
216 EXhalbtc8192e1ant_BtInfoNotify(
\r
217 IN PBTC_COEXIST pBtCoexist,
\r
222 EXhalbtc8192e1ant_RfStatusNotify(
\r
223 IN PBTC_COEXIST pBtCoexist,
\r
227 EXhalbtc8192e1ant_HaltNotify(
\r
228 IN PBTC_COEXIST pBtCoexist
\r
231 EXhalbtc8192e1ant_PnpNotify(
\r
232 IN PBTC_COEXIST pBtCoexist,
\r
236 EXhalbtc8192e1ant_CoexDmReset(
\r
237 IN PBTC_COEXIST pBtCoexist
\r
240 EXhalbtc8192e1ant_Periodical(
\r
241 IN PBTC_COEXIST pBtCoexist
\r
244 EXhalbtc8192e1ant_DisplayCoexInfo(
\r
245 IN PBTC_COEXIST pBtCoexist
\r
248 EXhalbtc8192e1ant_DbgControl(
\r
249 IN PBTC_COEXIST pBtCoexist,
\r