diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-03-30 17:00:07 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:13 -0700 |
commit | 20ee3de14a4ee1b0b12b93a9ceb6f0c096827da0 (patch) | |
tree | 1107194c3919db9bd72fdbf959e18f6447ab8e5f /bta | |
parent | 2e33c936064af00e6ec9a704a01e6b36eb8cd5c8 (diff) | |
download | external_bluetooth_bluedroid-20ee3de14a4ee1b0b12b93a9ceb6f0c096827da0.zip external_bluetooth_bluedroid-20ee3de14a4ee1b0b12b93a9ceb6f0c096827da0.tar.gz external_bluetooth_bluedroid-20ee3de14a4ee1b0b12b93a9ceb6f0c096827da0.tar.bz2 |
Before disconnecting, take the link out of sniff and set the L2C idle timer to 0. Some carkits are re-connecting back, if ACL is not dropped within a short time.
Change-Id: Ib4f089a4b426db9a81aff00983645ce430164b75
Diffstat (limited to 'bta')
-rw-r--r-- | bta/ag/bta_ag_act.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bta/ag/bta_ag_act.c b/bta/ag/bta_ag_act.c index af7c371..de59aa5 100644 --- a/bta/ag/bta_ag_act.c +++ b/bta/ag/bta_ag_act.c @@ -18,6 +18,8 @@ #include "port_api.h" #include "utl.h" #include <string.h> +#include "bta_dm_int.h" +#include "l2c_api.h" /***************************************************************************** ** Constants @@ -663,6 +665,10 @@ void bta_ag_rfc_data(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data) *******************************************************************************/ void bta_ag_start_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data) { + /* Take the link out of sniff and set L2C idle time to 0 */ + bta_dm_pm_active(p_scb->peer_addr); + L2CA_SetIdleTimeoutByBdAddr(p_scb->peer_addr, 0); + /* if SCO is open close SCO and wait on RFCOMM close */ if (bta_ag_sco_is_open(p_scb)) { |