From: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
To: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>,
<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 2/2] Bluetooth: mgmt: Fix enabling LE while powered off
Date: Tue, 28 Aug 2012 11:43:47 +0200 [thread overview]
Message-ID: <503C92D3.5050408@tieto.com> (raw)
In-Reply-To: <20120828074008.GA4602@aemeltch-MOBL1>
Hi Andrei,
On 08/28/2012 09:40 AM, Andrei Emeltchenko wrote:
> Hi Andrzej,
>
> On Mon, Aug 27, 2012 at 04:47:30PM +0200, Andrzej Kaczmarek wrote:
>> Set LE called when hdev is up but still has HCI_AUTO_OFF flag set will
>> only change dev_flags and enable feature in host but won't enable feature
>> in controller. As a resulit it's not possible to e.g. start LE only or
>> interleaved discovery due to missing LE Supported flag in local features.
>>
>> This patch ensures HCI Write LE Host Supported is sent when Set Powered is
>> called to clear HCI_AUTO_OFF flag.
>>
>> Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
>> ---
>> net/bluetooth/mgmt.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
>> index ccc6716..f73441f 100644
>> --- a/net/bluetooth/mgmt.c
>> +++ b/net/bluetooth/mgmt.c
>> @@ -2897,6 +2897,17 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
>> hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &ssp);
>> }
>>
>> + if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
>> + struct hci_cp_write_le_host_supported cp;
>> +
>> + memset(&cp, 0, sizeof(cp));
>
> Why memset is needed here?
Not really needed, I forgot to remove it after copy&paste from other
code. I'll send v2 later with memset removed.
BR,
Andrzej
prev parent reply other threads:[~2012-08-28 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 14:47 [PATCH 1/2] Bluetooth: mgmt: Fix enabling SSP while powered off Andrzej Kaczmarek
2012-08-27 14:47 ` [PATCH 2/2] Bluetooth: mgmt: Fix enabling LE " Andrzej Kaczmarek
2012-08-28 7:40 ` Andrei Emeltchenko
2012-08-28 9:43 ` Andrzej Kaczmarek [this message]
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=503C92D3.5050408@tieto.com \
--to=andrzej.kaczmarek@tieto.com \
--cc=andrei.emeltchenko.news@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.