1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 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 /* The following is for 8723B 2Ant BT Co-exist definition */
16 #define BT_INFO_8723B_2ANT_B_FTP BIT7
17 #define BT_INFO_8723B_2ANT_B_A2DP BIT6
18 #define BT_INFO_8723B_2ANT_B_HID BIT5
19 #define BT_INFO_8723B_2ANT_B_SCO_BUSY BIT4
20 #define BT_INFO_8723B_2ANT_B_ACL_BUSY BIT3
21 #define BT_INFO_8723B_2ANT_B_INQ_PAGE BIT2
22 #define BT_INFO_8723B_2ANT_B_SCO_ESCO BIT1
23 #define BT_INFO_8723B_2ANT_B_CONNECTION BIT0
25 #define BTC_RSSI_COEX_THRESH_TOL_8723B_2ANT 2
27 typedef enum _BT_INFO_SRC_8723B_2ANT{
28 BT_INFO_SRC_8723B_2ANT_WIFI_FW = 0x0,
29 BT_INFO_SRC_8723B_2ANT_BT_RSP = 0x1,
30 BT_INFO_SRC_8723B_2ANT_BT_ACTIVE_SEND = 0x2,
31 BT_INFO_SRC_8723B_2ANT_MAX
32 }BT_INFO_SRC_8723B_2ANT,*PBT_INFO_SRC_8723B_2ANT;
34 typedef enum _BT_8723B_2ANT_BT_STATUS{
35 BT_8723B_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
36 BT_8723B_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
37 BT_8723B_2ANT_BT_STATUS_INQ_PAGE = 0x2,
38 BT_8723B_2ANT_BT_STATUS_ACL_BUSY = 0x3,
39 BT_8723B_2ANT_BT_STATUS_SCO_BUSY = 0x4,
40 BT_8723B_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
41 BT_8723B_2ANT_BT_STATUS_MAX
42 }BT_8723B_2ANT_BT_STATUS,*PBT_8723B_2ANT_BT_STATUS;
44 typedef enum _BT_8723B_2ANT_COEX_ALGO{
45 BT_8723B_2ANT_COEX_ALGO_UNDEFINED = 0x0,
46 BT_8723B_2ANT_COEX_ALGO_SCO = 0x1,
47 BT_8723B_2ANT_COEX_ALGO_HID = 0x2,
48 BT_8723B_2ANT_COEX_ALGO_A2DP = 0x3,
49 BT_8723B_2ANT_COEX_ALGO_A2DP_PANHS = 0x4,
50 BT_8723B_2ANT_COEX_ALGO_PANEDR = 0x5,
51 BT_8723B_2ANT_COEX_ALGO_PANHS = 0x6,
52 BT_8723B_2ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
53 BT_8723B_2ANT_COEX_ALGO_PANEDR_HID = 0x8,
54 BT_8723B_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
55 BT_8723B_2ANT_COEX_ALGO_HID_A2DP = 0xa,
56 BT_8723B_2ANT_COEX_ALGO_MAX = 0xb,
57 }BT_8723B_2ANT_COEX_ALGO,*PBT_8723B_2ANT_COEX_ALGO;
59 typedef struct _COEX_DM_8723B_2ANT{
65 bool bCurIgnoreWlanAct;
66 bool bPreIgnoreWlanAct;
71 bool bResetTdmaAdjust;
75 bool bPreBtAutoReport;
76 bool bCurBtAutoReport;
79 bool bPreRfRxLpfShrink;
80 bool bCurRfRxLpfShrink;
82 bool bPreLowPenaltyRa;
83 bool bCurLowPenaltyRa;
102 /* algorithm related */
108 bool bNeedRecover0x948;
110 } COEX_DM_8723B_2ANT, *PCOEX_DM_8723B_2ANT;
112 typedef struct _COEX_STA_8723B_2ANT{
128 u8 preWifiRssiState[4];
129 bool bC2hBtInfoReqSent;
130 u8 btInfoC2h[BT_INFO_SRC_8723B_2ANT_MAX][10];
131 u32 btInfoC2hCnt[BT_INFO_SRC_8723B_2ANT_MAX];
132 bool bC2hBtInquiryPage;
135 }COEX_STA_8723B_2ANT, *PCOEX_STA_8723B_2ANT;
138 /* The following is interface which will notify coex module. */
141 EXhalbtc8723b2ant_PowerOnSetting(
142 PBTC_COEXIST pBtCoexist
145 EXhalbtc8723b2ant_InitHwConfig(
146 PBTC_COEXIST pBtCoexist,
150 EXhalbtc8723b2ant_InitCoexDm(
151 PBTC_COEXIST pBtCoexist
154 EXhalbtc8723b2ant_IpsNotify(
155 PBTC_COEXIST pBtCoexist,
159 EXhalbtc8723b2ant_LpsNotify(
160 PBTC_COEXIST pBtCoexist,
164 EXhalbtc8723b2ant_ScanNotify(
165 PBTC_COEXIST pBtCoexist,
169 EXhalbtc8723b2ant_ConnectNotify(
170 PBTC_COEXIST pBtCoexist,
174 EXhalbtc8723b2ant_MediaStatusNotify(
175 PBTC_COEXIST pBtCoexist,
179 EXhalbtc8723b2ant_SpecialPacketNotify(
180 PBTC_COEXIST pBtCoexist,
184 EXhalbtc8723b2ant_BtInfoNotify(
185 PBTC_COEXIST pBtCoexist,
190 EXhalbtc8723b2ant_HaltNotify(
191 PBTC_COEXIST pBtCoexist
194 EXhalbtc8723b2ant_PnpNotify(
195 PBTC_COEXIST pBtCoexist,
199 EXhalbtc8723b2ant_Periodical(
200 PBTC_COEXIST pBtCoexist
203 EXhalbtc8723b2ant_DisplayCoexInfo(
204 PBTC_COEXIST pBtCoexist