Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38f1af1f authored by Jaganath Kanakkassery's avatar Jaganath Kanakkassery Committed by Andre Eisenbach
Browse files

Suspend properly when receiving events without response



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: default avatarJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Signed-off-by: default avatarYingkai Cheng <yingkaix.cheng@intel.com>
Signed-off-by: default avatarZhiquan Liu <zhiquan.liu@intel.com>
Change-Id: Ie7c3fcae418eb2480338509e86b7cc870177a965
parent c530e937
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -120,6 +120,11 @@ static void btu_hci_msg_process(BT_HDR *p_msg) {
    {
        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 */