summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btintel.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-10-17 17:00:27 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-10-21 01:49:22 +0300
commitd8270fbb3ffe9a29d81bdaa66c81ef021ba09651 (patch)
tree8e262b1ca55a10593f3c31be2423eb7d6552408e /drivers/bluetooth/btintel.c
parent7e995b9eadbe226e355b785a765fd90fe0487414 (diff)
downloadlinux-d8270fbb3ffe9a29d81bdaa66c81ef021ba09651.tar.xz
Bluetooth: btintel: Set quirk for non-persistent diagnostic settings
For Intel controllers the diagnostics settings are not persistent over HCI Reset. So set the quirk to programm them again on every power up. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btintel.c')
-rw-r--r--drivers/bluetooth/btintel.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 95652aa12454..8d4891725e3b 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -97,9 +97,6 @@ int btintel_set_diag(struct hci_dev *hdev, bool enable)
u8 param[3];
int err;
- if (!test_bit(HCI_RUNNING, &hdev->flags))
- return -ENETDOWN;
-
if (enable) {
param[0] = 0x03;
param[1] = 0x03;
@@ -113,6 +110,8 @@ int btintel_set_diag(struct hci_dev *hdev, bool enable)
skb = __hci_cmd_sync(hdev, 0xfc43, 3, param, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
+ if (err == -ENODATA)
+ return 0;
BT_ERR("%s: Changing Intel diagnostic mode failed (%d)",
hdev->name, err);
return err;