Skip to contentSkip to conversation

Bluetooth: hci_core: Don't stop BT if the BD address missing in dts

RFC In review Balakrishna Godavarthi 3 participants 5 messages Apr 18, 2019 – Apr 24, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 Bluetooth: hci_core: Don't stop BT if the BD address missing in dts

When flag HCI_QUIRK_USE_BDADDR_PROPERTY is set, we will read the bluetooth address from dts. If the bluetooth address node is missing from the dts we will enable it controller UNCONFIGURED state. This patch enables the normal flow even if the BD address is missing from the dts tree.

---
 net/bluetooth/hci_core.c | 2 --
 1 file changed, 2 deletions(-)
net/bluetooth/hci_core.c +0 -2
index d6b2540ba7f8..3d9175f130b3 100644
@@ -1460,8 +1460,6 @@ static int hci_dev_do_open(struct hci_dev *hdev)
 			    hdev->set_bdaddr)
 				ret = hdev->set_bdaddr(hdev,
 						       &hdev->public_addr);
-			else
-				ret = -EADDRNOTAVAIL;
 		}
 
 setup_failed:
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer
#1 lore raw

Hi Balakrishna,

Quoted 10 lines

When flag HCI_QUIRK_USE_BDADDR_PROPERTY is set, we will read the bluetooth address from dts. If the bluetooth address node is missing from the dts we will enable it controller UNCONFIGURED state. This patch enables the normal flow even if the BD address is missing from the dts tree.

---
net/bluetooth/hci_core.c | 2 --

1 file changed, 2 deletions(-)

can I get an ACK for this one?

Regards

Marcel

Tested-by
#2 lore raw

Hi Balakrishna,

Quoted 13 lines · Marcel Holtmann

Hi Balakrishna,

Quoted 10 lines

When flag HCI_QUIRK_USE_BDADDR_PROPERTY is set, we will read the bluetooth address from dts. If the bluetooth address node is missing from the dts we will enable it controller UNCONFIGURED state. This patch enables the normal flow even if the BD address is missing from the dts tree.

---
net/bluetooth/hci_core.c | 2 --

1 file changed, 2 deletions(-)
Quoted 5 lines

can I get an ACK for this one?

Regards

Marcel

nit: it would be better if we print error message, if bd address missing in dts.

tested 20 times with bd address missing in dts.
tested 20 times with bd address available in dts.

Thanks,
Harish

#3 lore raw

Hi Harish,

Quoted 24 lines · Harish Bandi

Hi Balakrishna,

Quoted 13 lines · Marcel Holtmann

Hi Balakrishna,

Quoted 10 lines

When flag HCI_QUIRK_USE_BDADDR_PROPERTY is set, we will read the bluetooth address from dts. If the bluetooth address node is missing from the dts we will enable it controller UNCONFIGURED state. This patch enables the normal flow even if the BD address is missing from the dts tree.

---
net/bluetooth/hci_core.c | 2 --

1 file changed, 2 deletions(-)
Quoted 5 lines

can I get an ACK for this one?

Regards

Marcel

nit: it would be better if we print error message, if bd address missing in dts.

Quoted 8 lines

tested 20 times with bd address missing in dts.
tested 20 times with bd address available in dts.

Thanks,
Harish

Thanks for testing will note this improvement and send an incremental patch.

Signature · 2 lines
Regards
Balakrishna.
maintainer
#4 lore raw
In reply to Balakrishna Godavarthi

Hi Balakrishna,

Quoted 10 lines

When flag HCI_QUIRK_USE_BDADDR_PROPERTY is set, we will read the bluetooth address from dts. If the bluetooth address node is missing from the dts we will enable it controller UNCONFIGURED state. This patch enables the normal flow even if the BD address is missing from the dts tree.

---
net/bluetooth/hci_core.c | 2 --

1 file changed, 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel