Commit e9329bd3 authored by Konrad Zapalowicz's avatar Konrad Zapalowicz Committed by Greg Kroah-Hartman

staging: rtl8821ae: add static for local symbols in halbtc8723b1ant.c

This commit fixes the sparse warning:

    "warning: symbol 'X' was not declared. Should it be static?"

Where the X is one of the following:

    glbt_info_src_8723b_2ant
    glcoex_ver_date_8723b_2ant
    glcoex_ver_8723b_2ant
    halbtc8723b2ant_bt_rssi_state
    halbtc8723b2ant_wifi_rssi_state
    halbtc8723b2ant_monitor_bt_enable_disable
    halbtc8723b2ant_monitor_bt_ctr
    halbtc8723b2ant_query_bt_info
    halbtc8723b2ant_is_wifi_status_changed
    halbtc8723b2ant_update_bt_link_info
    halbtc8723b2ant_action_algorithm
    halbtc8723b2ant_need_to_dec_bt_pwr
    halbtc8723b2ant_set_fw_dac_swing_level
    halbtc8723b2ant_set_fw_dec_bt_pwr
    halbtc8723b2ant_dec_bt_pwr
    halbtc8723b2ant_set_bt_auto_report
    halbtc8723b2ant_bt_auto_report
    halbtc8723b2ant_fw_dac_swing_lvl
    halbtc8723b2ant_set_sw_rf_rx_lpf_corner
    halbtc8723b2ant_rf_shrink
    halbtc8723b2ant_set_sw_penalty_txrate_adaptive
    halbtc8723b2ant_low_penalty_ra
    halbtc8723b2ant_set_dac_swing_reg
    halbtc8723b2ant_set_sw_fulltime_dac_swing
    halbtc8723b2ant_dac_swing
    halbtc8723b2ant_set_adc_backoff
    halbtc8723b2ant_adc_backoff
    halbtc8723b2ant_set_agc_table
    halbtc8723b2ant_agc_table
    halbtc8723b2ant_set_coex_table
    halbtc8723b2ant_coex_table
    halbtc8723b2ant_coex_table_with_type
    halbtc8723b2ant_set_fw_ignore_wlan_act
    halbtc8723b2ant_ignore_wlan_act
    halbtc8723b2ant_set_fw_ps_tdma
    halbtc8723b2ant_sw_mechanism1
    halbtc8723b2ant_sw_mechanism2
    halbtc8723b2ant_set_ant_path
    halbtc8723b2ant_ps_tdma
    halbtc8723b2ant_coex_alloff
    halbtc8723b2ant_init_coex_dm
    halbtc8723b2ant_action_bt_inquiry
    halbtc8723b2ant_is_common_action
    halbtc8723b2ant_tdma_duration_adjust
    halbtc8723b2ant_action_sco
    halbtc8723b2ant_action_hid
    halbtc8723b2ant_action_a2dp
    halbtc8723b2ant_action_a2dp_pan_hs
    halbtc8723b2ant_action_pan_edr
    halbtc8723b2ant_action_pan_hs
    halbtc8723b2ant_action_pan_edr_a2dp
    halbtc8723b2ant_action_pan_edr_hid
    halbtc8723b2ant_action_hid_a2dp_pan_edr
    halbtc8723b2ant_action_hid_a2dp
    halbtc8723b2ant_run_coexist_mechanism
    halbtc8723b2ant_wifioff_hwcfg
