xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8189es/hal/btc/HalBtc8188c2Ant.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 //===========================================
3 // The following is for 8188C 2Ant BT Co-exist definition
4 //===========================================
5 #define		BTC_RSSI_COEX_THRESH_TOL_8188C_2ANT		6
6 
7 typedef enum _BT_INFO_SRC_8188C_2ANT{
8 	BT_INFO_SRC_8188C_2ANT_WIFI_FW			= 0x0,
9 	BT_INFO_SRC_8188C_2ANT_BT_RSP				= 0x1,
10 	BT_INFO_SRC_8188C_2ANT_BT_ACTIVE_SEND		= 0x2,
11 	BT_INFO_SRC_8188C_2ANT_MAX
12 }BT_INFO_SRC_8188C_2ANT,*PBT_INFO_SRC_8188C_2ANT;
13 
14 typedef enum _BT_8188C_2ANT_BT_STATUS{
15 	BT_8188C_2ANT_BT_STATUS_IDLE				= 0x0,
16 	BT_8188C_2ANT_BT_STATUS_CONNECTED_IDLE	= 0x1,
17 	BT_8188C_2ANT_BT_STATUS_NON_IDLE			= 0x2,
18 	BT_8188C_2ANT_BT_STATUS_MAX
19 }BT_8188C_2ANT_BT_STATUS,*PBT_8188C_2ANT_BT_STATUS;
20 
21 typedef enum _BT_8188C_2ANT_COEX_ALGO{
22 	BT_8188C_2ANT_COEX_ALGO_UNDEFINED			= 0x0,
23 	BT_8188C_2ANT_COEX_ALGO_SCO					= 0x1,
24 	BT_8188C_2ANT_COEX_ALGO_HID					= 0x2,
25 	BT_8188C_2ANT_COEX_ALGO_A2DP				= 0x3,
26 	BT_8188C_2ANT_COEX_ALGO_PAN					= 0x4,
27 	BT_8188C_2ANT_COEX_ALGO_HID_A2DP			= 0x5,
28 	BT_8188C_2ANT_COEX_ALGO_HID_PAN				= 0x6,
29 	BT_8188C_2ANT_COEX_ALGO_PAN_A2DP			= 0x7,
30 	BT_8188C_2ANT_COEX_ALGO_MAX
31 }BT_8188C_2ANT_COEX_ALGO,*PBT_8188C_2ANT_COEX_ALGO;
32 
33 typedef struct _COEX_DM_8188C_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 	// sw mechanism
49 	BOOLEAN		bPreRfRxLpfShrink;
50 	BOOLEAN		bCurRfRxLpfShrink;
51 	u4Byte		btRf0x1eBackup;
52 	BOOLEAN 	bPreLowPenaltyRa;
53 	BOOLEAN		bCurLowPenaltyRa;
54 	BOOLEAN		bPreDacSwingOn;
55 	u4Byte		preDacSwingLvl;
56 	BOOLEAN		bCurDacSwingOn;
57 	u4Byte		curDacSwingLvl;
58 	BOOLEAN		bPreAdcBackOff;
59 	BOOLEAN		bCurAdcBackOff;
60 	BOOLEAN 	bPreAgcTableEn;
61 	BOOLEAN		bCurAgcTableEn;
62 	//u4Byte		preVal0x6c0;
63 	//u4Byte		curVal0x6c0;
64 	u4Byte		preVal0x6c4;
65 	u4Byte		curVal0x6c4;
66 	u4Byte		preVal0x6c8;
67 	u4Byte		curVal0x6c8;
68 	u4Byte		preVal0x6cc;
69 	u4Byte		curVal0x6cc;
70 	//BOOLEAN		bLimitedDig;
71 
72 	// algorithm related
73 	u1Byte		preAlgorithm;
74 	u1Byte		curAlgorithm;
75 	//u1Byte		btStatus;
76 	//u1Byte		wifiChnlInfo[3];
77 } COEX_DM_8188C_2ANT, *PCOEX_DM_8188C_2ANT;
78 
79 typedef struct _COEX_STA_8188C_2ANT{
80 	u1Byte					preWifiRssiState[4];
81 	BOOLEAN					bBtBusy;
82 	BOOLEAN					bBtUplink;
83 	BOOLEAN					bBtDownLink;
84 	BOOLEAN					bA2dpBusy;
85 }COEX_STA_8188C_2ANT, *PCOEX_STA_8188C_2ANT;
86 
87 //===========================================
88 // The following is interface which will notify coex module.
89 //===========================================
90 VOID
91 EXhalbtc8188c2ant_PowerOnSetting(
92 	IN	PBTC_COEXIST		pBtCoexist
93 	);
94 VOID
95 EXhalbtc8188c2ant_InitHwConfig(
96 	IN	PBTC_COEXIST		pBtCoexist,
97 	IN	BOOLEAN				bWifiOnly
98 	);
99 VOID
100 EXhalbtc8188c2ant_InitCoexDm(
101 	IN	PBTC_COEXIST		pBtCoexist
102 	);
103 VOID
104 EXhalbtc8188c2ant_IpsNotify(
105 	IN	PBTC_COEXIST		pBtCoexist,
106 	IN	u1Byte			type
107 	);
108 VOID
109 EXhalbtc8188c2ant_LpsNotify(
110 	IN	PBTC_COEXIST		pBtCoexist,
111 	IN	u1Byte			type
112 	);
113 VOID
114 EXhalbtc8188c2ant_ScanNotify(
115 	IN	PBTC_COEXIST		pBtCoexist,
116 	IN	u1Byte			type
117 	);
118 VOID
119 EXhalbtc8188c2ant_ConnectNotify(
120 	IN	PBTC_COEXIST		pBtCoexist,
121 	IN	u1Byte			type
122 	);
123 VOID
124 EXhalbtc8188c2ant_MediaStatusNotify(
125 	IN	PBTC_COEXIST			pBtCoexist,
126 	IN	u1Byte				type
127 	);
128 VOID
129 EXhalbtc8188c2ant_SpecialPacketNotify(
130 	IN	PBTC_COEXIST			pBtCoexist,
131 	IN	u1Byte				type
132 	);
133 VOID
134 EXhalbtc8188c2ant_HaltNotify(
135 	IN	PBTC_COEXIST			pBtCoexist
136 	);
137 VOID
138 EXhalbtc8188c2ant_Periodical(
139 	IN	PBTC_COEXIST			pBtCoexist
140 	);
141 VOID
142 EXhalbtc8188c2ant_BtInfoNotify(
143 	IN	PBTC_COEXIST		pBtCoexist,
144 	IN	pu1Byte			tmpBuf,
145 	IN	u1Byte			length
146 	);
147 VOID
148 EXhalbtc8188c2ant_DisplayCoexInfo(
149 	IN	PBTC_COEXIST		pBtCoexist
150 	);
151