Re: [RFC v7 07/11] Bluetooth: Re-enable background scan in case of error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> > ---
> > 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


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux