xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723bs/hal/btc/halbtc8821c2ant.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2016 - 2017 Realtek Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  *****************************************************************************/
16 
17 #if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
18 
19 #if (RTL8821C_SUPPORT == 1)
20 
21 /* *******************************************
22  * The following is for 8821C 2Ant BT Co-exist definition
23  * ******************************************* */
24 #define	BT_8821C_2ANT_COEX_DBG					0
25 #define	BT_AUTO_REPORT_ONLY_8821C_2ANT				1
26 
27 
28 #define	BT_INFO_8821C_2ANT_B_FTP						BIT(7)
29 #define	BT_INFO_8821C_2ANT_B_A2DP					BIT(6)
30 #define	BT_INFO_8821C_2ANT_B_HID						BIT(5)
31 #define	BT_INFO_8821C_2ANT_B_SCO_BUSY				BIT(4)
32 #define	BT_INFO_8821C_2ANT_B_ACL_BUSY				BIT(3)
33 #define	BT_INFO_8821C_2ANT_B_INQ_PAGE				BIT(2)
34 #define	BT_INFO_8821C_2ANT_B_SCO_ESCO				BIT(1)
35 #define	BT_INFO_8821C_2ANT_B_CONNECTION				BIT(0)
36 
37 #define		BTC_RSSI_COEX_THRESH_TOL_8821C_2ANT		2
38 
39 
40 #define	BT_8821C_2ANT_WIFI_RSSI_COEXSWITCH_THRES1				80  /* unit: % WiFi RSSI Threshold for   2-Ant free-run/2-Ant TDMA translation, default = 42 */
41 #define	BT_8821C_2ANT_BT_RSSI_COEXSWITCH_THRES1				80 /*  unit: % BT RSSI Threshold for      2-Ant free-run/2-Ant TDMA translation, default = 46 */
42 #define	BT_8821C_2ANT_WIFI_RSSI_COEXSWITCH_THRES2				80  /* unit: % WiFi RSSI Threshold for   1-Ant TDMA/1-Ant PS-TDMA translation, default = 42 */
43 #define	BT_8821C_2ANT_BT_RSSI_COEXSWITCH_THRES2				80 /*  unit: % BT RSSI Threshold for      1-Ant TDMA/1-Ant PS-TDMA translation, default = 46 */
44 #define	BT_8821C_2ANT_DEFAULT_ISOLATION						15	 /*  unit: dB */
45 #define   BT_8821C_2ANT_WIFI_MAX_TX_POWER						15	 /*  unit: dBm */
46 #define   BT_8821C_2ANT_BT_MAX_TX_POWER							3	 /*  unit: dBm */
47 #define   BT_8821C_2ANT_WIFI_SIR_THRES1							-15  /*  unit: dB */
48 #define   BT_8821C_2ANT_WIFI_SIR_THRES2							-30  /*  unit: dB */
49 #define   BT_8821C_2ANT_BT_SIR_THRES1							-15		 /*  unit: dB */
50 #define   BT_8821C_2ANT_BT_SIR_THRES2							-30		 /*  unit: dB */
51 
52 
53 /* for Antenna detection */
54 #define	BT_8821C_2ANT_ANTDET_PSDTHRES_BACKGROUND						50
55 #define	BT_8821C_2ANT_ANTDET_PSDTHRES_2ANT_BADISOLATION				70
56 #define	BT_8821C_2ANT_ANTDET_PSDTHRES_2ANT_GOODISOLATION			52
57 #define	BT_8821C_2ANT_ANTDET_PSDTHRES_1ANT							40
58 #define	BT_8821C_2ANT_ANTDET_RETRY_INTERVAL							10	/* retry timer if ant det is fail, unit: second */
59 #define	BT_8821C_2ANT_ANTDET_SWEEPPOINT_DELAY							60000
60 #define	BT_8821C_2ANT_ANTDET_ENABLE										0
61 #define	BT_8821C_2ANT_ANTDET_BTTXTIME									100
62 #define	BT_8821C_2ANT_ANTDET_BTTXCHANNEL								39
63 #define	BT_8821C_2ANT_ANTDET_PSD_SWWEEPCOUNT						50
64 
65 
66 #define	BT_8821C_2ANT_LTECOEX_INDIRECTREG_ACCESS_TIMEOUT		30000
67 
68 enum bt_8821c_2ant_signal_state {
69 	BT_8821C_2ANT_SIG_STA_SET_TO_LOW		= 0x0,
70 	BT_8821C_2ANT_SIG_STA_SET_BY_HW		= 0x0,
71 	BT_8821C_2ANT_SIG_STA_SET_TO_HIGH		= 0x1,
72 	BT_8821C_2ANT_SIG_STA_MAX
73 };
74 
75 enum bt_8821c_2ant_path_ctrl_owner {
76 	BT_8821C_2ANT_PCO_BTSIDE		= 0x0,
77 	BT_8821C_2ANT_PCO_WLSIDE	= 0x1,
78 	BT_8821C_2ANT_PCO_MAX
79 };
80 
81 enum bt_8821c_2ant_gnt_ctrl_type {
82 	BT_8821C_2ANT_GNT_TYPE_CTRL_BY_PTA		= 0x0,
83 	BT_8821C_2ANT_GNT_TYPE_CTRL_BY_SW		= 0x1,
84 	BT_8821C_2ANT_GNT_TYPE_MAX
85 };
86 
87 enum bt_8821c_2ant_gnt_ctrl_block {
88 	BT_8821C_2ANT_GNT_BLOCK_RFC_BB		= 0x0,
89 	BT_8821C_2ANT_GNT_BLOCK_RFC			= 0x1,
90 	BT_8821C_2ANT_GNT_BLOCK_BB			= 0x2,
91 	BT_8821C_2ANT_GNT_BLOCK_MAX
92 };
93 
94 enum bt_8821c_2ant_lte_coex_table_type {
95 	BT_8821C_2ANT_CTT_WL_VS_LTE			= 0x0,
96 	BT_8821C_2ANT_CTT_BT_VS_LTE			= 0x1,
97 	BT_8821C_2ANT_CTT_MAX
98 };
99 
100 enum bt_8821c_2ant_lte_break_table_type {
101 	BT_8821C_2ANT_LBTT_WL_BREAK_LTE			= 0x0,
102 	BT_8821C_2ANT_LBTT_BT_BREAK_LTE				= 0x1,
103 	BT_8821C_2ANT_LBTT_LTE_BREAK_WL			= 0x2,
104 	BT_8821C_2ANT_LBTT_LTE_BREAK_BT				= 0x3,
105 	BT_8821C_2ANT_LBTT_MAX
106 };
107 
108 enum bt_info_src_8821c_2ant {
109 	BT_INFO_SRC_8821C_2ANT_WIFI_FW			= 0x0,
110 	BT_INFO_SRC_8821C_2ANT_BT_RSP				= 0x1,
111 	BT_INFO_SRC_8821C_2ANT_BT_ACTIVE_SEND		= 0x2,
112 	BT_INFO_SRC_8821C_2ANT_MAX
113 };
114 
115 enum bt_8821c_2ant_bt_status {
116 	BT_8821C_2ANT_BT_STATUS_NON_CONNECTED_IDLE	= 0x0,
117 	BT_8821C_2ANT_BT_STATUS_CONNECTED_IDLE		= 0x1,
118 	BT_8821C_2ANT_BT_STATUS_INQ_PAGE				= 0x2,
119 	BT_8821C_2ANT_BT_STATUS_ACL_BUSY				= 0x3,
120 	BT_8821C_2ANT_BT_STATUS_SCO_BUSY				= 0x4,
121 	BT_8821C_2ANT_BT_STATUS_ACL_SCO_BUSY			= 0x5,
122 	BT_8821C_2ANT_BT_STATUS_MAX
123 };
124 
125 enum bt_8821c_2ant_coex_algo {
126 	BT_8821C_2ANT_COEX_ALGO_UNDEFINED			= 0x0,
127 	BT_8821C_2ANT_COEX_ALGO_SCO				= 0x1,
128 	BT_8821C_2ANT_COEX_ALGO_HID				= 0x2,
129 	BT_8821C_2ANT_COEX_ALGO_A2DP				= 0x3,
130 	BT_8821C_2ANT_COEX_ALGO_A2DP_PANHS		= 0x4,
131 	BT_8821C_2ANT_COEX_ALGO_PANEDR			= 0x5,
132 	BT_8821C_2ANT_COEX_ALGO_PANHS			= 0x6,
133 	BT_8821C_2ANT_COEX_ALGO_PANEDR_A2DP		= 0x7,
134 	BT_8821C_2ANT_COEX_ALGO_PANEDR_HID		= 0x8,
135 	BT_8821C_2ANT_COEX_ALGO_HID_A2DP_PANEDR	= 0x9,
136 	BT_8821C_2ANT_COEX_ALGO_HID_A2DP			= 0xa,
137 	BT_8821C_2ANT_COEX_ALGO_NOPROFILEBUSY		= 0xb,
138 	BT_8821C_2ANT_COEX_ALGO_A2DPSINK		= 0xc,
139 	BT_8821C_2ANT_COEX_ALGO_MAX
140 };
141 
142 enum bt_8821c_2ant_ext_ant_switch_type {
143 	BT_8821C_2ANT_EXT_ANT_SWITCH_USE_DPDT		= 0x0,
144 	BT_8821C_2ANT_EXT_ANT_SWITCH_USE_SPDT		= 0x1,
145 	BT_8821C_2ANT_EXT_ANT_SWITCH_NONE			= 0x2,
146 	BT_8821C_2ANT_EXT_ANT_SWITCH_MAX
147 };
148 
149 enum bt_8821c_2ant_ext_ant_switch_ctrl_type {
150 	BT_8821C_2ANT_EXT_ANT_SWITCH_CTRL_BY_BBSW	= 0x0,
151 	BT_8821C_2ANT_EXT_ANT_SWITCH_CTRL_BY_PTA		= 0x1,
152 	BT_8821C_2ANT_EXT_ANT_SWITCH_CTRL_BY_ANTDIV	= 0x2,
153 	BT_8821C_2ANT_EXT_ANT_SWITCH_CTRL_BY_MAC		= 0x3,
154 	BT_8821C_2ANT_EXT_ANT_SWITCH_CTRL_BY_BT		= 0x4,
155 	BT_8821C_2ANT_EXT_ANT_SWITCH_CTRL_MAX
156 };
157 
158 enum bt_8821c_2ant_ext_ant_switch_pos_type {
159 	BT_8821C_2ANT_EXT_ANT_SWITCH_MAIN_TO_BT			= 0x0,
160 	BT_8821C_2ANT_EXT_ANT_SWITCH_MAIN_TO_WLG			= 0x1,
161 	BT_8821C_2ANT_EXT_ANT_SWITCH_MAIN_TO_WLA			= 0x2,
162 	BT_8821C_2ANT_EXT_ANT_SWITCH_MAIN_TO_NOCARE		= 0x3,
163 	BT_8821C_2ANT_EXT_ANT_SWITCH_MAIN_TO_MAX
164 };
165 
166 enum bt_8821c_2ant_ext_band_switch_pos_type {
167 	BT_8821C_2ANT_EXT_BAND_SWITCH_TO_WLG			= 0x0,
168 	BT_8821C_2ANT_EXT_BAND_SWITCH_TO_WLA			= 0x1,
169 	BT_8821C_2ANT_EXT_BAND_SWITCH_TO_MAX
170 };
171 
172 enum bt_8821c_2ant_int_block {
173 	BT_8821C_2ANT_INT_BLOCK_SWITCH_TO_WLG_OF_BTG			= 0x0,
174 	BT_8821C_2ANT_INT_BLOCK_SWITCH_TO_WLG_OF_WLAG		= 0x1,
175 	BT_8821C_2ANT_INT_BLOCK_SWITCH_TO_WLA_OF_WLAG		= 0x2,
176 	BT_8821C_2ANT_INT_BLOCK_SWITCH_TO_MAX
177 };
178 
179 enum bt_8821c_2ant_phase {
180 	BT_8821C_2ANT_PHASE_COEX_INIT								= 0x0,
181 	BT_8821C_2ANT_PHASE_WLANONLY_INIT							= 0x1,
182 	BT_8821C_2ANT_PHASE_WLAN_OFF								= 0x2,
183 	BT_8821C_2ANT_PHASE_2G_RUNTIME								= 0x3,
184 	BT_8821C_2ANT_PHASE_5G_RUNTIME								= 0x4,
185 	BT_8821C_2ANT_PHASE_BTMPMODE								= 0x5,
186 	BT_8821C_2ANT_PHASE_ANTENNA_DET								= 0x6,
187 	BT_8821C_2ANT_PHASE_COEX_POWERON							= 0x7,
188 	BT_8821C_2ANT_PHASE_2G_RUNTIME_CONCURRENT					= 0x8,
189 	BT_8821C_2ANT_PHASE_MAX
190 };
191 
192 enum bt_8821c_2ant_Scoreboard {
193 	BT_8821C_2ANT_SCOREBOARD_ACTIVE								= BIT(0),
194 	BT_8821C_2ANT_SCOREBOARD_ONOFF								= BIT(1),
195 	BT_8821C_2ANT_SCOREBOARD_SCAN								= BIT(2),
196 	BT_8821C_2ANT_SCOREBOARD_UNDERTEST							= BIT(3),
197 	BT_8821C_2ANT_SCOREBOARD_WLBUSY								= BIT(6)
198 };
199 
200 
201 
202 struct coex_dm_8821c_2ant {
203 	/* hw setting */
204 	u32		pre_ant_pos_type;
205 	u32		cur_ant_pos_type;
206 	/* fw mechanism */
207 	u8		pre_bt_dec_pwr_lvl;
208 	u8		cur_bt_dec_pwr_lvl;
209 	u8		pre_fw_dac_swing_lvl;
210 	u8		cur_fw_dac_swing_lvl;
211 	boolean		cur_ignore_wlan_act;
212 	boolean		pre_ignore_wlan_act;
213 	u8		pre_ps_tdma;
214 	u8		cur_ps_tdma;
215 	u8		ps_tdma_para[5];
216 	u8		ps_tdma_du_adj_type;
217 	boolean		reset_tdma_adjust;
218 	boolean		pre_ps_tdma_on;
219 	boolean		cur_ps_tdma_on;
220 	boolean		pre_bt_auto_report;
221 	boolean		cur_bt_auto_report;
222 
223 	/* sw mechanism */
224 	boolean		pre_rf_rx_lpf_shrink;
225 	boolean		cur_rf_rx_lpf_shrink;
226 	u32		bt_rf_0x1e_backup;
227 	boolean	pre_low_penalty_ra;
228 	boolean		cur_low_penalty_ra;
229 	boolean		pre_dac_swing_on;
230 	u32		pre_dac_swing_lvl;
231 	boolean		cur_dac_swing_on;
232 	u32		cur_dac_swing_lvl;
233 	boolean		pre_adc_back_off;
234 	boolean		cur_adc_back_off;
235 	boolean	pre_agc_table_en;
236 	boolean		cur_agc_table_en;
237 	u32		pre_val0x6c0;
238 	u32		cur_val0x6c0;
239 	u32		pre_val0x6c4;
240 	u32		cur_val0x6c4;
241 	u32		pre_val0x6c8;
242 	u32		cur_val0x6c8;
243 	u8		pre_val0x6cc;
244 	u8		cur_val0x6cc;
245 	boolean		limited_dig;
246 
247 	/* algorithm related */
248 	u8		pre_algorithm;
249 	u8		cur_algorithm;
250 	u8		bt_status;
251 	u8		wifi_chnl_info[3];
252 
253 	boolean		need_recover0x948;
254 	u32		backup0x948;
255 
256 	u8		pre_lps;
257 	u8		cur_lps;
258 	u8		pre_rpwm;
259 	u8		cur_rpwm;
260 
261 	boolean		is_switch_to_1dot5_ant;
262 	u8		switch_thres_offset;
263 	u32					arp_cnt;
264 
265 	u32		pre_ext_ant_switch_status;
266 	u32		cur_ext_ant_switch_status;
267 
268 	u8		pre_ext_band_switch_status;
269 	u8		cur_ext_band_switch_status;
270 
271 	u8		pre_int_block_status;
272 	u8		cur_int_block_status;
273 };
274 
275 struct coex_sta_8821c_2ant {
276 	boolean				bt_disabled;
277 	boolean				bt_link_exist;
278 	boolean				sco_exist;
279 	boolean				a2dp_exist;
280 	boolean				hid_exist;
281 	boolean				pan_exist;
282 
283 	boolean				under_lps;
284 	boolean				under_ips;
285 	u32					high_priority_tx;
286 	u32					high_priority_rx;
287 	u32					low_priority_tx;
288 	u32					low_priority_rx;
289 	boolean             is_hiPri_rx_overhead;
290 	u8					bt_rssi;
291 	u8					pre_bt_rssi_state;
292 	u8					pre_wifi_rssi_state[4];
293 	u8					bt_info_c2h[BT_INFO_SRC_8821C_2ANT_MAX][10];
294 	u32					bt_info_c2h_cnt[BT_INFO_SRC_8821C_2ANT_MAX];
295 	boolean				bt_whck_test;
296 	boolean				c2h_bt_inquiry_page;
297 	boolean				c2h_bt_remote_name_req;
298 
299 	u8					bt_info_ext;
300 	u8					bt_info_ext2;
301 	u32					pop_event_cnt;
302 	u8					scan_ap_num;
303 	u8					bt_retry_cnt;
304 
305 	u32					crc_ok_cck;
306 	u32					crc_ok_11g;
307 	u32					crc_ok_11n;
308 	u32					crc_ok_11n_vht;
309 
310 	u32					crc_err_cck;
311 	u32					crc_err_11g;
312 	u32					crc_err_11n;
313 	u32					crc_err_11n_vht;
314 
315 	u32					acc_crc_ratio;
316 	u32					now_crc_ratio;
317 	u32					cnt_crcok_max_in_10s;
318 
319 	boolean				cck_lock;
320 	boolean				cck_lock_ever;
321 	boolean				cck_lock_warn;
322 
323 	u8					coex_table_type;
324 	boolean				force_lps_ctrl;
325 
326 	u8					dis_ver_info_cnt;
327 
328 	u8					a2dp_bit_pool;
329 	u8					cut_version;
330 
331 	boolean				concurrent_rx_mode_on;
332 
333 	u16					score_board;
334 	u8					isolation_btween_wb;   /* 0~ 50 */
335 	u8					wifi_coex_thres;
336 	u8					bt_coex_thres;
337 	u8					wifi_coex_thres2;
338 	u8					bt_coex_thres2;
339 
340 	u8					num_of_profile;
341 	boolean				acl_busy;
342 	boolean				bt_create_connection;
343 	boolean				wifi_is_high_pri_task;
344 	u32					specific_pkt_period_cnt;
345 	u32					bt_coex_supported_feature;
346 	u32					bt_coex_supported_version;
347 
348 	u8					bt_ble_scan_type;
349 	u32					bt_ble_scan_para[3];
350 
351 	boolean				run_time_state;
352 	boolean				freeze_coexrun_by_btinfo;
353 
354 	boolean				is_A2DP_3M;
355 	boolean				voice_over_HOGP;
356 	u8                  bt_info;
357 	boolean				is_autoslot;
358 	u8					forbidden_slot;
359 	u8					hid_busy_num;
360 	u8					hid_pair_cnt;
361 
362 	u32					cnt_RemoteNameReq;
363 	u32					cnt_setupLink;
364 	u32					cnt_ReInit;
365 	u32					cnt_IgnWlanAct;
366 	u32					cnt_Page;
367 	u32					cnt_RoleSwitch;
368 
369 	u16					bt_reg_vendor_ac;
370 	u16					bt_reg_vendor_ae;
371 
372 	boolean				is_setupLink;
373 	u8				    wl_noisy_level;
374 	u32                 gnt_error_cnt;
375 
376 	u8					bt_afh_map[10];
377 	u8					bt_relink_downcount;
378 	boolean				is_tdma_btautoslot;
379 	boolean				is_tdma_btautoslot_hang;
380 
381 	boolean             is_eSCO_mode;
382 	u8                  switch_band_notify_to;
383 	boolean				is_rf_state_off;
384 
385 	boolean				is_hid_low_pri_tx_overhead;
386 	boolean				is_bt_multi_link;
387 	boolean				is_bt_a2dp_sink;
388 	boolean				is_set_ps_state_fail;
389 	u8					cnt_set_ps_state_fail;
390 
391 	u8					wl_fw_dbg_info[10];
392 	u8					wl_rx_rate;
393 	u8					wl_rts_rx_rate;
394 	u8					wl_center_channel;
395 
396 	u16					score_board_WB;
397 };
398 
399 
400 #define  BT_8821C_2ANT_EXT_BAND_SWITCH_USE_DPDT	0
401 #define  BT_8821C_2ANT_EXT_BAND_SWITCH_USE_SPDT	1
402 
403 
404 struct rfe_type_8821c_2ant {
405 
406 	u8			rfe_module_type;
407 	boolean		ext_ant_switch_exist;
408 	u8			ext_ant_switch_type;			/* 0:DPDT, 1:SPDT */
409 	u8			ext_ant_switch_ctrl_polarity;		/*  iF 0: DPDT_P=0, DPDT_N=1 => BTG to Main, WL_A+G to Aux */
410 
411 	boolean		ext_band_switch_exist;
412 	u8			ext_band_switch_type;			/* 0:DPDT, 1:SPDT */
413 	u8			ext_band_switch_ctrl_polarity;
414 
415 	boolean		ant_at_main_port;
416 
417 	boolean		wlg_Locate_at_btg;				/*  If TRUE:  WLG at BTG, If FALSE: WLG at WLAG */
418 
419 	boolean		ext_ant_switch_diversity;		/* If diversity on */
420 };
421 
422 #define BT_8821C_2ANT_ANTDET_PSD_POINTS			256	/* MAX:1024 */
423 #define BT_8821C_2ANT_ANTDET_PSD_AVGNUM		1	/* MAX:3 */
424 #define BT_8821C_2ANT_ANTDET_BUF_LEN			16
425 
426 struct psdscan_sta_8821c_2ant {
427 
428 	u32			ant_det_bt_le_channel;  /* BT LE Channel ex:2412 */
429 	u32			ant_det_bt_tx_time;
430 	u32			ant_det_pre_psdscan_peak_val;
431 	boolean			ant_det_is_ant_det_available;
432 	u32			ant_det_psd_scan_peak_val;
433 	boolean			ant_det_is_btreply_available;
434 	u32			ant_det_psd_scan_peak_freq;
435 
436 	u8			ant_det_result;
437 	u8			ant_det_peak_val[BT_8821C_2ANT_ANTDET_BUF_LEN];
438 	u8			ant_det_peak_freq[BT_8821C_2ANT_ANTDET_BUF_LEN];
439 	u32			ant_det_try_count;
440 	u32			ant_det_fail_count;
441 	u32			ant_det_inteval_count;
442 	u32			ant_det_thres_offset;
443 
444 	u32			real_cent_freq;
445 	s32			real_offset;
446 	u32			real_span;
447 
448 	u32			psd_band_width;  /* unit: Hz */
449 	u32			psd_point;		/* 128/256/512/1024 */
450 	u32			psd_report[1024];  /* unit:dB (20logx), 0~255 */
451 	u32			psd_report_max_hold[1024];  /* unit:dB (20logx), 0~255 */
452 	u32			psd_start_point;
453 	u32			psd_stop_point;
454 	u32			psd_max_value_point;
455 	u32			psd_max_value;
456 	u32			psd_max_value2;
457 	u32			psd_avg_value;   /* filter loop_max_value that below BT_8821C_1ANT_ANTDET_PSDTHRES_1ANT, and average the rest*/
458 	u32			psd_loop_max_value[BT_8821C_2ANT_ANTDET_PSD_SWWEEPCOUNT];  /*max value in each loop */
459 	u32			psd_start_base;
460 	u32			psd_avg_num;	/* 1/8/16/32 */
461 	u32			psd_gen_count;
462 	boolean			is_AntDet_running;
463 	boolean			is_psd_show_max_only;
464 };
465 
466 
467 /* *******************************************
468  * The following is interface which will notify coex module.
469  * ******************************************* */
470 void ex_halbtc8821c2ant_power_on_setting(IN struct btc_coexist *btcoexist);
471 void ex_halbtc8821c2ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
472 void ex_halbtc8821c2ant_init_hw_config(IN struct btc_coexist *btcoexist,
473 				       IN boolean wifi_only);
474 void ex_halbtc8821c2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
475 void ex_halbtc8821c2ant_ips_notify(IN struct btc_coexist *btcoexist,
476 				   IN u8 type);
477 void ex_halbtc8821c2ant_lps_notify(IN struct btc_coexist *btcoexist,
478 				   IN u8 type);
479 void ex_halbtc8821c2ant_scan_notify(IN struct btc_coexist *btcoexist,
480 				    IN u8 type);
481 void ex_halbtc8821c2ant_switchband_notify(IN struct btc_coexist *btcoexist,
482 		IN u8 type);
483 void ex_halbtc8821c2ant_connect_notify(IN struct btc_coexist *btcoexist,
484 				       IN u8 type);
485 void ex_halbtc8821c2ant_media_status_notify(IN struct btc_coexist *btcoexist,
486 		IN u8 type);
487 void ex_halbtc8821c2ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
488 		IN u8 type);
489 void ex_halbtc8821c2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
490 				       IN u8 *tmp_buf, IN u8 length);
491 void ex_halbtc8821c2ant_wl_fwdbginfo_notify(IN struct btc_coexist *btcoexist,
492 				       IN u8 *tmp_buf, IN u8 length);
493 void ex_halbtc8821c2ant_rx_rate_change_notify(IN struct btc_coexist *btcoexist,
494 		IN BOOLEAN is_data_frame, IN u8 btc_rate_id);
495 void ex_halbtc8821c2ant_rf_status_notify(IN struct btc_coexist *btcoexist,
496 		IN u8 type);
497 void ex_halbtc8821c2ant_halt_notify(IN struct btc_coexist *btcoexist);
498 void ex_halbtc8821c2ant_pnp_notify(IN struct btc_coexist *btcoexist,
499 				   IN u8 pnp_state);
500 void ex_halbtc8821c2ant_periodical(IN struct btc_coexist *btcoexist);
501 void ex_halbtc8821c2ant_display_simple_coex_info(IN struct btc_coexist *btcoexist);
502 void ex_halbtc8821c2ant_display_coex_info(IN struct btc_coexist *btcoexist);
503 void ex_halbtc8821c2ant_antenna_detection(IN struct btc_coexist *btcoexist,
504 		IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds);
505 void ex_halbtc8821c2ant_display_ant_detection(IN struct btc_coexist *btcoexist);
506 
507 
508 #else
509 #define	ex_halbtc8821c2ant_power_on_setting(btcoexist)
510 #define	ex_halbtc8821c2ant_pre_load_firmware(btcoexist)
511 #define	ex_halbtc8821c2ant_init_hw_config(btcoexist, wifi_only)
512 #define	ex_halbtc8821c2ant_init_coex_dm(btcoexist)
513 #define	ex_halbtc8821c2ant_ips_notify(btcoexist, type)
514 #define	ex_halbtc8821c2ant_lps_notify(btcoexist, type)
515 #define	ex_halbtc8821c2ant_scan_notify(btcoexist, type)
516 #define	ex_halbtc8821c2ant_switchband_notify(btcoexist, type)
517 #define	ex_halbtc8821c2ant_connect_notify(btcoexist, type)
518 #define	ex_halbtc8821c2ant_media_status_notify(btcoexist, type)
519 #define	ex_halbtc8821c2ant_specific_packet_notify(btcoexist, type)
520 #define	ex_halbtc8821c2ant_bt_info_notify(btcoexist, tmp_buf, length)
521 #define	ex_halbtc8821c2ant_wl_fwdbginfo_notify(btcoexist, tmp_buf, length)
522 #define	ex_halbtc8821c2ant_rx_rate_change_notify(btcoexist, is_data_frame, btc_rate_id)
523 #define	ex_halbtc8821c2ant_rf_status_notify(btcoexist, type)
524 #define	ex_halbtc8821c2ant_halt_notify(btcoexist)
525 #define	ex_halbtc8821c2ant_pnp_notify(btcoexist, pnp_state)
526 #define	ex_halbtc8821c2ant_periodical(btcoexist)
527 #define	ex_halbtc8821c2ant_display_simple_coex_info(btcoexist)
528 #define	ex_halbtc8821c2ant_display_coex_info(btcoexist)
529 #define	ex_halbtc8821c2ant_display_ant_detection(btcoexist)
530 #define	ex_halbtc8821c2ant_antenna_detection(btcoexist, cent_freq, offset, span, seconds)
531 #endif
532 
533 #endif
534 
535 
536