summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-07-15 19:43:33 +0200
committerMarcel Holtmann <marcel@holtmann.org>2020-07-16 08:40:07 +0200
commit339ddaa626995bc6218972ca241471f3717cc5f4 (patch)
tree8c56fc283b69d6219b1712ad72eed870e9848c5d /drivers/bluetooth/btusb.c
parent37adf701dd8790fd019c513b7a892d7178170338 (diff)
Bluetooth: Fix update of connection state in `hci_encrypt_cfm`
Starting with the upgrade to v5.8-rc3, I've noticed I wasn't able to connect to my Bluetooth headset properly anymore. While connecting to the device would eventually succeed, bluetoothd seemed to be confused about the current connection state where the state was flapping hence and forth. Bisecting this issue led to commit 3ca44c16b0dc (Bluetooth: Consolidate encryption handling in hci_encrypt_cfm, 2020-05-19), which refactored `hci_encrypt_cfm` to also handle updating the connection state. The commit in question changed the code to call `hci_connect_cfm` inside `hci_encrypt_cfm` and to change the connection state. But with the conversion, we now only update the connection state if a status was set already. In fact, the reverse should be true: the status should be updated if no status is yet set. So let's fix the isuse by reversing the condition. Fixes: 3ca44c16b0dc ("Bluetooth: Consolidate encryption handling in hci_encrypt_cfm") Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
0 files changed, 0 insertions, 0 deletions