xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8189es/hal/btc/HalBtc8192d2Ant.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 //===========================================
3 // The following is for 8192D 2Ant BT Co-exist definition
4 //===========================================
5 #define		BTC_RSSI_COEX_THRESH_TOL_8192D_2ANT		6
6 
7 typedef enum _BT_INFO_SRC_8192D_2ANT{
8 	BT_INFO_SRC_8192D_2ANT_WIFI_FW			= 0x0,
9 	BT_INFO_SRC_8192D_2ANT_BT_RSP				= 0x1,
10 	BT_INFO_SRC_8192D_2ANT_BT_ACTIVE_SEND		= 0x2,
11 	BT_INFO_SRC_8192D_2ANT_MAX
12 }BT_INFO_SRC_8192D_2ANT,*PBT_INFO_SRC_8192D_2ANT;
13 
14 typedef enum _BT_8192D_2ANT_BT_STATUS{
15 	BT_8192D_2ANT_BT_STATUS_IDLE				= 0x0,
16 	BT_8192D_2ANT_BT_STATUS_CONNECTED_IDLE	= 0x1,
17 	BT_8192D_2ANT_BT_STATUS_NON_IDLE			= 0x2,
18 	BT_8192D_2ANT_BT_STATUS_MAX
19 }BT_8192D_2ANT_BT_STATUS,*PBT_8192D_2ANT_BT_STATUS;
20 
21 typedef enum _BT_8192D_2ANT_COEX_ALGO{
22 	BT_8192D_2ANT_COEX_ALGO_UNDEFINED			= 0x0,
23 	BT_8192D_2ANT_COEX_ALGO_SCO					= 0x1,
24 	BT_8192D_2ANT_COEX_ALGO_HID					= 0x2,
25 	BT_8192D_2ANT_COEX_ALGO_A2DP				= 0x3,
26 	BT_8192D_2ANT_COEX_ALGO_PAN					= 0x4,
27 	BT_8192D_2ANT_COEX_ALGO_HID_A2DP			= 0x5,
28 	BT_8192D_2ANT_COEX_ALGO_HID_PAN				= 0x6,
29 	BT_8192D_2ANT_COEX_ALGO_PAN_A2DP			= 0x7,
30 	BT_8192D_2ANT_COEX_ALGO_MAX
31 }BT_8192D_2ANT_COEX_ALGO,*PBT_8192D_2ANT_COEX_ALGO;
32 
33 typedef struct _COEX_DM_8192D_2ANT{
34 	// fw mechanism
35 	BOOLEAN		bPreBalanceOn;
36 	BOOLEAN		bCurBalanceOn;
37 
38 	// diminishWifi
39 	BOOLEAN		bPreDacOn;
40 	BOOLEAN		bCurDacOn;
41 	BOOLEAN 	bPreInterruptOn;
42 	BOOLEAN		bCurInterruptOn;
43 	u1Byte		preFwDacSwingLvl;
44 	u1Byte		curFwDacSwingLvl;
45 	BOOLEAN 	bPreNavOn;
46 	BOOLEAN		bCurNavOn;
47 
48 
49 
50 
51 
52 	//BOOLEAN		bPreDecBtPwr;
53 	//BOOLEAN		bCurDecBtPwr;
54 
55 	//u1Byte		preFwDacSwingLvl;
56 	//u1Byte		curFwDacSwingLvl;
57 	//BOOLEAN		bCurIgnoreWlanAct;
58 	//BOOLEAN		bPreIgnoreWlanAct;
59 	//u1Byte		prePsTdma;
60 	//u1Byte		curPsTdma;
61 	//u1Byte		psTdmaPara[5];
62 	//u1Byte		psTdmaDuAdjType;
63 	//BOOLEAN		bResetTdmaAdjust;
64 	//BOOLEAN		bPrePsTdmaOn;
65 	//BOOLEAN		bCurPsTdmaOn;
66 	//BOOLEAN		bPreBtAutoReport;
67 	//BOOLEAN		bCurBtAutoReport;
68 
69 	// sw mechanism
70 	BOOLEAN		bPreRfRxLpfShrink;
71 	BOOLEAN		bCurRfRxLpfShrink;
72 	u4Byte		btRf0x1eBackup;
73 	BOOLEAN 	bPreLowPenaltyRa;
74 	BOOLEAN		bCurLowPenaltyRa;
75 	BOOLEAN		bPreDacSwingOn;
76 	u4Byte		preDacSwingLvl;
77 	BOOLEAN		bCurDacSwingOn;
78 	u4Byte		curDacSwingLvl;
79 	BOOLEAN		bPreAdcBackOff;
80 	BOOLEAN		bCurAdcBackOff;
81 	BOOLEAN 	bPreAgcTableEn;
82 	BOOLEAN		bCurAgcTableEn;
83 	//u4Byte		preVal0x6c0;
84 	//u4Byte		curVal0x6c0;
85 	u4Byte		preVal0x6c4;
86 	u4Byte		curVal0x6c4;
87 	u4Byte		preVal0x6c8;
88 	u4Byte		curVal0x6c8;
89 	u4Byte		preVal0x6cc;
90 	u4Byte		curVal0x6cc;
91 	//BOOLEAN		bLimitedDig;
92 
93 	// algorithm related
94 	u1Byte		preAlgorithm;
95 	u1Byte		curAlgorithm;
96 	//u1Byte		btStatus;
97 	//u1Byte		wifiChnlInfo[3];
98 } COEX_DM_8192D_2ANT, *PCOEX_DM_8192D_2ANT;
99 
100 typedef struct _COEX_STA_8192D_2ANT{
101 	u1Byte					preWifiRssiState[4];
102 	BOOLEAN					bBtBusy;
103 	BOOLEAN					bBtUplink;
104 	BOOLEAN					bBtDownLink;
105 	BOOLEAN					bA2dpBusy;
106 }COEX_STA_8192D_2ANT, *PCOEX_STA_8192D_2ANT;
107 
108 //===========================================
109 // The following is interface which will notify coex module.
110 //===========================================
111 VOID
112 EXhalbtc8192d2ant_PowerOnSetting(
113 	IN	PBTC_COEXIST		pBtCoexist
114 	);
115 VOID
116 EXhalbtc8192d2ant_InitHwConfig(
117 	IN	PBTC_COEXIST		pBtCoexist,
118 	IN	BOOLEAN				bWifiOnly
119 	);
120 VOID
121 EXhalbtc8192d2ant_InitCoexDm(
122 	IN	PBTC_COEXIST		pBtCoexist
123 	);
124 VOID
125 EXhalbtc8192d2ant_IpsNotify(
126 	IN	PBTC_COEXIST		pBtCoexist,
127 	IN	u1Byte			type
128 	);
129 VOID
130 EXhalbtc8192d2ant_LpsNotify(
131 	IN	PBTC_COEXIST		pBtCoexist,
132 	IN	u1Byte			type
133 	);
134 VOID
135 EXhalbtc8192d2ant_ScanNotify(
136 	IN	PBTC_COEXIST		pBtCoexist,
137 	IN	u1Byte			type
138 	);
139 VOID
140 EXhalbtc8192d2ant_ConnectNotify(
141 	IN	PBTC_COEXIST		pBtCoexist,
142 	IN	u1Byte			type
143 	);
144 VOID
145 EXhalbtc8192d2ant_MediaStatusNotify(
146 	IN	PBTC_COEXIST			pBtCoexist,
147 	IN	u1Byte				type
148 	);
149 VOID
150 EXhalbtc8192d2ant_SpecialPacketNotify(
151 	IN	PBTC_COEXIST			pBtCoexist,
152 	IN	u1Byte				type
153 	);
154 VOID
155 EXhalbtc8192d2ant_HaltNotify(
156 	IN	PBTC_COEXIST			pBtCoexist
157 	);
158 VOID
159 EXhalbtc8192d2ant_Periodical(
160 	IN	PBTC_COEXIST			pBtCoexist
161 	);
162 VOID
163 EXhalbtc8192d2ant_BtInfoNotify(
164 	IN	PBTC_COEXIST		pBtCoexist,
165 	IN	pu1Byte			tmpBuf,
166 	IN	u1Byte			length
167 	);
168 VOID
169 EXhalbtc8192d2ant_DisplayCoexInfo(
170 	IN	PBTC_COEXIST		pBtCoexist
171 	);
172