diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-06-29 07:41:50 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:49 -0400 |
commit | 1089b67d8eb7fcdfae837a91aae9af94e329361c (patch) | |
tree | 7f63c0dd5903743a28d825f84ddb8245a4fed275 /net | |
parent | 4b10966f0f204d80f087f955344cbf6074a5cf86 (diff) |
Bluetooth: Clear pending connections from hci_conn_params_clear
When hci_conn_params_clear is called, it is always followed by a
call to hci_pend_le_conns_clear. So instead of making this explicit
just make sure it is always called. This makes this function similar
on how hci_conn_params_add and hci_conn_params_del work.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ffee5f547506..8b206d0942aa 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -959,7 +959,6 @@ static ssize_t le_auto_conn_write(struct file *file, const char __user *data, | |||
959 | } else if (memcmp(buf, "clr", 3) == 0) { | 959 | } else if (memcmp(buf, "clr", 3) == 0) { |
960 | hci_dev_lock(hdev); | 960 | hci_dev_lock(hdev); |
961 | hci_conn_params_clear(hdev); | 961 | hci_conn_params_clear(hdev); |
962 | hci_pend_le_conns_clear(hdev); | ||
963 | hci_update_background_scan(hdev); | 962 | hci_update_background_scan(hdev); |
964 | hci_dev_unlock(hdev); | 963 | hci_dev_unlock(hdev); |
965 | } else { | 964 | } else { |
@@ -3561,6 +3560,8 @@ void hci_conn_params_clear(struct hci_dev *hdev) | |||
3561 | kfree(params); | 3560 | kfree(params); |
3562 | } | 3561 | } |
3563 | 3562 | ||
3563 | hci_pend_le_conns_clear(hdev); | ||
3564 | |||
3564 | BT_DBG("All LE connection parameters were removed"); | 3565 | BT_DBG("All LE connection parameters were removed"); |
3565 | } | 3566 | } |
3566 | 3567 | ||
@@ -4006,7 +4007,6 @@ void hci_unregister_dev(struct hci_dev *hdev) | |||
4006 | hci_remote_oob_data_clear(hdev); | 4007 | hci_remote_oob_data_clear(hdev); |
4007 | hci_white_list_clear(hdev); | 4008 | hci_white_list_clear(hdev); |
4008 | hci_conn_params_clear(hdev); | 4009 | hci_conn_params_clear(hdev); |
4009 | hci_pend_le_conns_clear(hdev); | ||
4010 | hci_dev_unlock(hdev); | 4010 | hci_dev_unlock(hdev); |
4011 | 4011 | ||
4012 | hci_dev_put(hdev); | 4012 | hci_dev_put(hdev); |