diff options
author | Hakan Jansson <hakan.jansson@infineon.com> | 2022-06-30 15:45:23 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-07-22 03:12:09 +0300 |
commit | 9baee415460e602686500d825a86436daa27ac8a (patch) | |
tree | 1898aa2128fe82e22ac3e75ea86ba25654e34b6f /drivers/bluetooth | |
parent | f8cad62002a7699fd05a23b558b980b5a77defe0 (diff) | |
download | linux-9baee415460e602686500d825a86436daa27ac8a.tar.xz |
Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode
Always prevent trying to set device baudrate before calling setup() when
using autobaud mode.
This was previously happening for devices which had device specific data
with member no_early_set_baudrate set to 0.
Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_bcm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 9a129867a4c0..0ae627c293c5 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -484,7 +484,7 @@ out: /* If oper_speed is set, ldisc/serdev will set the baudrate * before calling setup() */ - if (!bcm->dev->no_early_set_baudrate) + if (!bcm->dev->no_early_set_baudrate && !bcm->dev->use_autobaud_mode) hu->oper_speed = bcm->dev->oper_speed; err = bcm_gpio_set_power(bcm->dev, true); @@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev) { bdev->use_autobaud_mode = device_property_read_bool(bdev->dev, "brcm,requires-autobaud-mode"); - if (bdev->use_autobaud_mode) - bdev->no_early_set_baudrate = true; - device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed); device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params", bdev->pcm_int_params, 5); |