Re: [PATCH 2/6] Bluetooth: Add LE connect support

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

 



Hi,

On Mon, Oct 25, 2010 at 8:21 AM, Ville Tervo <ville.tervo@xxxxxxxxx> wrote:
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index 0b1e460..0944c0c 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -45,6 +45,32 @@
>  #include <net/bluetooth/bluetooth.h>
>  #include <net/bluetooth/hci_core.h>
>
> +void hci_le_connect(struct hci_conn *conn)

This function could be made static, right? (just noticed this now)

> +{
> +       struct hci_dev *hdev = conn->hdev;
> +       struct hci_cp_le_create_conn cp;
> +
> +       conn->state = BT_CONNECT;
> +       conn->out = 1;
> +
> +       memset(&cp, 0, sizeof(cp));
> +       cp.scan_interval = cpu_to_le16(0x0004);
> +       cp.scan_window = cpu_to_le16(0x0004);
> +       bacpy(&cp.peer_addr, &conn->dst);
> +       cp.conn_interval_min = cpu_to_le16(0x0008);
> +       cp.conn_interval_max = cpu_to_le16(0x0100);
> +       cp.supervision_timeout = cpu_to_le16(0x0064);
> +       cp.min_ce_len = cpu_to_le16(0x0001);
> +       cp.max_ce_len = cpu_to_le16(0x0001);
> +
> +       hci_send_cmd(hdev, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp);
> +}

Regards,
-- 
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
--
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