Skip to contentSkip to conversation

Bluetooth: Fix updating background scan for LE connect complete

PATCH In review [email protected] 2 participants 2 messages Jul 6, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Fix updating background scan for LE connect complete

From: Johan Hedberg <[email protected]>

When we get an LE connection complete event we should restart background scanning if there are any any devices needing it. So far the code was only making the decision based on whether the completed connection had any stored parameters or not. This patch ensures that we trigger background scanning always when necessary.

---
 net/bluetooth/hci_event.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
net/bluetooth/hci_event.c +2 -3
index f452e44eff3c..57837cad9919 100644
@@ -4196,12 +4196,11 @@ 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) {
+	if (params)
 		list_del_init(&params->action);
-		hci_update_background_scan(hdev);
-	}
 
 unlock:
+	hci_update_background_scan(hdev);
 	hci_dev_unlock(hdev);
 }
 
Signature · 1 line
1.9.3
maintainer
#1 lore raw

Hi Johan,

Quoted 10 lines

When we get an LE connection complete event we should restart background scanning if there are any any devices needing it. So far the code was only making the decision based on whether the completed connection had any stored parameters or not. This patch ensures that we trigger background scanning always when necessary.

---
net/bluetooth/hci_event.c | 5 ++---

1 file changed, 2 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel