summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--btif/src/btif_core.c2
-rw-r--r--hci/include/bt_vendor_lib.h2
-rw-r--r--hci/include/hci_layer.h2
-rw-r--r--hci/include/vendor.h2
-rw-r--r--hci/src/hci_layer.c8
-rw-r--r--hci/src/vendor.c4
-rw-r--r--include/bt_target.h2
-rw-r--r--main/bte_main.c4
-rw-r--r--stack/btu/btu_hcif.c2
9 files changed, 14 insertions, 14 deletions
diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c
index 30bcdbb5f..893250315 100644
--- a/btif/src/btif_core.c
+++ b/btif/src/btif_core.c
@@ -634,7 +634,7 @@ void btif_ssr_cleanup(void)
{
BTIF_TRACE_DEBUG("%s", __FUNCTION__);
ssr_triggered = TRUE;
- bte_ssr_cleanup();
+ bte_ssr_cleanup(0x11);//SSR reason 0x11 - ENABLE_TIMEOUT
}
/****************************************************************************
diff --git a/hci/include/bt_vendor_lib.h b/hci/include/bt_vendor_lib.h
index e312ab8c4..f8c63875a 100644
--- a/hci/include/bt_vendor_lib.h
+++ b/hci/include/bt_vendor_lib.h
@@ -347,7 +347,7 @@ typedef struct {
/** SSR cleanup is used in HW reset cases
* which would close all the client channels
* and turns off the chip*/
- void (*ssr_cleanup)(void);
+ void (*ssr_cleanup)(int reason);
} bt_vendor_interface_t;
diff --git a/hci/include/hci_layer.h b/hci/include/hci_layer.h
index 26841440d..d7bd0a8f6 100644
--- a/hci/include/hci_layer.h
+++ b/hci/include/hci_layer.h
@@ -102,7 +102,7 @@ typedef struct hci_t {
/** SSR cleanup is used in HW reset cases
** which would close all the client channels
** and turns off the chip*/
- void (*ssr_cleanup)(void);
+ void (*ssr_cleanup)(int reason);
} hci_t;
const hci_t *hci_layer_get_interface();
diff --git a/hci/include/vendor.h b/hci/include/vendor.h
index ec948fe60..3fe96cf26 100644
--- a/hci/include/vendor.h
+++ b/hci/include/vendor.h
@@ -69,7 +69,7 @@ typedef struct vendor_t{
/** SSR cleanup is used in HW reset cases
** which would close all the client channels
** and turns off the chip*/
- void (*ssr_cleanup) (void);
+ void (*ssr_cleanup) (int reason);
} vendor_t;
const vendor_t *vendor_get_interface();
diff --git a/hci/src/hci_layer.c b/hci/src/hci_layer.c
index 6a8050b4b..c26e3db98 100644
--- a/hci/src/hci_layer.c
+++ b/hci/src/hci_layer.c
@@ -163,7 +163,7 @@ static bool filter_incoming_event(BT_HDR *packet);
static serial_data_type_t event_to_data_type(uint16_t event);
static waiting_command_t *get_waiting_command(command_opcode_t opcode);
-void ssr_cleanup (void);
+void ssr_cleanup (int reason);
// Module lifecycle functions
@@ -520,7 +520,7 @@ static void command_timed_out(UNUSED_ATTR void *context) {
}
LOG_ERROR("%s restarting the bluetooth process.", __func__);
- ssr_cleanup();
+ ssr_cleanup(0x22);//SSR reasno 0x22 = CMD TO
usleep(20000);
//Reset SOC status to trigger hciattach service
if (property_set("bluetooth.status", "off") < 0) {
@@ -703,10 +703,10 @@ intercepted:;
/** SSR cleanup is used in HW reset cases
** which would close all the client channels
** and turns off the chip*/
-void ssr_cleanup (void) {
+void ssr_cleanup (int reason) {
LOG_INFO("%s", __func__);
if (vendor != NULL) {
- vendor->ssr_cleanup();
+ vendor->ssr_cleanup(reason);
} else {
LOG_ERROR("%s: vendor is NULL", __func__);
}
diff --git a/hci/src/vendor.c b/hci/src/vendor.c
index ccc0003d5..8224fc48c 100644
--- a/hci/src/vendor.c
+++ b/hci/src/vendor.c
@@ -89,9 +89,9 @@ static void vendor_close(void) {
lib_interface = NULL;
lib_handle = NULL;
}
-void vendor_ssrcleanup(void) {
+void vendor_ssrcleanup(int reason) {
if (lib_interface)
- lib_interface->ssr_cleanup();
+ lib_interface->ssr_cleanup(reason);
else
LOG_ERROR("%s lib_interface is NULL", __func__);
diff --git a/include/bt_target.h b/include/bt_target.h
index effc7e598..ce0baaab1 100644
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -1853,7 +1853,7 @@ The maximum number of payload octets that the local device can receive in a sing
#define BTSNOOP_MEM TRUE
#endif
-void bte_ssr_cleanup(void);
+void bte_ssr_cleanup(int reason);
#include "bt_trace.h"
diff --git a/main/bte_main.c b/main/bte_main.c
index f15f8e4cd..648e46cd1 100644
--- a/main/bte_main.c
+++ b/main/bte_main.c
@@ -280,11 +280,11 @@ void bte_main_hci_send (BT_HDR *p_msg, UINT16 event)
** Returns None
**
******************************************************************************/
-void bte_ssr_cleanup(void)
+void bte_ssr_cleanup(int reason)
{
APPL_TRACE_DEBUG("%s", __FUNCTION__);
if (hci != NULL) {
- hci->ssr_cleanup();
+ hci->ssr_cleanup(reason);
} else {
APPL_TRACE_ERROR("%s hci is NULL", __FUNCTION__);
}
diff --git a/stack/btu/btu_hcif.c b/stack/btu/btu_hcif.c
index 4c565a2f9..bcc7fcfa1 100644
--- a/stack/btu/btu_hcif.c
+++ b/stack/btu/btu_hcif.c
@@ -1205,7 +1205,7 @@ static void btu_hcif_hardware_error_evt (UINT8 *p)
if(*p == 0x0f)
{
HCI_TRACE_ERROR("Ctlr H/w error event - code:Tigger SSR");
- bte_ssr_cleanup();
+ bte_ssr_cleanup(0x33);//SSR reason 0x33 = HW ERR EVT
usleep(20000); /* 20 milliseconds */
//Reset SOC status to trigger hciattach service
if(property_set("bluetooth.status", "off") < 0)