[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191009085116.199922-1-tientzu@chromium.org>
Date: Wed, 9 Oct 2019 16:51:16 +0800
From: Claire Chang <tientzu@...omium.org>
To: marcel@...tmann.org, johan.hedberg@...il.com
Cc: linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
rjliao@...eaurora.org, rongchi@...eaurora.org,
Claire Chang <tientzu@...omium.org>
Subject: [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement
Enabling in-band sleep when there is no patch/nvm-config found and
bluetooth is running with the original fw/config.
Fixes: ba8f35979002 ("Bluetooth: hci_qca: Avoid setup failure on missing rampatch")
Fixes: 7dc5fe0814c3 ("Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader")
Signed-off-by: Claire Chang <tientzu@...omium.org>
---
drivers/bluetooth/hci_qca.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index e3164c200eac..367eef893a11 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1291,10 +1291,8 @@ static int qca_setup(struct hci_uart *hu)
/* Setup patch / NVM configurations */
ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver,
firmware_name);
- if (!ret) {
- set_bit(QCA_IBS_ENABLED, &qca->flags);
- qca_debugfs_init(hdev);
- } else if (ret == -ENOENT) {
+
+ if (ret == -ENOENT) {
/* No patch/nvm-config found, run with original fw/config */
ret = 0;
} else if (ret == -EAGAIN) {
@@ -1305,6 +1303,11 @@ static int qca_setup(struct hci_uart *hu)
ret = 0;
}
+ if (!ret) {
+ set_bit(QCA_IBS_ENABLED, &qca->flags);
+ qca_debugfs_init(hdev);
+ }
+
/* Setup bdaddr */
if (qca_is_wcn399x(soc_type))
hu->hdev->set_bdaddr = qca_set_bdaddr;
--
2.23.0.581.g78d2f28ef7-goog
Powered by blists - more mailing lists