diff options
Diffstat (limited to 'stack/btm/btm_pm.c')
-rw-r--r-- | stack/btm/btm_pm.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/stack/btm/btm_pm.c b/stack/btm/btm_pm.c index 02e3a6a92..711a69b76 100644 --- a/stack/btm/btm_pm.c +++ b/stack/btm/btm_pm.c @@ -420,7 +420,11 @@ static int btm_pm_find_acl_ind(BD_ADDR remote_bda) for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p++) { - if ((p->in_use) && (!memcmp (p->remote_addr, remote_bda, BD_ADDR_LEN))) + if ((p->in_use) && (!memcmp (p->remote_addr, remote_bda, BD_ADDR_LEN)) +#if (BLE_INCLUDED == TRUE) + && p->transport == BT_TRANSPORT_BR_EDR +#endif + ) { #if BTM_PM_DEBUG == TRUE BTM_TRACE_DEBUG2( "btm_pm_find_acl_ind ind:%d, st:%d", xx, btm_cb.pm_mode_db[xx].state); @@ -848,15 +852,17 @@ void btm_pm_proc_mode_change (UINT8 hci_status, UINT16 hci_handle, UINT8 mode, U BTM_TRACE_DEBUG2( "btm_pm_proc_mode_change new state:0x%x (old:0x%x)", p_cb->state, old_state); #endif - if ((p_cb->state == HCI_MODE_ACTIVE) && - ((p_lcb = l2cu_find_lcb_by_bd_addr (p->remote_addr)) != NULL)) + if ((p_lcb = l2cu_find_lcb_by_bd_addr(p->remote_addr, BT_TRANSPORT_BR_EDR)) != NULL) { - /* There might be any pending packets due to SNIFF or PENDING state */ - /* Trigger L2C to start transmission of the pending packets. */ - BTM_TRACE_DEBUG0 ("btm mode change to active; check l2c_link for outgoing packets"); - l2c_link_check_send_pkts (p_lcb, NULL, NULL); + if ((p_cb->state == BTM_PM_ST_ACTIVE) || (p_cb->state == BTM_PM_ST_SNIFF)) + { + /* There might be any pending packets due to SNIFF or PENDING state */ + /* Trigger L2C to start transmission of the pending packets. */ + BTM_TRACE_DEBUG0("btm mode change to active; check l2c_link for outgoing packets"); + l2c_link_check_send_pkts(p_lcb, NULL, NULL); //btu_stop_timer (&p_lcb->timer_entry); + } } /* notify registered parties */ @@ -955,7 +961,9 @@ void btm_pm_proc_ssr_evt (UINT8 *p, UINT16 evt_len) } } } + #endif + #else /* BTM_PWR_MGR_INCLUDED == TRUE */ /******************************************************************************* @@ -984,6 +992,7 @@ tBTM_STATUS BTM_ReadPowerMode (BD_ADDR remote_bda, tBTM_PM_MODE *p_mode) #endif + /******************************************************************************* ** ** Function BTM_IsPowerManagerOn @@ -998,3 +1007,5 @@ BOOLEAN BTM_IsPowerManagerOn (void) { return BTM_PWR_MGR_INCLUDED; } + + |