Lines Matching defs:hdev
233 static int qca_power_off(struct hci_dev *hdev);
550 hci_reset_dev(hu->hdev);
627 static void qca_debugfs_init(struct hci_dev *hdev)
629 struct hci_uart *hu = hci_get_drvdata(hdev);
634 if (!hdev->debugfs)
640 ibs_dir = debugfs_create_dir("ibs", hdev->debugfs);
868 bt_dev_dbg(hu->hdev, "SSR is in progress");
926 static int qca_ibs_sleep_ind(struct hci_dev *hdev, struct sk_buff *skb)
928 struct hci_uart *hu = hci_get_drvdata(hdev);
938 static int qca_ibs_wake_ind(struct hci_dev *hdev, struct sk_buff *skb)
940 struct hci_uart *hu = hci_get_drvdata(hdev);
950 static int qca_ibs_wake_ack(struct hci_dev *hdev, struct sk_buff *skb)
952 struct hci_uart *hu = hci_get_drvdata(hdev);
962 static int qca_recv_acl_data(struct hci_dev *hdev, struct sk_buff *skb)
970 return hci_recv_diag(hdev, skb);
972 return hci_recv_frame(hdev, skb);
1032 bt_dev_err(hu->hdev, "Rx invalid memdump size");
1040 bt_dev_info(hu->hdev, "QCA collecting dump of size:%u",
1060 bt_dev_err(hu->hdev, "QCA: Discarding other packets");
1079 bt_dev_err(hu->hdev, "QCA controller missed packet:%d",
1084 bt_dev_err(hu->hdev,
1099 bt_dev_err(hu->hdev,
1102 bt_dev_dbg(hu->hdev,
1112 bt_dev_err(hu->hdev,
1119 bt_dev_info(hu->hdev,
1138 static int qca_controller_memdump_event(struct hci_dev *hdev,
1141 struct hci_uart *hu = hci_get_drvdata(hdev);
1151 static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
1153 struct hci_uart *hu = hci_get_drvdata(hdev);
1183 return qca_controller_memdump_event(hdev, skb);
1185 return hci_recv_frame(hdev, skb);
1225 qca->rx_skb = h4_recv_buf(hu->hdev, qca->rx_skb, data, count,
1229 bt_dev_err(hu->hdev, "Frame reassembly failed (%d)", err);
1280 static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)
1282 struct hci_uart *hu = hci_get_drvdata(hdev);
1294 bt_dev_err(hdev, "Failed to allocate baudrate packet");
1347 bt_dev_dbg(hu->hdev, "sending power pulse %02x to controller", cmd);
1353 bt_dev_err(hu->hdev, "failed to send power pulse %02x", cmd);
1433 bt_dev_dbg(hu->hdev, "Set UART speed to %d", speed);
1434 ret = qca_set_baudrate(hu->hdev, qca_baudrate);
1450 bt_dev_err(hu->hdev,
1469 bt_dev_err(hu->hdev, "Failed to allocate memory for skb packet");
1480 bt_dev_info(hu->hdev, "crash the soc to collect controller dump");
1487 static void qca_wait_for_dump_collection(struct hci_dev *hdev)
1489 struct hci_uart *hu = hci_get_drvdata(hdev);
1498 static void qca_hw_error(struct hci_dev *hdev, u8 code)
1500 struct hci_uart *hu = hci_get_drvdata(hdev);
1505 bt_dev_info(hdev, "mem_dump_status: %d", qca->memdump_state);
1516 qca_wait_for_dump_collection(hdev);
1521 bt_dev_info(hdev, "waiting for dump to complete");
1522 qca_wait_for_dump_collection(hdev);
1527 bt_dev_err(hu->hdev, "clearing allocated memory due to memdump timeout");
1547 static void qca_cmd_timeout(struct hci_dev *hdev)
1549 struct hci_uart *hu = hci_get_drvdata(hdev);
1556 qca_wait_for_dump_collection(hdev);
1561 bt_dev_info(hdev, "waiting for dump to complete");
1562 qca_wait_for_dump_collection(hdev);
1572 hci_reset_dev(hu->hdev);
1595 bt_dev_err(hu->hdev, "failed to open port");
1619 bt_dev_err(hu->hdev, "failed to open port");
1628 static int qca_power_on(struct hci_dev *hdev)
1630 struct hci_uart *hu = hci_get_drvdata(hdev);
1659 struct hci_dev *hdev = hu->hdev;
1679 set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
1681 bt_dev_info(hdev, "setting up %s",
1687 ret = qca_power_on(hdev);
1694 set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
1696 ret = qca_read_soc_version(hdev, &soc_ver, soc_type);
1715 ret = qca_read_soc_version(hdev, &soc_ver, soc_type);
1720 bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);
1722 ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
1726 qca_debugfs_init(hdev);
1727 hu->hdev->hw_error = qca_hw_error;
1728 hu->hdev->cmd_timeout = qca_cmd_timeout;
1747 bt_dev_err(hdev, "failed to open port");
1758 hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
1760 hu->hdev->set_bdaddr = qca_set_bdaddr;
1855 static int qca_power_off(struct hci_dev *hdev)
1857 struct hci_uart *hu = hci_get_drvdata(hdev);
1861 hu->hdev->hw_error = NULL;
1862 hu->hdev->cmd_timeout = NULL;
1870 qca_send_pre_shutdown_cmd(hdev);
1954 struct hci_dev *hdev;
2036 hdev = qcadev->serdev_hu.hdev;
2039 set_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks);
2040 hdev->shutdown = qca_power_off;
2049 &hdev->quirks);
2052 set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
2078 struct hci_dev *hdev = hu->hdev;
2085 !test_bit(HCI_RUNNING, &hdev->flags))
2152 bt_dev_err(hu->hdev, "SSR or FW download time out");