summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-04 12:37:20 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-07-04 11:58:09 +0200
commit42ce26de67e13c50885e7856ff91aaeedf07a81b (patch)
tree2819f8901eea02a14cdcfc11874c5b4112683a20 /net/bluetooth/hci_core.c
parenta2f41a8f370a940629a0e42258ab9e941b1dbc83 (diff)
downloadop-kernel-dev-42ce26de67e13c50885e7856ff91aaeedf07a81b.zip
op-kernel-dev-42ce26de67e13c50885e7856ff91aaeedf07a81b.tar.gz
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>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index dd8aa5f..0601fcb 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -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);
OpenPOWER on IntegriCloud