linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Andre Guedes <andre.guedes@openbossa.org>
Cc: Gustavo Padovan <padovan@profusion.mobi>,
	linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v5 13/15] Bluetooth: LE scan infra-structure
Date: Sat, 15 Oct 2011 11:18:50 -0700	[thread overview]
Message-ID: <1318702742.15441.60.camel@aeonflux> (raw)
In-Reply-To: <A58B9034-BFE6-44D1-A5B0-74DBF764778D@openbossa.org>

Hi Andre,

> >>>> This patch adds to hci_core the infra-structure to carry out the
> >>>> LE scan. Functions were created to init the LE scan and cancel
> >>>> an ongoing scanning (hci_do_le_scan and hci_cancel_le_scan).
> >>>> 
> >>>> Also, the HCI_LE_SCAN flag was created to inform if the controller
> >>>> is performing LE scan. The flag is set/cleared when the controller
> >>>> starts/stops scanning.
> >>>> 
> >>>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> >>>> ---
> >>>> include/net/bluetooth/hci.h      |    2 +
> >>>> include/net/bluetooth/hci_core.h |    5 +++
> >>>> net/bluetooth/hci_core.c         |   69 ++++++++++++++++++++++++++++++++++++++
> >>>> net/bluetooth/hci_event.c        |    4 ++
> >>>> 4 files changed, 80 insertions(+), 0 deletions(-)
> >>>> 
> >>>> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> >>>> index 11537b8..7520544 100644
> >>>> --- a/include/net/bluetooth/hci.h
> >>>> +++ b/include/net/bluetooth/hci.h
> >>>> @@ -86,6 +86,8 @@ enum {
> >>>> 	HCI_DEBUG_KEYS,
> >>>> 
> >>>> 	HCI_RESET,
> >>>> +
> >>>> +	HCI_LE_SCAN,
> >>> 
> >>> I remember that Marcel commented against this here. Let's hide this
> >>> internally.
> >> 
> >> If I got it right, Marcel agreed in keeping this flag here, but we
> >> won't export it to userspace now (we'll keep it hidden internally).
> > 
> > hdev->flags is exported to userspace, it is not internal. We need to create
> > other place in struct hci_dev to keep this info. See some of Marcel's reply on
> > this.
> 
> When I said "export to userspace" I meant to add this flag to userspace
> header (lib/hci.h). Even though hdev->flags is exported to userspace,
> if the flag is not defined at that header the userspace cannot decode it
> properly. This way the flag is hidden internally in kernel.
> 
> Marcel, could you clarify this? Are you fine with we keep this HCI_LE_SCAN
> in hdev->flags?

so the hdev->flags has to stay as it is right now since otherwise you
need to change every single driver that sets HCI_RUNNING.

And I do not wanna export any single bit to the user that it does not
need to see. And right now it only needs HCI_UP to HCI_RAW, because they
have been there since ever. And deprecated them takes a bit longer. But
even they will be deprecated in the long run. Any other bit that you
guys introduced goes against this and needs to be fixed.

The one part I do not get right now is why is it so hard to introduce a
new flags variable for this. I mentioned this really early on and you
keep sending patches for it and we keep discussing this.

So I make this pretty simple, call this hdev->mgmt_flags and start
changing these NOW. These flags need to stay internal. Mixing it with
anything that is exported to userspace is a really bad idea.

Regards

Marcel



  reply	other threads:[~2011-10-15 18:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 23:20 [PATCH v5 00/15] Discovery procedure support Andre Guedes
2011-10-05 23:20 ` [PATCH v5 01/15] Bluetooth: Periodic Inquiry and mgmt discovering event Andre Guedes
2011-10-05 23:20 ` [PATCH v5 02/15] Bluetooth: Add mgmt_discovery_complete() Andre Guedes
2011-10-05 23:20 ` [PATCH v5 03/15] Bluetooth: Check pending command in start_discovery() Andre Guedes
2011-10-15 18:30   ` Marcel Holtmann
2011-10-17 12:59     ` Andre Guedes
2011-10-05 23:20 ` [PATCH v5 04/15] Bluetooth: Check pending commands in stop_discovery() Andre Guedes
2011-10-15 18:33   ` Marcel Holtmann
2011-10-05 23:20 ` [PATCH v5 05/15] Bluetooth: Create hci_do_inquiry() Andre Guedes
2011-10-05 23:20 ` [PATCH v5 06/15] Bluetooth: Create hci_cancel_inquiry() Andre Guedes
2011-10-05 23:20 ` [PATCH v5 07/15] Bluetooth: Handle race condition in Discovery Andre Guedes
2011-10-05 23:20 ` [PATCH v5 08/15] Bluetooth: Prepare for full support discovery procedures Andre Guedes
2011-10-06 18:50   ` Gustavo Padovan
2011-10-06 20:30     ` Andre Guedes
2011-10-07 19:51       ` Gustavo Padovan
2011-10-10 16:47         ` Andre Guedes
2011-10-05 23:20 ` [PATCH v5 09/15] Bluetooth: Send mgmt_discovering events Andre Guedes
2011-10-05 23:20 ` [PATCH v5 10/15] Bluetooth: Add 'eir_len' param to mgmt_device_found() Andre Guedes
2011-10-05 23:20 ` [PATCH v5 11/15] Bluetooth: Report LE devices Andre Guedes
2011-10-05 23:20 ` [PATCH v5 12/15] Bluetooth: Add LE Set Scan Parameter Command Andre Guedes
2011-10-05 23:20 ` [PATCH v5 13/15] Bluetooth: LE scan infra-structure Andre Guedes
2011-10-06 19:06   ` Gustavo Padovan
2011-10-06 20:31     ` Andre Guedes
2011-10-07 20:12       ` Gustavo Padovan
2011-10-07 20:31         ` Johan Hedberg
2011-10-10 16:48         ` Andre Guedes
2011-10-15 18:18           ` Marcel Holtmann [this message]
2011-10-17 12:50             ` Andre Guedes
2011-10-05 23:20 ` [PATCH v5 14/15] Bluetooth: Support LE-Only discovery procedure Andre Guedes
2011-10-05 23:20 ` [PATCH v5 15/15] Bluetooth: Support BR/EDR/LE " 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=1318702742.15441.60.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=andre.guedes@openbossa.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=padovan@profusion.mobi \
    /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;
as well as URLs for NNTP newsgroup(s).