From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC untested] Bluetooth: btusb: Fix secure send command length alignment on Intel 8260
Date: Tue, 9 Jun 2015 10:43:54 +0300 [thread overview]
Message-ID: <20150609074354.GA30226@t440s.lan> (raw)
In-Reply-To: <1433663228-30253-1-git-send-email-marcel@holtmann.org>
Hi Marcel,
On Sun, Jun 07, 2015, Marcel Holtmann wrote:
> This patch fixes the command length alignment issue for Intel Bluetooth
> 8260.
>
> The length of parameters in the firmware downloading command must be
> multiplication of 4. If not, the command must append Intel_NOP command
> with extra parameters, zeros, at the end, and the firmware file is
> already included Intel_NOP command for alignment.
>
> This patch checks the next command and if the next command is Intel_NOP
> command, it reads the Intel_NOP command and send them together.
>
> For example, if the data from the firmware file looks like this:
> 8E FC 03 11 22 33 02 FC 03 00 00 00
>
> Previously, btusb sends two commands:
> 09 FC 06 8E FC 03 11 22 33
> 09 FC 06 02 FC 03 00 00 00
>
> This won't work because the length of parameters are 6 which violates
> the 4 byte alignment.
>
> This patch will append them together and send as one command:
> 09 FC 0C 8E FC 03 11 22 33 02 FC 03 00 00 00
>
> Based on previous work from Tedd Ho-Jeong An <tedd.an@intel.com>
>
> Reported-by: Tedd Ho-Jeong An <tedd.an@intel.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> Cc: stable@vger.kernel.org
> ---
> drivers/bluetooth/btusb.c | 34 ++++++++++++++++++++++------------
> 1 file changed, 22 insertions(+), 12 deletions(-)
Applied to bluetooth-next. Thanks.
Johan
prev parent reply other threads:[~2015-06-09 7:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-07 7:47 [RFC untested] Bluetooth: btusb: Fix secure send command length alignment on Intel 8260 Marcel Holtmann
2015-06-08 18:55 ` Tedd Ho-Jeong An
2015-06-09 7:43 ` Johan Hedberg [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=20150609074354.GA30226@t440s.lan \
--to=johan.hedberg@gmail.com \
--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).