kernel_optimize_test/drivers/bluetooth
Marcel Holtmann e66890a96a Bluetooth: btusb: Fix secure send command length alignment on Intel 8260
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>
Tested-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Cc: stable@vger.kernel.org
2015-06-09 10:41:49 +03:00
..
ath3k.c ath3k: add support of 13d3:3474 AR3012 device 2015-06-07 09:32:32 +02:00
bcm203x.c Bluetooth: Use devm_kzalloc in bcm203x.c file. 2012-08-06 15:03:00 -03:00
bfusb.c Bluetooth: bfusb: Set the HCI_QUIRK_BROKEN_LOCAL_COMMANDS quirk 2014-12-26 20:16:12 +02:00
bluecard_cs.c Bluetooth: Remove typedef bluecard_info_t 2014-08-14 08:49:25 +02:00
bpa10x.c Bluetooth: Declare bpa10x_table[] as const 2013-10-11 17:05:22 +02:00
bt3c_cs.c Bluetooth: bt3c: Delete some unuseful comments 2015-04-30 01:05:29 +02:00
btbcm.c Bluetooth: btbcm: Add helper functions for UART setup 2015-06-06 07:33:25 +02:00
btbcm.h Bluetooth: btbcm: Add helper functions for UART setup 2015-06-06 07:33:25 +02:00
btintel.c Bluetooth: btintel: Fix calls to __hci_cmd_sync() 2015-05-15 16:04:49 +02:00
btintel.h Bluetooth: btusb: Use proper data structures for Intel vendor events 2015-04-09 10:42:18 +03:00
btmrvl_debugfs.c Bluetooth: btmrvl add firmware dump support 2014-12-03 17:35:51 +01:00
btmrvl_drv.h Bluetooth: btmrvl: support SCO routing to host interface 2015-02-14 05:19:58 +01:00
btmrvl_main.c Bluetooth: btmrvl: support SCO routing to host interface 2015-02-14 05:19:58 +01:00
btmrvl_sdio.c Bluetooth: btmrvl: fix compilation warning 2015-05-13 23:08:04 +02:00
btmrvl_sdio.h Bluetooth: btmrvl add firmware dump support 2014-12-03 17:35:51 +01:00
btrtl.c Bluetooth: btrtl: Create separate module for Realtek BT driver 2015-05-14 12:04:12 +02:00
btrtl.h Bluetooth: btrtl: Create separate module for Realtek BT driver 2015-05-14 12:04:12 +02:00
btsdio.c Bluetooth: Use MD SET register for changing SDIO Type-B to Type-A 2013-12-29 21:31:07 +02:00
btuart_cs.c Bluetooth: Remove typedef btuart_info_t 2014-08-14 08:49:25 +02:00
btusb.c Bluetooth: btusb: Fix secure send command length alignment on Intel 8260 2015-06-09 10:41:49 +03:00
btwilink.c Bluetooth: btwilink: remove DEBUG define 2015-05-13 23:00:51 +02:00
dtl1_cs.c Bluetooth: Remove typedefs nsh_t and dtl1_info_t 2014-08-14 08:49:26 +02:00
hci_ath.c Bluetooth: hci_uart: Add Atheros support for address configuration 2015-04-30 01:05:29 +02:00
hci_bcm.c Bluetooth: hci_uart: Update Broadcom UART setup 2015-06-06 07:37:33 +02:00
hci_bcsp.c Bluetooth: hci_uart: Change 1 to true for bool type variables assignments 2015-05-25 20:57:47 +02:00
hci_h4.c Bluetooth: hci_uart: Provide generic H:4 receive framework 2015-04-07 18:48:21 +02:00
hci_h5.c Bluetooth: hci_uart: Remove the manual protocol init message 2015-04-07 18:47:10 +02:00
hci_intel.c Bluetooth: hci_uart: Use generic Intel support for address setting 2015-04-07 18:48:21 +02:00
hci_ldisc.c Bluetooth: hci_uart: Support operational speed during setup 2015-06-06 07:30:12 +02:00
hci_ll.c Bluetooth: hci_uart: Remove the manual protocol init message 2015-04-07 18:47:10 +02:00
hci_uart.h Bluetooth: hci_uart: Support operational speed during setup 2015-06-06 07:30:12 +02:00
hci_vhci.c Bluetooth: vhci: Clean up coding style fix 2015-06-04 10:02:04 +07:00
Kconfig Bluetooth: btrtl: Create separate module for Realtek BT driver 2015-05-14 12:04:12 +02:00
Makefile Bluetooth: btrtl: Create separate module for Realtek BT driver 2015-05-14 12:04:12 +02:00