Skip to content

Commit

Permalink
Bluetooth: hci_qca: Not send vendor pre-shutdown command for QCA Rome
Browse files Browse the repository at this point in the history
QCA Rome doesn't support the pre-shutdown vendor hci command, this patch
will check the soc type in qca_power_off() and only send this command
for wcn399x.

Fixes: ae56318 ("Bluetooth: hci_qca: Enable power off/on support during hci down/up for QCA Rome")
Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Rocky Liao authored and Marcel Holtmann committed Feb 28, 2020
1 parent 107db7e commit 4f9ed5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/bluetooth/hci_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1759,9 +1759,11 @@ static int qca_power_off(struct hci_dev *hdev)
{
struct hci_uart *hu = hci_get_drvdata(hdev);
struct qca_data *qca = hu->priv;
enum qca_btsoc_type soc_type = qca_soc_type(hu);

/* Stop sending shutdown command if soc crashes. */
if (qca->memdump_state == QCA_MEMDUMP_IDLE) {
if (qca_is_wcn399x(soc_type)
&& qca->memdump_state == QCA_MEMDUMP_IDLE) {
qca_send_pre_shutdown_cmd(hdev);
usleep_range(8000, 10000);
}
Expand Down

0 comments on commit 4f9ed5b

Please sign in to comment.