summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-04 12:37:21 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-07-04 11:58:09 +0200
commit95305baa779223060c7129100424da6c0d01045b (patch)
treeb9ce90eb4ed888ee95f88a234c6f4432994f16cb /net/bluetooth/hci_event.c
parent42ce26de67e13c50885e7856ff91aaeedf07a81b (diff)
Bluetooth: Simplify hci_conn_params->action list usage
Since params->action is used for both the pend_le_conns and pend_le_reports lists we can simplify the adding and deleting of the lists considerably. For example, when deleting entries in most situations we no-longer need to check the auto_connect value but can directly proceed with calling list_del_init on param->action (which is safe even if the entry is not part of any list). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 2a2ef698e851..0ccdf9df2188 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4154,8 +4154,10 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
hci_proto_connect_cfm(conn, ev->status);
params = hci_conn_params_lookup(hdev, &conn->dst, conn->dst_type);
- if (params)
- hci_pend_le_conn_del(hdev, params);
+ if (params) {
+ list_del_init(&params->action);
+ hci_update_background_scan(hdev);
+ }
unlock:
hci_dev_unlock(hdev);