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 18 #if (BT_SUPPORT == 1 && COEX_SUPPORT == 1) 19 20 #if (RTL8821C_SUPPORT == 1) 21 22 /* ******************************************* 23 * The following is for 8821C 1ANT BT Co-exist definition 24 * ******************************************* */ 25 #define BT_8821C_1ANT_COEX_DBG 0 26 #define BT_AUTO_REPORT_ONLY_8821C_1ANT 1 27 28 #define BT_INFO_8821C_1ANT_B_FTP BIT(7) 29 #define BT_INFO_8821C_1ANT_B_A2DP BIT(6) 30 #define BT_INFO_8821C_1ANT_B_HID BIT(5) 31 #define BT_INFO_8821C_1ANT_B_SCO_BUSY BIT(4) 32 #define BT_INFO_8821C_1ANT_B_ACL_BUSY BIT(3) 33 #define BT_INFO_8821C_1ANT_B_INQ_PAGE BIT(2) 34 #define BT_INFO_8821C_1ANT_B_SCO_ESCO BIT(1) 35 #define BT_INFO_8821C_1ANT_B_CONNECTION BIT(0) 36 37 #define BT_INFO_8821C_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \ 38 (((_BT_INFO_EXT_&BIT(0))) ? TRUE : FALSE) 39 40 #define BTC_RSSI_COEX_THRESH_TOL_8821C_1ANT 2 41 42 #define BT_8821C_1ANT_WIFI_NOISY_THRESH 30 /* max: 255 */ 43 #define BT_8821C_1ANT_DEFAULT_ISOLATION 15 /* unit: dB */ 44 45 46 /* for Antenna detection */ 47 #define BT_8821C_1ANT_ANTDET_PSDTHRES_BACKGROUND 50 48 #define BT_8821C_1ANT_ANTDET_PSDTHRES_2ANT_BADISOLATION 70 49 #define BT_8821C_1ANT_ANTDET_PSDTHRES_2ANT_GOODISOLATION 55 50 #define BT_8821C_1ANT_ANTDET_PSDTHRES_1ANT 35 51 #define BT_8821C_1ANT_ANTDET_RETRY_INTERVAL 10 /* retry timer if ant det is fail, unit: second */ 52 #define BT_8821C_1ANT_ANTDET_SWEEPPOINT_DELAY 60000 53 #define BT_8821C_1ANT_ANTDET_ENABLE 0 54 #define BT_8821C_1ANT_ANTDET_BTTXTIME 100 55 #define BT_8821C_1ANT_ANTDET_BTTXCHANNEL 39 56 #define BT_8821C_1ANT_ANTDET_PSD_SWWEEPCOUNT 50 57 58 #define BT_8821C_1ANT_LTECOEX_INDIRECTREG_ACCESS_TIMEOUT 30000 59 60 enum bt_8821c_1ant_signal_state { 61 BT_8821C_1ANT_SIG_STA_SET_TO_LOW = 0x0, 62 BT_8821C_1ANT_SIG_STA_SET_BY_HW = 0x0, 63 BT_8821C_1ANT_SIG_STA_SET_TO_HIGH = 0x1, 64 BT_8821C_1ANT_SIG_STA_MAX 65 }; 66 67 enum bt_8821c_1ant_path_ctrl_owner { 68 BT_8821C_1ANT_PCO_BTSIDE = 0x0, 69 BT_8821C_1ANT_PCO_WLSIDE = 0x1, 70 BT_8821C_1ANT_PCO_MAX 71 }; 72 73 enum bt_8821c_1ant_gnt_ctrl_type { 74 BT_8821C_1ANT_GNT_TYPE_CTRL_BY_PTA = 0x0, 75 BT_8821C_1ANT_GNT_TYPE_CTRL_BY_SW = 0x1, 76 BT_8821C_1ANT_GNT_TYPE_MAX 77 }; 78 79 enum bt_8821c_1ant_gnt_ctrl_block { 80 BT_8821C_1ANT_GNT_BLOCK_RFC_BB = 0x0, 81 BT_8821C_1ANT_GNT_BLOCK_RFC = 0x1, 82 BT_8821C_1ANT_GNT_BLOCK_BB = 0x2, 83 BT_8821C_1ANT_GNT_BLOCK_MAX 84 }; 85 86 enum bt_8821c_1ant_lte_coex_table_type { 87 BT_8821C_1ANT_CTT_WL_VS_LTE = 0x0, 88 BT_8821C_1ANT_CTT_BT_VS_LTE = 0x1, 89 BT_8821C_1ANT_CTT_MAX 90 }; 91 92 enum bt_8821c_1ant_lte_break_table_type { 93 BT_8821C_1ANT_LBTT_WL_BREAK_LTE = 0x0, 94 BT_8821C_1ANT_LBTT_BT_BREAK_LTE = 0x1, 95 BT_8821C_1ANT_LBTT_LTE_BREAK_WL = 0x2, 96 BT_8821C_1ANT_LBTT_LTE_BREAK_BT = 0x3, 97 BT_8821C_1ANT_LBTT_MAX 98 }; 99 100 enum bt_info_src_8821c_1ant { 101 BT_INFO_SRC_8821C_1ANT_WIFI_FW = 0x0, 102 BT_INFO_SRC_8821C_1ANT_BT_RSP = 0x1, 103 BT_INFO_SRC_8821C_1ANT_BT_ACTIVE_SEND = 0x2, 104 BT_INFO_SRC_8821C_1ANT_MAX 105 }; 106 107 enum bt_8821c_1ant_bt_status { 108 BT_8821C_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0, 109 BT_8821C_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1, 110 BT_8821C_1ANT_BT_STATUS_INQ_PAGE = 0x2, 111 BT_8821C_1ANT_BT_STATUS_ACL_BUSY = 0x3, 112 BT_8821C_1ANT_BT_STATUS_SCO_BUSY = 0x4, 113 BT_8821C_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5, 114 BT_8821C_1ANT_BT_STATUS_MAX 115 }; 116 117 enum bt_8821c_1ant_wifi_status { 118 BT_8821C_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0, 119 BT_8821C_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1, 120 BT_8821C_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2, 121 BT_8821C_1ANT_WIFI_STATUS_CONNECTED_SPECIFIC_PKT = 0x3, 122 BT_8821C_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4, 123 BT_8821C_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5, 124 BT_8821C_1ANT_WIFI_STATUS_MAX 125 }; 126 127 enum bt_8821c_1ant_coex_algo { 128 BT_8821C_1ANT_COEX_ALGO_UNDEFINED = 0x0, 129 BT_8821C_1ANT_COEX_ALGO_SCO = 0x1, 130 BT_8821C_1ANT_COEX_ALGO_HID = 0x2, 131 BT_8821C_1ANT_COEX_ALGO_A2DP = 0x3, 132 BT_8821C_1ANT_COEX_ALGO_A2DP_PANHS = 0x4, 133 BT_8821C_1ANT_COEX_ALGO_PANEDR = 0x5, 134 BT_8821C_1ANT_COEX_ALGO_PANHS = 0x6, 135 BT_8821C_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7, 136 BT_8821C_1ANT_COEX_ALGO_PANEDR_HID = 0x8, 137 BT_8821C_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9, 138 BT_8821C_1ANT_COEX_ALGO_HID_A2DP = 0xa, 139 BT_8821C_1ANT_COEX_ALGO_MAX = 0xb, 140 }; 141 142 enum bt_8821c_1ant_ext_ant_switch_type { 143 BT_8821C_1ANT_EXT_ANT_SWITCH_USE_DPDT = 0x0, 144 BT_8821C_1ANT_EXT_ANT_SWITCH_USE_SPDT = 0x1, 145 BT_8821C_1ANT_EXT_ANT_SWITCH_NONE = 0x2, 146 BT_8821C_1ANT_EXT_ANT_SWITCH_MAX 147 }; 148 149 150 enum bt_8821c_1ant_ext_ant_switch_ctrl_type { 151 BT_8821C_1ANT_EXT_ANT_SWITCH_CTRL_BY_BBSW = 0x0, 152 BT_8821C_1ANT_EXT_ANT_SWITCH_CTRL_BY_PTA = 0x1, 153 BT_8821C_1ANT_EXT_ANT_SWITCH_CTRL_BY_ANTDIV = 0x2, 154 BT_8821C_1ANT_EXT_ANT_SWITCH_CTRL_BY_MAC = 0x3, 155 BT_8821C_1ANT_EXT_ANT_SWITCH_CTRL_BY_BT = 0x4, 156 BT_8821C_1ANT_EXT_ANT_SWITCH_CTRL_MAX 157 }; 158 159 enum bt_8821c_1ant_ext_ant_switch_pos_type { 160 BT_8821C_1ANT_EXT_ANT_SWITCH_TO_BT = 0x0, 161 BT_8821C_1ANT_EXT_ANT_SWITCH_TO_WLG = 0x1, 162 BT_8821C_1ANT_EXT_ANT_SWITCH_TO_WLA = 0x2, 163 BT_8821C_1ANT_EXT_ANT_SWITCH_TO_NOCARE = 0x3, 164 BT_8821C_1ANT_EXT_ANT_SWITCH_TO_MAX 165 }; 166 167 enum bt_8821c_1ant_ext_band_switch_pos_type { 168 BT_8821C_1ANT_EXT_BAND_SWITCH_TO_WLG = 0x0, 169 BT_8821C_1ANT_EXT_BAND_SWITCH_TO_WLA = 0x1, 170 BT_8821C_1ANT_EXT_BAND_SWITCH_TO_MAX 171 }; 172 173 enum bt_8821c_1ant_int_block { 174 BT_8821C_1ANT_INT_BLOCK_SWITCH_TO_WLG_OF_BTG = 0x0, 175 BT_8821C_1ANT_INT_BLOCK_SWITCH_TO_WLG_OF_WLAG = 0x1, 176 BT_8821C_1ANT_INT_BLOCK_SWITCH_TO_WLA_OF_WLAG = 0x2, 177 BT_8821C_1ANT_INT_BLOCK_SWITCH_TO_MAX 178 }; 179 180 enum bt_8821c_1ant_phase { 181 BT_8821C_1ANT_PHASE_COEX_INIT = 0x0, 182 BT_8821C_1ANT_PHASE_WLANONLY_INIT = 0x1, 183 BT_8821C_1ANT_PHASE_WLAN_OFF = 0x2, 184 BT_8821C_1ANT_PHASE_2G_RUNTIME = 0x3, 185 BT_8821C_1ANT_PHASE_5G_RUNTIME = 0x4, 186 BT_8821C_1ANT_PHASE_BTMPMODE = 0x5, 187 BT_8821C_1ANT_PHASE_ANTENNA_DET = 0x6, 188 BT_8821C_1ANT_PHASE_COEX_POWERON = 0x7, 189 BT_8821C_1ANT_PHASE_MAX 190 }; 191 192 enum bt_8821c_1ant_Scoreboard { 193 BT_8821C_1ANT_SCOREBOARD_ACTIVE = BIT(0), 194 BT_8821C_1ANT_SCOREBOARD_ONOFF = BIT(1), 195 BT_8821C_1ANT_SCOREBOARD_SCAN = BIT(2), 196 BT_8821C_1ANT_SCOREBOARD_UNDERTEST = BIT(3), 197 BT_8821C_1ANT_SCOREBOARD_WLBUSY = BIT(6) 198 }; 199 200 struct coex_dm_8821c_1ant { 201 /* hw setting */ 202 u32 pre_ant_pos_type; 203 u32 cur_ant_pos_type; 204 /* fw mechanism */ 205 boolean cur_ignore_wlan_act; 206 boolean pre_ignore_wlan_act; 207 u8 pre_ps_tdma; 208 u8 cur_ps_tdma; 209 u8 ps_tdma_para[5]; 210 u8 ps_tdma_du_adj_type; 211 boolean pre_ps_tdma_on; 212 boolean cur_ps_tdma_on; 213 boolean pre_bt_auto_report; 214 boolean cur_bt_auto_report; 215 u8 pre_lps; 216 u8 cur_lps; 217 u8 pre_rpwm; 218 u8 cur_rpwm; 219 220 /* sw mechanism */ 221 boolean pre_low_penalty_ra; 222 boolean cur_low_penalty_ra; 223 u32 pre_val0x6c0; 224 u32 cur_val0x6c0; 225 u32 pre_val0x6c4; 226 u32 cur_val0x6c4; 227 u32 pre_val0x6c8; 228 u32 cur_val0x6c8; 229 u8 pre_val0x6cc; 230 u8 cur_val0x6cc; 231 boolean limited_dig; 232 233 u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */ 234 u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */ 235 u16 backup_retry_limit; 236 u8 backup_ampdu_max_time; 237 238 /* algorithm related */ 239 u8 pre_algorithm; 240 u8 cur_algorithm; 241 u8 bt_status; 242 u8 wifi_chnl_info[3]; 243 244 u32 pre_ra_mask; 245 u32 cur_ra_mask; 246 u8 pre_arfr_type; 247 u8 cur_arfr_type; 248 u8 pre_retry_limit_type; 249 u8 cur_retry_limit_type; 250 u8 pre_ampdu_time_type; 251 u8 cur_ampdu_time_type; 252 u32 arp_cnt; 253 254 u32 pre_ext_ant_switch_status; 255 u32 cur_ext_ant_switch_status; 256 257 u8 pre_ext_band_switch_status; 258 u8 cur_ext_band_switch_status; 259 260 u8 pre_int_block_status; 261 u8 cur_int_block_status; 262 263 u8 error_condition; 264 }; 265 266 struct coex_sta_8821c_1ant { 267 boolean bt_disabled; 268 boolean bt_link_exist; 269 boolean sco_exist; 270 boolean a2dp_exist; 271 boolean hid_exist; 272 boolean pan_exist; 273 u8 num_of_profile; 274 275 boolean under_lps; 276 boolean under_ips; 277 u32 specific_pkt_period_cnt; 278 u32 high_priority_tx; 279 u32 high_priority_rx; 280 u32 low_priority_tx; 281 u32 low_priority_rx; 282 boolean is_hiPri_rx_overhead; 283 s8 bt_rssi; 284 u8 pre_bt_rssi_state; 285 u8 pre_wifi_rssi_state[4]; 286 u8 bt_info_c2h[BT_INFO_SRC_8821C_1ANT_MAX][10]; 287 u32 bt_info_c2h_cnt[BT_INFO_SRC_8821C_1ANT_MAX]; 288 boolean bt_whck_test; 289 boolean c2h_bt_inquiry_page; 290 boolean c2h_bt_remote_name_req; 291 boolean c2h_bt_page; /* Add for win8.1 page out issue */ 292 boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */ 293 294 u8 bt_info_ext; 295 u8 bt_info_ext2; 296 u32 pop_event_cnt; 297 u8 scan_ap_num; 298 u8 bt_retry_cnt; 299 300 u32 crc_ok_cck; 301 u32 crc_ok_11g; 302 u32 crc_ok_11n; 303 u32 crc_ok_11n_vht; 304 305 u32 crc_err_cck; 306 u32 crc_err_11g; 307 u32 crc_err_11n; 308 u32 crc_err_11n_vht; 309 310 boolean cck_lock; 311 boolean cck_lock_ever; 312 boolean cck_lock_warn; 313 314 u8 coex_table_type; 315 boolean force_lps_ctrl; 316 boolean concurrent_rx_mode_on; 317 u16 score_board; 318 u8 isolation_btween_wb; /* 0~ 50 */ 319 320 u8 a2dp_bit_pool; 321 u8 cut_version; 322 boolean acl_busy; 323 boolean bt_create_connection; 324 325 u32 bt_coex_supported_feature; 326 u32 bt_coex_supported_version; 327 328 u8 bt_ble_scan_type; 329 u32 bt_ble_scan_para[3]; 330 331 boolean run_time_state; 332 boolean freeze_coexrun_by_btinfo; 333 334 boolean is_A2DP_3M; 335 boolean voice_over_HOGP; 336 u8 bt_info; 337 boolean is_autoslot; 338 u8 forbidden_slot; 339 u8 hid_busy_num; 340 u8 hid_pair_cnt; 341 342 u32 cnt_RemoteNameReq; 343 u32 cnt_setupLink; 344 u32 cnt_ReInit; 345 u32 cnt_IgnWlanAct; 346 u32 cnt_Page; 347 u32 cnt_RoleSwitch; 348 349 u16 bt_reg_vendor_ac; 350 u16 bt_reg_vendor_ae; 351 352 boolean is_setupLink; 353 u8 wl_noisy_level; 354 u32 gnt_error_cnt; 355 356 u8 bt_afh_map[10]; 357 u8 bt_relink_downcount; 358 boolean is_tdma_btautoslot; 359 boolean is_tdma_btautoslot_hang; 360 361 u8 switch_band_notify_to; 362 boolean is_rf_state_off; 363 364 boolean is_hid_low_pri_tx_overhead; 365 boolean is_bt_multi_link; 366 boolean is_bt_a2dp_sink; 367 boolean is_set_ps_state_fail; 368 u8 cnt_set_ps_state_fail; 369 370 u8 wl_fw_dbg_info[10]; 371 u8 wl_rx_rate; 372 u8 wl_rts_rx_rate; 373 u8 wl_center_channel; 374 375 u16 score_board_WB; 376 }; 377 378 379 #define BT_8821C_1ANT_EXT_BAND_SWITCH_USE_DPDT 0 380 #define BT_8821C_1ANT_EXT_BAND_SWITCH_USE_SPDT 1 381 382 383 struct rfe_type_8821c_1ant { 384 385 u8 rfe_module_type; 386 boolean ext_ant_switch_exist; 387 u8 ext_ant_switch_type; /* 0:DPDT, 1:SPDT */ 388 u8 ext_ant_switch_ctrl_polarity; /* iF 0: DPDT_P=0, DPDT_N=1 => BTG to Main, WL_A+G to Aux */ 389 390 boolean ext_band_switch_exist; 391 u8 ext_band_switch_type; /* 0:DPDT, 1:SPDT */ 392 u8 ext_band_switch_ctrl_polarity; 393 394 boolean ant_at_main_port; 395 396 boolean wlg_Locate_at_btg; /* If TRUE: WLG at BTG, If FALSE: WLG at WLAG */ 397 398 boolean ext_ant_switch_diversity; /* If diversity on */ 399 }; 400 401 #define BT_8821C_1ANT_ANTDET_PSD_POINTS 256 /* MAX:1024 */ 402 #define BT_8821C_1ANT_ANTDET_PSD_AVGNUM 1 /* MAX:3 */ 403 #define BT_8821C_1ANT_ANTDET_BUF_LEN 16 404 405 struct psdscan_sta_8821c_1ant { 406 407 u32 ant_det_bt_le_channel; /* BT LE Channel ex:2412 */ 408 u32 ant_det_bt_tx_time; 409 u32 ant_det_pre_psdscan_peak_val; 410 boolean ant_det_is_ant_det_available; 411 u32 ant_det_psd_scan_peak_val; 412 boolean ant_det_is_btreply_available; 413 u32 ant_det_psd_scan_peak_freq; 414 415 u8 ant_det_result; 416 u8 ant_det_peak_val[BT_8821C_1ANT_ANTDET_BUF_LEN]; 417 u8 ant_det_peak_freq[BT_8821C_1ANT_ANTDET_BUF_LEN]; 418 u32 ant_det_try_count; 419 u32 ant_det_fail_count; 420 u32 ant_det_inteval_count; 421 u32 ant_det_thres_offset; 422 423 u32 real_cent_freq; 424 s32 real_offset; 425 u32 real_span; 426 427 u32 psd_band_width; /* unit: Hz */ 428 u32 psd_point; /* 128/256/512/1024 */ 429 u32 psd_report[1024]; /* unit:dB (20logx), 0~255 */ 430 u32 psd_report_max_hold[1024]; /* unit:dB (20logx), 0~255 */ 431 u32 psd_start_point; 432 u32 psd_stop_point; 433 u32 psd_max_value_point; 434 u32 psd_max_value; 435 u32 psd_max_value2; 436 u32 psd_avg_value; /* filter loop_max_value that below BT_8821C_1ANT_ANTDET_PSDTHRES_1ANT, and average the rest*/ 437 u32 psd_loop_max_value[BT_8821C_1ANT_ANTDET_PSD_SWWEEPCOUNT]; /*max value in each loop */ 438 u32 psd_start_base; 439 u32 psd_avg_num; /* 1/8/16/32 */ 440 u32 psd_gen_count; 441 boolean is_AntDet_running; 442 boolean is_psd_show_max_only; 443 }; 444 445 /* ******************************************* 446 * The following is interface which will notify coex module. 447 * ******************************************* */ 448 void ex_halbtc8821c1ant_power_on_setting(IN struct btc_coexist *btcoexist); 449 void ex_halbtc8821c1ant_pre_load_firmware(IN struct btc_coexist *btcoexist); 450 void ex_halbtc8821c1ant_init_hw_config(IN struct btc_coexist *btcoexist, 451 IN boolean wifi_only); 452 void ex_halbtc8821c1ant_init_coex_dm(IN struct btc_coexist *btcoexist); 453 void ex_halbtc8821c1ant_ips_notify(IN struct btc_coexist *btcoexist, 454 IN u8 type); 455 void ex_halbtc8821c1ant_lps_notify(IN struct btc_coexist *btcoexist, 456 IN u8 type); 457 void ex_halbtc8821c1ant_scan_notify(IN struct btc_coexist *btcoexist, 458 IN u8 type); 459 void ex_halbtc8821c1ant_switchband_notify(IN struct btc_coexist *btcoexist, 460 IN u8 type); 461 void ex_halbtc8821c1ant_connect_notify(IN struct btc_coexist *btcoexist, 462 IN u8 type); 463 void ex_halbtc8821c1ant_media_status_notify(IN struct btc_coexist *btcoexist, 464 IN u8 type); 465 void ex_halbtc8821c1ant_specific_packet_notify(IN struct btc_coexist *btcoexist, 466 IN u8 type); 467 void ex_halbtc8821c1ant_bt_info_notify(IN struct btc_coexist *btcoexist, 468 IN u8 *tmp_buf, IN u8 length); 469 void ex_halbtc8821c1ant_wl_fwdbginfo_notify(IN struct btc_coexist *btcoexist, 470 IN u8 *tmp_buf, IN u8 length); 471 void ex_halbtc8821c1ant_rx_rate_change_notify(IN struct btc_coexist *btcoexist, 472 IN BOOLEAN is_data_frame, IN u8 btc_rate_id); 473 void ex_halbtc8821c1ant_rf_status_notify(IN struct btc_coexist *btcoexist, 474 IN u8 type); 475 void ex_halbtc8821c1ant_halt_notify(IN struct btc_coexist *btcoexist); 476 void ex_halbtc8821c1ant_pnp_notify(IN struct btc_coexist *btcoexist, 477 IN u8 pnp_state); 478 void ex_halbtc8821c1ant_coex_dm_reset(IN struct btc_coexist *btcoexist); 479 void ex_halbtc8821c1ant_periodical(IN struct btc_coexist *btcoexist); 480 void ex_halbtc8821c1ant_display_simple_coex_info(IN struct btc_coexist *btcoexist); 481 void ex_halbtc8821c1ant_display_coex_info(IN struct btc_coexist *btcoexist); 482 void ex_halbtc8821c1ant_antenna_detection(IN struct btc_coexist *btcoexist, 483 IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds); 484 void ex_halbtc8821c1ant_antenna_isolation(IN struct btc_coexist *btcoexist, 485 IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds); 486 487 void ex_halbtc8821c1ant_psd_scan(IN struct btc_coexist *btcoexist, 488 IN u32 cent_freq, IN u32 offset, IN u32 span, IN u32 seconds); 489 void ex_halbtc8821c1ant_display_ant_detection(IN struct btc_coexist *btcoexist); 490 491 #else 492 #define ex_halbtc8821c1ant_power_on_setting(btcoexist) 493 #define ex_halbtc8821c1ant_pre_load_firmware(btcoexist) 494 #define ex_halbtc8821c1ant_init_hw_config(btcoexist, wifi_only) 495 #define ex_halbtc8821c1ant_init_coex_dm(btcoexist) 496 #define ex_halbtc8821c1ant_ips_notify(btcoexist, type) 497 #define ex_halbtc8821c1ant_lps_notify(btcoexist, type) 498 #define ex_halbtc8821c1ant_scan_notify(btcoexist, type) 499 #define ex_halbtc8821c1ant_switchband_notify(btcoexist, type) 500 #define ex_halbtc8821c1ant_connect_notify(btcoexist, type) 501 #define ex_halbtc8821c1ant_media_status_notify(btcoexist, type) 502 #define ex_halbtc8821c1ant_specific_packet_notify(btcoexist, type) 503 #define ex_halbtc8821c1ant_bt_info_notify(btcoexist, tmp_buf, length) 504 #define ex_halbtc8821c1ant_wl_fwdbginfo_notify(btcoexist, tmp_buf, length) 505 #define ex_halbtc8821c1ant_rx_rate_change_notify(btcoexist, is_data_frame, btc_rate_id) 506 #define ex_halbtc8821c1ant_rf_status_notify(btcoexist, type) 507 #define ex_halbtc8821c1ant_halt_notify(btcoexist) 508 #define ex_halbtc8821c1ant_pnp_notify(btcoexist, pnp_state) 509 #define ex_halbtc8821c1ant_coex_dm_reset(btcoexist) 510 #define ex_halbtc8821c1ant_periodical(btcoexist) 511 #define ex_halbtc8821c1ant_display_simple_coex_info(btcoexist) 512 #define ex_halbtc8821c1ant_display_coex_info(btcoexist) 513 #define ex_halbtc8821c1ant_antenna_detection(btcoexist, cent_freq, offset, span, seconds) 514 #define ex_halbtc8821c1ant_antenna_isolation(btcoexist, cent_freq, offset, span, seconds) 515 #define ex_halbtc8821c1ant_psd_scan(btcoexist, cent_freq, offset, span, seconds) 516 #define ex_halbtc8821c1ant_display_ant_detection(btcoexist) 517 #endif 518 519 #endif 520 521 522