diff options
author | pramod kotreshappa <kpramod@codeaurora.org> | 2015-09-10 14:33:09 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:22:13 -0600 |
commit | 84f60eb3f2d7076c8f2d2ac099e5c38eb4753bbb (patch) | |
tree | 0a21fc957b6ccc0077d15e4d46699707eb08d579 /hci | |
parent | d7803ccf0dc5c4538dd9d735f5886627817313b2 (diff) | |
download | android_system_bt-84f60eb3f2d7076c8f2d2ac099e5c38eb4753bbb.tar.gz android_system_bt-84f60eb3f2d7076c8f2d2ac099e5c38eb4753bbb.tar.bz2 android_system_bt-84f60eb3f2d7076c8f2d2ac099e5c38eb4753bbb.zip |
Bluetooth: Add parameter to indicate reason for ssr_cleanup
Add parameter to distinguish the reason for ssr_cleanup.
Change-Id: If8dbc8bbeef430c7cea3d8c300285c9aef1222ec
Diffstat (limited to 'hci')
-rw-r--r-- | hci/include/bt_vendor_lib.h | 2 | ||||
-rw-r--r-- | hci/include/hci_layer.h | 2 | ||||
-rw-r--r-- | hci/include/vendor.h | 2 | ||||
-rw-r--r-- | hci/src/hci_layer.c | 8 | ||||
-rw-r--r-- | hci/src/vendor.c | 4 |
5 files changed, 9 insertions, 9 deletions
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__); |