Skip to content

Commit

Permalink
Bluetooth: btbcm: Fix sleep mode struct ordering
Browse files Browse the repository at this point in the history
According to the documentation for Laird SD40 radio modules (which use
the BCM4329 chipset), the order of the Enable_BREAK_To_Host and
Pulsed_HOST_WAKE parameters in the sleep mode struct is reversed
vis-à-vis our struct declaration.  See page 46 of this PDF:

http://cdn.lairdtech.com/home/brandworld/files/Application%20Note%20-%2040%20Series%20Bluetooth.pdf

The documentation is dated Oct 2015, so fairly recent, making it appear
more likely that the documentation is correct and our code is wrong.
Amend our code to be in congruence with the documentation.

Cc: Sue White <sue.white@lairdtech.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Lukas Wunner authored and Marcel Holtmann committed Jan 10, 2018
1 parent e4b9e5b commit ff87596
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/bluetooth/btbcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ struct bcm_set_sleep_mode {
__u8 tristate_control;
__u8 usb_auto_sleep;
__u8 usb_resume_timeout;
__u8 pulsed_host_wake;
__u8 break_to_host;
__u8 pulsed_host_wake;
} __packed;

struct bcm_set_pcm_int_params {
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ static const struct bcm_set_sleep_mode default_sleep_params = {
/* Irrelevant USB flags */
.usb_auto_sleep = 0,
.usb_resume_timeout = 0,
.break_to_host = 0,
.pulsed_host_wake = 0,
.break_to_host = 0
};

static int bcm_setup_sleep(struct hci_uart *hu)
Expand Down

0 comments on commit ff87596

Please sign in to comment.