Lines Matching refs:coex_sta
23 static struct coex_sta_8723b_2ant *coex_sta = &glcoex_sta_8723b_2ant; variable
46 u8 bt_rssi_state = coex_sta->pre_bt_rssi_state; in btc8723b2ant_bt_rssi_state()
48 bt_rssi = coex_sta->bt_rssi; in btc8723b2ant_bt_rssi_state()
51 if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) || in btc8723b2ant_bt_rssi_state()
52 (coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_STAY_LOW)) { in btc8723b2ant_bt_rssi_state()
78 return coex_sta->pre_bt_rssi_state; in btc8723b2ant_bt_rssi_state()
81 if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) || in btc8723b2ant_bt_rssi_state()
82 (coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_STAY_LOW)) { in btc8723b2ant_bt_rssi_state()
93 } else if ((coex_sta->pre_bt_rssi_state == in btc8723b2ant_bt_rssi_state()
95 (coex_sta->pre_bt_rssi_state == in btc8723b2ant_bt_rssi_state()
124 coex_sta->pre_bt_rssi_state = bt_rssi_state; in btc8723b2ant_bt_rssi_state()
135 u8 wifi_rssi_state = coex_sta->pre_wifi_rssi_state[index]; in btc8723b2ant_wifi_rssi_state()
140 if ((coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
142 (coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
169 return coex_sta->pre_wifi_rssi_state[index]; in btc8723b2ant_wifi_rssi_state()
172 if ((coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
174 (coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
186 } else if ((coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
188 (coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
217 coex_sta->pre_wifi_rssi_state[index] = wifi_rssi_state; in btc8723b2ant_wifi_rssi_state()
264 coex_sta->high_priority_tx = reg_hp_tx; in btc8723b2ant_monitor_bt_ctr()
265 coex_sta->high_priority_rx = reg_hp_rx; in btc8723b2ant_monitor_bt_ctr()
266 coex_sta->low_priority_tx = reg_lp_tx; in btc8723b2ant_monitor_bt_ctr()
267 coex_sta->low_priority_rx = reg_lp_rx; in btc8723b2ant_monitor_bt_ctr()
269 if ((coex_sta->low_priority_tx > 1050) && in btc8723b2ant_monitor_bt_ctr()
270 (!coex_sta->c2h_bt_inquiry_page)) in btc8723b2ant_monitor_bt_ctr()
271 coex_sta->pop_event_cnt++; in btc8723b2ant_monitor_bt_ctr()
273 if ((coex_sta->low_priority_rx >= 950) && in btc8723b2ant_monitor_bt_ctr()
274 (coex_sta->low_priority_rx >= coex_sta->low_priority_tx) && in btc8723b2ant_monitor_bt_ctr()
275 (!coex_sta->under_ips)) in btc8723b2ant_monitor_bt_ctr()
293 if (coex_sta->under_ips) { in btc8723b2ant_monitor_wifi_ctr()
294 coex_sta->crc_ok_cck = 0; in btc8723b2ant_monitor_wifi_ctr()
295 coex_sta->crc_ok_11g = 0; in btc8723b2ant_monitor_wifi_ctr()
296 coex_sta->crc_ok_11n = 0; in btc8723b2ant_monitor_wifi_ctr()
297 coex_sta->crc_ok_11n_agg = 0; in btc8723b2ant_monitor_wifi_ctr()
299 coex_sta->crc_err_cck = 0; in btc8723b2ant_monitor_wifi_ctr()
300 coex_sta->crc_err_11g = 0; in btc8723b2ant_monitor_wifi_ctr()
301 coex_sta->crc_err_11n = 0; in btc8723b2ant_monitor_wifi_ctr()
302 coex_sta->crc_err_11n_agg = 0; in btc8723b2ant_monitor_wifi_ctr()
304 coex_sta->crc_ok_cck = in btc8723b2ant_monitor_wifi_ctr()
306 coex_sta->crc_ok_11g = in btc8723b2ant_monitor_wifi_ctr()
308 coex_sta->crc_ok_11n = in btc8723b2ant_monitor_wifi_ctr()
310 coex_sta->crc_ok_11n_agg = in btc8723b2ant_monitor_wifi_ctr()
313 coex_sta->crc_err_cck = in btc8723b2ant_monitor_wifi_ctr()
315 coex_sta->crc_err_11g = in btc8723b2ant_monitor_wifi_ctr()
317 coex_sta->crc_err_11n = in btc8723b2ant_monitor_wifi_ctr()
319 coex_sta->crc_err_11n_agg = in btc8723b2ant_monitor_wifi_ctr()
333 coex_sta->c2h_bt_info_req_sent = true; in btc8723b2ant_query_bt_info()
397 bt_link_info->bt_link_exist = coex_sta->bt_link_exist; in btc8723b2ant_update_bt_link_info()
398 bt_link_info->sco_exist = coex_sta->sco_exist; in btc8723b2ant_update_bt_link_info()
399 bt_link_info->a2dp_exist = coex_sta->a2dp_exist; in btc8723b2ant_update_bt_link_info()
400 bt_link_info->pan_exist = coex_sta->pan_exist; in btc8723b2ant_update_bt_link_info()
401 bt_link_info->hid_exist = coex_sta->hid_exist; in btc8723b2ant_update_bt_link_info()
1058 if ((coex_sta->a2dp_exist) && (coex_sta->hid_exist)) in btc8723b2ant_set_fw_ps_tdma()
1252 if (coex_sta->scan_ap_num <= 5) { in btc8723b2ant_ps_tdma()
1253 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1255 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1259 } else if (coex_sta->scan_ap_num <= 20) { in btc8723b2ant_ps_tdma()
1260 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1262 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1266 } else if (coex_sta->scan_ap_num <= 40) { in btc8723b2ant_ps_tdma()
1267 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1269 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1274 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1276 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1509 coex_sta->force_lps_on = false; in btc8723b2ant_power_save_state()
1522 coex_sta->force_lps_on = true; in btc8723b2ant_power_save_state()
1528 coex_sta->force_lps_on = false; in btc8723b2ant_power_save_state()
1563 coex_sta->pop_event_cnt = 0; in btc8723b2ant_init_coex_dm()
1584 if (coex_sta->bt_abnormal_scan) { in btc8723b2ant_action_bt_inquiry()
1646 if (BTC_RSSI_HIGH(wifi_rssi_state1) && (coex_sta->hid_exist) && in btc8723b2ant_action_wifi_idle_process()
1647 (coex_sta->a2dp_exist)) { in btc8723b2ant_action_wifi_idle_process()
1898 retry_count = coex_sta->bt_retry_cnt; in btc8723b2ant_tdma_duration_adjust()
1900 if ((coex_sta->low_priority_tx) > 1050 || in btc8723b2ant_tdma_duration_adjust()
1901 (coex_sta->low_priority_rx) > 1250) in btc8723b2ant_tdma_duration_adjust()
3364 if (coex_sta->under_ips) { in btc8723b2ant_run_coexist_mechanism()
3371 if (coex_sta->c2h_bt_inquiry_page && in btc8723b2ant_run_coexist_mechanism()
3548 coex_sta->dis_ver_info_cnt = 0; in ex_btc8723b2ant_init_hwconfig()
3722 bt_info_ext = coex_sta->bt_info_ext; in ex_btc8723b2ant_display_coex_info()
3728 if (coex_sta->bt_info_c2h_cnt[i]) { in ex_btc8723b2ant_display_coex_info()
3731 coex_sta->bt_info_c2h[i], in ex_btc8723b2ant_display_coex_info()
3732 coex_sta->bt_info_c2h_cnt[i]); in ex_btc8723b2ant_display_coex_info()
3738 ((coex_sta->under_ips ? "IPS ON" : "IPS OFF")), in ex_btc8723b2ant_display_coex_info()
3739 ((coex_sta->under_lps ? "LPS ON" : "LPS OFF"))); in ex_btc8723b2ant_display_coex_info()
3842 coex_sta->high_priority_rx, coex_sta->high_priority_tx); in ex_btc8723b2ant_display_coex_info()
3844 "0x774(low-pri rx/tx)", coex_sta->low_priority_rx, in ex_btc8723b2ant_display_coex_info()
3845 coex_sta->low_priority_tx); in ex_btc8723b2ant_display_coex_info()
3858 coex_sta->under_ips = true; in ex_btc8723b2ant_ips_notify()
3865 coex_sta->under_ips = false; in ex_btc8723b2ant_ips_notify()
3879 coex_sta->under_lps = true; in ex_btc8723b2ant_lps_notify()
3883 coex_sta->under_lps = false; in ex_btc8723b2ant_lps_notify()
3904 &coex_sta->scan_ap_num); in ex_btc8723b2ant_scan_notify()
3991 coex_sta->c2h_bt_info_req_sent = false; in ex_btc8723b2ant_bt_info_notify()
3996 coex_sta->bt_info_c2h_cnt[rsp_source]++; in ex_btc8723b2ant_bt_info_notify()
4002 coex_sta->bt_info_c2h[rsp_source][i] = tmpbuf[i]; in ex_btc8723b2ant_bt_info_notify()
4020 coex_sta->bt_retry_cnt = in ex_btc8723b2ant_bt_info_notify()
4021 coex_sta->bt_info_c2h[rsp_source][2] & 0xf; in ex_btc8723b2ant_bt_info_notify()
4023 if (coex_sta->bt_retry_cnt >= 1) in ex_btc8723b2ant_bt_info_notify()
4024 coex_sta->pop_event_cnt++; in ex_btc8723b2ant_bt_info_notify()
4026 coex_sta->bt_rssi = in ex_btc8723b2ant_bt_info_notify()
4027 coex_sta->bt_info_c2h[rsp_source][3] * 2 + 10; in ex_btc8723b2ant_bt_info_notify()
4029 coex_sta->bt_info_ext = coex_sta->bt_info_c2h[rsp_source][4]; in ex_btc8723b2ant_bt_info_notify()
4031 if (coex_sta->bt_info_c2h[rsp_source][2] & 0x20) in ex_btc8723b2ant_bt_info_notify()
4032 coex_sta->c2h_bt_remote_name_req = true; in ex_btc8723b2ant_bt_info_notify()
4034 coex_sta->c2h_bt_remote_name_req = false; in ex_btc8723b2ant_bt_info_notify()
4036 if (coex_sta->bt_info_c2h[rsp_source][1] == 0x49) in ex_btc8723b2ant_bt_info_notify()
4037 coex_sta->a2dp_bit_pool = in ex_btc8723b2ant_bt_info_notify()
4038 coex_sta->bt_info_c2h[rsp_source][6]; in ex_btc8723b2ant_bt_info_notify()
4040 coex_sta->a2dp_bit_pool = 0; in ex_btc8723b2ant_bt_info_notify()
4045 if ((coex_sta->bt_info_ext & BIT1)) { in ex_btc8723b2ant_bt_info_notify()
4060 if ((coex_sta->bt_info_ext & BIT3)) { in ex_btc8723b2ant_bt_info_notify()
4069 if (!(coex_sta->bt_info_ext & BIT4)) in ex_btc8723b2ant_bt_info_notify()
4077 coex_sta->c2h_bt_inquiry_page = true; in ex_btc8723b2ant_bt_info_notify()
4079 coex_sta->c2h_bt_inquiry_page = false; in ex_btc8723b2ant_bt_info_notify()
4083 coex_sta->bt_link_exist = false; in ex_btc8723b2ant_bt_info_notify()
4084 coex_sta->pan_exist = false; in ex_btc8723b2ant_bt_info_notify()
4085 coex_sta->a2dp_exist = false; in ex_btc8723b2ant_bt_info_notify()
4086 coex_sta->hid_exist = false; in ex_btc8723b2ant_bt_info_notify()
4087 coex_sta->sco_exist = false; in ex_btc8723b2ant_bt_info_notify()
4090 coex_sta->bt_link_exist = true; in ex_btc8723b2ant_bt_info_notify()
4092 coex_sta->pan_exist = true; in ex_btc8723b2ant_bt_info_notify()
4094 coex_sta->pan_exist = false; in ex_btc8723b2ant_bt_info_notify()
4096 coex_sta->a2dp_exist = true; in ex_btc8723b2ant_bt_info_notify()
4098 coex_sta->a2dp_exist = false; in ex_btc8723b2ant_bt_info_notify()
4100 coex_sta->hid_exist = true; in ex_btc8723b2ant_bt_info_notify()
4102 coex_sta->hid_exist = false; in ex_btc8723b2ant_bt_info_notify()
4104 coex_sta->sco_exist = true; in ex_btc8723b2ant_bt_info_notify()
4106 coex_sta->sco_exist = false; in ex_btc8723b2ant_bt_info_notify()
4108 if ((!coex_sta->hid_exist) && in ex_btc8723b2ant_bt_info_notify()
4109 (!coex_sta->c2h_bt_inquiry_page) && in ex_btc8723b2ant_bt_info_notify()
4110 (!coex_sta->sco_exist)) { in ex_btc8723b2ant_bt_info_notify()
4111 if (coex_sta->high_priority_tx + in ex_btc8723b2ant_bt_info_notify()
4112 coex_sta->high_priority_rx >= 160) { in ex_btc8723b2ant_bt_info_notify()
4113 coex_sta->hid_exist = true; in ex_btc8723b2ant_bt_info_notify()
4190 coex_sta->under_ips = false; in ex_btc8723b2ant_pnp_notify()
4191 coex_sta->under_lps = false; in ex_btc8723b2ant_pnp_notify()
4209 if (coex_sta->dis_ver_info_cnt <= 5) { in ex_btc8723b2ant_periodical()
4210 coex_sta->dis_ver_info_cnt += 1; in ex_btc8723b2ant_periodical()
4211 if (coex_sta->dis_ver_info_cnt == 3) { in ex_btc8723b2ant_periodical()
4231 if ((coex_sta->high_priority_tx + in ex_btc8723b2ant_periodical()
4232 coex_sta->high_priority_rx < 50) && in ex_btc8723b2ant_periodical()