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