mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-19 05:24:11 +00:00
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: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
a2f41a8f37
commit
42ce26de67
1 changed files with 3 additions and 0 deletions
|
@ -3525,6 +3525,9 @@ int hci_conn_params_set(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
|
||||||
if (!params)
|
if (!params)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
|
if (params->auto_connect == auto_connect)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (params->auto_connect == HCI_AUTO_CONN_REPORT &&
|
if (params->auto_connect == HCI_AUTO_CONN_REPORT &&
|
||||||
auto_connect != HCI_AUTO_CONN_REPORT)
|
auto_connect != HCI_AUTO_CONN_REPORT)
|
||||||
list_del_init(¶ms->action);
|
list_del_init(¶ms->action);
|
||||||
|
|
Loading…
Add table
Reference in a new issue