From: Gustavo Padovan <padovan@profusion.mobi>
To: Andre Guedes <andre.guedes@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v5 08/15] Bluetooth: Prepare for full support discovery procedures
Date: Fri, 7 Oct 2011 16:51:49 -0300 [thread overview]
Message-ID: <20111007195149.GA4108@joana> (raw)
In-Reply-To: <8EBD0209-B0F2-4AEB-B876-D87F8A32C5F6@openbossa.org>
Hi Andre,
* Andre Guedes <andre.guedes@openbossa.org> [2011-10-06 17:30:39 -0300]:
> Hi Gustavo,
>
> On Oct 6, 2011, at 3:50 PM, Gustavo Padovan wrote:
>
> > Hi Andre,
> >
> > * Andre Guedes <andre.guedes@openbossa.org> [2011-10-05 20:20:40 -0300]:
> >
> >> This patch prepares start_discovery() to support LE-Only and BR/EDR/LE
> >> discovery procedures (BR/EDR is already supported).
> >>
> >> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> >> ---
> >> include/net/bluetooth/hci.h | 1 +
> >> include/net/bluetooth/hci_core.h | 1 +
> >> net/bluetooth/mgmt.c | 12 +++++++++++-
> >> 3 files changed, 13 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> >> index aaf79af..1e11e7f 100644
> >> --- a/include/net/bluetooth/hci.h
> >> +++ b/include/net/bluetooth/hci.h
> >> @@ -202,6 +202,7 @@ enum {
> >>
> >> #define LMP_EV4 0x01
> >> #define LMP_EV5 0x02
> >> +#define LMP_NO_BREDR 0x20
> >> #define LMP_LE 0x40
> >>
> >> #define LMP_SNIFF_SUBR 0x02
> >> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> >> index 36e15cc..e0c9790 100644
> >> --- a/include/net/bluetooth/hci_core.h
> >> +++ b/include/net/bluetooth/hci_core.h
> >> @@ -613,6 +613,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
> >> #define lmp_esco_capable(dev) ((dev)->features[3] & LMP_ESCO)
> >> #define lmp_ssp_capable(dev) ((dev)->features[6] & LMP_SIMPLE_PAIR)
> >> #define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH)
> >> +#define lmp_bredr_capable(dev) (!((dev)->features[4] & LMP_NO_BREDR))
> >> #define lmp_le_capable(dev) ((dev)->features[4] & LMP_LE)
> >>
> >> /* ----- Extended LMP capabilities ----- */
> >> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> >> index 58cf33a..0040e37 100644
> >> --- a/net/bluetooth/mgmt.c
> >> +++ b/net/bluetooth/mgmt.c
> >> @@ -32,6 +32,8 @@
> >> #define MGMT_VERSION 0
> >> #define MGMT_REVISION 1
> >>
> >> +#define INQUIRY_LEN_BREDR 0x08 /* TGAP(100) */
> >> +
> >> struct pending_cmd {
> >> struct list_head list;
> >> __u16 opcode;
> >> @@ -1632,7 +1634,15 @@ static int start_discovery(struct sock *sk, u16 index)
> >> goto failed;
> >> }
> >>
> >> - err = hci_do_inquiry(hdev, 0x08);
> >> + if (lmp_host_le_capable(hdev)) {
> >> + if (lmp_bredr_capable(hdev))
> >> + err = -ENOSYS;
> >> + else
> >> + err = -ENOSYS;
> >
> > This seems a lot wrong.
>
> As the patch message says it prepares for supporting LE-only and
> BR/EDR/LE discovery procedures. If you take a look further in the
> patch series you'll see these -ENOSYS being replaced as soon as
> those procedures are supported. Please take a look at patches 14
> and 15.
>
> Anyway, if you don't like this, I can squash it in patch 14. Please
> let me know.
Please do that, makes more sense to me.
Gustavo
next prev parent reply other threads:[~2011-10-07 19:51 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 [this message]
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
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=20111007195149.GA4108@joana \
--to=padovan@profusion.mobi \
--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;
as well as URLs for NNTP newsgroup(s).