ffd9ac8ee10feb860c7ff94544e84062a0e52325
[deliverable/linux.git] / drivers / staging / rtl8821ae / btcoexist / habtc8723a1ant.h
1 //===========================================
2 // The following is for 8723A 1Ant BT Co-exist definition
3 //===========================================
4 #define BT_INFO_8723A_1ANT_B_FTP BIT7
5 #define BT_INFO_8723A_1ANT_B_A2DP BIT6
6 #define BT_INFO_8723A_1ANT_B_HID BIT5
7 #define BT_INFO_8723A_1ANT_B_SCO_BUSY BIT4
8 #define BT_INFO_8723A_1ANT_B_ACL_BUSY BIT3
9 #define BT_INFO_8723A_1ANT_B_INQ_PAGE BIT2
10 #define BT_INFO_8723A_1ANT_B_SCO_ESCO BIT1
11 #define BT_INFO_8723A_1ANT_B_CONNECTION BIT0
12
13 typedef enum _BT_STATE_8723A_1ANT{
14 BT_STATE_8723A_1ANT_DISABLED = 0,
15 BT_STATE_8723A_1ANT_NO_CONNECTION = 1,
16 BT_STATE_8723A_1ANT_CONNECT_IDLE = 2,
17 BT_STATE_8723A_1ANT_INQ_OR_PAG = 3,
18 BT_STATE_8723A_1ANT_ACL_ONLY_BUSY = 4,
19 BT_STATE_8723A_1ANT_SCO_ONLY_BUSY = 5,
20 BT_STATE_8723A_1ANT_ACL_SCO_BUSY = 6,
21 BT_STATE_8723A_1ANT_HID_BUSY = 7,
22 BT_STATE_8723A_1ANT_HID_SCO_BUSY = 8,
23 BT_STATE_8723A_1ANT_MAX
24 }BT_STATE_8723A_1ANT, *PBT_STATE_8723A_1ANT;
25
26 #define BTC_RSSI_COEX_THRESH_TOL_8723A_1ANT 2
27
28 typedef enum _BT_INFO_SRC_8723A_1ANT{
29 BT_INFO_SRC_8723A_1ANT_WIFI_FW = 0x0,
30 BT_INFO_SRC_8723A_1ANT_BT_RSP = 0x1,
31 BT_INFO_SRC_8723A_1ANT_BT_ACTIVE_SEND = 0x2,
32 BT_INFO_SRC_8723A_1ANT_MAX
33 } BT_INFO_SRC_8723A_1ANT, *PBT_INFO_SRC_8723A_1ANT;
34
35 typedef enum _BT_8723A_1ANT_BT_STATUS{
36 BT_8723A_1ANT_BT_STATUS_IDLE = 0x0,
37 BT_8723A_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
38 BT_8723A_1ANT_BT_STATUS_NON_IDLE = 0x2,
39 BT_8723A_1ANT_BT_STATUS_MAX
40 } BT_8723A_1ANT_BT_STATUS, *PBT_8723A_1ANT_BT_STATUS;
41
42 typedef enum _BT_8723A_1ANT_COEX_ALGO{
43 BT_8723A_1ANT_COEX_ALGO_UNDEFINED = 0x0,
44 BT_8723A_1ANT_COEX_ALGO_SCO = 0x1,
45 BT_8723A_1ANT_COEX_ALGO_HID = 0x2,
46 BT_8723A_1ANT_COEX_ALGO_A2DP = 0x3,
47 BT_8723A_1ANT_COEX_ALGO_PANEDR = 0x4,
48 BT_8723A_1ANT_COEX_ALGO_PANHS = 0x5,
49 BT_8723A_1ANT_COEX_ALGO_PANEDR_A2DP = 0x6,
50 BT_8723A_1ANT_COEX_ALGO_PANEDR_HID = 0x7,
51 BT_8723A_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x8,
52 BT_8723A_1ANT_COEX_ALGO_HID_A2DP = 0x9,
53 BT_8723A_1ANT_COEX_ALGO_MAX
54 } BT_8723A_1ANT_COEX_ALGO, *PBT_8723A_1ANT_COEX_ALGO;
55
56 typedef struct _COEX_DM_8723A_1ANT{
57 // fw mechanism
58 BOOLEAN bCurIgnoreWlanAct;
59 BOOLEAN bPreIgnoreWlanAct;
60 u1Byte prePsTdma;
61 u1Byte curPsTdma;
62 u1Byte psTdmaPara[5];
63 u1Byte psTdmaDuAdjType;
64 u4Byte psTdmaMonitorCnt;
65 u4Byte psTdmaGlobalCnt;
66 BOOLEAN bResetTdmaAdjust;
67 BOOLEAN bPrePsTdmaOn;
68 BOOLEAN bCurPsTdmaOn;
69
70 // sw mechanism
71 BOOLEAN bPreRfRxLpfShrink;
72 BOOLEAN bCurRfRxLpfShrink;
73 u4Byte btRf0x1eBackup;
74 BOOLEAN bPreLowPenaltyRa;
75 BOOLEAN bCurLowPenaltyRa;
76 u4Byte preVal0x6c0;
77 u4Byte curVal0x6c0;
78 u4Byte preVal0x6c8;
79 u4Byte curVal0x6c8;
80 u1Byte preVal0x6cc;
81 u1Byte curVal0x6cc;
82 BOOLEAN limited_dig;
83
84 // algorithm related
85 u1Byte preAlgorithm;
86 u1Byte curAlgorithm;
87 u1Byte btStatus;
88 u1Byte wifiChnlInfo[3];
89 } COEX_DM_8723A_1ANT, *PCOEX_DM_8723A_1ANT;
90
91 typedef struct _COEX_STA_8723A_1ANT{
92 u4Byte highPriorityTx;
93 u4Byte highPriorityRx;
94 u4Byte lowPriorityTx;
95 u4Byte lowPriorityRx;
96 u1Byte btRssi;
97 u1Byte preBtRssiState;
98 u1Byte preBtRssiState1;
99 u1Byte preWifiRssiState[4];
100 BOOLEAN bC2hBtInfoReqSent;
101 u1Byte btInfoC2h[BT_INFO_SRC_8723A_1ANT_MAX][10];
102 u4Byte btInfoC2hCnt[BT_INFO_SRC_8723A_1ANT_MAX];
103 BOOLEAN bC2hBtInquiryPage;
104 u1Byte btRetryCnt;
105 u1Byte btInfoExt;
106 //BOOLEAN bHoldForStackOperation;
107 //u1Byte bHoldPeriodCnt;
108 // this is for c2h hang work-around
109 u4Byte c2hHangDetectCnt;
110 }COEX_STA_8723A_1ANT, *PCOEX_STA_8723A_1ANT;
111
112 //===========================================
113 // The following is interface which will notify coex module.
114 //===========================================
115 VOID
116 EXhalbtc8723a1ant_InitHwConfig(
117 IN PBTC_COEXIST pBtCoexist
118 );
119 VOID
120 EXhalbtc8723a1ant_InitCoexDm(
121 IN PBTC_COEXIST pBtCoexist
122 );
123 VOID
124 EXhalbtc8723a1ant_IpsNotify(
125 IN PBTC_COEXIST pBtCoexist,
126 IN u1Byte type
127 );
128 VOID
129 EXhalbtc8723a1ant_LpsNotify(
130 IN PBTC_COEXIST pBtCoexist,
131 IN u1Byte type
132 );
133 VOID
134 EXhalbtc8723a1ant_ScanNotify(
135 IN PBTC_COEXIST pBtCoexist,
136 IN u1Byte type
137 );
138 VOID
139 EXhalbtc8723a1ant_ConnectNotify(
140 IN PBTC_COEXIST pBtCoexist,
141 IN u1Byte type
142 );
143 VOID
144 EXhalbtc8723a1ant_MediaStatusNotify(
145 IN PBTC_COEXIST pBtCoexist,
146 IN u1Byte type
147 );
148 VOID
149 EXhalbtc8723a1ant_SpecialPacketNotify(
150 IN PBTC_COEXIST pBtCoexist,
151 IN u1Byte type
152 );
153 VOID
154 EXhalbtc8723a1ant_BtInfoNotify(
155 IN PBTC_COEXIST pBtCoexist,
156 IN pu1Byte tmpBuf,
157 IN u1Byte length
158 );
159 VOID
160 EXhalbtc8723a1ant_StackOperationNotify(
161 IN PBTC_COEXIST pBtCoexist,
162 IN u1Byte type
163 );
164 VOID
165 EXhalbtc8723a1ant_HaltNotify(
166 IN PBTC_COEXIST pBtCoexist
167 );
168 VOID
169 EXhalbtc8723a1ant_Periodical(
170 IN PBTC_COEXIST pBtCoexist
171 );
172 VOID
173 EXhalbtc8723a1ant_DisplayCoexInfo(
174 IN PBTC_COEXIST pBtCoexist
175 );
176
This page took 0.034288 seconds and 4 git commands to generate.