summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubramanian Srinivasan <quic_subrsrin@quicinc.com>2023-04-14 11:59:37 -0700
committerSubramanian Srinivasan <quic_subrsrin@quicinc.com>2023-05-05 10:28:16 -0700
commit506c018151691d978d318e11a65ee216eca1615e (patch)
tree90de767ffd712d40bffc6883362e079a70cfbd12
parent618aa2cb8e484407365f947910bafdda86fbdd04 (diff)
Send pending EATT connect requests after LE encryption is enabled
When EATT connect requests from profiles are pending and LE encryption has not yet completed, sometimes EATT connect requests are never sent to L2CAP layer. Hence after LE encryption is enabled, send pending EATT connect requests to L2CAP layer. CRs-Fixed: 3452384 Change-Id: I5700cf418a91769a1453fb1a4d932e0dd1cf2e52
-rw-r--r--stack/btm/btm_ble.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/stack/btm/btm_ble.cc b/stack/btm/btm_ble.cc
index f2dc1adef..1c5b38dc8 100644
--- a/stack/btm/btm_ble.cc
+++ b/stack/btm/btm_ble.cc
@@ -1855,8 +1855,13 @@ void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) {
gatt_notify_enc_cmpl(p_dev_rec->ble.pseudo_addr);
/* Update EATT support */
- if (encr_enable)
+ if (encr_enable) {
gatt_update_eatt_support(p_dev_rec->ble.pseudo_addr);
+ tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(p_dev_rec->ble.pseudo_addr, BT_TRANSPORT_LE);
+ if (p_tcb && p_tcb->is_eatt_supported && !p_tcb->apps_needing_eatt.empty()) {
+ gatt_establish_eatt_connect(p_tcb, 1);
+ }
+ }
}
/*******************************************************************************