Lines Matching refs:coex_sta

44 static struct coex_sta_8723b_2ant *coex_sta = &glcoex_sta_8723b_2ant;  variable
67 u8 bt_rssi_state = coex_sta->pre_bt_rssi_state; in btc8723b2ant_bt_rssi_state()
69 bt_rssi = coex_sta->bt_rssi; in btc8723b2ant_bt_rssi_state()
72 if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) || in btc8723b2ant_bt_rssi_state()
73 (coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_STAY_LOW)) { in btc8723b2ant_bt_rssi_state()
99 return coex_sta->pre_bt_rssi_state; in btc8723b2ant_bt_rssi_state()
102 if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) || in btc8723b2ant_bt_rssi_state()
103 (coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_STAY_LOW)) { in btc8723b2ant_bt_rssi_state()
114 } else if ((coex_sta->pre_bt_rssi_state == in btc8723b2ant_bt_rssi_state()
116 (coex_sta->pre_bt_rssi_state == in btc8723b2ant_bt_rssi_state()
145 coex_sta->pre_bt_rssi_state = bt_rssi_state; in btc8723b2ant_bt_rssi_state()
156 u8 wifi_rssi_state = coex_sta->pre_wifi_rssi_state[index]; in btc8723b2ant_wifi_rssi_state()
161 if ((coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
163 (coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
190 return coex_sta->pre_wifi_rssi_state[index]; in btc8723b2ant_wifi_rssi_state()
193 if ((coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
195 (coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
207 } else if ((coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
209 (coex_sta->pre_wifi_rssi_state[index] == in btc8723b2ant_wifi_rssi_state()
238 coex_sta->pre_wifi_rssi_state[index] = wifi_rssi_state; in btc8723b2ant_wifi_rssi_state()
285 coex_sta->high_priority_tx = reg_hp_tx; in btc8723b2ant_monitor_bt_ctr()
286 coex_sta->high_priority_rx = reg_hp_rx; in btc8723b2ant_monitor_bt_ctr()
287 coex_sta->low_priority_tx = reg_lp_tx; in btc8723b2ant_monitor_bt_ctr()
288 coex_sta->low_priority_rx = reg_lp_rx; in btc8723b2ant_monitor_bt_ctr()
290 if ((coex_sta->low_priority_tx > 1050) && in btc8723b2ant_monitor_bt_ctr()
291 (!coex_sta->c2h_bt_inquiry_page)) in btc8723b2ant_monitor_bt_ctr()
292 coex_sta->pop_event_cnt++; in btc8723b2ant_monitor_bt_ctr()
294 if ((coex_sta->low_priority_rx >= 950) && in btc8723b2ant_monitor_bt_ctr()
295 (coex_sta->low_priority_rx >= coex_sta->low_priority_tx) && in btc8723b2ant_monitor_bt_ctr()
296 (!coex_sta->under_ips)) in btc8723b2ant_monitor_bt_ctr()
314 if (coex_sta->under_ips) { in btc8723b2ant_monitor_wifi_ctr()
315 coex_sta->crc_ok_cck = 0; in btc8723b2ant_monitor_wifi_ctr()
316 coex_sta->crc_ok_11g = 0; in btc8723b2ant_monitor_wifi_ctr()
317 coex_sta->crc_ok_11n = 0; in btc8723b2ant_monitor_wifi_ctr()
318 coex_sta->crc_ok_11n_agg = 0; in btc8723b2ant_monitor_wifi_ctr()
320 coex_sta->crc_err_cck = 0; in btc8723b2ant_monitor_wifi_ctr()
321 coex_sta->crc_err_11g = 0; in btc8723b2ant_monitor_wifi_ctr()
322 coex_sta->crc_err_11n = 0; in btc8723b2ant_monitor_wifi_ctr()
323 coex_sta->crc_err_11n_agg = 0; in btc8723b2ant_monitor_wifi_ctr()
325 coex_sta->crc_ok_cck = in btc8723b2ant_monitor_wifi_ctr()
327 coex_sta->crc_ok_11g = in btc8723b2ant_monitor_wifi_ctr()
329 coex_sta->crc_ok_11n = in btc8723b2ant_monitor_wifi_ctr()
331 coex_sta->crc_ok_11n_agg = in btc8723b2ant_monitor_wifi_ctr()
334 coex_sta->crc_err_cck = in btc8723b2ant_monitor_wifi_ctr()
336 coex_sta->crc_err_11g = in btc8723b2ant_monitor_wifi_ctr()
338 coex_sta->crc_err_11n = in btc8723b2ant_monitor_wifi_ctr()
340 coex_sta->crc_err_11n_agg = in btc8723b2ant_monitor_wifi_ctr()
354 coex_sta->c2h_bt_info_req_sent = true; in btc8723b2ant_query_bt_info()
418 bt_link_info->bt_link_exist = coex_sta->bt_link_exist; in btc8723b2ant_update_bt_link_info()
419 bt_link_info->sco_exist = coex_sta->sco_exist; in btc8723b2ant_update_bt_link_info()
420 bt_link_info->a2dp_exist = coex_sta->a2dp_exist; in btc8723b2ant_update_bt_link_info()
421 bt_link_info->pan_exist = coex_sta->pan_exist; in btc8723b2ant_update_bt_link_info()
422 bt_link_info->hid_exist = coex_sta->hid_exist; in btc8723b2ant_update_bt_link_info()
1079 if ((coex_sta->a2dp_exist) && (coex_sta->hid_exist)) in btc8723b2ant_set_fw_ps_tdma()
1273 if (coex_sta->scan_ap_num <= 5) { 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()
1280 } else if (coex_sta->scan_ap_num <= 20) { in btc8723b2ant_ps_tdma()
1281 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1283 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1287 } else if (coex_sta->scan_ap_num <= 40) { in btc8723b2ant_ps_tdma()
1288 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1290 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1295 if (coex_sta->a2dp_bit_pool >= 45) in btc8723b2ant_ps_tdma()
1297 else if (coex_sta->a2dp_bit_pool >= 35) in btc8723b2ant_ps_tdma()
1530 coex_sta->force_lps_on = false; in btc8723b2ant_power_save_state()
1543 coex_sta->force_lps_on = true; in btc8723b2ant_power_save_state()
1549 coex_sta->force_lps_on = false; in btc8723b2ant_power_save_state()
1584 coex_sta->pop_event_cnt = 0; in btc8723b2ant_init_coex_dm()
1605 if (coex_sta->bt_abnormal_scan) { in btc8723b2ant_action_bt_inquiry()
1667 if (BTC_RSSI_HIGH(wifi_rssi_state1) && (coex_sta->hid_exist) && in btc8723b2ant_action_wifi_idle_process()
1668 (coex_sta->a2dp_exist)) { in btc8723b2ant_action_wifi_idle_process()
1919 retry_count = coex_sta->bt_retry_cnt; in btc8723b2ant_tdma_duration_adjust()
1921 if ((coex_sta->low_priority_tx) > 1050 || in btc8723b2ant_tdma_duration_adjust()
1922 (coex_sta->low_priority_rx) > 1250) in btc8723b2ant_tdma_duration_adjust()
3385 if (coex_sta->under_ips) { in btc8723b2ant_run_coexist_mechanism()
3392 if (coex_sta->c2h_bt_inquiry_page && in btc8723b2ant_run_coexist_mechanism()
3569 coex_sta->dis_ver_info_cnt = 0; in ex_btc8723b2ant_init_hwconfig()
3743 bt_info_ext = coex_sta->bt_info_ext; in ex_btc8723b2ant_display_coex_info()
3749 if (coex_sta->bt_info_c2h_cnt[i]) { in ex_btc8723b2ant_display_coex_info()
3752 coex_sta->bt_info_c2h[i], in ex_btc8723b2ant_display_coex_info()
3753 coex_sta->bt_info_c2h_cnt[i]); in ex_btc8723b2ant_display_coex_info()
3759 ((coex_sta->under_ips ? "IPS ON" : "IPS OFF")), in ex_btc8723b2ant_display_coex_info()
3760 ((coex_sta->under_lps ? "LPS ON" : "LPS OFF"))); in ex_btc8723b2ant_display_coex_info()
3863 coex_sta->high_priority_rx, coex_sta->high_priority_tx); in ex_btc8723b2ant_display_coex_info()
3865 "0x774(low-pri rx/tx)", coex_sta->low_priority_rx, in ex_btc8723b2ant_display_coex_info()
3866 coex_sta->low_priority_tx); in ex_btc8723b2ant_display_coex_info()
3879 coex_sta->under_ips = true; in ex_btc8723b2ant_ips_notify()
3886 coex_sta->under_ips = false; in ex_btc8723b2ant_ips_notify()
3900 coex_sta->under_lps = true; in ex_btc8723b2ant_lps_notify()
3904 coex_sta->under_lps = false; in ex_btc8723b2ant_lps_notify()
3925 &coex_sta->scan_ap_num); in ex_btc8723b2ant_scan_notify()
4012 coex_sta->c2h_bt_info_req_sent = false; in ex_btc8723b2ant_bt_info_notify()
4017 coex_sta->bt_info_c2h_cnt[rsp_source]++; in ex_btc8723b2ant_bt_info_notify()
4023 coex_sta->bt_info_c2h[rsp_source][i] = tmpbuf[i]; in ex_btc8723b2ant_bt_info_notify()
4041 coex_sta->bt_retry_cnt = in ex_btc8723b2ant_bt_info_notify()
4042 coex_sta->bt_info_c2h[rsp_source][2] & 0xf; in ex_btc8723b2ant_bt_info_notify()
4044 if (coex_sta->bt_retry_cnt >= 1) in ex_btc8723b2ant_bt_info_notify()
4045 coex_sta->pop_event_cnt++; in ex_btc8723b2ant_bt_info_notify()
4047 coex_sta->bt_rssi = in ex_btc8723b2ant_bt_info_notify()
4048 coex_sta->bt_info_c2h[rsp_source][3] * 2 + 10; in ex_btc8723b2ant_bt_info_notify()
4050 coex_sta->bt_info_ext = coex_sta->bt_info_c2h[rsp_source][4]; in ex_btc8723b2ant_bt_info_notify()
4052 if (coex_sta->bt_info_c2h[rsp_source][2] & 0x20) in ex_btc8723b2ant_bt_info_notify()
4053 coex_sta->c2h_bt_remote_name_req = true; in ex_btc8723b2ant_bt_info_notify()
4055 coex_sta->c2h_bt_remote_name_req = false; in ex_btc8723b2ant_bt_info_notify()
4057 if (coex_sta->bt_info_c2h[rsp_source][1] == 0x49) in ex_btc8723b2ant_bt_info_notify()
4058 coex_sta->a2dp_bit_pool = in ex_btc8723b2ant_bt_info_notify()
4059 coex_sta->bt_info_c2h[rsp_source][6]; in ex_btc8723b2ant_bt_info_notify()
4061 coex_sta->a2dp_bit_pool = 0; in ex_btc8723b2ant_bt_info_notify()
4066 if ((coex_sta->bt_info_ext & BIT1)) { in ex_btc8723b2ant_bt_info_notify()
4081 if ((coex_sta->bt_info_ext & BIT3)) { in ex_btc8723b2ant_bt_info_notify()
4090 if (!(coex_sta->bt_info_ext & BIT4)) in ex_btc8723b2ant_bt_info_notify()
4098 coex_sta->c2h_bt_inquiry_page = true; in ex_btc8723b2ant_bt_info_notify()
4100 coex_sta->c2h_bt_inquiry_page = false; in ex_btc8723b2ant_bt_info_notify()
4104 coex_sta->bt_link_exist = false; in ex_btc8723b2ant_bt_info_notify()
4105 coex_sta->pan_exist = false; in ex_btc8723b2ant_bt_info_notify()
4106 coex_sta->a2dp_exist = false; in ex_btc8723b2ant_bt_info_notify()
4107 coex_sta->hid_exist = false; in ex_btc8723b2ant_bt_info_notify()
4108 coex_sta->sco_exist = false; in ex_btc8723b2ant_bt_info_notify()
4111 coex_sta->bt_link_exist = true; in ex_btc8723b2ant_bt_info_notify()
4113 coex_sta->pan_exist = true; in ex_btc8723b2ant_bt_info_notify()
4115 coex_sta->pan_exist = false; in ex_btc8723b2ant_bt_info_notify()
4117 coex_sta->a2dp_exist = true; in ex_btc8723b2ant_bt_info_notify()
4119 coex_sta->a2dp_exist = false; in ex_btc8723b2ant_bt_info_notify()
4121 coex_sta->hid_exist = true; in ex_btc8723b2ant_bt_info_notify()
4123 coex_sta->hid_exist = false; in ex_btc8723b2ant_bt_info_notify()
4125 coex_sta->sco_exist = true; in ex_btc8723b2ant_bt_info_notify()
4127 coex_sta->sco_exist = false; in ex_btc8723b2ant_bt_info_notify()
4129 if ((!coex_sta->hid_exist) && in ex_btc8723b2ant_bt_info_notify()
4130 (!coex_sta->c2h_bt_inquiry_page) && in ex_btc8723b2ant_bt_info_notify()
4131 (!coex_sta->sco_exist)) { in ex_btc8723b2ant_bt_info_notify()
4132 if (coex_sta->high_priority_tx + in ex_btc8723b2ant_bt_info_notify()
4133 coex_sta->high_priority_rx >= 160) { in ex_btc8723b2ant_bt_info_notify()
4134 coex_sta->hid_exist = true; in ex_btc8723b2ant_bt_info_notify()
4211 coex_sta->under_ips = false; in ex_btc8723b2ant_pnp_notify()
4212 coex_sta->under_lps = false; in ex_btc8723b2ant_pnp_notify()
4230 if (coex_sta->dis_ver_info_cnt <= 5) { in ex_btc8723b2ant_periodical()
4231 coex_sta->dis_ver_info_cnt += 1; in ex_btc8723b2ant_periodical()
4232 if (coex_sta->dis_ver_info_cnt == 3) { in ex_btc8723b2ant_periodical()
4252 if ((coex_sta->high_priority_tx + in ex_btc8723b2ant_periodical()
4253 coex_sta->high_priority_rx < 50) && in ex_btc8723b2ant_periodical()