diff mbox series

Bluetooth: hci_sync: fix hogp device suspend bug

Message ID 20231221071621.1154462-1-15013537245@163.com
State New
Headers show
Series Bluetooth: hci_sync: fix hogp device suspend bug | expand

Commit Message

15013537245@163.com Dec. 21, 2023, 7:16 a.m. UTC
From: clancy shang <clancy.shang@quectel.com>

when Bluetooth enter suspend, and disconnect everything with the diconnect
reason code of 0x15,the hogp device could not into sleep and continued
advertizing. when use the diconnect reason code of 0x13, the hogp device
into sleep succeeded.

Signed-off-by: clancy shang <clancy.shang@quectel.com>
---
 net/bluetooth/hci_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index d85a7091a116..16b5420c32d0 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5927,7 +5927,7 @@  int hci_suspend_sync(struct hci_dev *hdev)
 
 	if (hci_conn_count(hdev)) {
 		/* Soft disconnect everything (power off) */
-		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_POWER_OFF);
+		err = hci_disconnect_all_sync(hdev, HCI_ERROR_REMOTE_USER_TERM);
 		if (err) {
 			/* Set state to BT_RUNNING so resume doesn't notify */
 			hdev->suspend_state = BT_RUNNING;