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

Bluetooth: Don't bother doing anything if auto_connect doesn't change

When hci_conn_params_set() is called if the new auto_connect value is
the same as the old one we don't need to take any action. Simply return
success from the function in this case.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 a2f41a8f
......@@ -3525,6 +3525,9 @@ int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
if (!params)
return -EIO;
if (params->auto_connect == auto_connect)
return 0;
if (params->auto_connect == HCI_AUTO_CONN_REPORT &&
auto_connect != HCI_AUTO_CONN_REPORT)
list_del_init(&params->action);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册