OSDN Git Service

Bluetooth: hci_core: fix init for HCI_USER_CHANNEL
authorMattijs Korpershoek <mkorpershoek@baylibre.com>
Thu, 17 Oct 2019 03:20:39 +0000 (20:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 12:34:13 +0000 (13:34 +0100)
commit85d1225b09578649415ebd0a34d3bbb7ec223364
tree56526681c0dc577a02c20c1b8557142659b36041
parent91986927053a94913eb20b67dac0d777babfc628
Bluetooth: hci_core: fix init for HCI_USER_CHANNEL

[ Upstream commit eb8c101e28496888a0dcfe16ab86a1bee369e820 ]

During the setup() stage, HCI device drivers expect the chip to
acknowledge its setup() completion via vendor specific frames.

If userspace opens() such HCI device in HCI_USER_CHANNEL [1] mode,
the vendor specific frames are never tranmitted to the driver, as
they are filtered in hci_rx_work().

Allow HCI devices which operate in HCI_USER_CHANNEL mode to receive
frames if the HCI device is is HCI_INIT state.

[1] https://www.spinics.net/lists/linux-bluetooth/msg37345.html

Fixes: 23500189d7e0 ("Bluetooth: Introduce new HCI socket channel for user operation")
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_core.c