From: Andre Guedes <andre.guedes@openbossa.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v3 1/6] Bluetooth: LE scan should send Discovering events
Date: Tue, 31 Jan 2012 10:41:52 -0300 [thread overview]
Message-ID: <CACJA=fWWnFA27QGGvoZKU1TrXWWS5jB0e62EaPyjH6DA0G1-xA@mail.gmail.com> (raw)
In-Reply-To: <1327959331.1955.165.camel@aeonflux>
Hi Marcel,
On Mon, Jan 30, 2012 at 6:35 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Andre,
>
>> Send MGMT Discovering events once LE scan starts/stops so the
>> userspace can track when local adapters are discovering LE devices.
>>
>> This way, we also keep the same behavior of inquiry which sends MGMT
>> Discovering events once inquiry starts/stops even if it is triggered
>> by an external tool (e.g. hcitool).
>>
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> include/net/bluetooth/hci_core.h | 1 +
>> net/bluetooth/hci_core.c | 2 ++
>> net/bluetooth/hci_event.c | 5 +++++
>> 3 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
>> index 25f449f..4e569d8 100644
>> --- a/include/net/bluetooth/hci_core.h
>> +++ b/include/net/bluetooth/hci_core.h
>> @@ -61,6 +61,7 @@ struct discovery_state {
>> DISCOVERY_STOPPED,
>> DISCOVERY_STARTING,
>> DISCOVERY_INQUIRY,
>> + DISCOVERY_LE_SCAN,
>> DISCOVERY_RESOLVING,
>> DISCOVERY_STOPPING,
>> } state;
>> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
>> index 91166db..fd22035 100644
>> --- a/net/bluetooth/hci_core.c
>> +++ b/net/bluetooth/hci_core.c
>> @@ -361,6 +361,7 @@ bool hci_discovery_active(struct hci_dev *hdev)
>> struct discovery_state *discov = &hdev->discovery;
>>
>> if (discov->state == DISCOVERY_INQUIRY ||
>> + discov->state == DISCOVERY_LE_SCAN ||
>> discov->state == DISCOVERY_RESOLVING)
>> return true;
>
> I think we need to start using a switch statement here.
Ok, then I'll have a code refactoring patch to handle this separately.
BR,
Andre
next prev parent reply other threads:[~2012-01-31 13:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 22:52 [PATCH v3 0/6] MGMT Start Discovery command LE-Only Support Andre Guedes
2012-01-25 22:52 ` [PATCH v3 1/6] Bluetooth: LE scan should send Discovering events Andre Guedes
2012-01-30 21:35 ` Marcel Holtmann
2012-01-31 13:41 ` Andre Guedes [this message]
2012-01-31 15:12 ` Marcel Holtmann
2012-01-25 22:52 ` [PATCH v3 2/6] Bluetooth: Add helper functions to send LE scan commands Andre Guedes
2012-01-25 22:52 ` [PATCH v3 3/6] Bluetooth: Add hci_do_le_scan() Andre Guedes
2012-01-30 21:38 ` Marcel Holtmann
2012-01-30 23:22 ` Andre Guedes
2012-01-31 0:51 ` Marcel Holtmann
2012-01-31 13:42 ` Andre Guedes
2012-01-25 22:52 ` [PATCH v3 4/6] Bluetooth: Add hci_le_scan() Andre Guedes
2012-01-30 21:41 ` Marcel Holtmann
2012-01-25 22:52 ` [PATCH v3 5/6] Bluetooth: MGMT start discovery LE-Only support Andre Guedes
2012-01-26 12:55 ` Anderson Lizardo
2012-01-26 13:05 ` Andre Guedes
2012-01-30 21:44 ` Marcel Holtmann
2012-01-31 13:44 ` Andre Guedes
2012-01-25 22:52 ` [PATCH v3 6/6] Bluetooth: Fix indentation Andre Guedes
2012-01-30 21:45 ` Marcel Holtmann
2012-01-31 13:45 ` 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='CACJA=fWWnFA27QGGvoZKU1TrXWWS5jB0e62EaPyjH6DA0G1-xA@mail.gmail.com' \
--to=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.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).