All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix updating background scan for LE connect complete
@ 2014-07-06 12:44 johan.hedberg
  2014-07-06 13:05 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: johan.hedberg @ 2014-07-06 12:44 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

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.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/hci_event.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index f452e44eff3c..57837cad9919 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -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);
 }
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Fix updating background scan for LE connect complete
  2014-07-06 12:44 [PATCH] Bluetooth: Fix updating background scan for LE connect complete johan.hedberg
@ 2014-07-06 13:05 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2014-07-06 13:05 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

Hi Johan,

> 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.
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/hci_event.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-06 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-06 12:44 [PATCH] Bluetooth: Fix updating background scan for LE connect complete johan.hedberg
2014-07-06 13:05 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.