Lines Matching +full:fw +full:- +full:cfg

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
153 /* Search looking for whether it's a Realtek-based device */ in rtlbt_is_realtek()
155 if ((rtlbt_list[i].product_id == d->idProduct) && in rtlbt_is_realtek()
156 (rtlbt_list[i].vendor_id == d->idVendor)) { in rtlbt_is_realtek()
169 struct libusb_config_descriptor *cfg; in rtlbt_is_bluetooth() local
174 r = libusb_get_active_config_descriptor(dev, &cfg); in rtlbt_is_bluetooth()
181 if (cfg->bNumInterfaces != 0) { in rtlbt_is_bluetooth()
182 /* Only 0-th HCI/ACL interface is supported by downloader */ in rtlbt_is_bluetooth()
183 ifc = &cfg->interface[0]; in rtlbt_is_bluetooth()
184 if (ifc->num_altsetting != 0) { in rtlbt_is_bluetooth()
186 d = &ifc->altsetting[0]; in rtlbt_is_bluetooth()
188 if (d->bInterfaceClass == LIBUSB_CLASS_WIRELESS && in rtlbt_is_bluetooth()
189 d->bInterfaceSubClass == 0x01 && in rtlbt_is_bluetooth()
190 d->bInterfaceProtocol == 0x01) { in rtlbt_is_bluetooth()
192 libusb_free_config_descriptor(cfg); in rtlbt_is_bluetooth()
197 libusb_free_config_descriptor(cfg); in rtlbt_is_bluetooth()
233 /* For non-Realtek match on the vendor/product id */ in rtlbt_find_device()
259 rtlbt_info("hci_version 0x%02x", ver->hci_version); in rtlbt_dump_version()
260 rtlbt_info("hci_revision 0x%04x", le16toh(ver->hci_revision)); in rtlbt_dump_version()
261 rtlbt_info("lmp_version 0x%02x", ver->lmp_version); in rtlbt_dump_version()
262 rtlbt_info("lmp_subversion 0x%04x", le16toh(ver->lmp_subversion)); in rtlbt_dump_version()
275 return (-1); in parse_ugen_name()
279 return (-1); in parse_ugen_name()
283 return (-1); in parse_ugen_name()
292 "Usage: rtlbtfw (-D) -d ugenX.Y (-f firmware path) (-I)\n"); in usage()
293 fprintf(stderr, " -D: enable debugging\n"); in usage()
294 fprintf(stderr, " -d: device to operate upon\n"); in usage()
295 fprintf(stderr, " -f: firmware path, if not default\n"); in usage()
296 fprintf(stderr, " -I: enable informational output\n"); in usage()
317 struct rtlbt_firmware fw, cfg; in main() local
322 while ((n = getopt(argc, argv, "Dd:f:hIm:p:v:")) != -1) { in main()
372 /* XXX enforce the device/product id if they're non-zero */ in main()
412 firmware_path = rtlbt_get_fwname(ic->fw_name, firmware_dir, "_fw.bin"); in main()
421 if (rtlbt_fw_read(&fw, firmware_path) <= 0) { in main()
423 return (-1); in main()
426 fw_type = rtlbt_get_fw_type(&fw, &fw_lmp_subversion); in main()
428 (ic->flags & RTLBT_IC_FLAG_SIMPLE) == 0) { in main()
451 r = rtlbt_parse_fwfile_v1(&fw, rom_version); in main()
457 config_path = rtlbt_get_fwname(ic->fw_name, firmware_dir, in main()
465 if (rtlbt_fw_read(&cfg, config_path) <= 0) { in main()
467 if ((ic->flags & RTLBT_IC_FLAG_CONFIG) != 0) in main()
470 r = rtlbt_append_fwfile(&fw, &cfg); in main()
471 rtlbt_fw_free(&cfg); in main()
479 r = rtlbt_load_fwfile(hdl, &fw); in main()
486 rtlbt_fw_free(&fw); in main()