fix spreadtrum (sprd) bluetooth broken park link status
This commit is contained in:
parent
cdacabd872
commit
24e106b383
@ -658,6 +658,12 @@ static int hci_uart_register_dev(struct hci_uart *hu)
|
||||
hdev->setup = hci_uart_setup;
|
||||
SET_HCIDEV_DEV(hdev, hu->tty->dev);
|
||||
|
||||
// Set the broken Park link status quirk, specific for spreadtrum (sprd)
|
||||
// bluetooth devices
|
||||
if (hdev->manufacturer == 0xffff && hu->tty->driver &&
|
||||
strncmp(hu->tty->driver->name, "ttyBT", 5) == 0)
|
||||
set_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks);
|
||||
|
||||
if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
|
||||
set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
|
||||
|
||||
|
||||
@ -309,6 +309,13 @@ enum {
|
||||
* to support it.
|
||||
*/
|
||||
HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT,
|
||||
|
||||
/*
|
||||
* Device declares that support Park link status, but it really
|
||||
* does not support it and fails to initialize
|
||||
*/
|
||||
HCI_QUIRK_BROKEN_PARK_LINK_STATUS,
|
||||
|
||||
};
|
||||
|
||||
/* HCI device flags */
|
||||
|
||||
@ -3804,7 +3804,7 @@ static int hci_setup_link_policy_sync(struct hci_dev *hdev)
|
||||
link_policy |= HCI_LP_HOLD;
|
||||
if (lmp_sniff_capable(hdev))
|
||||
link_policy |= HCI_LP_SNIFF;
|
||||
if (lmp_park_capable(hdev))
|
||||
if (lmp_park_capable(hdev) && !test_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks))
|
||||
link_policy |= HCI_LP_PARK;
|
||||
|
||||
cp.policy = cpu_to_le16(link_policy);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user