btrtl_dev 232 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev, btrtl_dev 261 drivers/bluetooth/btrtl.c if (btrtl_dev->fw_len < min_size) btrtl_dev 264 drivers/bluetooth/btrtl.c fwptr = btrtl_dev->fw_data + btrtl_dev->fw_len - sizeof(extension_sig); btrtl_dev 276 drivers/bluetooth/btrtl.c while (fwptr >= btrtl_dev->fw_data + (sizeof(*epatch_info) + 3)) { btrtl_dev 315 drivers/bluetooth/btrtl.c if (btrtl_dev->ic_info->lmp_subver != btrtl_dev 319 drivers/bluetooth/btrtl.c btrtl_dev->ic_info->lmp_subver); btrtl_dev 323 drivers/bluetooth/btrtl.c epatch_info = (struct rtl_epatch_header *)btrtl_dev->fw_data; btrtl_dev 340 drivers/bluetooth/btrtl.c if (btrtl_dev->fw_len < min_size) btrtl_dev 343 drivers/bluetooth/btrtl.c chip_id_base = btrtl_dev->fw_data + sizeof(struct rtl_epatch_header); btrtl_dev 349 drivers/bluetooth/btrtl.c if (chip_id == btrtl_dev->rom_version + 1) { btrtl_dev 360 drivers/bluetooth/btrtl.c btrtl_dev->rom_version); btrtl_dev 366 drivers/bluetooth/btrtl.c if (btrtl_dev->fw_len < min_size) btrtl_dev 373 drivers/bluetooth/btrtl.c buf = kmemdup(btrtl_dev->fw_data + patch_offset, patch_length, btrtl_dev 473 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev) btrtl_dev 475 drivers/bluetooth/btrtl.c if (btrtl_dev->fw_len < 8) btrtl_dev 481 drivers/bluetooth/btrtl.c if (!memcmp(btrtl_dev->fw_data, RTL_EPATCH_SIGNATURE, 8)) { btrtl_dev 486 drivers/bluetooth/btrtl.c return rtl_download_firmware(hdev, btrtl_dev->fw_data, btrtl_dev 487 drivers/bluetooth/btrtl.c btrtl_dev->fw_len); btrtl_dev 491 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev) btrtl_dev 497 drivers/bluetooth/btrtl.c ret = rtlbt_parse_firmware(hdev, btrtl_dev, &fw_data); btrtl_dev 501 drivers/bluetooth/btrtl.c if (btrtl_dev->cfg_len > 0) { btrtl_dev 502 drivers/bluetooth/btrtl.c tbuff = kzalloc(ret + btrtl_dev->cfg_len, GFP_KERNEL); btrtl_dev 511 drivers/bluetooth/btrtl.c memcpy(tbuff + ret, btrtl_dev->cfg_data, btrtl_dev->cfg_len); btrtl_dev 512 drivers/bluetooth/btrtl.c ret += btrtl_dev->cfg_len; btrtl_dev 517 drivers/bluetooth/btrtl.c rtl_dev_info(hdev, "cfg_sz %d, total sz %d", btrtl_dev->cfg_len, ret); btrtl_dev 526 drivers/bluetooth/btrtl.c void btrtl_free(struct btrtl_device_info *btrtl_dev) btrtl_dev 528 drivers/bluetooth/btrtl.c kfree(btrtl_dev->fw_data); btrtl_dev 529 drivers/bluetooth/btrtl.c kfree(btrtl_dev->cfg_data); btrtl_dev 530 drivers/bluetooth/btrtl.c kfree(btrtl_dev); btrtl_dev 537 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev; btrtl_dev 545 drivers/bluetooth/btrtl.c btrtl_dev = kzalloc(sizeof(*btrtl_dev), GFP_KERNEL); btrtl_dev 546 drivers/bluetooth/btrtl.c if (!btrtl_dev) { btrtl_dev 567 drivers/bluetooth/btrtl.c btrtl_dev->ic_info = btrtl_match_ic(lmp_subver, hci_rev, hci_ver, btrtl_dev 570 drivers/bluetooth/btrtl.c if (!btrtl_dev->ic_info) { btrtl_dev 573 drivers/bluetooth/btrtl.c return btrtl_dev; btrtl_dev 576 drivers/bluetooth/btrtl.c if (btrtl_dev->ic_info->has_rom_version) { btrtl_dev 577 drivers/bluetooth/btrtl.c ret = rtl_read_rom_version(hdev, &btrtl_dev->rom_version); btrtl_dev 582 drivers/bluetooth/btrtl.c btrtl_dev->fw_len = rtl_load_file(hdev, btrtl_dev->ic_info->fw_name, btrtl_dev 583 drivers/bluetooth/btrtl.c &btrtl_dev->fw_data); btrtl_dev 584 drivers/bluetooth/btrtl.c if (btrtl_dev->fw_len < 0) { btrtl_dev 586 drivers/bluetooth/btrtl.c btrtl_dev->ic_info->fw_name); btrtl_dev 587 drivers/bluetooth/btrtl.c ret = btrtl_dev->fw_len; btrtl_dev 591 drivers/bluetooth/btrtl.c if (btrtl_dev->ic_info->cfg_name) { btrtl_dev 594 drivers/bluetooth/btrtl.c btrtl_dev->ic_info->cfg_name, postfix); btrtl_dev 597 drivers/bluetooth/btrtl.c btrtl_dev->ic_info->cfg_name); btrtl_dev 599 drivers/bluetooth/btrtl.c btrtl_dev->cfg_len = rtl_load_file(hdev, cfg_name, btrtl_dev 600 drivers/bluetooth/btrtl.c &btrtl_dev->cfg_data); btrtl_dev 601 drivers/bluetooth/btrtl.c if (btrtl_dev->ic_info->config_needed && btrtl_dev 602 drivers/bluetooth/btrtl.c btrtl_dev->cfg_len <= 0) { btrtl_dev 604 drivers/bluetooth/btrtl.c btrtl_dev->ic_info->cfg_name); btrtl_dev 605 drivers/bluetooth/btrtl.c ret = btrtl_dev->cfg_len; btrtl_dev 610 drivers/bluetooth/btrtl.c return btrtl_dev; btrtl_dev 613 drivers/bluetooth/btrtl.c btrtl_free(btrtl_dev); btrtl_dev 620 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev) btrtl_dev 628 drivers/bluetooth/btrtl.c if (!btrtl_dev->ic_info) { btrtl_dev 633 drivers/bluetooth/btrtl.c switch (btrtl_dev->ic_info->lmp_subver) { btrtl_dev 636 drivers/bluetooth/btrtl.c return btrtl_setup_rtl8723a(hdev, btrtl_dev); btrtl_dev 641 drivers/bluetooth/btrtl.c return btrtl_setup_rtl8723b(hdev, btrtl_dev); btrtl_dev 651 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev; btrtl_dev 654 drivers/bluetooth/btrtl.c btrtl_dev = btrtl_initialize(hdev, NULL); btrtl_dev 655 drivers/bluetooth/btrtl.c if (IS_ERR(btrtl_dev)) btrtl_dev 656 drivers/bluetooth/btrtl.c return PTR_ERR(btrtl_dev); btrtl_dev 658 drivers/bluetooth/btrtl.c ret = btrtl_download_firmware(hdev, btrtl_dev); btrtl_dev 660 drivers/bluetooth/btrtl.c btrtl_free(btrtl_dev); btrtl_dev 729 drivers/bluetooth/btrtl.c struct btrtl_device_info *btrtl_dev, btrtl_dev 738 drivers/bluetooth/btrtl.c total_data_len = btrtl_dev->cfg_len - sizeof(*config); btrtl_dev 744 drivers/bluetooth/btrtl.c config = (struct rtl_vendor_config *)btrtl_dev->cfg_data; btrtl_dev 54 drivers/bluetooth/btrtl.h void btrtl_free(struct btrtl_device_info *btrtl_dev); btrtl_dev 56 drivers/bluetooth/btrtl.h struct btrtl_device_info *btrtl_dev); btrtl_dev 60 drivers/bluetooth/btrtl.h struct btrtl_device_info *btrtl_dev, btrtl_dev 72 drivers/bluetooth/btrtl.h static inline void btrtl_free(struct btrtl_device_info *btrtl_dev) btrtl_dev 77 drivers/bluetooth/btrtl.h struct btrtl_device_info *btrtl_dev) btrtl_dev 93 drivers/bluetooth/btrtl.h struct btrtl_device_info *btrtl_dev, btrtl_dev 856 drivers/bluetooth/hci_h5.c struct btrtl_device_info *btrtl_dev; btrtl_dev 864 drivers/bluetooth/hci_h5.c btrtl_dev = btrtl_initialize(h5->hu->hdev, h5->id); btrtl_dev 865 drivers/bluetooth/hci_h5.c if (IS_ERR(btrtl_dev)) btrtl_dev 866 drivers/bluetooth/hci_h5.c return PTR_ERR(btrtl_dev); btrtl_dev 868 drivers/bluetooth/hci_h5.c err = btrtl_get_uart_settings(h5->hu->hdev, btrtl_dev, btrtl_dev 890 drivers/bluetooth/hci_h5.c err = btrtl_download_firmware(h5->hu->hdev, btrtl_dev); btrtl_dev 895 drivers/bluetooth/hci_h5.c btrtl_free(btrtl_dev);