Commit 590deccf authored by Balakrishna Godavarthi's avatar Balakrishna Godavarthi Committed by Marcel Holtmann

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: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 32929e1f
...@@ -400,6 +400,27 @@ static int qca_download_firmware(struct hci_dev *hdev, ...@@ -400,6 +400,27 @@ static int qca_download_firmware(struct hci_dev *hdev,
return ret; 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) int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr)
{ {
struct sk_buff *skb; struct sk_buff *skb;
...@@ -486,6 +507,12 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, ...@@ -486,6 +507,12 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
return err; return err;
} }
if (soc_type >= QCA_WCN3991) {
err = qca_disable_soc_logging(hdev);
if (err < 0)
return err;
}
/* Perform HCI reset */ /* Perform HCI reset */
err = qca_send_reset(hdev); err = qca_send_reset(hdev);
if (err < 0) { if (err < 0) {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#define EDL_NVM_ACCESS_SET_REQ_CMD (0x01) #define EDL_NVM_ACCESS_SET_REQ_CMD (0x01)
#define MAX_SIZE_PER_TLV_SEGMENT (243) #define MAX_SIZE_PER_TLV_SEGMENT (243)
#define QCA_PRE_SHUTDOWN_CMD (0xFC08) #define QCA_PRE_SHUTDOWN_CMD (0xFC08)
#define QCA_DISABLE_LOGGING (0xFC17)
#define EDL_CMD_REQ_RES_EVT (0x00) #define EDL_CMD_REQ_RES_EVT (0x00)
#define EDL_PATCH_VER_RES_EVT (0x19) #define EDL_PATCH_VER_RES_EVT (0x19)
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
#define EDL_CMD_EXE_STATUS_EVT (0x00) #define EDL_CMD_EXE_STATUS_EVT (0x00)
#define EDL_SET_BAUDRATE_RSP_EVT (0x92) #define EDL_SET_BAUDRATE_RSP_EVT (0x92)
#define EDL_NVM_ACCESS_CODE_EVT (0x0B) #define EDL_NVM_ACCESS_CODE_EVT (0x0B)
#define QCA_DISABLE_LOGGING_SUB_OP (0x14)
#define EDL_TAG_ID_HCI (17) #define EDL_TAG_ID_HCI (17)
#define EDL_TAG_ID_DEEP_SLEEP (27) #define EDL_TAG_ID_DEEP_SLEEP (27)
......
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