1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2009-2012 Realtek Corporation.*/
4 #ifndef __HALBTC_OUT_SRC_H__
5 #define __HALBTC_OUT_SRC_H__
9 #define NORMAL_EXEC false
10 #define FORCE_EXEC true
12 #define BTC_RF_OFF 0x0
15 #define BTC_RF_A RF90_PATH_A
16 #define BTC_RF_B RF90_PATH_B
17 #define BTC_RF_C RF90_PATH_C
18 #define BTC_RF_D RF90_PATH_D
20 #define BTC_SMSP SINGLEMAC_SINGLEPHY
21 #define BTC_DMDP DUALMAC_DUALPHY
22 #define BTC_DMSP DUALMAC_SINGLEPHY
23 #define BTC_MP_UNKNOWN 0xff
28 #define BT_TMP_BUF_SIZE 100
30 #define BT_COEX_ANT_TYPE_PG 0
31 #define BT_COEX_ANT_TYPE_ANTDIV 1
32 #define BT_COEX_ANT_TYPE_DETECTED 2
34 #define BTC_MIMO_PS_STATIC 0
35 #define BTC_MIMO_PS_DYNAMIC 1
37 #define BTC_RATE_DISABLE 0
38 #define BTC_RATE_ENABLE 1
40 /* single Antenna definition */
41 #define BTC_ANT_PATH_WIFI 0
42 #define BTC_ANT_PATH_BT 1
43 #define BTC_ANT_PATH_PTA 2
44 #define BTC_ANT_PATH_WIFI5G 3
45 #define BTC_ANT_PATH_AUTO 4
46 /* dual Antenna definition */
47 #define BTC_ANT_WIFI_AT_MAIN 0
48 #define BTC_ANT_WIFI_AT_AUX 1
49 /* coupler Antenna definition */
50 #define BTC_ANT_WIFI_AT_CPL_MAIN 0
51 #define BTC_ANT_WIFI_AT_CPL_AUX 1
53 enum btc_bt_reg_type
{
56 BTC_BT_REG_BLUEWIZE
= 2,
57 BTC_BT_REG_VENDOR
= 3,
62 enum btc_chip_interface
{
75 BTC_CHIP_RTL8723A
= 3,
77 BTC_CHIP_RTL8723B
= 5,
82 BTC_MSG_INTERFACE
= 0x0,
83 BTC_MSG_ALGORITHM
= 0x1,
87 /* following is for BTC_MSG_INTERFACE */
88 #define INTF_INIT BIT0
89 #define INTF_NOTIFY BIT2
91 /* following is for BTC_ALGORITHM */
92 #define ALGO_BT_RSSI_STATE BIT0
93 #define ALGO_WIFI_RSSI_STATE BIT1
94 #define ALGO_BT_MONITOR BIT2
95 #define ALGO_TRACE BIT3
96 #define ALGO_TRACE_FW BIT4
97 #define ALGO_TRACE_FW_DETAIL BIT5
98 #define ALGO_TRACE_FW_EXEC BIT6
99 #define ALGO_TRACE_SW BIT7
100 #define ALGO_TRACE_SW_DETAIL BIT8
101 #define ALGO_TRACE_SW_EXEC BIT9
103 /* following is for wifi link status */
104 #define WIFI_STA_CONNECTED BIT0
105 #define WIFI_AP_CONNECTED BIT1
106 #define WIFI_HS_CONNECTED BIT2
107 #define WIFI_P2P_GO_CONNECTED BIT3
108 #define WIFI_P2P_GC_CONNECTED BIT4
110 #define BTC_RSSI_HIGH(_rssi_) \
111 ((_rssi_ == BTC_RSSI_STATE_HIGH || \
112 _rssi_ == BTC_RSSI_STATE_STAY_HIGH) ? true : false)
113 #define BTC_RSSI_MEDIUM(_rssi_) \
114 ((_rssi_ == BTC_RSSI_STATE_MEDIUM || \
115 _rssi_ == BTC_RSSI_STATE_STAY_MEDIUM) ? true : false)
116 #define BTC_RSSI_LOW(_rssi_) \
117 ((_rssi_ == BTC_RSSI_STATE_LOW || \
118 _rssi_ == BTC_RSSI_STATE_STAY_LOW) ? true : false)
120 enum btc_power_save_type
{
121 BTC_PS_WIFI_NATIVE
= 0,
127 struct btc_board_info
{
128 /* The following is some board information */
130 u8 pg_ant_num
; /* pg ant number */
131 u8 btdm_ant_num
; /* ant number for btdm */
133 u8 single_ant_path
; /* current used for 8723b only, 1=>s0, 0=>s1 */
141 enum btc_dbg_opcode
{
142 BTC_DBG_SET_COEX_NORMAL
= 0x0,
143 BTC_DBG_SET_COEX_WIFI_ONLY
= 0x1,
144 BTC_DBG_SET_COEX_BT_ONLY
= 0x2,
148 enum btc_rssi_state
{
149 BTC_RSSI_STATE_HIGH
= 0x0,
150 BTC_RSSI_STATE_MEDIUM
= 0x1,
151 BTC_RSSI_STATE_LOW
= 0x2,
152 BTC_RSSI_STATE_STAY_HIGH
= 0x3,
153 BTC_RSSI_STATE_STAY_MEDIUM
= 0x4,
154 BTC_RSSI_STATE_STAY_LOW
= 0x5,
159 BTC_ROLE_STATION
= 0x0,
162 BTC_ROLE_HS_MODE
= 0x3,
166 enum btc_wireless_freq
{
172 enum btc_wifi_bw_mode
{
173 BTC_WIFI_BW_LEGACY
= 0x0,
174 BTC_WIFI_BW_HT20
= 0x1,
175 BTC_WIFI_BW_HT40
= 0x2,
176 BTC_WIFI_BW_HT80
= 0x3,
180 enum btc_wifi_traffic_dir
{
181 BTC_WIFI_TRAFFIC_TX
= 0x0,
182 BTC_WIFI_TRAFFIC_RX
= 0x1,
187 BTC_WIFI_PNP_WAKE_UP
= 0x0,
188 BTC_WIFI_PNP_SLEEP
= 0x1,
189 BTC_WIFI_PNP_SLEEP_KEEP_ANT
= 0x2,
194 BTC_IOT_PEER_UNKNOWN
= 0,
195 BTC_IOT_PEER_REALTEK
= 1,
196 BTC_IOT_PEER_REALTEK_92SE
= 2,
197 BTC_IOT_PEER_BROADCOM
= 3,
198 BTC_IOT_PEER_RALINK
= 4,
199 BTC_IOT_PEER_ATHEROS
= 5,
200 BTC_IOT_PEER_CISCO
= 6,
201 BTC_IOT_PEER_MERU
= 7,
202 BTC_IOT_PEER_MARVELL
= 8,
203 BTC_IOT_PEER_REALTEK_SOFTAP
= 9,
204 BTC_IOT_PEER_SELF_SOFTAP
= 10, /* Self is SoftAP */
205 BTC_IOT_PEER_AIRGO
= 11,
206 BTC_IOT_PEER_REALTEK_JAGUAR_BCUTAP
= 12,
207 BTC_IOT_PEER_REALTEK_JAGUAR_CCUTAP
= 13,
211 /* for 8723b-d cut large current issue */
212 enum bt_wifi_coex_state
{
215 BTC_WIFI_STAT_NORMAL_OFF
,
216 BTC_WIFI_STAT_MP_OFF
,
217 BTC_WIFI_STAT_NORMAL
,
218 BTC_WIFI_STAT_ANT_DIV
,
233 BTC_GET_BL_HS_OPERATION
,
234 BTC_GET_BL_HS_CONNECTING
,
235 BTC_GET_BL_WIFI_CONNECTED
,
236 BTC_GET_BL_WIFI_DUAL_BAND_CONNECTED
,
237 BTC_GET_BL_WIFI_BUSY
,
238 BTC_GET_BL_WIFI_SCAN
,
239 BTC_GET_BL_WIFI_LINK
,
240 BTC_GET_BL_WIFI_DHCP
,
241 BTC_GET_BL_WIFI_SOFTAP_IDLE
,
242 BTC_GET_BL_WIFI_SOFTAP_LINKING
,
243 BTC_GET_BL_WIFI_IN_EARLY_SUSPEND
,
244 BTC_GET_BL_WIFI_ROAM
,
245 BTC_GET_BL_WIFI_4_WAY_PROGRESS
,
246 BTC_GET_BL_WIFI_UNDER_5G
,
247 BTC_GET_BL_WIFI_AP_MODE_ENABLE
,
248 BTC_GET_BL_WIFI_ENABLE_ENCRYPTION
,
249 BTC_GET_BL_WIFI_UNDER_B_MODE
,
250 BTC_GET_BL_EXT_SWITCH
,
251 BTC_GET_BL_WIFI_IS_IN_MP_MODE
,
252 BTC_GET_BL_IS_ASUS_8723B
,
254 BTC_GET_BL_RF4CE_CONNECTED
,
257 BTC_GET_S4_WIFI_RSSI
,
262 BTC_GET_U4_WIFI_TRAFFIC_DIRECTION
,
263 BTC_GET_U4_WIFI_FW_VER
,
264 BTC_GET_U4_WIFI_LINK_STATUS
,
265 BTC_GET_U4_BT_PATCH_VER
,
267 BTC_GET_U4_SUPPORTED_VERSION
,
268 BTC_GET_U4_SUPPORTED_FEATURE
,
269 BTC_GET_U4_BT_DEVICE_INFO
,
270 BTC_GET_U4_BT_FORBIDDEN_SLOT_VAL
,
271 BTC_GET_U4_WIFI_IQK_TOTAL
,
272 BTC_GET_U4_WIFI_IQK_OK
,
273 BTC_GET_U4_WIFI_IQK_FAIL
,
276 BTC_GET_U1_WIFI_DOT11_CHNL
,
277 BTC_GET_U1_WIFI_CENTRAL_CHNL
,
278 BTC_GET_U1_WIFI_HS_CHNL
,
279 BTC_GET_U1_MAC_PHY_MODE
,
286 BTC_GET_BL_BT_SCO_BUSY
,
289 BTC_GET_DRIVER_TEST_CFG
,
301 BTC_SET_BL_BT_DISABLE
,
302 BTC_SET_BL_BT_TRAFFIC_BUSY
,
303 BTC_SET_BL_BT_LIMITED_DIG
,
304 BTC_SET_BL_FORCE_TO_ROAM
,
305 BTC_SET_BL_TO_REJ_AP_AGG_PKT
,
306 BTC_SET_BL_BT_CTRL_AGG_SIZE
,
307 BTC_SET_BL_INC_SCAN_DEV_NUM
,
308 BTC_SET_BL_BT_TX_RX_MASK
,
309 BTC_SET_BL_MIRACAST_PLUS_BT
,
312 BTC_SET_U1_RSSI_ADJ_VAL_FOR_AGC_TABLE_ON
,
313 BTC_SET_UI_SCAN_SIG_COMPENSATION
,
314 BTC_SET_U1_AGG_BUF_SIZE
,
316 /* type trigger some action */
317 BTC_SET_ACT_GET_BT_RSSI
,
318 BTC_SET_ACT_AGGREGATE_CTRL
,
319 BTC_SET_ACT_ANTPOSREGRISTRY_CTRL
,
320 BTC_SET_MIMO_PS_MODE
,
322 /********* for 1Ant **********/
324 BTC_SET_BL_BT_SCO_BUSY
,
326 BTC_SET_U1_RSSI_ADJ_VAL_FOR_1ANT_COEX_TYPE
,
330 BTC_SET_U1_1ANT_RPWM
,
331 /* type trigger some action */
332 BTC_SET_ACT_LEAVE_LPS
,
333 BTC_SET_ACT_ENTER_LPS
,
334 BTC_SET_ACT_NORMAL_LPS
,
335 BTC_SET_ACT_PRE_NORMAL_LPS
,
336 BTC_SET_ACT_POST_NORMAL_LPS
,
337 BTC_SET_ACT_INC_FORCE_EXEC_PWR_CMD_CNT
,
338 BTC_SET_ACT_DISABLE_LOW_POWER
,
339 BTC_SET_BL_BT_LNA_CONSTRAIN_LEVEL
,
340 BTC_SET_ACT_UPDATE_RAMASK
,
341 BTC_SET_ACT_SEND_MIMO_PS
,
342 /* BT Coex related */
343 BTC_SET_ACT_CTRL_BT_INFO
,
344 BTC_SET_ACT_CTRL_BT_COEX
,
345 BTC_SET_ACT_CTRL_8723B_ANT
,
346 /***************************/
350 enum btc_dbg_disp_type
{
351 BTC_DBG_DISP_COEX_STATISTICS
= 0x0,
352 BTC_DBG_DISP_BT_LINK_INFO
= 0x1,
353 BTC_DBG_DISP_BT_FW_VER
= 0x2,
354 BTC_DBG_DISP_FW_PWR_MODE_CMD
= 0x3,
355 BTC_DBG_DISP_WIFI_STATUS
= 0x04,
359 enum btc_notify_type_ips
{
365 enum btc_notify_type_lps
{
366 BTC_LPS_DISABLE
= 0x0,
367 BTC_LPS_ENABLE
= 0x1,
371 enum btc_notify_type_scan
{
372 BTC_SCAN_FINISH
= 0x0,
373 BTC_SCAN_START
= 0x1,
374 BTC_SCAN_START_2G
= 0x2,
378 enum btc_notify_type_switchband
{
379 BTC_NOT_SWITCH
= 0x0,
380 BTC_SWITCH_TO_24G
= 0x1,
381 BTC_SWITCH_TO_5G
= 0x2,
382 BTC_SWITCH_TO_24G_NOFORSCAN
= 0x3,
386 enum btc_notify_type_associate
{
387 BTC_ASSOCIATE_FINISH
= 0x0,
388 BTC_ASSOCIATE_START
= 0x1,
389 BTC_ASSOCIATE_5G_FINISH
= 0x2,
390 BTC_ASSOCIATE_5G_START
= 0x3,
394 enum btc_notify_type_media_status
{
395 BTC_MEDIA_DISCONNECT
= 0x0,
396 BTC_MEDIA_CONNECT
= 0x1,
400 enum btc_notify_type_special_packet
{
401 BTC_PACKET_UNKNOWN
= 0x0,
402 BTC_PACKET_DHCP
= 0x1,
403 BTC_PACKET_ARP
= 0x2,
404 BTC_PACKET_EAPOL
= 0x3,
408 enum hci_ext_bt_operation
{
409 HCI_BT_OP_NONE
= 0x0,
410 HCI_BT_OP_INQUIRY_START
= 0x1,
411 HCI_BT_OP_INQUIRY_FINISH
= 0x2,
412 HCI_BT_OP_PAGING_START
= 0x3,
413 HCI_BT_OP_PAGING_SUCCESS
= 0x4,
414 HCI_BT_OP_PAGING_UNSUCCESS
= 0x5,
415 HCI_BT_OP_PAIRING_START
= 0x6,
416 HCI_BT_OP_PAIRING_FINISH
= 0x7,
417 HCI_BT_OP_BT_DEV_ENABLE
= 0x8,
418 HCI_BT_OP_BT_DEV_DISABLE
= 0x9,
422 enum btc_notify_type_stack_operation
{
423 BTC_STACK_OP_NONE
= 0x0,
424 BTC_STACK_OP_INQ_PAGE_PAIR_START
= 0x1,
425 BTC_STACK_OP_INQ_PAGE_PAIR_FINISH
= 0x2,
525 BTC_MULTIPORT_MCC_2CHANNEL
,
526 BTC_MULTIPORT_MCC_2BAND
,
532 u8 rssi_adjust_for_agc_table_on
;
533 u8 rssi_adjust_for_1ant_coex_type
;
534 bool pre_bt_ctrl_agg_buf_size
;
539 bool pre_reject_agg_pkt
;
541 bool bt_ctrl_buf_size
;
542 bool increase_scan_dev_num
;
543 bool miracast_plus_bt
;
544 bool bt_ctrl_agg_buf_size
;
551 bool bt_disable_low_pwr
;
553 /* the following is for 1Ant solution */
555 bool bt_pwr_save_mode
;
558 u8 force_exec_pwr_cmd_cnt
;
566 u32 bt_supported_feature
;
567 u32 bt_supported_version
;
569 u32 bt_forb_slot_val
;
572 u32 bt_ble_scan_para
;
575 struct btc_stack_info
{
576 bool profile_notified
;
577 u16 hci_version
; /* stack hci version */
586 bool unknown_acl_exist
;
590 struct btc_statistics
{
592 u32 cnt_init_hw_config
;
593 u32 cnt_init_coex_dm
;
597 u32 cnt_connect_notify
;
598 u32 cnt_media_status_notify
;
599 u32 cnt_special_packet_notify
;
600 u32 cnt_bt_info_notify
;
602 u32 cnt_coex_dm_switch
;
603 u32 cnt_stack_operation_notify
;
605 u32 cnt_pre_load_firmware
;
609 struct btc_bt_link_info
{
611 bool bt_hi_pri_link_exist
;
624 enum btc_antenna_pos
{
625 BTC_ANTENNA_AT_MAIN_PORT
= 0x1,
626 BTC_ANTENNA_AT_AUX_PORT
= 0x2,
629 enum btc_mp_h2c_op_code
{
630 BT_OP_GET_BT_VERSION
= 0,
631 BT_OP_WRITE_REG_ADDR
= 12,
632 BT_OP_WRITE_REG_VALUE
= 13,
634 BT_OP_GET_AFH_MAP_L
= 30,
635 BT_OP_GET_AFH_MAP_M
= 31,
636 BT_OP_GET_AFH_MAP_H
= 32,
637 BT_OP_GET_BT_COEX_SUPPORTED_FEATURE
= 42,
638 BT_OP_GET_BT_COEX_SUPPORTED_VERSION
= 43,
639 BT_OP_GET_BT_ANT_DET_VAL
= 44,
640 BT_OP_GET_BT_BLE_SCAN_PARA
= 45,
641 BT_OP_GET_BT_BLE_SCAN_TYPE
= 46,
642 BT_OP_GET_BT_DEVICE_INFO
= 48,
643 BT_OP_GET_BT_FORBIDDEN_SLOT_VAL
= 49,
647 enum btc_mp_h2c_req_num
{
649 BT_SEQ_DONT_CARE
= 0,
650 BT_SEQ_GET_BT_VERSION
= 0xE,
651 BT_SEQ_GET_AFH_MAP_L
= 0x5,
652 BT_SEQ_GET_AFH_MAP_M
= 0x6,
653 BT_SEQ_GET_AFH_MAP_H
= 0x9,
654 BT_SEQ_GET_BT_COEX_SUPPORTED_FEATURE
= 0x7,
655 BT_SEQ_GET_BT_COEX_SUPPORTED_VERSION
= 0x8,
656 BT_SEQ_GET_BT_ANT_DET_VAL
= 0x2,
657 BT_SEQ_GET_BT_BLE_SCAN_PARA
= 0x3,
658 BT_SEQ_GET_BT_BLE_SCAN_TYPE
= 0x4,
659 BT_SEQ_GET_BT_DEVICE_INFO
= 0xA,
660 BT_SEQ_GET_BT_FORB_SLOT_VAL
= 0xB,
664 /* make sure only one adapter can bind the data context */
666 /* default adapter */
668 struct btc_board_info board_info
;
669 /* some bt info referenced by non-bt module */
670 struct btc_bt_info bt_info
;
671 struct btc_stack_info stack_info
;
672 enum btc_chip_interface chip_interface
;
673 struct btc_bt_link_info bt_link_info
;
675 /* boolean variables to replace BT_AUTO_REPORT_ONLY_XXXXY_ZANT
676 * configuration parameters
678 bool auto_report_1ant
;
679 bool auto_report_2ant
;
685 struct btc_statistics statistics
;
688 struct completion bt_mp_comp
;
690 /* function pointers - io related */
691 u8 (*btc_read_1byte
)(void *btc_context
, u32 reg_addr
);
692 void (*btc_write_1byte
)(void *btc_context
, u32 reg_addr
, u32 data
);
693 void (*btc_write_1byte_bitmask
)(void *btc_context
, u32 reg_addr
,
694 u32 bit_mask
, u8 data1b
);
695 u16 (*btc_read_2byte
)(void *btc_context
, u32 reg_addr
);
696 void (*btc_write_2byte
)(void *btc_context
, u32 reg_addr
, u16 data
);
697 u32 (*btc_read_4byte
)(void *btc_context
, u32 reg_addr
);
698 void (*btc_write_4byte
)(void *btc_context
, u32 reg_addr
, u32 data
);
700 void (*btc_write_local_reg_1byte
)(void *btc_context
, u32 reg_addr
,
702 void (*btc_set_bb_reg
)(void *btc_context
, u32 reg_addr
,
703 u32 bit_mask
, u32 data
);
704 u32 (*btc_get_bb_reg
)(void *btc_context
, u32 reg_addr
,
706 void (*btc_set_rf_reg
)(void *btc_context
, u8 rf_path
, u32 reg_addr
,
707 u32 bit_mask
, u32 data
);
708 u32 (*btc_get_rf_reg
)(void *btc_context
, u8 rf_path
,
709 u32 reg_addr
, u32 bit_mask
);
711 void (*btc_fill_h2c
)(void *btc_context
, u8 element_id
,
712 u32 cmd_len
, u8
*cmd_buffer
);
714 void (*btc_disp_dbg_msg
)(void *btcoexist
, u8 disp_type
,
717 bool (*btc_get
)(void *btcoexist
, u8 get_type
, void *out_buf
);
718 bool (*btc_set
)(void *btcoexist
, u8 set_type
, void *in_buf
);
720 void (*btc_set_bt_reg
)(void *btc_context
, u8 reg_type
, u32 offset
,
722 u32 (*btc_get_bt_reg
)(void *btc_context
, u8 reg_type
, u32 offset
);
723 u32 (*btc_get_bt_coex_supported_feature
)(void *btcoexist
);
724 u32 (*btc_get_bt_coex_supported_version
)(void *btcoexist
);
725 u32 (*btc_get_bt_phydm_version
)(void *btcoexist
);
726 void (*btc_phydm_modify_ra_pcr_threshold
)(void *btcoexist
,
727 u8 ra_offset_direction
,
728 u8 ra_threshold_offset
);
729 u32 (*btc_phydm_query_phy_counter
)(void *btcoexist
,
730 enum dm_info_query dm_id
);
731 u8 (*btc_get_ant_det_val_from_bt
)(void *btcoexist
);
732 u8 (*btc_get_ble_scan_type_from_bt
)(void *btcoexist
);
733 u32 (*btc_get_ble_scan_para_from_bt
)(void *btcoexist
, u8 scan_type
);
734 bool (*btc_get_bt_afh_map_from_bt
)(void *btcoexist
, u8 map_type
,
738 bool halbtc_is_wifi_uplink(struct rtl_priv
*adapter
);
740 #define rtl_btc_coexist(rtlpriv) \
741 ((struct btc_coexist *)((rtlpriv)->btcoexist.btc_context))
742 #define rtl_btc_wifi_only(rtlpriv) \
743 ((struct wifi_only_cfg *)((rtlpriv)->btcoexist.wifi_only_context))
745 struct wifi_only_cfg
;
747 bool exhalbtc_initlize_variables(struct rtl_priv
*rtlpriv
);
748 bool exhalbtc_initlize_variables_wifi_only(struct rtl_priv
*rtlpriv
);
749 bool exhalbtc_bind_bt_coex_withadapter(void *adapter
);
750 void exhalbtc_power_on_setting(struct btc_coexist
*btcoexist
);
751 void exhalbtc_pre_load_firmware(struct btc_coexist
*btcoexist
);
752 void exhalbtc_init_hw_config(struct btc_coexist
*btcoexist
, bool wifi_only
);
753 void exhalbtc_init_hw_config_wifi_only(struct wifi_only_cfg
*wifionly_cfg
);
754 void exhalbtc_init_coex_dm(struct btc_coexist
*btcoexist
);
755 void exhalbtc_ips_notify(struct btc_coexist
*btcoexist
, u8 type
);
756 void exhalbtc_lps_notify(struct btc_coexist
*btcoexist
, u8 type
);
757 void exhalbtc_scan_notify(struct btc_coexist
*btcoexist
, u8 type
);
758 void exhalbtc_scan_notify_wifi_only(struct wifi_only_cfg
*wifionly_cfg
,
760 void exhalbtc_connect_notify(struct btc_coexist
*btcoexist
, u8 action
);
761 void exhalbtc_mediastatus_notify(struct btc_coexist
*btcoexist
,
762 enum rt_media_status media_status
);
763 void exhalbtc_special_packet_notify(struct btc_coexist
*btcoexist
, u8 pkt_type
);
764 void exhalbtc_bt_info_notify(struct btc_coexist
*btcoexist
, u8
*tmp_buf
,
766 void exhalbtc_rf_status_notify(struct btc_coexist
*btcoexist
, u8 type
);
767 void exhalbtc_halt_notify(struct btc_coexist
*btcoexist
);
768 void exhalbtc_pnp_notify(struct btc_coexist
*btcoexist
, u8 pnp_state
);
769 void exhalbtc_coex_dm_switch(struct btc_coexist
*btcoexist
);
770 void exhalbtc_periodical(struct btc_coexist
*btcoexist
);
771 void exhalbtc_dbg_control(struct btc_coexist
*btcoexist
, u8 code
, u8 len
,
773 void exhalbtc_antenna_detection(struct btc_coexist
*btcoexist
, u32 cent_freq
,
774 u32 offset
, u32 span
, u32 seconds
);
775 void exhalbtc_stack_update_profile_info(void);
776 void exhalbtc_set_hci_version(struct btc_coexist
*btcoexist
, u16 hci_version
);
777 void exhalbtc_set_bt_patch_version(struct btc_coexist
*btcoexist
,
778 u16 bt_hci_version
, u16 bt_patch_version
);
779 void exhalbtc_update_min_bt_rssi(struct btc_coexist
*btcoexist
, s8 bt_rssi
);
780 void exhalbtc_set_bt_exist(struct btc_coexist
*btcoexist
, bool bt_exist
);
781 void exhalbtc_set_chip_type(struct btc_coexist
*btcoexist
, u8 chip_type
);
782 void exhalbtc_set_ant_num(struct rtl_priv
*rtlpriv
, u8 type
, u8 ant_num
);
783 void exhalbtc_display_bt_coex_info(struct btc_coexist
*btcoexist
,
785 void exhalbtc_switch_band_notify(struct btc_coexist
*btcoexist
, u8 type
);
786 void exhalbtc_switch_band_notify_wifi_only(struct wifi_only_cfg
*wifionly_cfg
,
788 void exhalbtc_signal_compensation(struct btc_coexist
*btcoexist
,
789 u8
*rssi_wifi
, u8
*rssi_bt
);
790 void exhalbtc_lps_leave(struct btc_coexist
*btcoexist
);
791 void exhalbtc_low_wifi_traffic_notify(struct btc_coexist
*btcoexist
);
792 void exhalbtc_set_single_ant_path(struct btc_coexist
*btcoexist
,
794 void halbtc_send_wifi_port_id_cmd(void *bt_context
);
795 void halbtc_set_default_port_id_cmd(void *bt_context
);
797 /* The following are used by wifi_only case */
798 enum wifionly_chip_interface
{
799 WIFIONLY_INTF_UNKNOWN
= 0,
800 WIFIONLY_INTF_PCI
= 1,
801 WIFIONLY_INTF_USB
= 2,
802 WIFIONLY_INTF_SDIO
= 3,
806 enum wifionly_customer_id
{
811 struct wifi_only_haldata
{
819 struct wifi_only_cfg
{
821 struct wifi_only_haldata haldata_info
;
822 enum wifionly_chip_interface chip_interface
;
826 void halwifionly_phy_set_bb_reg(struct wifi_only_cfg
*wifi_conly_cfg
,
827 u32 regaddr
, u32 bitmask
, u32 data
)
829 struct rtl_priv
*rtlpriv
= (struct rtl_priv
*)wifi_conly_cfg
->adapter
;
831 rtl_set_bbreg(rtlpriv
->hw
, regaddr
, bitmask
, data
);