Remove unused auto-reset code path, with associated macros.
diff --git a/bta/sys/bta_sys_main.c b/bta/sys/bta_sys_main.c
index 041ce54..14a15c5 100644
--- a/bta/sys/bta_sys_main.c
+++ b/bta/sys/bta_sys_main.c
@@ -411,21 +411,7 @@
void bta_sys_hw_evt_enabled(tBTA_SYS_HW_MSG *p_sys_hw_msg)
{
APPL_TRACE_EVENT("bta_sys_hw_evt_enabled for %i", p_sys_hw_msg->hw_module);
-
-#if ( defined BTM_AUTOMATIC_HCI_RESET && BTM_AUTOMATIC_HCI_RESET == TRUE )
- /* If device is already up, send a fake "BTM DEVICE UP" using BTA SYS state machine */
- /* If we are in the middle device initialization, BTM_DEVICE_UP will be issued */
- /* by BTM once initialization is done. */
- if (BTA_DmIsDeviceUp())
- {
- bta_sys_hw_btm_cback (BTM_DEV_STATUS_UP);
- }
-#else
-
- /* if HCI reset was not sent during stack start-up */
BTM_DeviceReset( NULL );
-
-#endif
}
diff --git a/include/bt_target.h b/include/bt_target.h
index 618e696..6028602 100644
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -714,13 +714,6 @@
** BTM
**
******************************************************************************/
-/* if set to TRUE, stack will automatically send an HCI reset at start-up. To be
-set to FALSE for advanced start-up / shut-down procedures using USER_HW_ENABLE_API
-and USER_HW_DISABLE_API macros */
-#ifndef BTM_AUTOMATIC_HCI_RESET
-#define BTM_AUTOMATIC_HCI_RESET FALSE
-#endif
-
/* Include BTM Discovery database and code. */
#ifndef BTM_DISCOVERY_INCLUDED
#define BTM_DISCOVERY_INCLUDED TRUE
@@ -906,11 +899,6 @@
#define BTU_BTA_INCLUDED TRUE
#endif
-/* Number of seconds to wait to send an HCI Reset command upon device initialization. */
-#ifndef BTM_FIRST_RESET_DELAY
-#define BTM_FIRST_RESET_DELAY 0
-#endif
-
/* Default class of device
* {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
*
diff --git a/stack/btm/btm_devctl.c b/stack/btm/btm_devctl.c
index 8f0a1d5..23e7be7 100644
--- a/stack/btm/btm_devctl.c
+++ b/stack/btm/btm_devctl.c
@@ -148,20 +148,6 @@
btm_cb.first_disabled_channel = 0xff; /* To allow disabling 0th channel alone */
btm_cb.last_disabled_channel = 0xff; /* To allow disabling 0th channel alone */
-
-#if (BTM_AUTOMATIC_HCI_RESET == TRUE)
-
-#if (BTM_FIRST_RESET_DELAY > 0)
- btm_cb.devcb.state = BTM_DEV_STATE_WAIT_RESET_CMPLT;
- btu_start_timer (&btm_cb.devcb.reset_timer, BTU_TTYPE_BTM_DEV_CTL, BTM_FIRST_RESET_DELAY);
-#else
- btm_dev_reset();
-#endif
-
-#else
- BTM_TRACE_EVENT ("BTM_AUTOMATIC_HCI_RESET is FALSE, so skip btm reset for now");
-#endif
-
}