From d9e2d0f1fa19f737632e82c24ba278990b8a7548 Mon Sep 17 00:00:00 2001 From: Hemant Gupta Date: Mon, 30 Sep 2013 18:26:03 +0530 Subject: [PATCH] Bluetooth: Restarting PM timer during incoming rfcomm data. During incoming rfcomm data, we were setting the pm mode to active, thereby stopping timer and never restarting it again. So Dut was never going to sniff , if the last packet is incoming packet. Therefore add change to restart the PM timer during incoming data. Change-Id: I4396bb2f267b12cb92a944c15609ddeaa13288ad --- bta/jv/bta_jv_act.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bta/jv/bta_jv_act.c b/bta/jv/bta_jv_act.c index ca148373c..5fcba70fa 100644 --- a/bta/jv/bta_jv_act.c +++ b/bta/jv/bta_jv_act.c @@ -1871,14 +1871,18 @@ static int bta_jv_port_data_co_cback(UINT16 port_handle, UINT8 *buf, UINT16 len, { tBTA_JV_RFC_CB *p_cb = bta_jv_rfc_port_to_cb(port_handle); tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle); - APPL_TRACE_DEBUG("bta_jv_port_data_co_cback, p_cb:%p, p_pcb:%p, len:%d", - p_cb, p_pcb, len); + int ret = 0; + APPL_TRACE_DEBUG("bta_jv_port_data_co_cback, p_cb:%p, p_pcb:%p, len:%d, type:%d", + p_cb, p_pcb, len, type); if (p_pcb != NULL) { switch(type) { case DATA_CO_CALLBACK_TYPE_INCOMING: - return bta_co_rfc_data_incoming(p_pcb->user_data, (BT_HDR*)buf); + bta_jv_pm_conn_busy(p_pcb->p_pm_cb); + ret = bta_co_rfc_data_incoming(p_pcb->user_data, (BT_HDR*)buf); + bta_jv_pm_conn_idle(p_pcb->p_pm_cb); + return ret; case DATA_CO_CALLBACK_TYPE_OUTGOING_SIZE: return bta_co_rfc_data_outgoing_size(p_pcb->user_data, (int*)buf); case DATA_CO_CALLBACK_TYPE_OUTGOING: -- 2.11.0