diff options
author | Balakrishna Godavarthi <bgodavar@codeaurora.org> | 2020-06-12 14:20:28 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2020-06-12 15:17:47 +0200 |
commit | 590deccf4c0690597ca69349fe46ee124944d8c5 (patch) | |
tree | 82fec820e9641bcc21bd89c392e3fe5be3b867cb /drivers/bluetooth/btqca.c | |
parent | Bluetooth: Use only 8 bits for the HCI CMSG state flags (diff) | |
download | linux-590deccf4c0690597ca69349fe46ee124944d8c5.tar.xz linux-590deccf4c0690597ca69349fe46ee124944d8c5.zip |
Bluetooth: hci_qca: Disable SoC debug logging for WCN3991
By default, WCN3991 sent debug packets to HOST via ACL packet
with header 0xDC2E. This logging is not required on commercial
devices. With this patch SoC logging is disabled post fw
download.
Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btqca.c')
-rw-r--r-- | drivers/bluetooth/btqca.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index c5984966f315..ce9dcffdc5bf 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -400,6 +400,27 @@ out: return ret; } +static int qca_disable_soc_logging(struct hci_dev *hdev) +{ + struct sk_buff *skb; + u8 cmd[2]; + int err; + + cmd[0] = QCA_DISABLE_LOGGING_SUB_OP; + cmd[1] = 0x00; + skb = __hci_cmd_sync_ev(hdev, QCA_DISABLE_LOGGING, sizeof(cmd), cmd, + HCI_EV_CMD_COMPLETE, HCI_INIT_TIMEOUT); + if (IS_ERR(skb)) { + err = PTR_ERR(skb); + bt_dev_err(hdev, "QCA Failed to disable soc logging(%d)", err); + return err; + } + + kfree_skb(skb); + + return 0; +} + int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr) { struct sk_buff *skb; @@ -486,6 +507,12 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, return err; } + if (soc_type >= QCA_WCN3991) { + err = qca_disable_soc_logging(hdev); + if (err < 0) + return err; + } + /* Perform HCI reset */ err = qca_send_reset(hdev); if (err < 0) { |