|
7 | 7 | *
|
8 | 8 | * Copyright (C) 2007 Texas Instruments, Inc.
|
9 | 9 | * Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
|
| 10 | + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. |
10 | 11 | *
|
11 | 12 | * Acknowledgements:
|
12 | 13 | * This file is based on hci_ll.c, which was...
|
@@ -1806,13 +1807,12 @@ static int qca_power_on(struct hci_dev *hdev)
|
1806 | 1807 |
|
1807 | 1808 | static void hci_coredump_qca(struct hci_dev *hdev)
|
1808 | 1809 | {
|
| 1810 | + int err; |
1809 | 1811 | static const u8 param[] = { 0x26 };
|
1810 |
| - struct sk_buff *skb; |
1811 | 1812 |
|
1812 |
| - skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT); |
1813 |
| - if (IS_ERR(skb)) |
1814 |
| - bt_dev_err(hdev, "%s: trigger crash failed (%ld)", __func__, PTR_ERR(skb)); |
1815 |
| - kfree_skb(skb); |
| 1813 | + err = __hci_cmd_send(hdev, 0xfc0c, 1, param); |
| 1814 | + if (err < 0) |
| 1815 | + bt_dev_err(hdev, "%s: trigger crash failed (%d)", __func__, err); |
1816 | 1816 | }
|
1817 | 1817 |
|
1818 | 1818 | static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
|
@@ -1904,7 +1904,17 @@ static int qca_setup(struct hci_uart *hu)
|
1904 | 1904 | case QCA_WCN6750:
|
1905 | 1905 | case QCA_WCN6855:
|
1906 | 1906 | case QCA_WCN7850:
|
1907 |
| - set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); |
| 1907 | + |
| 1908 | + /* Set BDA quirk bit for reading BDA value from fwnode property |
| 1909 | + * only if that property exist in DT. |
| 1910 | + */ |
| 1911 | + if (fwnode_property_present(dev_fwnode(hdev->dev.parent), "local-bd-address")) { |
| 1912 | + set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); |
| 1913 | + bt_dev_info(hdev, "setting quirk bit to read BDA from fwnode later"); |
| 1914 | + } else { |
| 1915 | + bt_dev_dbg(hdev, "local-bd-address` is not present in the devicetree so not setting quirk bit for BDA"); |
| 1916 | + } |
| 1917 | + |
1908 | 1918 | hci_set_aosp_capable(hdev);
|
1909 | 1919 |
|
1910 | 1920 | ret = qca_read_soc_version(hdev, &ver, soc_type);
|
|
0 commit comments