linux/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2009-2012  Realtek Corporation.*/

#ifndef	__HALBTC_OUT_SRC_H__
#define __HALBTC_OUT_SRC_H__

#include	"../wifi.h"

#define NORMAL_EXEC
#define FORCE_EXEC

#define BTC_RF_OFF
#define BTC_RF_ON

#define BTC_RF_A
#define BTC_RF_B
#define BTC_RF_C
#define BTC_RF_D

#define BTC_SMSP
#define BTC_DMDP
#define BTC_DMSP
#define BTC_MP_UNKNOWN

#define IN
#define OUT

#define BT_TMP_BUF_SIZE

#define BT_COEX_ANT_TYPE_PG
#define BT_COEX_ANT_TYPE_ANTDIV
#define BT_COEX_ANT_TYPE_DETECTED

#define BTC_MIMO_PS_STATIC
#define BTC_MIMO_PS_DYNAMIC

#define BTC_RATE_DISABLE
#define BTC_RATE_ENABLE

/* single Antenna definition */
#define BTC_ANT_PATH_WIFI
#define BTC_ANT_PATH_BT
#define BTC_ANT_PATH_PTA
#define BTC_ANT_PATH_WIFI5G
#define BTC_ANT_PATH_AUTO
/* dual Antenna definition */
#define BTC_ANT_WIFI_AT_MAIN
#define BTC_ANT_WIFI_AT_AUX
/* coupler Antenna definition */
#define BTC_ANT_WIFI_AT_CPL_MAIN
#define BTC_ANT_WIFI_AT_CPL_AUX

enum btc_bt_reg_type {};

enum btc_chip_interface {};

enum btc_chip_type {};

enum btc_msg_type {};

/* following is for BTC_MSG_INTERFACE */
#define INTF_INIT
#define INTF_NOTIFY

/* following is for BTC_ALGORITHM */
#define ALGO_BT_RSSI_STATE
#define ALGO_WIFI_RSSI_STATE
#define ALGO_BT_MONITOR
#define ALGO_TRACE
#define ALGO_TRACE_FW
#define ALGO_TRACE_FW_DETAIL
#define ALGO_TRACE_FW_EXEC
#define ALGO_TRACE_SW
#define ALGO_TRACE_SW_DETAIL
#define ALGO_TRACE_SW_EXEC

/* following is for wifi link status */
#define WIFI_STA_CONNECTED
#define WIFI_AP_CONNECTED
#define WIFI_HS_CONNECTED
#define WIFI_P2P_GO_CONNECTED
#define WIFI_P2P_GC_CONNECTED

#define BTC_RSSI_HIGH(_rssi_)
#define BTC_RSSI_MEDIUM(_rssi_)
#define BTC_RSSI_LOW(_rssi_)

enum btc_power_save_type {};

struct btc_board_info {};

enum btc_dbg_opcode {};

enum btc_rssi_state {};

enum btc_wifi_role {};

enum btc_wireless_freq {};

enum btc_wifi_bw_mode {};

enum btc_wifi_traffic_dir {};

enum btc_wifi_pnp {};

enum btc_iot_peer {};

/* for 8723b-d cut large current issue */
enum bt_wifi_coex_state {};

enum bt_ant_type {};

enum btc_get_type {};

enum btc_vendor {};

enum btc_set_type {};

enum btc_dbg_disp_type {};

enum btc_notify_type_ips {};

enum btc_notify_type_lps {};

enum btc_notify_type_scan {};

enum btc_notify_type_switchband {};

enum btc_notify_type_associate {};

enum btc_notify_type_media_status {};

enum btc_notify_type_special_packet {};

enum hci_ext_bt_operation {};

enum btc_notify_type_stack_operation {};

enum {};

enum {};

struct btc_bt_info {};

struct btc_stack_info {};

struct btc_statistics {};

struct btc_bt_link_info {};

enum btc_antenna_pos {};

enum btc_mp_h2c_op_code {};

enum btc_mp_h2c_req_num {};

struct btc_coexist {};

bool halbtc_is_wifi_uplink(struct rtl_priv *adapter);

#define rtl_btc_coexist(rtlpriv)
#define rtl_btc_wifi_only(rtlpriv)