Signed-off-by: default avatarKonrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29606609
...@@ -22,14 +22,14 @@ static struct coex_dm_8723b_1ant *coex_dm = &glcoex_dm_8723b_1ant; ...@@ -22,14 +22,14 @@ static struct coex_dm_8723b_1ant *coex_dm = &glcoex_dm_8723b_1ant;
static struct coex_sta_8723b_1ant glcoex_sta_8723b_1ant; static struct coex_sta_8723b_1ant glcoex_sta_8723b_1ant;
static struct coex_sta_8723b_1ant *coex_sta = &glcoex_sta_8723b_1ant; static struct coex_sta_8723b_1ant *coex_sta = &glcoex_sta_8723b_1ant;
const char *const GLBtInfoSrc8723b1Ant[]={ static const char *const GLBtInfoSrc8723b1Ant[] = {
"BT Info[wifi fw]", "BT Info[wifi fw]",
"BT Info[bt rsp]", "BT Info[bt rsp]",
"BT Info[bt auto report]", "BT Info[bt auto report]",
}; };
u32 glcoex_ver_date_8723b_1ant = 20130906; static u32 glcoex_ver_date_8723b_1ant = 20130906;
u32 glcoex_ver_8723b_1ant = 0x45; static u32 glcoex_ver_8723b_1ant = 0x45;
/*************************************************************** /***************************************************************
* local function proto type if needed * local function proto type if needed
...@@ -37,7 +37,8 @@ u32 glcoex_ver_8723b_1ant = 0x45; ...@@ -37,7 +37,8 @@ u32 glcoex_ver_8723b_1ant = 0x45;
/*************************************************************** /***************************************************************
* local function start with halbtc8723b1ant_ * local function start with halbtc8723b1ant_
***************************************************************/ ***************************************************************/
u8 halbtc8723b1ant_bt_rssi_state(u8 level_num, u8 rssi_thresh, u8 rssi_thresh1) static u8 halbtc8723b1ant_bt_rssi_state(u8 level_num, u8 rssi_thresh,
u8 rssi_thresh1)
{ {
s32 bt_rssi=0; s32 bt_rssi=0;
u8 bt_rssi_state = coex_sta->pre_bt_rssi_state; u8 bt_rssi_state = coex_sta->pre_bt_rssi_state;
...@@ -134,9 +135,9 @@ u8 halbtc8723b1ant_bt_rssi_state(u8 level_num, u8 rssi_thresh, u8 rssi_thresh1) ...@@ -134,9 +135,9 @@ u8 halbtc8723b1ant_bt_rssi_state(u8 level_num, u8 rssi_thresh, u8 rssi_thresh1)
return bt_rssi_state; return bt_rssi_state;
} }
u8 halbtc8723b1ant_wifi_rssi_state(struct btc_coexist *btcoexist, static u8 halbtc8723b1ant_wifi_rssi_state(struct btc_coexist *btcoexist,
u8 index, u8 level_num, u8 index, u8 level_num,
u8 rssi_thresh, u8 rssi_thresh1) u8 rssi_thresh, u8 rssi_thresh1)
{ {
s32 wifi_rssi=0; s32 wifi_rssi=0;
u8 wifi_rssi_state = coex_sta->pre_wifi_rssi_state[index]; u8 wifi_rssi_state = coex_sta->pre_wifi_rssi_state[index];
...@@ -249,8 +250,8 @@ u8 halbtc8723b1ant_wifi_rssi_state(struct btc_coexist *btcoexist, ...@@ -249,8 +250,8 @@ u8 halbtc8723b1ant_wifi_rssi_state(struct btc_coexist *btcoexist,
return wifi_rssi_state; return wifi_rssi_state;
} }
void halbtc8723b1ant_updatera_mask(struct btc_coexist *btcoexist, static void halbtc8723b1ant_updatera_mask(struct btc_coexist *btcoexist,
bool force_exec, u32 dis_rate_mask) bool force_exec, u32 dis_rate_mask)
{ {
coex_dm->curra_mask = dis_rate_mask; coex_dm->curra_mask = dis_rate_mask;
...@@ -261,8 +262,9 @@ void halbtc8723b1ant_updatera_mask(struct btc_coexist *btcoexist, ...@@ -261,8 +262,9 @@ void halbtc8723b1ant_updatera_mask(struct btc_coexist *btcoexist,
coex_dm->prera_mask = coex_dm->curra_mask; coex_dm->prera_mask = coex_dm->curra_mask;
} }
void halbtc8723b1ant_auto_rate_fallback_retry(struct btc_coexist *btcoexist, static void halbtc8723b1ant_auto_rate_fallback_retry(
bool force_exec, u8 type) struct btc_coexist *btcoexist,
bool force_exec, u8 type)
{ {
bool wifi_under_bmode = false; bool wifi_under_bmode = false;
...@@ -300,8 +302,8 @@ void halbtc8723b1ant_auto_rate_fallback_retry(struct btc_coexist *btcoexist, ...@@ -300,8 +302,8 @@ void halbtc8723b1ant_auto_rate_fallback_retry(struct btc_coexist *btcoexist,
coex_dm->pre_arfr_type = coex_dm->cur_arfr_type; coex_dm->pre_arfr_type = coex_dm->cur_arfr_type;
} }
void halbtc8723b1ant_retry_limit(struct btc_coexist *btcoexist, static void halbtc8723b1ant_retry_limit(struct btc_coexist *btcoexist,
bool force_exec, u8 type) bool force_exec, u8 type)
{ {
coex_dm->cur_retry_limit_type = type; coex_dm->cur_retry_limit_type = type;
...@@ -324,8 +326,8 @@ void halbtc8723b1ant_retry_limit(struct btc_coexist *btcoexist, ...@@ -324,8 +326,8 @@ void halbtc8723b1ant_retry_limit(struct btc_coexist *btcoexist,
coex_dm->pre_retry_limit_type = coex_dm->cur_retry_limit_type; coex_dm->pre_retry_limit_type = coex_dm->cur_retry_limit_type;
} }
void halbtc8723b1ant_ampdu_maxtime(struct btc_coexist *btcoexist, static void halbtc8723b1ant_ampdu_maxtime(struct btc_coexist *btcoexist,
bool force_exec, u8 type) bool force_exec, u8 type)
{ {
coex_dm->cur_ampdu_time_type = type; coex_dm->cur_ampdu_time_type = type;
...@@ -348,7 +350,7 @@ void halbtc8723b1ant_ampdu_maxtime(struct btc_coexist *btcoexist, ...@@ -348,7 +350,7 @@ void halbtc8723b1ant_ampdu_maxtime(struct btc_coexist *btcoexist,
coex_dm->pre_ampdu_time_type = coex_dm->cur_ampdu_time_type; coex_dm->pre_ampdu_time_type = coex_dm->cur_ampdu_time_type;
} }
void halbtc8723b1ant_limited_tx(struct btc_coexist *btcoexist, static void halbtc8723b1ant_limited_tx(struct btc_coexist *btcoexist,
bool force_exec, u8 ra_maskType, u8 arfr_type, bool force_exec, u8 ra_maskType, u8 arfr_type,
u8 retry_limit_type, u8 ampdu_time_type) u8 retry_limit_type, u8 ampdu_time_type)
{ {
...@@ -375,7 +377,7 @@ void halbtc8723b1ant_limited_tx(struct btc_coexist *btcoexist, ...@@ -375,7 +377,7 @@ void halbtc8723b1ant_limited_tx(struct btc_coexist *btcoexist,
halbtc8723b1ant_ampdu_maxtime(btcoexist, force_exec, ampdu_time_type); halbtc8723b1ant_ampdu_maxtime(btcoexist, force_exec, ampdu_time_type);
} }
void halbtc8723b1ant_limited_rx(struct btc_coexist *btcoexist, static void halbtc8723b1ant_limited_rx(struct btc_coexist *btcoexist,
bool force_exec, bool rej_ap_agg_pkt, bool force_exec, bool rej_ap_agg_pkt,
bool b_bt_ctrl_agg_buf_size, u8 agg_buf_size) bool b_bt_ctrl_agg_buf_size, u8 agg_buf_size)
{ {
...@@ -398,7 +400,7 @@ void halbtc8723b1ant_limited_rx(struct btc_coexist *btcoexist, ...@@ -398,7 +400,7 @@ void halbtc8723b1ant_limited_rx(struct btc_coexist *btcoexist,
btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL);
} }
void halbtc8723b1ant_monitor_bt_ctr(struct btc_coexist *btcoexist) static void halbtc8723b1ant_monitor_bt_ctr(struct btc_coexist *btcoexist)
{ {
u32 reg_hp_txrx, reg_lp_txrx, u32tmp; u32 reg_hp_txrx, reg_lp_txrx, u32tmp;
u32 reg_hp_tx = 0, reg_hp_rx = 0; u32 reg_hp_tx = 0, reg_hp_rx = 0;
...@@ -424,7 +426,7 @@ void halbtc8723b1ant_monitor_bt_ctr(struct btc_coexist *btcoexist) ...@@ -424,7 +426,7 @@ void halbtc8723b1ant_monitor_bt_ctr(struct btc_coexist *btcoexist)
btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc);
} }
void halbtc8723b1ant_query_bt_info(struct btc_coexist *btcoexist) static void halbtc8723b1ant_query_bt_info(struct btc_coexist *btcoexist)
{ {
u8 h2c_parameter[1] = {0}; u8 h2c_parameter[1] = {0};
...@@ -439,7 +441,8 @@ void halbtc8723b1ant_query_bt_info(struct btc_coexist *btcoexist) ...@@ -439,7 +441,8 @@ void halbtc8723b1ant_query_bt_info(struct btc_coexist *btcoexist)
btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter);
} }
bool halbtc8723b1ant_is_wifi_status_changed(struct btc_coexist *btcoexist) static bool halbtc8723b1ant_is_wifi_status_changed(
struct btc_coexist *btcoexist)
{ {
static bool pre_wifi_busy = false; static bool pre_wifi_busy = false;
static bool pre_under_4way = false, pre_bt_hs_on = false; static bool pre_under_4way = false, pre_bt_hs_on = false;
...@@ -471,7 +474,7 @@ bool halbtc8723b1ant_is_wifi_status_changed(struct btc_coexist *btcoexist) ...@@ -471,7 +474,7 @@ bool halbtc8723b1ant_is_wifi_status_changed(struct btc_coexist *btcoexist)
return false; return false;
} }
void halbtc8723b1ant_update_bt_link_info(struct btc_coexist *btcoexist) static void halbtc8723b1ant_update_bt_link_info(struct btc_coexist *btcoexist)
{ {
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
bool bt_hs_on = false; bool bt_hs_on = false;
...@@ -519,7 +522,7 @@ void halbtc8723b1ant_update_bt_link_info(struct btc_coexist *btcoexist) ...@@ -519,7 +522,7 @@ void halbtc8723b1ant_update_bt_link_info(struct btc_coexist *btcoexist)
bt_link_info->hid_only = false; bt_link_info->hid_only = false;
} }
u8 halbtc8723b1ant_action_algorithm(struct btc_coexist *btcoexist) static u8 halbtc8723b1ant_action_algorithm(struct btc_coexist *btcoexist)
{ {
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
bool bt_hs_on = false; bool bt_hs_on = false;
...@@ -719,7 +722,7 @@ u8 halbtc8723b1ant_action_algorithm(struct btc_coexist *btcoexist) ...@@ -719,7 +722,7 @@ u8 halbtc8723b1ant_action_algorithm(struct btc_coexist *btcoexist)
return algorithm; return algorithm;
} }
bool halbtc8723b1ant_need_to_dec_bt_pwr(struct btc_coexist *btcoexist) static bool halbtc8723b1ant_need_to_dec_bt_pwr(struct btc_coexist *btcoexist)
{ {
bool ret = false; bool ret = false;
bool bt_hs_on = false, wifi_connected = false; bool bt_hs_on = false, wifi_connected = false;
...@@ -750,8 +753,9 @@ bool halbtc8723b1ant_need_to_dec_bt_pwr(struct btc_coexist *btcoexist) ...@@ -750,8 +753,9 @@ bool halbtc8723b1ant_need_to_dec_bt_pwr(struct btc_coexist *btcoexist)
return ret; return ret;
} }
void halbtc8723b1ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_fw_dac_swing_level(
u8 dac_swing_lvl) struct btc_coexist *btcoexist,
u8 dac_swing_lvl)
{ {
u8 h2c_parameter[1] = {0}; u8 h2c_parameter[1] = {0};
...@@ -767,7 +771,7 @@ void halbtc8723b1ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, ...@@ -767,7 +771,7 @@ void halbtc8723b1ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist,
btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter);
} }
void halbtc8723b1ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist,
bool dec_bt_pwr) bool dec_bt_pwr)
{ {
u8 h2c_parameter[1] = {0}; u8 h2c_parameter[1] = {0};
...@@ -784,7 +788,7 @@ void halbtc8723b1ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, ...@@ -784,7 +788,7 @@ void halbtc8723b1ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist,
btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter);
} }
void halbtc8723b1ant_dec_bt_pwr(struct btc_coexist *btcoexist, static void halbtc8723b1ant_dec_bt_pwr(struct btc_coexist *btcoexist,
bool force_exec, bool dec_bt_pwr) bool force_exec, bool dec_bt_pwr)
{ {
return; return;
...@@ -806,7 +810,7 @@ void halbtc8723b1ant_dec_bt_pwr(struct btc_coexist *btcoexist, ...@@ -806,7 +810,7 @@ void halbtc8723b1ant_dec_bt_pwr(struct btc_coexist *btcoexist,
coex_dm->pre_dec_bt_pwr = coex_dm->cur_dec_bt_pwr; coex_dm->pre_dec_bt_pwr = coex_dm->cur_dec_bt_pwr;
} }
void halbtc8723b1ant_set_bt_auto_report(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_bt_auto_report(struct btc_coexist *btcoexist,
bool enable_auto_report) bool enable_auto_report)
{ {
u8 h2c_parameter[1] = {0}; u8 h2c_parameter[1] = {0};
...@@ -824,7 +828,7 @@ void halbtc8723b1ant_set_bt_auto_report(struct btc_coexist *btcoexist, ...@@ -824,7 +828,7 @@ void halbtc8723b1ant_set_bt_auto_report(struct btc_coexist *btcoexist,
btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter);
} }
void halbtc8723b1ant_bt_auto_report(struct btc_coexist *btcoexist, static void halbtc8723b1ant_bt_auto_report(struct btc_coexist *btcoexist,
bool force_exec, bool enable_auto_report) bool force_exec, bool enable_auto_report)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW,
...@@ -849,7 +853,7 @@ void halbtc8723b1ant_bt_auto_report(struct btc_coexist *btcoexist, ...@@ -849,7 +853,7 @@ void halbtc8723b1ant_bt_auto_report(struct btc_coexist *btcoexist,
coex_dm->pre_bt_auto_report = coex_dm->cur_bt_auto_report; coex_dm->pre_bt_auto_report = coex_dm->cur_bt_auto_report;
} }
void halbtc8723b1ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, static void halbtc8723b1ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist,
bool force_exec, u8 fw_dac_swing_lvl) bool force_exec, u8 fw_dac_swing_lvl)
{ {
return; return;
...@@ -876,8 +880,9 @@ void halbtc8723b1ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, ...@@ -876,8 +880,9 @@ void halbtc8723b1ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist,
coex_dm->pre_fw_dac_swing_lvl = coex_dm->cur_fw_dac_swing_lvl; coex_dm->pre_fw_dac_swing_lvl = coex_dm->cur_fw_dac_swing_lvl;
} }
void halbtc8723b1ant_set_sw_rf_rx_lpf_corner(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_sw_rf_rx_lpf_corner(
bool rx_rf_shrink_on) struct btc_coexist *btcoexist,
bool rx_rf_shrink_on)
{ {
if (rx_rf_shrink_on) { if (rx_rf_shrink_on) {
/*Shrink RF Rx LPF corner */ /*Shrink RF Rx LPF corner */
...@@ -898,7 +903,7 @@ void halbtc8723b1ant_set_sw_rf_rx_lpf_corner(struct btc_coexist *btcoexist, ...@@ -898,7 +903,7 @@ void halbtc8723b1ant_set_sw_rf_rx_lpf_corner(struct btc_coexist *btcoexist,
} }
} }
void halbtc8723b1ant_rf_shrink(struct btc_coexist *btcoexist, static void halbtc8723b1ant_rf_shrink(struct btc_coexist *btcoexist,
bool force_exec, bool rx_rf_shrink_on) bool force_exec, bool rx_rf_shrink_on)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW,
...@@ -924,7 +929,7 @@ void halbtc8723b1ant_rf_shrink(struct btc_coexist *btcoexist, ...@@ -924,7 +929,7 @@ void halbtc8723b1ant_rf_shrink(struct btc_coexist *btcoexist,
coex_dm->pre_rf_rx_lpf_shrink = coex_dm->cur_rf_rx_lpf_shrink; coex_dm->pre_rf_rx_lpf_shrink = coex_dm->cur_rf_rx_lpf_shrink;
} }
void halbtc8723b1ant_set_sw_penalty_tx_rate_adaptive( static void halbtc8723b1ant_set_sw_penalty_tx_rate_adaptive(
struct btc_coexist *btcoexist, struct btc_coexist *btcoexist,
bool low_penalty_ra) bool low_penalty_ra)
{ {
...@@ -948,7 +953,7 @@ void halbtc8723b1ant_set_sw_penalty_tx_rate_adaptive( ...@@ -948,7 +953,7 @@ void halbtc8723b1ant_set_sw_penalty_tx_rate_adaptive(
btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter);
} }
void halbtc8723b1ant_low_penalty_ra(struct btc_coexist *btcoexist, static void halbtc8723b1ant_low_penalty_ra(struct btc_coexist *btcoexist,
bool force_exec, bool low_penalty_ra) bool force_exec, bool low_penalty_ra)
{ {
coex_dm->cur_low_penalty_ra = low_penalty_ra; coex_dm->cur_low_penalty_ra = low_penalty_ra;
...@@ -963,7 +968,8 @@ void halbtc8723b1ant_low_penalty_ra(struct btc_coexist *btcoexist, ...@@ -963,7 +968,8 @@ void halbtc8723b1ant_low_penalty_ra(struct btc_coexist *btcoexist,
coex_dm->pre_low_penalty_ra = coex_dm->cur_low_penalty_ra; coex_dm->pre_low_penalty_ra = coex_dm->cur_low_penalty_ra;
} }
void halbtc8723b1ant_set_dac_swing_reg(struct btc_coexist *btcoexist, u32 level) static void halbtc8723b1ant_set_dac_swing_reg(struct btc_coexist *btcoexist,
u32 level)
{ {
u8 val = (u8) level; u8 val = (u8) level;
...@@ -972,7 +978,8 @@ void halbtc8723b1ant_set_dac_swing_reg(struct btc_coexist *btcoexist, u32 level) ...@@ -972,7 +978,8 @@ void halbtc8723b1ant_set_dac_swing_reg(struct btc_coexist *btcoexist, u32 level)
btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val); btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val);
} }
void halbtc8723b1ant_set_sw_full_time_dac_swing(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_sw_full_time_dac_swing(
struct btc_coexist *btcoexist,
bool sw_dac_swing_on, bool sw_dac_swing_on,
u32 sw_dac_swing_lvl) u32 sw_dac_swing_lvl)
{ {
...@@ -983,8 +990,8 @@ void halbtc8723b1ant_set_sw_full_time_dac_swing(struct btc_coexist *btcoexist, ...@@ -983,8 +990,8 @@ void halbtc8723b1ant_set_sw_full_time_dac_swing(struct btc_coexist *btcoexist,
} }
void halbtc8723b1ant_dac_swing(struct btc_coexist *btcoexist, bool force_exec, static void halbtc8723b1ant_dac_swing(struct btc_coexist *btcoexist,
bool dac_swing_on, u32 dac_swing_lvl) bool force_exec, bool dac_swing_on, u32 dac_swing_lvl)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW,
"[BTCoex], %s turn DacSwing=%s, dac_swing_lvl=0x%x\n", "[BTCoex], %s turn DacSwing=%s, dac_swing_lvl=0x%x\n",
...@@ -1014,8 +1021,8 @@ void halbtc8723b1ant_dac_swing(struct btc_coexist *btcoexist, bool force_exec, ...@@ -1014,8 +1021,8 @@ void halbtc8723b1ant_dac_swing(struct btc_coexist *btcoexist, bool force_exec,
coex_dm->pre_dac_swing_lvl = coex_dm->cur_dac_swing_lvl; coex_dm->pre_dac_swing_lvl = coex_dm->cur_dac_swing_lvl;
} }
void halbtc8723b1ant_set_adc_backoff(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_adc_backoff(struct btc_coexist *btcoexist,
bool adc_backoff) bool adc_backoff)
{ {
if (adc_backoff) { if (adc_backoff) {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW_EXEC, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW_EXEC,
...@@ -1028,7 +1035,7 @@ void halbtc8723b1ant_set_adc_backoff(struct btc_coexist *btcoexist, ...@@ -1028,7 +1035,7 @@ void halbtc8723b1ant_set_adc_backoff(struct btc_coexist *btcoexist,
} }
} }
void halbtc8723b1ant_adc_backoff(struct btc_coexist *btcoexist, static void halbtc8723b1ant_adc_backoff(struct btc_coexist *btcoexist,
bool force_exec, bool adc_backoff) bool force_exec, bool adc_backoff)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW,
...@@ -1050,7 +1057,7 @@ void halbtc8723b1ant_adc_backoff(struct btc_coexist *btcoexist, ...@@ -1050,7 +1057,7 @@ void halbtc8723b1ant_adc_backoff(struct btc_coexist *btcoexist,
coex_dm->cur_adc_backoff; coex_dm->cur_adc_backoff;
} }
void halbtc8723b1ant_set_agc_table(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_agc_table(struct btc_coexist *btcoexist,
bool adc_table_en) bool adc_table_en)
{ {
u8 rssi_adjust_val = 0; u8 rssi_adjust_val = 0;
...@@ -1085,7 +1092,7 @@ void halbtc8723b1ant_set_agc_table(struct btc_coexist *btcoexist, ...@@ -1085,7 +1092,7 @@ void halbtc8723b1ant_set_agc_table(struct btc_coexist *btcoexist,
} }
void halbtc8723b1ant_agc_table(struct btc_coexist *btcoexist, static void halbtc8723b1ant_agc_table(struct btc_coexist *btcoexist,
bool force_exec, bool adc_table_en) bool force_exec, bool adc_table_en)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_SW,
...@@ -1108,7 +1115,7 @@ void halbtc8723b1ant_agc_table(struct btc_coexist *btcoexist, ...@@ -1108,7 +1115,7 @@ void halbtc8723b1ant_agc_table(struct btc_coexist *btcoexist,
coex_dm->pre_agc_table_en = coex_dm->cur_agc_table_en; coex_dm->pre_agc_table_en = coex_dm->cur_agc_table_en;
} }
void halbtc8723b1ant_set_coex_table(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_coex_table(struct btc_coexist *btcoexist,
u32 val0x6c0, u32 val0x6c4, u32 val0x6c0, u32 val0x6c4,
u32 val0x6c8, u8 val0x6cc) u32 val0x6c8, u8 val0x6cc)
{ {
...@@ -1129,7 +1136,7 @@ void halbtc8723b1ant_set_coex_table(struct btc_coexist *btcoexist, ...@@ -1129,7 +1136,7 @@ void halbtc8723b1ant_set_coex_table(struct btc_coexist *btcoexist,
btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc);
} }
void halbtc8723b1ant_coex_table(struct btc_coexist *btcoexist, static void halbtc8723b1ant_coex_table(struct btc_coexist *btcoexist,
bool force_exec, u32 val0x6c0, bool force_exec, u32 val0x6c0,
u32 val0x6c4, u32 val0x6c8, u32 val0x6c4, u32 val0x6c8,
u8 val0x6cc) u8 val0x6cc)
...@@ -1159,7 +1166,7 @@ void halbtc8723b1ant_coex_table(struct btc_coexist *btcoexist, ...@@ -1159,7 +1166,7 @@ void halbtc8723b1ant_coex_table(struct btc_coexist *btcoexist,
coex_dm->pre_val0x6cc = coex_dm->cur_val0x6cc; coex_dm->pre_val0x6cc = coex_dm->cur_val0x6cc;
} }
void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist, static void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist,
bool force_exec, u8 type) bool force_exec, u8 type)
{ {
switch (type) { switch (type) {
...@@ -1200,7 +1207,7 @@ void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist, ...@@ -1200,7 +1207,7 @@ void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist,
} }
} }
void halbtc8723b1ant_SetFwIgnoreWlanAct(struct btc_coexist *btcoexist, static void halbtc8723b1ant_SetFwIgnoreWlanAct(struct btc_coexist *btcoexist,
bool enable) bool enable)
{ {
u8 h2c_parameter[1] = {0}; u8 h2c_parameter[1] = {0};
...@@ -1215,7 +1222,7 @@ void halbtc8723b1ant_SetFwIgnoreWlanAct(struct btc_coexist *btcoexist, ...@@ -1215,7 +1222,7 @@ void halbtc8723b1ant_SetFwIgnoreWlanAct(struct btc_coexist *btcoexist,
btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter);
} }
void halbtc8723b1ant_ignore_wlan_act(struct btc_coexist *btcoexist, static void halbtc8723b1ant_ignore_wlan_act(struct btc_coexist *btcoexist,
bool force_exec, bool enable) bool force_exec, bool enable)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW,
...@@ -1239,7 +1246,7 @@ void halbtc8723b1ant_ignore_wlan_act(struct btc_coexist *btcoexist, ...@@ -1239,7 +1246,7 @@ void halbtc8723b1ant_ignore_wlan_act(struct btc_coexist *btcoexist,
coex_dm->pre_ignore_wlan_act = coex_dm->cur_ignore_wlan_act; coex_dm->pre_ignore_wlan_act = coex_dm->cur_ignore_wlan_act;
} }
void halbtc8723b1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, static void halbtc8723b1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist,
u8 byte1, u8 byte2, u8 byte3, u8 byte1, u8 byte2, u8 byte3,
u8 byte4, u8 byte5) u8 byte4, u8 byte5)
{ {
...@@ -1285,7 +1292,7 @@ void halbtc8723b1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, ...@@ -1285,7 +1292,7 @@ void halbtc8723b1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist,
btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter);
} }
void halbtc8723b1ant_SetLpsRpwm(struct btc_coexist *btcoexist, static void halbtc8723b1ant_SetLpsRpwm(struct btc_coexist *btcoexist,
u8 lps_val, u8 rpwm_val) u8 lps_val, u8 rpwm_val)
{ {
u8 lps = lps_val; u8 lps = lps_val;
...@@ -1295,8 +1302,8 @@ void halbtc8723b1ant_SetLpsRpwm(struct btc_coexist *btcoexist, ...@@ -1295,8 +1302,8 @@ void halbtc8723b1ant_SetLpsRpwm(struct btc_coexist *btcoexist,
btcoexist->btc_set(btcoexist, BTC_SET_U1_1ANT_RPWM, &rpwm); btcoexist->btc_set(btcoexist, BTC_SET_U1_1ANT_RPWM, &rpwm);
} }
void halbtc8723b1ant_LpsRpwm(struct btc_coexist *btcoexist, bool force_exec, static void halbtc8723b1ant_LpsRpwm(struct btc_coexist *btcoexist,
u8 lps_val, u8 rpwm_val) bool force_exec, u8 lps_val, u8 rpwm_val)
{ {
BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW, BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW,
...@@ -1326,7 +1333,7 @@ void halbtc8723b1ant_LpsRpwm(struct btc_coexist *btcoexist, bool force_exec, ...@@ -1326,7 +1333,7 @@ void halbtc8723b1ant_LpsRpwm(struct btc_coexist *btcoexist, bool force_exec,
coex_dm->pre_rpwm = coex_dm->cur_rpwm; coex_dm->pre_rpwm = coex_dm->cur_rpwm;
} }
void halbtc8723b1ant_sw_mechanism1(struct btc_coexist *btcoexist, static void halbtc8723b1ant_sw_mechanism1(struct btc_coexist *btcoexist,
bool shrink_rx_lpf, bool low_penalty_ra, bool shrink_rx_lpf, bool low_penalty_ra,
bool limited_dig, bool bt_lna_constrain) bool limited_dig, bool bt_lna_constrain)
{ {
...@@ -1337,7 +1344,7 @@ void halbtc8723b1ant_sw_mechanism1(struct btc_coexist *btcoexist, ...@@ -1337,7 +1344,7 @@ void halbtc8723b1ant_sw_mechanism1(struct btc_coexist *btcoexist,
halbtc8723b1ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); halbtc8723b1ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra);
} }
void halbtc8723b1ant_sw_mechanism2(struct btc_coexist *btcoexist, static void halbtc8723b1ant_sw_mechanism2(struct btc_coexist *btcoexist,
bool agc_table_shift, bool adc_backoff, bool agc_table_shift, bool adc_backoff,
bool sw_dac_swing, u32 dac_swing_lvl) bool sw_dac_swing, u32 dac_swing_lvl)
{ {
...@@ -1346,7 +1353,7 @@ void halbtc8723b1ant_sw_mechanism2(struct btc_coexist *btcoexist, ...@@ -1346,7 +1353,7 @@ void halbtc8723b1ant_sw_mechanism2(struct btc_coexist *btcoexist,
agc_table_shift, adc_backoff, sw_dac_swing); agc_table_shift, adc_backoff, sw_dac_swing);
} }
void halbtc8723b1ant_SetAntPath(struct btc_coexist *btcoexist, static void halbtc8723b1ant_SetAntPath(struct btc_coexist *btcoexist,
u8 ant_pos_type, bool init_hw_cfg, u8 ant_pos_type, bool init_hw_cfg,
bool wifi_off) bool wifi_off)
{ {
...@@ -1537,8 +1544,8 @@ void halbtc8723b1ant_SetAntPath(struct btc_coexist *btcoexist, ...@@ -1537,8 +1544,8 @@ void halbtc8723b1ant_SetAntPath(struct btc_coexist *btcoexist,
} }
} }
void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec, static void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist,
bool turn_on, u8 type) bool force_exec, bool turn_on, u8 type)
{ {
bool wifi_busy = false; bool wifi_busy = false;
u8 rssi_adjust_val = 0; u8 rssi_adjust_val = 0;
...@@ -1783,7 +1790,7 @@ void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec, ...@@ -1783,7 +1790,7 @@ void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec,
coex_dm->pre_ps_tdma = coex_dm->cur_ps_tdma; coex_dm->pre_ps_tdma = coex_dm->cur_ps_tdma;
} }
void halbtc8723b1ant_coex_alloff(struct btc_coexist *btcoexist) static void halbtc8723b1ant_coex_alloff(struct btc_coexist *btcoexist)
{ {
/* fw all off */ /* fw all off */
halbtc8723b1ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); halbtc8723b1ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6);
...@@ -1798,7 +1805,7 @@ void halbtc8723b1ant_coex_alloff(struct btc_coexist *btcoexist) ...@@ -1798,7 +1805,7 @@ void halbtc8723b1ant_coex_alloff(struct btc_coexist *btcoexist)
halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0);
} }
bool halbtc8723b1ant_is_common_action(struct btc_coexist *btcoexist) static bool halbtc8723b1ant_is_common_action(struct btc_coexist *btcoexist)
{ {
bool commom = false, wifi_connected = false; bool commom = false, wifi_connected = false;
bool wifi_busy = false; bool wifi_busy = false;
...@@ -1896,8 +1903,9 @@ bool halbtc8723b1ant_is_common_action(struct btc_coexist *btcoexist) ...@@ -1896,8 +1903,9 @@ bool halbtc8723b1ant_is_common_action(struct btc_coexist *btcoexist)
} }
void halbtc8723b1ant_tdma_duration_adjust_for_acl(struct btc_coexist *btcoexist, static void halbtc8723b1ant_tdma_duration_adjust_for_acl(
u8 wifi_status) struct btc_coexist *btcoexist,
u8 wifi_status)
{ {
static s32 up, dn, m, n, wait_count; static s32 up, dn, m, n, wait_count;
/* 0: no change, +1: increase WiFi duration, /* 0: no change, +1: increase WiFi duration,
...@@ -2082,8 +2090,8 @@ void halbtc8723b1ant_tdma_duration_adjust_for_acl(struct btc_coexist *btcoexist, ...@@ -2082,8 +2090,8 @@ void halbtc8723b1ant_tdma_duration_adjust_for_acl(struct btc_coexist *btcoexist,
} }
} }
u8 halbtc8723b1ant_ps_tdma_type_by_wifi_rssi(s32 wifi_rssi, s32 pre_wifi_rssi, static u8 halbtc8723b1ant_ps_tdma_type_by_wifi_rssi(s32 wifi_rssi,
u8 wifi_rssi_thresh) s32 pre_wifi_rssi, u8 wifi_rssi_thresh)
{ {
u8 ps_tdma_type=0; u8 ps_tdma_type=0;
...@@ -2102,8 +2110,8 @@ u8 halbtc8723b1ant_ps_tdma_type_by_wifi_rssi(s32 wifi_rssi, s32 pre_wifi_rssi, ...@@ -2102,8 +2110,8 @@ u8 halbtc8723b1ant_ps_tdma_type_by_wifi_rssi(s32 wifi_rssi, s32 pre_wifi_rssi,
return ps_tdma_type; return ps_tdma_type;
} }
void halbtc8723b1ant_PsTdmaCheckForPowerSaveState(struct btc_coexist *btcoexist, static void halbtc8723b1ant_PsTdmaCheckForPowerSaveState(
bool new_ps_state) struct btc_coexist *btcoexist, bool new_ps_state)
{ {
u8 lps_mode = 0x0; u8 lps_mode = 0x0;
...@@ -2128,7 +2136,7 @@ void halbtc8723b1ant_PsTdmaCheckForPowerSaveState(struct btc_coexist *btcoexist, ...@@ -2128,7 +2136,7 @@ void halbtc8723b1ant_PsTdmaCheckForPowerSaveState(struct btc_coexist *btcoexist,
} }
} }
void halbtc8723b1ant_power_save_state(struct btc_coexist *btcoexist, static void halbtc8723b1ant_power_save_state(struct btc_coexist *btcoexist,
u8 ps_type, u8 lps_val, u8 ps_type, u8 lps_val,
u8 rpwm_val) u8 rpwm_val)
{ {
...@@ -2162,13 +2170,14 @@ void halbtc8723b1ant_power_save_state(struct btc_coexist *btcoexist, ...@@ -2162,13 +2170,14 @@ void halbtc8723b1ant_power_save_state(struct btc_coexist *btcoexist,
} }
} }
void halbtc8723b1ant_action_wifi_only(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_wifi_only(struct btc_coexist *btcoexist)
{ {
halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0);
halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 9); halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 9);
} }
void halbtc8723b1ant_monitor_bt_enable_disable(struct btc_coexist *btcoexist) static void halbtc8723b1ant_monitor_bt_enable_disable(
struct btc_coexist *btcoexist)
{ {
static bool pre_bt_disabled = false; static bool pre_bt_disabled = false;
static u32 bt_disable_cnt = 0; static u32 bt_disable_cnt = 0;
...@@ -2231,7 +2240,7 @@ void halbtc8723b1ant_monitor_bt_enable_disable(struct btc_coexist *btcoexist) ...@@ -2231,7 +2240,7 @@ void halbtc8723b1ant_monitor_bt_enable_disable(struct btc_coexist *btcoexist)
* *
***************************************************/ ***************************************************/
/* SCO only or SCO+PAN(HS) */ /* SCO only or SCO+PAN(HS) */
void halbtc8723b1ant_action_sco(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_sco(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state; u8 wifi_rssi_state;
u32 wifi_bw; u32 wifi_bw;
...@@ -2280,7 +2289,7 @@ void halbtc8723b1ant_action_sco(struct btc_coexist *btcoexist) ...@@ -2280,7 +2289,7 @@ void halbtc8723b1ant_action_sco(struct btc_coexist *btcoexist)
} }
void halbtc8723b1ant_action_hid(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_hid(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state; u8 wifi_rssi_state, bt_rssi_state;
u32 wifi_bw; u32 wifi_bw;
...@@ -2331,7 +2340,7 @@ void halbtc8723b1ant_action_hid(struct btc_coexist *btcoexist) ...@@ -2331,7 +2340,7 @@ void halbtc8723b1ant_action_hid(struct btc_coexist *btcoexist)
} }
/*A2DP only / PAN(EDR) only/ A2DP+PAN(HS) */ /*A2DP only / PAN(EDR) only/ A2DP+PAN(HS) */
void halbtc8723b1ant_action_a2dp(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_a2dp(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state; u8 wifi_rssi_state, bt_rssi_state;
u32 wifi_bw; u32 wifi_bw;
...@@ -2380,7 +2389,7 @@ void halbtc8723b1ant_action_a2dp(struct btc_coexist *btcoexist) ...@@ -2380,7 +2389,7 @@ void halbtc8723b1ant_action_a2dp(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state, bt_info_ext; u8 wifi_rssi_state, bt_rssi_state, bt_info_ext;
u32 wifi_bw; u32 wifi_bw;
...@@ -2430,7 +2439,7 @@ void halbtc8723b1ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) ...@@ -2430,7 +2439,7 @@ void halbtc8723b1ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_action_pan_edr(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_pan_edr(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state; u8 wifi_rssi_state, bt_rssi_state;
u32 wifi_bw; u32 wifi_bw;
...@@ -2481,7 +2490,7 @@ void halbtc8723b1ant_action_pan_edr(struct btc_coexist *btcoexist) ...@@ -2481,7 +2490,7 @@ void halbtc8723b1ant_action_pan_edr(struct btc_coexist *btcoexist)
/* PAN(HS) only */ /* PAN(HS) only */
void halbtc8723b1ant_action_pan_hs(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_pan_hs(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state; u8 wifi_rssi_state, bt_rssi_state;
u32 wifi_bw; u32 wifi_bw;
...@@ -2544,7 +2553,7 @@ void halbtc8723b1ant_action_pan_hs(struct btc_coexist *btcoexist) ...@@ -2544,7 +2553,7 @@ void halbtc8723b1ant_action_pan_hs(struct btc_coexist *btcoexist)
} }
/*PAN(EDR)+A2DP */ /*PAN(EDR)+A2DP */
void halbtc8723b1ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state, bt_info_ext; u8 wifi_rssi_state, bt_rssi_state, bt_info_ext;
u32 wifi_bw; u32 wifi_bw;
...@@ -2595,7 +2604,7 @@ void halbtc8723b1ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) ...@@ -2595,7 +2604,7 @@ void halbtc8723b1ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_action_pan_edr_hid(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_pan_edr_hid(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state; u8 wifi_rssi_state, bt_rssi_state;
u32 wifi_bw; u32 wifi_bw;
...@@ -2645,7 +2654,8 @@ void halbtc8723b1ant_action_pan_edr_hid(struct btc_coexist *btcoexist) ...@@ -2645,7 +2654,8 @@ void halbtc8723b1ant_action_pan_edr_hid(struct btc_coexist *btcoexist)
} }
/* HID+A2DP+PAN(EDR) */ /* HID+A2DP+PAN(EDR) */
void halbtc8723b1ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_hid_a2dp_pan_edr(
struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state, bt_info_ext; u8 wifi_rssi_state, bt_rssi_state, bt_info_ext;
u32 wifi_bw; u32 wifi_bw;
...@@ -2695,7 +2705,7 @@ void halbtc8723b1ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) ...@@ -2695,7 +2705,7 @@ void halbtc8723b1ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_action_hid_a2dp(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_hid_a2dp(struct btc_coexist *btcoexist)
{ {
u8 wifi_rssi_state, bt_rssi_state, bt_info_ext; u8 wifi_rssi_state, bt_rssi_state, bt_info_ext;
u32 wifi_bw; u32 wifi_bw;
...@@ -2748,13 +2758,13 @@ void halbtc8723b1ant_action_hid_a2dp(struct btc_coexist *btcoexist) ...@@ -2748,13 +2758,13 @@ void halbtc8723b1ant_action_hid_a2dp(struct btc_coexist *btcoexist)
* Non-Software Coex Mechanism start * Non-Software Coex Mechanism start
* *
*****************************************************/ *****************************************************/
void halbtc8723b1ant_action_hs(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_hs(struct btc_coexist *btcoexist)
{ {
halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5);
halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 2); halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 2);
} }
void halbtc8723b1ant_action_bt_inquiry(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_bt_inquiry(struct btc_coexist *btcoexist)
{ {
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
bool wifi_connected = false, ap_enable = false; bool wifi_connected = false, ap_enable = false;
...@@ -2790,8 +2800,9 @@ void halbtc8723b1ant_action_bt_inquiry(struct btc_coexist *btcoexist) ...@@ -2790,8 +2800,9 @@ void halbtc8723b1ant_action_bt_inquiry(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_action_bt_sco_hid_only_busy(struct btc_coexist * btcoexist, static void halbtc8723b1ant_action_bt_sco_hid_only_busy(
u8 wifi_status) struct btc_coexist *btcoexist,
u8 wifi_status)
{ {
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
bool wifi_connected = false; bool wifi_connected = false;
...@@ -2810,7 +2821,7 @@ void halbtc8723b1ant_action_bt_sco_hid_only_busy(struct btc_coexist * btcoexist, ...@@ -2810,7 +2821,7 @@ void halbtc8723b1ant_action_bt_sco_hid_only_busy(struct btc_coexist * btcoexist,
} }
} }
void halbtc8723b1ant_action_wifi_connected_bt_acl_busy( static void halbtc8723b1ant_action_wifi_connected_bt_acl_busy(
struct btc_coexist *btcoexist, struct btc_coexist *btcoexist,
u8 wifi_status) u8 wifi_status)
{ {
...@@ -2870,7 +2881,8 @@ void halbtc8723b1ant_action_wifi_connected_bt_acl_busy( ...@@ -2870,7 +2881,8 @@ void halbtc8723b1ant_action_wifi_connected_bt_acl_busy(
} }
} }
void halbtc8723b1ant_action_wifi_not_connected(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_wifi_not_connected(
struct btc_coexist *btcoexist)
{ {
/* power save state */ /* power save state */
halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE,
...@@ -2881,7 +2893,7 @@ void halbtc8723b1ant_action_wifi_not_connected(struct btc_coexist *btcoexist) ...@@ -2881,7 +2893,7 @@ void halbtc8723b1ant_action_wifi_not_connected(struct btc_coexist *btcoexist)
halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0);
} }
void halbtc8723b1ant_action_wifi_not_connected_asso_auth_scan( static void halbtc8723b1ant_action_wifi_not_connected_asso_auth_scan(
struct btc_coexist *btcoexist) struct btc_coexist *btcoexist)
{ {
halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE,
...@@ -2891,7 +2903,8 @@ void halbtc8723b1ant_action_wifi_not_connected_asso_auth_scan( ...@@ -2891,7 +2903,8 @@ void halbtc8723b1ant_action_wifi_not_connected_asso_auth_scan(
halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1);
} }
void halbtc8723b1ant_ActionWifiConnectedScan(struct btc_coexist *btcoexist) static void halbtc8723b1ant_ActionWifiConnectedScan(
struct btc_coexist *btcoexist)
{ {
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
...@@ -2921,7 +2934,7 @@ void halbtc8723b1ant_ActionWifiConnectedScan(struct btc_coexist *btcoexist) ...@@ -2921,7 +2934,7 @@ void halbtc8723b1ant_ActionWifiConnectedScan(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_action_wifi_connected_special_packet( static void halbtc8723b1ant_action_wifi_connected_special_packet(
struct btc_coexist *btcoexist) struct btc_coexist *btcoexist)
{ {
bool hs_connecting = false; bool hs_connecting = false;
...@@ -2951,7 +2964,7 @@ void halbtc8723b1ant_action_wifi_connected_special_packet( ...@@ -2951,7 +2964,7 @@ void halbtc8723b1ant_action_wifi_connected_special_packet(
} }
} }
void halbtc8723b1ant_action_wifi_connected(struct btc_coexist *btcoexist) static void halbtc8723b1ant_action_wifi_connected(struct btc_coexist *btcoexist)
{ {
bool wifi_busy = false; bool wifi_busy = false;
bool scan = false, link = false, roam = false; bool scan = false, link = false, roam = false;
...@@ -3031,7 +3044,8 @@ void halbtc8723b1ant_action_wifi_connected(struct btc_coexist *btcoexist) ...@@ -3031,7 +3044,8 @@ void halbtc8723b1ant_action_wifi_connected(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_run_sw_coexist_mechanism(struct btc_coexist *btcoexist) static void halbtc8723b1ant_run_sw_coexist_mechanism(
struct btc_coexist *btcoexist)
{ {
u8 algorithm = 0; u8 algorithm = 0;
...@@ -3104,7 +3118,7 @@ void halbtc8723b1ant_run_sw_coexist_mechanism(struct btc_coexist *btcoexist) ...@@ -3104,7 +3118,7 @@ void halbtc8723b1ant_run_sw_coexist_mechanism(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist) static void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
{ {
struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info;
bool wifi_connected = false, bt_hs_on = false; bool wifi_connected = false, bt_hs_on = false;
...@@ -3218,7 +3232,7 @@ void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist) ...@@ -3218,7 +3232,7 @@ void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist)
} }
} }
void halbtc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist) static void halbtc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist)
{ {
/* force to reset coex mechanism */ /* force to reset coex mechanism */
halbtc8723b1ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); halbtc8723b1ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6);
...@@ -3232,7 +3246,8 @@ void halbtc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist) ...@@ -3232,7 +3246,8 @@ void halbtc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist)
halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0);
} }
void halbtc8723b1ant_init_hw_config(struct btc_coexist *btcoexist, bool backup) static void halbtc8723b1ant_init_hw_config(struct btc_coexist *btcoexist,
bool backup)
{ {
u32 u32tmp = 0; u32 u32tmp = 0;
u8 u8tmp = 0; u8 u8tmp = 0;
...@@ -3304,7 +3319,7 @@ void halbtc8723b1ant_init_hw_config(struct btc_coexist *btcoexist, bool backup) ...@@ -3304,7 +3319,7 @@ void halbtc8723b1ant_init_hw_config(struct btc_coexist *btcoexist, bool backup)
} }
void halbtc8723b1ant_wifi_off_hw_cfg(struct btc_coexist *btcoexist) static void halbtc8723b1ant_wifi_off_hw_cfg(struct btc_coexist *btcoexist)
{ {
/* set wlan_act to low */ /* set wlan_act to low */
btcoexist->btc_write_1byte(btcoexist, 0x76e, 0); btcoexist->btc_write_1byte(btcoexist, 0x76e, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment