Commit b12691c2 authored by Harish Bandi's avatar Harish Bandi Committed by Greg Kroah-Hartman

Bluetooth: hci_qca: Send VS pre shutdown command.

[ Upstream commit a2780889 ]

WCN399x chips are coex chips, it needs a VS pre shutdown
command while turning off the BT. So that chip can inform
BT is OFF to other active clients.
Signed-off-by: default avatarHarish Bandi <>
Signed-off-by: Marcel Holtmann's avatarMarcel Holtmann <>
Signed-off-by: default avatarSasha Levin <>
parent 113d5ca7
......@@ -99,6 +99,27 @@ static int qca_send_reset(struct hci_dev *hdev)
return 0;
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
struct sk_buff *skb;
int err;
bt_dev_dbg(hdev, "QCA pre shutdown cmd");
skb = __hci_cmd_sync(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
if (IS_ERR(skb)) {
err = PTR_ERR(skb);
bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err);
return err;
return 0;
static void qca_tlv_check_data(struct rome_config *config,
const struct firmware *fw)
......@@ -13,6 +13,7 @@
#define EDL_PATCH_TLV_REQ_CMD (0x1E)
#define EDL_CMD_REQ_RES_EVT (0x00)
#define EDL_PATCH_VER_RES_EVT (0x19)
......@@ -130,6 +131,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
enum qca_btsoc_type soc_type, u32 soc_ver);
int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version);
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev);
static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
return soc_type == QCA_WCN3990 || soc_type == QCA_WCN3998;
......@@ -161,4 +163,9 @@ static inline bool qca_is_wcn399x(enum qca_btsoc_type soc_type)
return false;
static inline int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
......@@ -1319,6 +1319,9 @@ static int qca_power_off(struct hci_dev *hdev)
struct hci_uart *hu = hci_get_drvdata(hdev);
/* Perform pre shutdown command */
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