Lines Matching full:bt
415 /* TDMA off + pri: BT > WL */
418 /* TDMA off + pri: WL > BT */
421 /* TDMA off + pri: BT = WL */
424 /* TDMA off + pri: BT = WL > BT_Lo */
427 /* TDMA off + pri: WL = BT, BT_Rx > WL_Lo_Tx */
430 /* TDMA off + pri: WL_Rx = BT, BT_HI > WL_Tx > BT_Lo */
433 /* TDMA off + pri: WL_Rx = BT, BT_HI > WL_Tx > BT_Lo */
436 /* TDMA off + pri: WL_Rx = BT, BT_HI > WL_Tx > BT_Lo */
445 /* TDMA off + pri: WL_Hi-Tx > BT, BT_Hi > other-WL > BT_Lo */
448 /* TDMA off + pri: WL_Hi-Tx = BT */
451 /* TDMA off + pri: WL > BT, Block-BT*/
460 /* TDMA off + Ext-Ctrl + pri: E2G-slot block all BT */
466 /* TDMA off + Ext-Ctrl + pri: E2G-slot block all BT */
469 /* TDMA off + Ext-Ctrl + pri: E2G-slot WL > BT */
472 /* TDMA off + Ext-Ctrl + pri: E2G/EBT-slot WL > BT */
819 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _reset_btc_var() local
820 struct rtw89_btc_bt_link_info *bt_linfo = &bt->link_info; in _reset_btc_var()
829 if (type & BTC_RESET_BTINFO) /* only for BT enable */ in _reset_btc_var()
830 memset(bt, 0, sizeof(*bt)); in _reset_btc_var()
998 struct rtw89_btc_bt_info *bt = &cx->bt; in _chk_btc_err() local
1112 if (cnt == 0 && bt->link_info.slave_role) in _chk_btc_err()
1134 bt->enable.now) || (!dm->cnt_dm[BTC_DCNT_BTCNT_HANG] && in _chk_btc_err()
1135 !bt->enable.now)) in _chk_btc_err()
1168 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _update_bt_report() local
1169 struct rtw89_btc_bt_link_info *bt_linfo = &bt->link_info; in _update_bt_report()
1190 bt->ver_info.fw = le32_to_cpu(pver->v7.fw_ver); in _update_bt_report()
1191 bt->ver_info.fw_coex = le32_get_bits(pver->v7.coex_ver, in _update_bt_report()
1193 bt->feature = le32_to_cpu(pver->v7.feature); in _update_bt_report()
1196 bt->ver_info.fw = le32_to_cpu(pver->v1.fw_ver); in _update_bt_report()
1197 bt->ver_info.fw_coex = le32_get_bits(pver->v1.coex_ver, in _update_bt_report()
1199 bt->feature = le32_to_cpu(pver->v1.feature); in _update_bt_report()
1206 bt->scan_info_v1[i] = pscan_v1->scan[i]; in _update_bt_report()
1207 if (bt->scan_info_v1[i].win == 0 && in _update_bt_report()
1208 bt->scan_info_v1[i].intvl == 0) in _update_bt_report()
1214 bt->scan_info_v2[i] = pscan_v2->para[i]; in _update_bt_report()
1223 bt->scan_info_v2[i] = pscan_v7->para[i]; in _update_bt_report()
1231 bt->scan_info_update = 1; in _update_bt_report()
1308 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _chk_btc_report() local
1610 bt->rfk_info.map.timeout = 1; in _chk_btc_report()
1612 bt->rfk_info.map.timeout = 0; in _chk_btc_report()
1614 dm->error.map.bt_rfk_timeout = bt->rfk_info.map.timeout; in _chk_btc_report()
1641 dm->error.map.bt_rfk_timeout = bt->rfk_info.map.timeout; in _chk_btc_report()
1668 dm->error.map.bt_rfk_timeout = bt->rfk_info.map.timeout; in _chk_btc_report()
1847 /* Check diff time between real BT slot and EBT/E5G slot */ in _chk_btc_report()
1891 /* Check diff time between real BT slot and EBT/E5G slot */ in _chk_btc_report()
1938 /* Check diff time between real BT slot and EBT/E5G slot */ in _chk_btc_report()
1982 /* Check diff between real BT slot and EBT/E5G slot */ in _chk_btc_report()
1985 /* Check bt slot length for P2P mode*/ in _chk_btc_report()
1993 else if (bt->link_info.status.map.connect == 0) in _chk_btc_report()
2781 dm->gnt.bt[i].wlan_act_en = 0; in _set_gnt_v1()
2782 dm->gnt.bt[i].wlan_act = 0; in _set_gnt_v1()
2785 dm->gnt.bt[i].wlan_act_en = 1; in _set_gnt_v1()
2786 dm->gnt.bt[i].wlan_act = 0; in _set_gnt_v1()
2789 dm->gnt.bt[i].wlan_act_en = 1; in _set_gnt_v1()
2790 dm->gnt.bt[i].wlan_act = 1; in _set_gnt_v1()
2803 "[BTC], %s(): set bt %s wlan_act\n", __func__, in _set_bt_ignore_wlan_act()
2871 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_bt_tx_power() local
2878 if (bt->rf_para.tx_pwr_freerun == level) in _set_bt_tx_power()
2888 bt->rf_para.tx_pwr_freerun = level; in _set_bt_tx_power()
2898 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_bt_rx_gain() local
2903 if ((bt->rf_para.rx_gain_freerun == level || in _set_bt_rx_gain()
2905 (!rtwdev->chip->scbd || bt->lna_constrain == level)) in _set_bt_rx_gain()
2908 bt->rf_para.rx_gain_freerun = level; in _set_bt_rx_gain()
2930 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_rf_trx_para() local
2931 struct rtw89_btc_bt_link_info *b = &bt->link_info; in _set_rf_trx_para()
2956 dm->trx_para_level = 1; /* for better BT ACI issue */ in _set_rf_trx_para()
2961 /* modify trx_para if WK 2.4G-STA-DL + bt link */ in _set_rf_trx_para()
2965 if (wl->rssi_level == 4 && bt->rssi_level > 2) in _set_rf_trx_para()
2967 else if (wl->rssi_level == 3 && bt->rssi_level > 3) in _set_rf_trx_para()
2996 if (!bt->enable.now || dm->wl_only || wl_smap->rf_off || in _set_rf_trx_para()
3016 struct rtw89_btc_bt_info *bt = &cx->bt; in _update_btc_state_map() local
3017 struct rtw89_btc_bt_link_info *bt_linfo = &bt->link_info; in _update_btc_state_map()
3043 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_bt_afh_info() local
3044 struct rtw89_btc_bt_link_info *b = &bt->link_info; in _set_bt_afh_info()
3080 if (wl->status.map.rf_off || bt->whql_test || in _set_bt_afh_info()
3210 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _check_freerun() local
3216 struct rtw89_btc_bt_link_info *bt_linfo = &bt->link_info; in _check_freerun()
3259 /* TODO get isolation by BT psd */ in _check_freerun()
3683 struct rtw89_btc_bt_hid_desc *hid = &btc->cx.bt.link_info.hid_desc; in rtw89_btc_set_policy_v1()
3684 struct rtw89_btc_bt_hfp_desc *hfp = &btc->cx.bt.link_info.hfp_desc; in rtw89_btc_set_policy_v1()
3696 tbl_w1 = cxtbl[7]; /* Ack/BA no break bt Hi-Pri-rx */ in rtw89_btc_set_policy_v1()
3705 tbl_b1 = cxtbl[4]; /* Ack/BA no break bt Hi-Pri-rx */ in rtw89_btc_set_policy_v1()
3808 case BTC_CXP_OFFE_2GISOB: /* for bt no-link */ in rtw89_btc_set_policy_v1()
4141 struct rtw89_btc_bt_info *bt = &cx->bt; in _set_ant_v0() local
4168 } else if (bt->rfk_info.map.run) { in _set_ant_v0()
4170 "[BTC], %s(): return by bt rfk!!\n", __func__); in _set_ant_v0()
4191 if (bt->enable.now) in _set_ant_v0()
4216 /* BT should control by GNT_BT if WL_2G at S0 */ in _set_ant_v0()
4268 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_ant_v1() local
4289 } else if (bt->rfk_info.map.run) { in _set_ant_v1()
4291 "[BTC], %s(): return by bt rfk!!\n", __func__); in _set_ant_v1()
4308 /* To avoid BT MP driver case (bt_enable but no mailbox) */ in _set_ant_v1()
4309 if (bt->enable.now && bt->run_patch_code) in _set_ant_v1()
4356 BTC_WLACT_SW_HI); /* no BT-Tx */ in _set_ant_v1()
4407 if (btc->cx.bt.link_info.a2dp_desc.active) in _action_wl_off()
4447 struct rtw89_btc_bt_link_info *b = &btc->cx.bt.link_info; in _action_bt_idle()
4454 case BTC_WBUSY_BNOSCAN: /*wl-busy + bt idle*/ in _action_bt_idle()
4455 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-idle */ in _action_bt_idle()
4463 case BTC_WBUSY_BSCAN: /*wl-busy + bt-inq */ in _action_bt_idle()
4467 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq */ in _action_bt_idle()
4471 case BTC_WLINKING: /* wl-connecting + bt-inq or bt-idle */ in _action_bt_idle()
4475 case BTC_WIDLE: /* wl-idle + bt-idle */ in _action_bt_idle()
4495 btc->cx.bt.scan_rx_low_pri = true; in _action_bt_hfp()
4515 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _action_bt_hid() local
4516 struct rtw89_btc_bt_hid_desc *hid = &bt->link_info.hid_desc; in _action_bt_hid()
4525 btc->cx.bt.scan_rx_low_pri = true; in _action_bt_hid()
4531 bt->scan_rx_low_pri = true; in _action_bt_hid()
4553 struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info; in _action_bt_a2dp()
4560 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-A2DP */ in _action_bt_a2dp()
4571 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-A2DP */ in _action_bt_a2dp()
4574 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-A2DP */ in _action_bt_a2dp()
4577 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-A2DP */ in _action_bt_a2dp()
4578 case BTC_WLINKING: /* wl-connecting + bt-A2DP */ in _action_bt_a2dp()
4589 case BTC_WIDLE: /* wl-idle + bt-A2DP */ in _action_bt_a2dp()
4602 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-A2dp_Sink */ in _action_bt_a2dpsink()
4605 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-A2dp_Sink */ in _action_bt_a2dpsink()
4608 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-A2dp_Sink */ in _action_bt_a2dpsink()
4611 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-A2dp_Sink */ in _action_bt_a2dpsink()
4614 case BTC_WLINKING: /* wl-connecting + bt-A2dp_Sink */ in _action_bt_a2dpsink()
4617 case BTC_WIDLE: /* wl-idle + bt-A2dp_Sink */ in _action_bt_a2dpsink()
4630 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-PAN */ in _action_bt_pan()
4633 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-PAN */ in _action_bt_pan()
4636 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-PAN */ in _action_bt_pan()
4639 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-PAN */ in _action_bt_pan()
4642 case BTC_WLINKING: /* wl-connecting + bt-PAN */ in _action_bt_pan()
4645 case BTC_WIDLE: /* wl-idle + bt-pan */ in _action_bt_pan()
4654 struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info; in _action_bt_a2dp_hid()
4661 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-A2DP+HID */ in _action_bt_a2dp_hid()
4662 case BTC_WIDLE: /* wl-idle + bt-A2DP */ in _action_bt_a2dp_hid()
4673 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-A2DP+HID */ in _action_bt_a2dp_hid()
4677 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-A2DP+HID */ in _action_bt_a2dp_hid()
4680 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-A2DP+HID */ in _action_bt_a2dp_hid()
4681 case BTC_WLINKING: /* wl-connecting + bt-A2DP+HID */ in _action_bt_a2dp_hid()
4702 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-A2DP+PAN */ in _action_bt_a2dp_pan()
4705 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-A2DP+PAN */ in _action_bt_a2dp_pan()
4708 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-A2DP+PAN */ in _action_bt_a2dp_pan()
4711 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-A2DP+PAN */ in _action_bt_a2dp_pan()
4714 case BTC_WLINKING: /* wl-connecting + bt-A2DP+PAN */ in _action_bt_a2dp_pan()
4717 case BTC_WIDLE: /* wl-idle + bt-A2DP+PAN */ in _action_bt_a2dp_pan()
4730 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-PAN+HID */ in _action_bt_pan_hid()
4733 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-PAN+HID */ in _action_bt_pan_hid()
4736 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-PAN+HID */ in _action_bt_pan_hid()
4739 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-PAN+HID */ in _action_bt_pan_hid()
4742 case BTC_WLINKING: /* wl-connecting + bt-PAN+HID */ in _action_bt_pan_hid()
4745 case BTC_WIDLE: /* wl-idle + bt-PAN+HID */ in _action_bt_pan_hid()
4758 case BTC_WBUSY_BNOSCAN: /* wl-busy + bt-A2DP+PAN+HID */ in _action_bt_a2dp_pan_hid()
4762 case BTC_WBUSY_BSCAN: /* wl-busy + bt-inq + bt-A2DP+PAN+HID */ in _action_bt_a2dp_pan_hid()
4766 case BTC_WSCAN_BSCAN: /* wl-scan + bt-inq + bt-A2DP+PAN+HID */ in _action_bt_a2dp_pan_hid()
4770 case BTC_WSCAN_BNOSCAN: /* wl-scan + bt-A2DP+PAN+HID */ in _action_bt_a2dp_pan_hid()
4771 case BTC_WLINKING: /* wl-connecting + bt-A2DP+PAN+HID */ in _action_bt_a2dp_pan_hid()
4775 case BTC_WIDLE: /* wl-idle + bt-A2DP+PAN+HID */ in _action_bt_a2dp_pan_hid()
4833 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_btg_ctrl() local
4877 else if (!(bt->run_patch_code && bt->enable.now)) in _set_btg_ctrl()
4911 struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info; in _set_wl_preagc_ctrl()
4917 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_wl_preagc_ctrl() local
4944 } else if (!(bt->run_patch_code && bt->enable.now)) { in _set_wl_preagc_ctrl()
4949 btc->cx.bt.link_info.profile_cnt.now == 0) { in _set_wl_preagc_ctrl()
5058 struct rtw89_btc_bt_info *bt = &cx->bt; in _set_wl_tx_limit() local
5059 struct rtw89_btc_bt_link_info *b = &bt->link_info; in _set_wl_tx_limit()
5145 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_bt_rx_agc() local
5165 if (bt_hi_lna_rx == bt->hi_lna_rx) in _set_bt_rx_agc()
5174 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _set_bt_rx_scan_pri() local
5176 _write_scbd(rtwdev, BTC_WSCB_RXSCAN_PRI, (bool)(!!bt->scan_rx_low_pri)); in _set_bt_rx_scan_pri()
5184 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _action_common() local
5197 bt_fw_ver = bt->ver_info.fw & 0xffff; in _action_common()
5198 if (bt->enable.now && in _action_common()
5200 (bt_fw_ver == bt_rom_code_id && bt->run_patch_code && rtwdev->chip->scbd))) in _action_common()
5229 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _action_by_bt() local
5230 struct rtw89_btc_bt_link_info *bt_linfo = &bt->link_info; in _action_by_bt()
5322 else if (btc->cx.bt.link_info.profile_cnt.now == 0) in _action_wl_25g_mcc()
5365 if (btc->cx.bt.link_info.profile_cnt.now == 0) in _action_wl_2g_mcc()
5383 if (btc->cx.bt.link_info.profile_cnt.now == 0) in _action_wl_2g_scc()
5398 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _action_wl_2g_scc_v1() local
5431 } else if (bt->link_info.status.map.connect == 0) { in _action_wl_2g_scc_v1()
5434 } else if (bt->link_info.a2dp_desc.exist && in _action_wl_2g_scc_v1()
5438 } else if (bt->link_info.a2dp_desc.exist || in _action_wl_2g_scc_v1()
5439 bt->link_info.pan_desc.exist) { in _action_wl_2g_scc_v1()
5460 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _action_wl_2g_scc_v2() local
5504 } else if (bt->link_info.status.map.connect == 0) { in _action_wl_2g_scc_v2()
5507 } else if (bt->link_info.a2dp_desc.exist && in _action_wl_2g_scc_v2()
5511 } else if (bt->link_info.a2dp_desc.exist || in _action_wl_2g_scc_v2()
5512 bt->link_info.pan_desc.exist) { in _action_wl_2g_scc_v2()
5533 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _action_wl_2g_scc_v8() local
5540 else if (bt->link_info.status.map.connect == 0) in _action_wl_2g_scc_v8()
5561 if (btc->cx.bt.link_info.profile_cnt.now == 0) in _action_wl_2g_ap()
5578 if (btc->cx.bt.link_info.profile_cnt.now == 0) in _action_wl_2g_go()
5609 if (btc->cx.bt.link_info.profile_cnt.now == 0) in _action_wl_2g_nan()
5756 /* only care 2 roles + BT coex */ in _update_wl_info()
5906 /* only care 2 roles + BT coex */ in _update_wl_info_v1()
6056 /* only care 2 roles + BT coex */ in _update_wl_info_v2()
6559 /* for WL 5G-Rx interfered with BT issue */ in _update_wl_info_v8()
6681 struct rtw89_btc_bt_a2dp_desc *a2dp = &btc->cx.bt.link_info.a2dp_desc; in rtw89_coex_bt_devinfo_work()
6720 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _update_bt_scbd() local
6738 bt->enable.now = 0; in _update_bt_scbd()
6740 bt->enable.now = 1; in _update_bt_scbd()
6742 if (bt->enable.now != bt->enable.last) in _update_bt_scbd()
6745 /* reset bt info if bt re-enable */ in _update_bt_scbd()
6746 if (bt->enable.now && !bt->enable.last) { in _update_bt_scbd()
6749 bt->enable.now = 1; in _update_bt_scbd()
6752 bt->enable.last = bt->enable.now; in _update_bt_scbd()
6753 bt->scbd = val; in _update_bt_scbd()
6754 bt->mbx_avl = !!(val & BTC_BSCB_ACT); in _update_bt_scbd()
6756 if (bt->whql_test != !!(val & BTC_BSCB_WHQL)) in _update_bt_scbd()
6759 bt->whql_test = !!(val & BTC_BSCB_WHQL); in _update_bt_scbd()
6760 bt->btg_type = val & BTC_BSCB_BT_S1 ? BTC_BT_BTG : BTC_BT_ALONE; in _update_bt_scbd()
6761 bt->link_info.a2dp_desc.exist = !!(val & BTC_BSCB_A2DP_ACT); in _update_bt_scbd()
6763 bt->lna_constrain = !!(val & BTC_BSCB_BT_LNAB0) + in _update_bt_scbd()
6767 if (bt->rfk_info.map.run && !(val & BTC_BSCB_RFK_RUN)) in _update_bt_scbd()
6770 bt->rfk_info.map.run = !!(val & BTC_BSCB_RFK_RUN); in _update_bt_scbd()
6771 bt->rfk_info.map.req = !!(val & BTC_BSCB_RFK_REQ); in _update_bt_scbd()
6772 bt->hi_lna_rx = !!(val & BTC_BSCB_BT_HILNA); in _update_bt_scbd()
6773 bt->link_info.status.map.connect = !!(val & BTC_BSCB_BT_CONNECT); in _update_bt_scbd()
6774 bt->run_patch_code = !!(val & BTC_BSCB_PATCH_CODE); in _update_bt_scbd()
6784 struct rtw89_btc_bt_info *bt = &cx->bt; in _chk_wl_rfk_request() local
6790 if ((bt->rfk_info.map.run || bt->rfk_info.map.req) && in _chk_wl_rfk_request()
6791 !bt->rfk_info.map.timeout) { in _chk_wl_rfk_request()
6808 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _run_coex() local
6893 bt->scan_rx_low_pri = false; in _run_coex()
6919 if (!cx->bt.enable.now && !cx->other.type) { in _run_coex()
6924 if (cx->bt.whql_test) { in _run_coex()
6938 bt->scan_rx_low_pri = false; in _run_coex()
6945 bt->scan_rx_low_pri = false; in _run_coex()
6955 bt->scan_rx_low_pri = true; in _run_coex()
6959 bt->scan_rx_low_pri = true; in _run_coex()
6963 bt->scan_rx_low_pri = true; in _run_coex()
6967 bt->scan_rx_low_pri = true; in _run_coex()
6971 bt->scan_rx_low_pri = true; in _run_coex()
6982 bt->scan_rx_low_pri = true; in _run_coex()
6986 bt->scan_rx_low_pri = true; in _run_coex()
7199 struct rtw89_btc_bt_link_info *b = &cx->bt.link_info; in rtw89_btc_ntfy_specific_packet()
7304 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _update_bt_rssi_level() local
7319 rssi_st = &bt->link_info.rssi_state[i]; in _update_bt_rssi_level()
7354 struct rtw89_btc_bt_info *bt = &cx->bt; in _update_bt_info() local
7355 struct rtw89_btc_bt_link_info *b = &bt->link_info; in _update_bt_info()
7365 if (!memcmp(bt->raw_info, buf, BTC_BTINFO_MAX)) { in _update_bt_info()
7367 "[BTC], %s(): return by bt-info duplicate!!\n", in _update_bt_info()
7373 memcpy(bt->raw_info, buf, BTC_BTINFO_MAX); in _update_bt_info()
7377 __func__, bt->raw_info[2]); in _update_bt_info()
7385 bt->inq_pag.last = bt->inq_pag.now; in _update_bt_info()
7390 btinfo.val = bt->raw_info[BTC_BTINFO_L2]; in _update_bt_info()
7395 bt->inq_pag.now = btinfo.lb2.inq_pag; in _update_bt_info()
7396 cx->cnt_bt[BTC_BCNT_INQPAG] += !!(bt->inq_pag.now && !bt->inq_pag.last); in _update_bt_info()
7408 btinfo.val = bt->raw_info[BTC_BTINFO_L3]; in _update_bt_info()
7412 cx->cnt_bt[BTC_BCNT_INQ] += !!(btinfo.lb3.inq && !bt->inq); in _update_bt_info()
7413 bt->inq = btinfo.lb3.inq; in _update_bt_info()
7414 cx->cnt_bt[BTC_BCNT_PAGE] += !!(btinfo.lb3.pag && !bt->pag); in _update_bt_info()
7415 bt->pag = btinfo.lb3.pag; in _update_bt_info()
7419 btinfo.val = bt->raw_info[BTC_BTINFO_H0]; in _update_bt_info()
7422 bt->rssi_level = _update_bt_rssi_level(rtwdev, b->rssi); in _update_bt_info()
7423 btc->dm.trx_info.bt_rssi = bt->rssi_level; in _update_bt_info()
7426 btinfo.val = bt->raw_info[BTC_BTINFO_H1]; in _update_bt_info()
7431 cx->cnt_bt[BTC_BCNT_REINIT] += !!(btinfo.hb1.reinit && !bt->reinit); in _update_bt_info()
7432 bt->reinit = btinfo.hb1.reinit; in _update_bt_info()
7435 cx->cnt_bt[BTC_BCNT_IGNOWL] += !!(btinfo.hb1.igno_wl && !bt->igno_wl); in _update_bt_info()
7436 bt->igno_wl = btinfo.hb1.igno_wl; in _update_bt_info()
7438 if (bt->igno_wl && !cx->wl.status.map.rf_off) in _update_bt_info()
7442 bt->ble_scan_en = btinfo.hb1.ble_scan; in _update_bt_info()
7450 btinfo.val = bt->raw_info[BTC_BTINFO_H2]; in _update_bt_info()
7463 btinfo.val = bt->raw_info[BTC_BTINFO_H3]; in _update_bt_info()
7978 "[BTC], %s(): C2H BT len:%d class:%d fun:%d\n", in rtw89_btc_c2h_handle()
7993 "[BTC], handle C2H BT INFO with data %8ph\n", buf); in rtw89_btc_c2h_handle()
7999 "[BTC], handle C2H BT SCBD with data %8ph\n", buf); in rtw89_btc_c2h_handle()
8030 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _show_cx_info() local
8065 bt->ver_info.fw_coex, in _show_cx_info()
8066 (bt->ver_info.fw_coex >= chip->btcx_desired ? in _show_cx_info()
8069 if (bt->enable.now && bt->ver_info.fw == 0) in _show_cx_info()
8081 bt->ver_info.fw, bt->run_patch_code ? "patch" : "ROM"); in _show_cx_info()
8227 struct rtw89_btc_bt_link_info *bt_linfo = &btc->cx.bt.link_info; in _show_bt_profile_info()
8280 struct rtw89_btc_bt_info *bt = &cx->bt; in _show_bt_info() local
8282 struct rtw89_btc_bt_link_info *bt_linfo = &bt->link_info; in _show_bt_info()
8296 seq_puts(m, "========== [BT Status] ==========\n"); in _show_bt_info()
8299 "[status]", bt->enable.now ? "Y" : "N", in _show_bt_info()
8300 bt->btg_type ? "Y" : "N", in _show_bt_info()
8301 (bt->enable.now && (bt->btg_type != bt_pos) ? in _show_bt_info()
8306 bt->igno_wl ? "Y" : "N", in _show_bt_info()
8307 bt->mbx_avl ? "Y" : "N", bt->rfk_info.val); in _show_bt_info()
8330 bt->rssi_level, in _show_bt_info()
8367 "[bt_info]", bt->raw_info[2], bt->raw_info[3], in _show_bt_info()
8368 bt->raw_info[4], bt->raw_info[5], bt->raw_info[6], in _show_bt_info()
8369 bt->raw_info[7], in _show_bt_info()
8370 bt->raw_info[0] == BTC_BTINFO_AUTO ? "auto" : "reply", in _show_bt_info()
8380 if (!bt->scan_info_update) { in _show_bt_info()
8388 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_INQ].win), in _show_bt_info()
8389 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_INQ].intvl), in _show_bt_info()
8390 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_PAGE].win), in _show_bt_info()
8391 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_PAGE].intvl), in _show_bt_info()
8392 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_BLE].win), in _show_bt_info()
8393 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_BLE].intvl), in _show_bt_info()
8394 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_INIT].win), in _show_bt_info()
8395 le16_to_cpu(bt->scan_info_v1[BTC_SCAN_INIT].intvl)); in _show_bt_info()
8399 le16_to_cpu(bt->scan_info_v2[CXSCAN_BG].win), in _show_bt_info()
8400 le16_to_cpu(bt->scan_info_v2[CXSCAN_BG].intvl), in _show_bt_info()
8401 le16_to_cpu(bt->scan_info_v2[CXSCAN_INIT].win), in _show_bt_info()
8402 le16_to_cpu(bt->scan_info_v2[CXSCAN_INIT].intvl), in _show_bt_info()
8403 le16_to_cpu(bt->scan_info_v2[CXSCAN_LE].win), in _show_bt_info()
8404 le16_to_cpu(bt->scan_info_v2[CXSCAN_LE].intvl)); in _show_bt_info()
8447 CASE_BTC_POLUT_STR(BT); in id_to_polut()
8692 CASE_BTC_INIT(BT); in id_to_mode()
8763 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _show_dm_info() local
8813 (bt->hi_lna_rx ? "Hi" : "Ori"), dm->wl_btg_rx); in _show_dm_info()
8818 dm->wl_tx_limit.tx_retry, btc->bt_req_len, bt->scan_rx_low_pri); in _show_dm_info()
8966 struct rtw89_btc_bt_a2dp_desc *a2dp = &btc->cx.bt.link_info.a2dp_desc; in _show_fbtc_cysta_v2()
8979 " %-15s : cycle:%d, bcn[all:%d/all_ok:%d/bt:%d/bt_ok:%d]", in _show_fbtc_cysta_v2()
9010 seq_printf(m, " %-15s : avg_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v2()
9016 seq_printf(m, ", max_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v2()
9021 seq_printf(m, ", maxdiff_t[wl:%d/bt:%d]\n", in _show_fbtc_cysta_v2()
9028 /* 1 cycle record 1 wl-slot and 1 bt-slot */ in _show_fbtc_cysta_v2()
9092 struct rtw89_btc_bt_a2dp_desc *a2dp = &btc->cx.bt.link_info.a2dp_desc; in _show_fbtc_cysta_v3()
9107 " %-15s : cycle:%d, bcn[all:%d/all_ok:%d/bt:%d/bt_ok:%d]", in _show_fbtc_cysta_v3()
9134 seq_printf(m, " %-15s : avg_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v3()
9141 ", max_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v3()
9147 ", maxdiff_t[wl:%d/bt:%d]\n", in _show_fbtc_cysta_v3()
9155 /* 1 cycle record 1 wl-slot and 1 bt-slot */ in _show_fbtc_cysta_v3()
9222 struct rtw89_btc_bt_a2dp_desc *a2dp = &btc->cx.bt.link_info.a2dp_desc; in _show_fbtc_cysta_v4()
9237 " %-15s : cycle:%d, bcn[all:%d/all_ok:%d/bt:%d/bt_ok:%d]", in _show_fbtc_cysta_v4()
9266 seq_printf(m, " %-15s : avg_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v4()
9273 ", max_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v4()
9279 ", maxdiff_t[wl:%d/bt:%d]\n", in _show_fbtc_cysta_v4()
9287 /* 1 cycle record 1 wl-slot and 1 bt-slot */ in _show_fbtc_cysta_v4()
9354 struct rtw89_btc_bt_a2dp_desc *a2dp = &btc->cx.bt.link_info.a2dp_desc; in _show_fbtc_cysta_v5()
9369 " %-15s : cycle:%d, bcn[all:%d/all_ok:%d/bt:%d/bt_ok:%d]", in _show_fbtc_cysta_v5()
9398 seq_printf(m, " %-15s : avg_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v5()
9405 ", max_t[wl:%d/bt:%d/lk:%d.%03d]\n", in _show_fbtc_cysta_v5()
9415 /* 1 cycle record 1 wl-slot and 1 bt-slot */ in _show_fbtc_cysta_v5()
9484 struct rtw89_btc_bt_info *bt = &rtwdev->btc.cx.bt; in _show_fbtc_cysta_v7() local
9485 struct rtw89_btc_bt_a2dp_desc *a2dp = &bt->link_info.a2dp_desc; in _show_fbtc_cysta_v7()
9519 seq_printf(m, "\n\r %-15s : avg_t[wl:%d/bt:%d/lk:%d.%03d]", in _show_fbtc_cysta_v7()
9525 seq_printf(m, ", max_t[wl:%d/bt:%d(>%dms:%d)/lk:%d.%03d]", in _show_fbtc_cysta_v7()
9553 /* 1 cycle = 1 wl-slot + 1 bt-slot */ in _show_fbtc_cysta_v7()
9949 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _show_mreg_v1() local
9961 " %-15s : WL->BT:0x%08x(cnt:%d), BT->WL:0x%08x(total:%d, bt_update:%d)\n", in _show_mreg_v1()
9963 bt->scbd, cx->cnt_bt[BTC_BCNT_SCBDREAD], in _show_mreg_v1()
9974 btc->dm.pta_owner == BTC_CTRL_BY_WL ? "WL" : "BT", in _show_mreg_v1()
10027 struct rtw89_btc_bt_info *bt = &btc->cx.bt; in _show_mreg_v2() local
10039 " %-15s : WL->BT:0x%08x(cnt:%d), BT->WL:0x%08x(total:%d, bt_update:%d)\n", in _show_mreg_v2()
10041 bt->scbd, cx->cnt_bt[BTC_BCNT_SCBDREAD], in _show_mreg_v2()
10052 btc->dm.pta_owner == BTC_CTRL_BY_WL ? "WL" : "BT", in _show_mreg_v2()
10105 struct rtw89_btc_bt_info *bt = &cx->bt; in _show_mreg_v7() local
10117 "\n\r %-15s : WL->BT:0x%08x(cnt:%d), BT->WL:0x%08x(total:%d, bt_update:%d)", in _show_mreg_v7()
10119 bt->scbd, cx->cnt_bt[BTC_BCNT_SCBDREAD], in _show_mreg_v7()
10129 dm->pta_owner == BTC_CTRL_BY_WL ? "WL" : "BT", in _show_mreg_v7()
10176 struct rtw89_btc_bt_info *bt = &cx->bt; in _show_summary_v1() local
10230 bt->rfk_info.map.timeout = 1; in _show_summary_v1()
10232 bt->rfk_info.map.timeout = 0; in _show_summary_v1()
10234 dm->error.map.wl_rfk_timeout = bt->rfk_info.map.timeout; in _show_summary_v1()
10280 struct rtw89_btc_bt_info *bt = &cx->bt; in _show_summary_v4() local
10342 bt->rfk_info.map.timeout = 1; in _show_summary_v4()
10344 bt->rfk_info.map.timeout = 0; in _show_summary_v4()
10346 dm->error.map.wl_rfk_timeout = bt->rfk_info.map.timeout; in _show_summary_v4()
10823 struct rtw89_btc_bt_info *bt = &cx->bt; in rtw89_btc_dump_info() local
10826 seq_printf(m, "WL FW / BT FW %d.%d.%d.%d / NA\n", in rtw89_btc_dump_info()
10835 bt->raw_info[2], bt->raw_info[3], in rtw89_btc_dump_info()
10836 bt->raw_info[4], bt->raw_info[5], in rtw89_btc_dump_info()
10837 bt->raw_info[6], bt->raw_info[7], in rtw89_btc_dump_info()
10838 bt->raw_info[0] == BTC_BTINFO_AUTO ? "auto" : "reply", in rtw89_btc_dump_info()