struct wifi_only_cfg;

bool exhalbtc_initlize_variables(struct rtl_priv *rtlpriv);
bool exhalbtc_initlize_variables_wifi_only(struct rtl_priv *rtlpriv);
bool exhalbtc_bind_bt_coex_withadapter(void *adapter);
void exhalbtc_power_on_setting(struct btc_coexist *btcoexist);
void exhalbtc_pre_load_firmware(struct btc_coexist *btcoexist);
void exhalbtc_init_hw_config(struct btc_coexist *btcoexist, bool wifi_only);
void exhalbtc_init_hw_config_wifi_only(struct wifi_only_cfg *wifionly_cfg);
void exhalbtc_init_coex_dm(struct btc_coexist *btcoexist);
void exhalbtc_ips_notify(struct btc_coexist *btcoexist, u8 type);
void exhalbtc_lps_notify(struct btc_coexist *btcoexist, u8 type);
void exhalbtc_scan_notify(struct btc_coexist *btcoexist, u8 type);
void exhalbtc_scan_notify_wifi_only(struct wifi_only_cfg *wifionly_cfg,
				    u8 is_5g);
void exhalbtc_connect_notify(struct btc_coexist *btcoexist, u8 action);
void exhalbtc_mediastatus_notify(struct btc_coexist *btcoexist,
				 enum rt_media_status media_status);
void exhalbtc_special_packet_notify(struct btc_coexist *btcoexist, u8 pkt_type);
void exhalbtc_bt_info_notify(struct btc_coexist *btcoexist, u8 *tmp_buf,
			     u8 length);
void exhalbtc_rf_status_notify(struct btc_coexist *btcoexist, u8 type);
void exhalbtc_halt_notify(struct btc_coexist *btcoexist);
void exhalbtc_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state);
void exhalbtc_coex_dm_switch(struct btc_coexist *btcoexist);
void exhalbtc_periodical(struct btc_coexist *btcoexist);
void exhalbtc_dbg_control(struct btc_coexist *btcoexist, u8 code, u8 len,
			  u8 *data);
void exhalbtc_antenna_detection(struct btc_coexist *btcoexist, u32 cent_freq,
				u32 offset, u32 span, u32 seconds);
void exhalbtc_stack_update_profile_info(void);
void exhalbtc_set_hci_version(struct btc_coexist *btcoexist, u16 hci_version);
void exhalbtc_set_bt_patch_version(struct btc_coexist *btcoexist,
				   u16 bt_hci_version, u16 bt_patch_version);
void exhalbtc_update_min_bt_rssi(struct btc_coexist *btcoexist, s8 bt_rssi);
void exhalbtc_set_bt_exist(struct btc_coexist *btcoexist, bool bt_exist);
void exhalbtc_set_chip_type(struct btc_coexist *btcoexist, u8 chip_type);
void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num);
void exhalbtc_display_bt_coex_info(struct btc_coexist *btcoexist,
				   struct seq_file *m);
void exhalbtc_switch_band_notify(struct btc_coexist *btcoexist, u8 type);
void exhalbtc_switch_band_notify_wifi_only(struct wifi_only_cfg *wifionly_cfg,
					   u8 is_5g);
void exhalbtc_signal_compensation(struct btc_coexist *btcoexist,
				  u8 *rssi_wifi, u8 *rssi_bt);
void exhalbtc_lps_leave(struct btc_coexist *btcoexist);
void exhalbtc_low_wifi_traffic_notify(struct btc_coexist *btcoexist);
void exhalbtc_set_single_ant_path(struct btc_coexist *btcoexist,
				  u8 single_ant_path);
void halbtc_send_wifi_port_id_cmd(void *bt_context);
void halbtc_set_default_port_id_cmd(void *bt_context);

/* The following are used by wifi_only case */
enum wifionly_chip_interface {};

enum wifionly_customer_id {};

struct wifi_only_haldata {};

struct wifi_only_cfg {};

static inline
void halwifionly_phy_set_bb_reg(struct wifi_only_cfg *wifi_conly_cfg,
				u32 regaddr, u32 bitmask, u32 data)
{}

#endif