Linux bluetooth development
 help / color / mirror / Atom feed
From: Andre Guedes <andre.guedes@openbossa.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC v7 07/11] Bluetooth: Re-enable background scan in case of error
Date: Tue, 04 Feb 2014 15:32:58 -0300	[thread overview]
Message-ID: <1391538778.26488.39.camel@bali> (raw)
In-Reply-To: <D3ABE58A-C3B4-4BF1-8C7B-BE63ECED7C89@holtmann.org>


Hi Marcel,

On Mon, 2014-02-03 at 20:10 -0800, Marcel Holtmann wrote:
> Hi Andre,
> 
> > Since we temporarily stop the background scanning in favor of
> > connection, we should re-enable it in case something goes wrong
> > with connection establishment. So this patch adds a hci_update_
> > background_scan() call in fail_conn_attempt() and hci_le_conn_
> > complete_evt() error flow.
> > 
> > Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> > ---
> > net/bluetooth/hci_conn.c  | 2 ++
> > net/bluetooth/hci_event.c | 1 +
> > 2 files changed, 3 insertions(+)
> > 
> > diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> > index 127465f..2ef29c7 100644
> > --- a/net/bluetooth/hci_conn.c
> > +++ b/net/bluetooth/hci_conn.c
> > @@ -527,6 +527,8 @@ static void le_conn_failed(struct hci_conn *conn, u8 status)
> > 	hci_proto_connect_cfm(conn, status);
> > 
> > 	hci_conn_del(conn);
> > +
> > +	hci_update_background_scan(hdev);
> > }
> > 
> > static void create_le_conn_complete(struct hci_dev *hdev, u8 status)
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> > index ef95030..8de51b1 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -3606,6 +3606,7 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
> > 		hci_proto_connect_cfm(conn, ev->status);
> > 		conn->state = BT_CLOSED;
> > 		hci_conn_del(conn);
> > +		hci_update_background_scan(hdev);
> > 		goto unlock;
> 
> please fold this patch into the one that does the disabling.

I'll squash this patch into 06/11.

- Andre

  reply	other threads:[~2014-02-04 18:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 16:56 [RFC v7 01/11] Bluetooth: Introduce connection parameters list Andre Guedes
2014-02-03 16:56 ` [RFC v7 02/11] Bluetooth: Use connection parameters if any Andre Guedes
2014-02-04  4:02   ` Marcel Holtmann
2014-02-03 16:56 ` [RFC v7 03/11] Bluetooth: Stop scanning on LE connection Andre Guedes
2014-02-04  4:08   ` Marcel Holtmann
2014-02-04 18:32     ` Andre Guedes
2014-02-03 16:56 ` [RFC v7 04/11] Bluetooth: Remove unused function Andre Guedes
2014-02-03 16:56 ` [RFC v7 05/11] Bluetooth: Introduce hdev->pend_le_conn list Andre Guedes
2014-02-03 16:56 ` [RFC v7 06/11] Bluetooth: Introduce LE auto connection infrastructure Andre Guedes
2014-02-03 16:56 ` [RFC v7 07/11] Bluetooth: Re-enable background scan in case of error Andre Guedes
2014-02-04  4:10   ` Marcel Holtmann
2014-02-04 18:32     ` Andre Guedes [this message]
2014-02-03 16:56 ` [RFC v7 08/11] Bluetooth: Temporarily stop background scanning on discovery Andre Guedes
2014-02-04  4:25   ` Marcel Holtmann
2014-02-04 18:33     ` Andre Guedes
2014-02-03 16:56 ` [RFC v7 09/11] Bluetooth: Introduce LE auto connect options Andre Guedes
2014-02-03 16:56 ` [RFC v7 10/11] Bluetooth: Auto connection and power on Andre Guedes
2014-02-03 16:56 ` [RFC v7 11/11] Bluetooth: Add le_auto_conn file on debugfs Andre Guedes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391538778.26488.39.camel@bali \
    --to=andre.guedes@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox