From: Marcel Holtmann <marcel@holtmann.org>
To: Andre Guedes <andre.guedes@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC 1/7] Bluetooth: Add new connection states
Date: Sat, 02 Feb 2013 01:51:24 +0100 [thread overview]
Message-ID: <1359766284.16887.2.camel@aeonflux> (raw)
In-Reply-To: <1359765878-31409-2-git-send-email-andre.guedes@openbossa.org>
Hi Andre,
> This patch adds two new connection states which will be used by
> hci_conn to establish LE connections.
>
> BT_SCAN state means the controller is scanning for LE devices. Once
> the target device is found, the connection goes to BT_DEV_FOUND
> state, and then to BT_CONNECT state.
>
> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> ---
> include/net/bluetooth/bluetooth.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 9531bee..add5721 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -126,7 +126,9 @@ enum {
> BT_CONNECT2,
> BT_CONFIG,
> BT_DISCONN,
> - BT_CLOSED
> + BT_CLOSED,
> + BT_SCAN,
> + BT_DEV_FOUND
> };
I am actually against this. These states where originally socket states
and not general states that we just pile on top of.
You need to create separate state handling for LE connection handling. I
am really not happy that we always try to shoe-horn this onto something
else.
Regards
Marcel
next prev parent reply other threads:[~2013-02-02 0:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 0:44 [RFC 0/7] LE connection routine Andre Guedes
2013-02-02 0:44 ` [RFC 1/7] Bluetooth: Add new connection states Andre Guedes
2013-02-02 0:51 ` Marcel Holtmann [this message]
2013-02-08 1:33 ` Andre Guedes
2013-02-02 0:44 ` [RFC 2/7] Bluetooth: Make hci_le_create_connection non-static Andre Guedes
2013-02-02 0:44 ` [RFC 3/7] Bluetooth: Setup LE scan with no timeout Andre Guedes
2013-02-02 0:44 ` [RFC 4/7] Bluetooth: Add LE scan type macros Andre Guedes
2013-02-02 0:44 ` [RFC 5/7] Bluetooth: Change LE connection routine Andre Guedes
2013-02-02 0:44 ` [RFC 6/7] Bluetooth: Handle hci_conn timeout in BT_SCAN state Andre Guedes
2013-02-02 0:44 ` [RFC 7/7] Bluetooth: Track the number of hci_conn in BT_SCAN 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=1359766284.16887.2.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.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