2010-10-22 23:56:59

by Anderson Briglia

[permalink] [raw]
Subject: [PATCH 5/6] Bluetooth: Fix initiated LE connections

From: Vinicius Costa Gomes <[email protected]>

Fix LE connections not being marked as master.

Signed-off-by: Vinicius Costa Gomes <[email protected]>
---
net/bluetooth/hci_conn.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index c7309e4..1a48c6a 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -52,6 +52,7 @@ void hci_le_connect(struct hci_conn *conn)

conn->state = BT_CONNECT;
conn->out = 1;
+ conn->link_mode |= HCI_LM_MASTER;

memset(&cp, 0, sizeof(cp));
cp.scan_interval = cpu_to_le16(0x0004);
--
1.7.0.4



2010-10-26 09:28:51

by Ville Tervo

[permalink] [raw]
Subject: Re: [PATCH 5/6] Bluetooth: Fix initiated LE connections

Hi,

On Sat, Oct 23, 2010 at 01:56:59AM +0200, ext Anderson Briglia wrote:
> From: Vinicius Costa Gomes <[email protected]>
>
> Fix LE connections not being marked as master.
>
> Signed-off-by: Vinicius Costa Gomes <[email protected]>
> ---
> net/bluetooth/hci_conn.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index c7309e4..1a48c6a 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -52,6 +52,7 @@ void hci_le_connect(struct hci_conn *conn)
>
> conn->state = BT_CONNECT;
> conn->out = 1;
> + conn->link_mode |= HCI_LM_MASTER;

conn->out and conn->link_mode are redutant information. The role cannot be changed.

>
> memset(&cp, 0, sizeof(cp));
> cp.scan_interval = cpu_to_le16(0x0004);
> --
> 1.7.0.4

--
Ville