linux/net/bluetooth
Sonny Sasaka 3515b56cc0 Bluetooth: Handle Inquiry Cancel error after Inquiry Complete
[ Upstream commit adf1d69264 ]

After sending Inquiry Cancel command to the controller, it is possible
that Inquiry Complete event comes before Inquiry Cancel command complete
event. In this case the Inquiry Cancel command will have status of
Command Disallowed since there is no Inquiry session to be cancelled.
This case should not be treated as error, otherwise we can reach an
inconsistent state.

Example of a btmon trace when this happened:

< HCI Command: Inquiry Cancel (0x01|0x0002) plen 0
> HCI Event: Inquiry Complete (0x01) plen 1
        Status: Success (0x00)
> HCI Event: Command Complete (0x0e) plen 4
      Inquiry Cancel (0x01|0x0002) ncmd 1
        Status: Command Disallowed (0x0c)

Signed-off-by: Sonny Sasaka <sonnysasaka@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:17:59 +02:00
..
bnep
cmtp
hidp
rfcomm Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl 2020-04-13 10:48:13 +02:00
6lowpan.c Bluetooth: add a mutex lock to avoid UAF in do_enale_set 2020-08-19 08:15:59 +02:00
a2mp.c
a2mp.h
af_bluetooth.c
amp.c
amp.h
ecdh_helper.c
ecdh_helper.h
hci_conn.c
hci_core.c
hci_debugfs.c
hci_debugfs.h
hci_event.c Bluetooth: Handle Inquiry Cancel error after Inquiry Complete 2020-10-01 13:17:59 +02:00
hci_request.c
hci_request.h
hci_sock.c
hci_sysfs.c
Kconfig
l2cap_core.c Bluetooth: L2CAP: handle l2cap config request during open state 2020-10-01 13:17:41 +02:00
l2cap_sock.c Bluetooth: prefetch channel before killing sock 2020-10-01 13:17:31 +02:00
leds.c
leds.h
lib.c
Makefile
mgmt_util.c
mgmt_util.h
mgmt.c
sco.c
selftest.c
selftest.h
smp.c
smp.h