diff mbox series

[RFC,v1] Bluetooth: hci_core: Don't stop BT if the BD address missing in dts

Message ID 20190418132123.12816-1-bgodavar@codeaurora.org (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show
Series [RFC,v1] Bluetooth: hci_core: Don't stop BT if the BD address missing in dts | expand

Commit Message

Balakrishna Godavarthi April 18, 2019, 1:21 p.m. UTC
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.

Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
---
 net/bluetooth/hci_core.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Marcel Holtmann April 23, 2019, 4:35 p.m. UTC | #1
Hi Balakrishna,

> 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.
> 
> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> ---
> net/bluetooth/hci_core.c | 2 --
> 1 file changed, 2 deletions(-)

can I get an ACK for this one?

Regards

Marcel
Harish Bandi April 24, 2019, 7:04 a.m. UTC | #2
Hi Balakrishna,

On 2019-04-23 22:05, Marcel Holtmann wrote:
> Hi Balakrishna,
> 
>> 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.
>> 
>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
>> ---
>> net/bluetooth/hci_core.c | 2 --
>> 1 file changed, 2 deletions(-)
> 
> 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.

Tested-by: Harish Bandi <c-hbandi@codeaurora.org>


Thanks,
Harish
Balakrishna Godavarthi April 24, 2019, 7:08 a.m. UTC | #3
Hi Harish,

On 2019-04-24 12:34, Harish Bandi wrote:
> Hi Balakrishna,
> 
> On 2019-04-23 22:05, Marcel Holtmann wrote:
>> Hi Balakrishna,
>> 
>>> 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.
>>> 
>>> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
>>> ---
>>> net/bluetooth/hci_core.c | 2 --
>>> 1 file changed, 2 deletions(-)
>> 
>> 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.
> 
> Tested-by: Harish Bandi <c-hbandi@codeaurora.org>
> 
> 
> Thanks,
> Harish

Thanks for testing will note this improvement and send an incremental 
patch.
Marcel Holtmann April 24, 2019, 7:13 a.m. UTC | #4
Hi Balakrishna,

> 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.
> 
> Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
> ---
> net/bluetooth/hci_core.c | 2 --
> 1 file changed, 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index d6b2540ba7f8..3d9175f130b3 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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: