提交 a81070ba 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

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: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 e8ba3a1f
......@@ -1483,8 +1483,8 @@ static int set_connectable(struct sock *sk, struct hci_dev *hdev, void *data,
if (err < 0) {
mgmt_pending_remove(cmd);
if (err == -ENODATA)
err = send_settings_rsp(sk, MGMT_OP_SET_CONNECTABLE,
hdev);
err = set_connectable_update_settings(hdev, sk,
cp->val);
goto failed;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册