mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT
[ Upstream commit7dcd3e014a
] BT adapter going into UNCONFIGURED state during BT turn ON when devicetree has no local-bd-address node. Bluetooth will not work out of the box on such devices, to avoid this problem, added check to set HCI_QUIRK_USE_BDADDR_PROPERTY based on local-bd-address node entry. When this quirk is not set, the public Bluetooth address read by host from controller though HCI Read BD Address command is considered as valid. Fixes:e668eb1e15
("Bluetooth: hci_core: Don't stop BT if the BD address missing in dts") Signed-off-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fb3e827bad
commit
c50ce483c2
1 changed files with 12 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Texas Instruments, Inc.
|
* Copyright (C) 2007 Texas Instruments, Inc.
|
||||||
* Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2010, 2012, 2018 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Acknowledgements:
|
* Acknowledgements:
|
||||||
* This file is based on hci_ll.c, which was...
|
* This file is based on hci_ll.c, which was...
|
||||||
|
@ -1882,7 +1883,17 @@ static int qca_setup(struct hci_uart *hu)
|
||||||
case QCA_WCN6750:
|
case QCA_WCN6750:
|
||||||
case QCA_WCN6855:
|
case QCA_WCN6855:
|
||||||
case QCA_WCN7850:
|
case QCA_WCN7850:
|
||||||
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
|
|
||||||
|
/* Set BDA quirk bit for reading BDA value from fwnode property
|
||||||
|
* only if that property exist in DT.
|
||||||
|
*/
|
||||||
|
if (fwnode_property_present(dev_fwnode(hdev->dev.parent), "local-bd-address")) {
|
||||||
|
set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
|
||||||
|
bt_dev_info(hdev, "setting quirk bit to read BDA from fwnode later");
|
||||||
|
} else {
|
||||||
|
bt_dev_dbg(hdev, "local-bd-address` is not present in the devicetree so not setting quirk bit for BDA");
|
||||||
|
}
|
||||||
|
|
||||||
hci_set_aosp_capable(hdev);
|
hci_set_aosp_capable(hdev);
|
||||||
|
|
||||||
ret = qca_read_soc_version(hdev, &ver, soc_type);
|
ret = qca_read_soc_version(hdev, &ver, soc_type);
|
||||||
|
|
Loading…
Reference in a new issue