Lines Matching refs:btrtl
624 struct patch_info *get_patch_entry(struct btrtl_info *btrtl) in get_patch_entry() argument
628 if (btrtl->proto == HCI_UART_3WIRE) in get_patch_entry()
634 n->chip_type != btrtl->chip_type) in get_patch_entry()
637 n->hci_ver != btrtl->hci_ver) in get_patch_entry()
640 n->hci_rev != btrtl->hci_rev) in get_patch_entry()
642 if (n->lmp_subver != btrtl->lmp_subver) in get_patch_entry()
2263 int rtk_get_bt_config(struct btrtl_info *btrtl, uint8_t **config_buf, in rtk_get_bt_config() argument
2340 strcat(bt_config_file_name, btrtl->patch_ent->config_file); in rtk_get_bt_config()
2666 int rtk_get_bt_firmware(struct btrtl_info *btrtl, RT_U8 **fw_buf) in rtk_get_bt_firmware() argument
2676 strcat(firmware_file_name, btrtl->patch_ent->patch_file); in rtk_get_bt_firmware()
2823 struct btrtl_info *btrtl = &rtk_hw_cfg; in rtk_get_chip_type_timeout() local
2826 if (retries < btrtl->h5_max_retries) { in rtk_get_chip_type_timeout()
2828 if (btrtl->host_last_cmd) { in rtk_get_chip_type_timeout()
2829 len = write(btrtl->serial_fd, in rtk_get_chip_type_timeout()
2830 btrtl->host_last_cmd->data, in rtk_get_chip_type_timeout()
2831 btrtl->host_last_cmd->data_len); in rtk_get_chip_type_timeout()
2837 tcflush(btrtl->serial_fd, TCIOFLUSH); in rtk_get_chip_type_timeout()
2851 struct btrtl_info *btrtl = &rtk_hw_cfg; in rtk_get_chip_type() local
2853 nskb = h5_prepare_pkt(btrtl, cmd_buff, sizeof(cmd_buff), in rtk_get_chip_type()
2855 if (btrtl->host_last_cmd){ in rtk_get_chip_type()
2856 skb_free(btrtl->host_last_cmd); in rtk_get_chip_type()
2857 btrtl->host_last_cmd = NULL; in rtk_get_chip_type()
2860 btrtl->host_last_cmd = nskb; in rtk_get_chip_type()
2872 while (btrtl->chip_type_cmd_state != event_received) { in rtk_get_chip_type()
2877 h5_recv(btrtl, &bytes, retlen); in rtk_get_chip_type()
3378 struct btrtl_info *btrtl = &rtk_hw_cfg; in rtk_config() local
3380 btrtl->proto = proto; in rtk_config()
3417 RS_INFO("LMP Subversion 0x%04x", btrtl->lmp_subver); in rtk_config()
3418 RS_INFO("EVersion %d", btrtl->eversion); in rtk_config()
3438 btrtl->patch_ent = get_patch_entry(btrtl); in rtk_config()
3439 if (btrtl->patch_ent) { in rtk_config()
3440 RS_INFO("IC: %s\n", btrtl->patch_ent->ic_name); in rtk_config()
3442 btrtl->patch_ent->patch_file, in rtk_config()
3443 btrtl->patch_ent->config_file); in rtk_config()
3450 rtk_get_bt_config(btrtl, &btrtl->config_buf, &btrtl->baudrate); in rtk_config()
3456 rtk_hw_cfg.fw_len = rtk_get_bt_firmware(btrtl, &btrtl->fw_buf); in rtk_config()