Commit 54780138 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Marcel Holtmann

Bluetooth: btqca: Add valid le states quirk

WCN3991 supports connectable advertisements so we need to add the valid
le states quirk so the 'central-peripheral' role is exposed in
userspace.
Signed-off-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent bff6f1db
...@@ -78,6 +78,7 @@ enum qca_flags { ...@@ -78,6 +78,7 @@ enum qca_flags {
enum qca_capabilities { enum qca_capabilities {
QCA_CAP_WIDEBAND_SPEECH = BIT(0), QCA_CAP_WIDEBAND_SPEECH = BIT(0),
QCA_CAP_VALID_LE_STATES = BIT(1),
}; };
/* HCI_IBS transmit side sleep protocol states */ /* HCI_IBS transmit side sleep protocol states */
...@@ -1780,7 +1781,7 @@ static const struct qca_device_data qca_soc_data_wcn3991 = { ...@@ -1780,7 +1781,7 @@ static const struct qca_device_data qca_soc_data_wcn3991 = {
{ "vddch0", 450000 }, { "vddch0", 450000 },
}, },
.num_vregs = 4, .num_vregs = 4,
.capabilities = QCA_CAP_WIDEBAND_SPEECH, .capabilities = QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES,
}; };
static const struct qca_device_data qca_soc_data_wcn3998 = { static const struct qca_device_data qca_soc_data_wcn3998 = {
...@@ -2017,11 +2018,17 @@ static int qca_serdev_probe(struct serdev_device *serdev) ...@@ -2017,11 +2018,17 @@ static int qca_serdev_probe(struct serdev_device *serdev)
hdev->shutdown = qca_power_off; hdev->shutdown = qca_power_off;
} }
/* Wideband speech support must be set per driver since it can't be if (data) {
* queried via hci. /* Wideband speech support must be set per driver since it can't
*/ * be queried via hci. Same with the valid le states quirk.
if (data && (data->capabilities & QCA_CAP_WIDEBAND_SPEECH)) */
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks); if (data->capabilities & QCA_CAP_WIDEBAND_SPEECH)
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
&hdev->quirks);
if (data->capabilities & QCA_CAP_VALID_LE_STATES)
set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment