From 1f91706abef12d3d5ebe1fd9f61b7e3030560962 Mon Sep 17 00:00:00 2001 From: Sameer Kumar Date: Tue, 6 Aug 2024 10:37:13 +0530 Subject: [PATCH] This Patch adds new enum for ACL disconnection BT_DEVICE_DISCONNECT_REASON_MIC_FAILURE Change-Id: I9201b04ec02fc553608b3e24958a831ab84706a5 Signed-off-by: Sameer Kumar --- include/bluetooth_type.h | 1 + src/bluetooth-common.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/bluetooth_type.h b/include/bluetooth_type.h index a2e4001..89c46f5 100644 --- a/include/bluetooth_type.h +++ b/include/bluetooth_type.h @@ -221,6 +221,7 @@ typedef enum { BT_DEVICE_DISCONNECT_REASON_TIMEOUT, /**< Disconnected by timeout */ BT_DEVICE_DISCONNECT_REASON_LOCAL_HOST, /**< Disconnected by local host */ BT_DEVICE_DISCONNECT_REASON_REMOTE, /**< Disconnected by remote */ + BT_DEVICE_DISCONNECT_REASON_MIC_FAILURE, /**< Disconnected by MIC failure (Since 9.0) */ } bt_device_disconnect_reason_e; /** diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 015bf36..adfce28 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -985,6 +985,9 @@ static int __bt_get_bt_device_connection_info_s(bt_device_connection_info_s **de case (int)BLUETOOTH_ERROR_LOCAL_HOST_TERM: (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_LOCAL_HOST; break; + case (int)BLUETOOTH_ERROR_CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE: + (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_MIC_FAILURE; + break; default: (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_UNKNOWN; break; -- 2.7.4