aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-10-19 16:38:19 -0400
committerMarcel Holtmann <marcel@holtmann.org>2013-10-20 12:05:40 -0400
commita81070ba3743400444275cc87f8f91bb5b67dd4b (patch)
tree6e65f0b5572dfacf6eeff3e76e9e22d272366776 /net/bluetooth
parente8ba3a1f08d9386b6e4abe9b00c21e38029a76a4 (diff)
Bluetooth: Fix updating settings when there are no HCI commands to send
It is possible that the Set Connectable management command doesn't cause any HCI commands to send (such as when BR/EDR is disabled). We can't just send a response to user space in this case but must also update the necessary device flags and settings. This patch fixes the issue by using the recently introduced set_connectable_update_settings function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index b74a157bde09..51d0446bc4ed 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1483,8 +1483,8 @@ static int set_connectable(struct sock *sk, struct hci_dev *hdev, void *data,
1483 if (err < 0) { 1483 if (err < 0) {
1484 mgmt_pending_remove(cmd); 1484 mgmt_pending_remove(cmd);
1485 if (err == -ENODATA) 1485 if (err == -ENODATA)
1486 err = send_settings_rsp(sk, MGMT_OP_SET_CONNECTABLE, 1486 err = set_connectable_update_settings(hdev, sk,
1487 hdev); 1487 cp->val);
1488 goto failed; 1488 goto failed;
1489 } 1489 }
1490 1490