diff options
Diffstat (limited to 'drivers/bluetooth/hci_qca.c')
| -rw-r--r-- | drivers/bluetooth/hci_qca.c | 17 | 
1 files changed, 16 insertions, 1 deletions
| diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index de36af63e182..0a0056912d51 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1066,7 +1066,7 @@ static void qca_controller_memdump(struct work_struct *work)  		 * packets in the buffer.  		 */  		/* For QCA6390, controller does not lost packets but -		 * sequence number field of packat sometimes has error +		 * sequence number field of packet sometimes has error  		 * bits, so skip this checking for missing packet.  		 */  		while ((seq_no > qca_memdump->current_seq_no + 1) && @@ -1571,6 +1571,20 @@ static void qca_cmd_timeout(struct hci_dev *hdev)  	mutex_unlock(&qca->hci_memdump_lock);  } +static bool qca_prevent_wake(struct hci_dev *hdev) +{ +	struct hci_uart *hu = hci_get_drvdata(hdev); +	bool wakeup; + +	/* UART driver handles the interrupt from BT SoC.So we need to use +	 * device handle of UART driver to get the status of device may wakeup. +	 */ +	wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent); +	bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup); + +	return !wakeup; +} +  static int qca_wcn3990_init(struct hci_uart *hu)  {  	struct qca_serdev *qcadev; @@ -1721,6 +1735,7 @@ retry:  		qca_debugfs_init(hdev);  		hu->hdev->hw_error = qca_hw_error;  		hu->hdev->cmd_timeout = qca_cmd_timeout; +		hu->hdev->prevent_wake = qca_prevent_wake;  	} else if (ret == -ENOENT) {  		/* No patch/nvm-config found, run with original fw/config */  		set_bit(QCA_ROM_FW, &qca->flags); | 
