Lines Matching defs:hdev

17 int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version,
29 bt_dev_dbg(hdev, "QCA Version Request");
42 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CMD_LEN,
46 bt_dev_err(hdev, "Reading QCA version information failed (%d)",
52 bt_dev_err(hdev, "QCA Version size mismatch len %d", skb->len);
59 bt_dev_err(hdev, "QCA TLV with no header");
66 bt_dev_err(hdev, "QCA Wrong packet received %d %d", edl->cresp,
77 bt_dev_info(hdev, "QCA Product ID :0x%08x",
79 bt_dev_info(hdev, "QCA SOC Version :0x%08x",
81 bt_dev_info(hdev, "QCA ROM Version :0x%08x",
83 bt_dev_info(hdev, "QCA Patch Version:0x%08x",
98 bt_dev_err(hdev, "QCA Failed to get version (%d)", err);
104 static int qca_send_reset(struct hci_dev *hdev)
109 bt_dev_dbg(hdev, "QCA HCI_RESET");
111 skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
114 bt_dev_err(hdev, "QCA Reset failed (%d)", err);
123 int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
128 bt_dev_dbg(hdev, "QCA pre shutdown cmd");
130 skb = __hci_cmd_sync_ev(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
135 bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err);
250 static int qca_tlv_send_segment(struct hci_dev *hdev, int seg_size,
268 return __hci_cmd_send(hdev, EDL_PATCH_CMD_OPCODE, seg_size + 2,
281 skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, seg_size + 2, cmd,
285 bt_dev_err(hdev, "QCA Failed to send TLV segment (%d)", err);
290 bt_dev_err(hdev, "QCA TLV response size mismatch");
297 bt_dev_err(hdev, "TLV with no header");
303 bt_dev_err(hdev, "QCA TLV with error stat 0x%x rtype 0x%x",
313 bt_dev_err(hdev, "QCA TLV with error stat 0x%x rtype 0x%x (0x%x)",
323 static int qca_inject_cmd_complete_event(struct hci_dev *hdev)
345 return hci_recv_frame(hdev, skb);
348 static int qca_download_firmware(struct hci_dev *hdev,
357 bt_dev_info(hdev, "QCA Downloading %s", config->fwname);
359 ret = request_firmware(&fw, config->fwname, &hdev->dev);
361 bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
369 bt_dev_err(hdev, "QCA Failed to allocate memory for file: %s",
385 bt_dev_dbg(hdev, "Send segment %d, size %d", i++, segsize);
392 ret = qca_tlv_send_segment(hdev, segsize, segment,
408 ret = qca_inject_cmd_complete_event(hdev);
416 static int qca_disable_soc_logging(struct hci_dev *hdev)
424 skb = __hci_cmd_sync_ev(hdev, QCA_DISABLE_LOGGING, sizeof(cmd), cmd,
428 bt_dev_err(hdev, "QCA Failed to disable soc logging(%d)", err);
437 int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr)
447 skb = __hci_cmd_sync_ev(hdev, EDL_NVM_ACCESS_OPCODE, sizeof(cmd), cmd,
451 bt_dev_err(hdev, "QCA Change address command failed (%d)", err);
461 int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
469 bt_dev_dbg(hdev, "QCA setup on UART");
493 err = qca_download_firmware(hdev, &config, soc_type);
495 bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
517 err = qca_download_firmware(hdev, &config, soc_type);
519 bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
524 err = qca_disable_soc_logging(hdev);
530 err = qca_send_reset(hdev);
532 bt_dev_err(hdev, "QCA Failed to run HCI_RESET (%d)", err);
536 bt_dev_info(hdev, "QCA setup on UART is completed");
542 int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
547 skb = __hci_cmd_sync_ev(hdev, EDL_WRITE_BD_ADDR_OPCODE, 6, bdaddr,
551 bt_dev_err(hdev, "QCA Change address cmd failed (%d)", err);