In the BTU handler for messages from the controller, rn event may be
received that the stack does not have to respond to. In this case, the
stack should go to sleep.
This patch calls the provided function in the BTU to enter sleep.
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Signed-off-by: Yingkai Cheng <yingkaix.cheng@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
Change-Id: Ie7c3fcae418eb2480338509e86b7cc870177a965
{
case BTU_POST_TO_TASK_NO_GOOD_HORRIBLE_HACK: // TODO(zachoverflow): remove this
((post_to_task_hack_t *)(&p_msg->data[0]))->callback(p_msg);
+#if (defined(HCILP_INCLUDED) && HCILP_INCLUDED == TRUE)
+ /* If the host receives events which it doesn't responsd to, */
+ /* it should start an idle timer to enter sleep mode. */
+ btu_check_bt_sleep ();
+#endif
break;
case BT_EVT_TO_BTU_HCI_ACL:
/* All Acl Data goes to L2CAP */