Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Andre Guedes <andre.guedes@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC 00/16] Discovery procedure refactoring
Date: Thu, 5 May 2011 01:26:41 -0700	[thread overview]
Message-ID: <20110505082641.GA24639@jh-x301> (raw)
In-Reply-To: <1304123252-14464-1-git-send-email-andre.guedes@openbossa.org>

Hi André,

On Fri, Apr 29, 2011, Andre Guedes wrote:
> Hi all,
> 
> Today, discovery procedure is supported only in hciops. This refactoring has
> been done to provide easier implementation of discovery procedure in mgmtops.
> Lots of effort would be necessary to implement discovery procedure in mgmtops
> because its logic is spread out adapter layer and hciops layer.
> 
> The approach this patchset follows is moving all logic related to discovery
> procedure from adapter layer to hciops layer.
> 
> Future work will be:
>         - full support for discovery procedure (BR/EDR, LE-Only, BR/EDR/LE
>           devices) in kernel via management interface (today, only BR/EDR is
>           supported).
>         - name resolving support through mgmt interface (kernel + userspace)
> 
> Thanks,
> Guedes.
> 
> Anderson Briglia (1):
>   Implement mgmt start and stop discovery
> 
> Andre Guedes (15):
>   Add discovery callbacks to btd_adapter_ops
>   Replace inquiry/scanning calls by discovery calls
>   Add 'discov_state' field to struct dev_info
>   Code cleanup event.c
>   Remove Periodic Inquiry support in hciops
>   Change DiscoverSchedulerInterval default value
>   Add 'timeout' param to start_scanning callback
>   Refactoring adapter_set_state()
>   Remove 'suspend' param from stop_discovery()
>   Add extfeatures to struct dev_info
>   Implement start_discovery hciops callback
>   Remove obsolete code.
>   Implement stop_discovery hciops callback
>   Remove inquiry and scanning callbacks from btd_adapter_ops
>   Remove 'periodic' param from hciops_start_inquiry()
> 
>  plugins/hciops.c  |  373 ++++++++++++++++++++++++++++++++++++-----------------
>  plugins/mgmtops.c |   35 ++----
>  src/adapter.c     |  217 ++++++++++---------------------
>  src/adapter.h     |   19 +--
>  src/event.c       |   48 +-------
>  src/event.h       |    1 -
>  src/main.conf     |    4 +-
>  7 files changed, 345 insertions(+), 352 deletions(-)

All patches in this set have been pushed upstream. Thanks.

There seems to be at least one race condition that'd need fixing which I
can see with test-discovery: if the D-Bus client that requested
discovery exits like test-discovery does it can occur between sending
the HCI_Inquiry command but before the cmd_status or first inquiry event
arrives. In this case the adapter state doesn't seem to be yet updated
and so the ongoing inquiry doesn't get canceled even if it should. You
should be able to see this simply by running hcidump together with
test-discovery e.g. on your laptop.

Johan

  parent reply	other threads:[~2011-05-05  8:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-30  0:27 [RFC 00/16] Discovery procedure refactoring Andre Guedes
2011-04-30  0:27 ` [RFC 01/16] Add discovery callbacks to btd_adapter_ops Andre Guedes
2011-04-30  0:27 ` [RFC 02/16] Replace inquiry/scanning calls by discovery calls Andre Guedes
2011-04-30  0:27 ` [RFC 03/16] Add 'discov_state' field to struct dev_info Andre Guedes
2011-04-30  0:27 ` [RFC 04/16] Code cleanup event.c Andre Guedes
2011-04-30  0:27 ` [RFC 05/16] Remove Periodic Inquiry support in hciops Andre Guedes
2011-05-02  7:38   ` Luiz Augusto von Dentz
2011-05-02 22:35     ` Andre Guedes
2011-04-30  0:27 ` [RFC 06/16] Change DiscoverSchedulerInterval default value Andre Guedes
2011-05-02  7:48   ` Luiz Augusto von Dentz
2011-05-02 22:37     ` Andre Guedes
2011-04-30  0:27 ` [RFC 07/16] Add 'timeout' param to start_scanning callback Andre Guedes
2011-04-30  0:27 ` [RFC 08/16] Refactoring adapter_set_state() Andre Guedes
2011-04-30  0:27 ` [RFC 09/16] Remove 'suspend' param from stop_discovery() Andre Guedes
2011-05-02  8:42   ` Luiz Augusto von Dentz
2011-05-02 22:38     ` Andre Guedes
2011-04-30  0:27 ` [RFC 10/16] Add extfeatures to struct dev_info Andre Guedes
2011-04-30  0:27 ` [RFC 11/16] Implement start_discovery hciops callback Andre Guedes
2011-04-30  0:27 ` [RFC 12/16] Remove obsolete code Andre Guedes
2011-04-30  0:27 ` [RFC 13/16] Implement stop_discovery hciops callback Andre Guedes
2011-04-30  0:27 ` [RFC 14/16] Implement mgmt start and stop discovery Andre Guedes
2011-04-30  0:27 ` [RFC 15/16] Remove inquiry and scanning callbacks from btd_adapter_ops Andre Guedes
2011-04-30  0:27 ` [RFC 16/16] Remove 'periodic' param from hciops_start_inquiry() Andre Guedes
2011-05-02  8:39 ` [RFC 00/16] Discovery procedure refactoring Luiz Augusto von Dentz
2011-05-02 14:01   ` Anderson Lizardo
2011-05-02 22:32   ` Andre Guedes
2011-05-05  8:26 ` Johan Hedberg [this message]
2011-05-10 14:03   ` 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=20110505082641.GA24639@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --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