Loading system/bta/gatt/bta_gattc_act.cc +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ void bta_gattc_deregister(tBTA_GATTC_RCB* p_clreg) { } /* remove bg connection associated with this rcb */ for (uint8_t i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++) { for (uint8_t i = 0; i < BTM_GetWhiteListSize(); i++) { if (!bta_gattc_cb.bg_track[i].in_use) continue; if (bta_gattc_cb.bg_track[i].cif_mask & (1 << (p_clreg->client_if - 1))) { Loading system/bta/gatt/bta_gattc_int.h +2 −2 Original line number Diff line number Diff line Loading @@ -71,9 +71,9 @@ typedef uint16_t tBTA_GATTC_INT_EVT; #define BTA_GATTC_CL_MAX 32 #endif /* max known devices GATTC can support */ /* max known devices GATTC can support in Bluetooth spec */ #ifndef BTA_GATTC_KNOWN_SR_MAX #define BTA_GATTC_KNOWN_SR_MAX 10 #define BTA_GATTC_KNOWN_SR_MAX 255 #endif #define BTA_GATTC_CONN_MAX GATT_MAX_PHY_CHANNEL Loading system/bta/gatt/bta_gattc_utils.cc +6 −6 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ tBTA_GATTC_SERV* bta_gattc_find_srcb(const RawAddress& bda) { tBTA_GATTC_SERV* p_srcb = &bta_gattc_cb.known_server[0]; uint8_t i; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_srcb++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_srcb++) { if (p_srcb->in_use && p_srcb->server_bda == bda) return p_srcb; } return NULL; Loading @@ -243,7 +243,7 @@ tBTA_GATTC_SERV* bta_gattc_find_srvr_cache(const RawAddress& bda) { tBTA_GATTC_SERV* p_srcb = &bta_gattc_cb.known_server[0]; uint8_t i; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_srcb++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_srcb++) { if (p_srcb->server_bda == bda) return p_srcb; } return NULL; Loading Loading @@ -279,7 +279,7 @@ tBTA_GATTC_SERV* bta_gattc_srcb_alloc(const RawAddress& bda) { bool found = false; uint8_t i; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_tcb++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_tcb++) { if (!p_tcb->in_use) { found = true; break; Loading Loading @@ -409,7 +409,7 @@ bool bta_gattc_mark_bg_conn(tGATT_IF client_if, uint8_t i = 0; tBTA_GATTC_CIF_MASK* p_cif_mask; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_bg_tck++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_bg_tck++) { if (p_bg_tck->in_use && ((p_bg_tck->remote_bda == remote_bda_ptr) || (p_bg_tck->remote_bda.IsEmpty()))) { p_cif_mask = &p_bg_tck->cif_mask; Loading Loading @@ -437,7 +437,7 @@ bool bta_gattc_mark_bg_conn(tGATT_IF client_if, } else /* adding a new device mask */ { for (i = 0, p_bg_tck = &bta_gattc_cb.bg_track[0]; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_bg_tck++) { i < BTM_GetWhiteListSize(); i++, p_bg_tck++) { if (!p_bg_tck->in_use) { p_bg_tck->in_use = true; p_bg_tck->remote_bda = remote_bda_ptr; Loading Loading @@ -468,7 +468,7 @@ bool bta_gattc_check_bg_conn(tGATT_IF client_if, const RawAddress& remote_bda, uint8_t i = 0; bool is_bg_conn = false; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX && !is_bg_conn; i++, p_bg_tck++) { for (i = 0; i < BTM_GetWhiteListSize() && !is_bg_conn; i++, p_bg_tck++) { if (p_bg_tck->in_use && (p_bg_tck->remote_bda == remote_bda || p_bg_tck->remote_bda.IsEmpty())) { if (((p_bg_tck->cif_mask & (1 << (client_if - 1))) != 0) && Loading system/stack/btm/btm_ble_bgconn.cc +8 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,14 @@ void btm_ble_white_list_init(uint8_t white_list_size) { BTM_TRACE_DEBUG("%s white_list_size = %d", __func__, white_list_size); } uint8_t BTM_GetWhiteListSize() { const controller_t* controller = controller_get_interface(); if (!controller->supports_ble()) { return 0; } return controller->get_ble_white_list_size(); } bool BTM_SetLeConnectionModeToFast() { VLOG(2) << __func__; tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb; Loading system/stack/btm/btm_ble_bgconn.h +4 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ extern bool BTM_WhiteListAdd(const RawAddress& address); /** Removes the device from white list */ extern void BTM_WhiteListRemove(const RawAddress& address); /** Get max white list size supports of the Bluetooth controller */ extern uint8_t BTM_GetWhiteListSize(); /** Clear the whitelist, end any pending whitelist connections */ extern void BTM_WhiteListClear(); Loading Loading
system/bta/gatt/bta_gattc_act.cc +1 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,7 @@ void bta_gattc_deregister(tBTA_GATTC_RCB* p_clreg) { } /* remove bg connection associated with this rcb */ for (uint8_t i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++) { for (uint8_t i = 0; i < BTM_GetWhiteListSize(); i++) { if (!bta_gattc_cb.bg_track[i].in_use) continue; if (bta_gattc_cb.bg_track[i].cif_mask & (1 << (p_clreg->client_if - 1))) { Loading
system/bta/gatt/bta_gattc_int.h +2 −2 Original line number Diff line number Diff line Loading @@ -71,9 +71,9 @@ typedef uint16_t tBTA_GATTC_INT_EVT; #define BTA_GATTC_CL_MAX 32 #endif /* max known devices GATTC can support */ /* max known devices GATTC can support in Bluetooth spec */ #ifndef BTA_GATTC_KNOWN_SR_MAX #define BTA_GATTC_KNOWN_SR_MAX 10 #define BTA_GATTC_KNOWN_SR_MAX 255 #endif #define BTA_GATTC_CONN_MAX GATT_MAX_PHY_CHANNEL Loading
system/bta/gatt/bta_gattc_utils.cc +6 −6 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ tBTA_GATTC_SERV* bta_gattc_find_srcb(const RawAddress& bda) { tBTA_GATTC_SERV* p_srcb = &bta_gattc_cb.known_server[0]; uint8_t i; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_srcb++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_srcb++) { if (p_srcb->in_use && p_srcb->server_bda == bda) return p_srcb; } return NULL; Loading @@ -243,7 +243,7 @@ tBTA_GATTC_SERV* bta_gattc_find_srvr_cache(const RawAddress& bda) { tBTA_GATTC_SERV* p_srcb = &bta_gattc_cb.known_server[0]; uint8_t i; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_srcb++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_srcb++) { if (p_srcb->server_bda == bda) return p_srcb; } return NULL; Loading Loading @@ -279,7 +279,7 @@ tBTA_GATTC_SERV* bta_gattc_srcb_alloc(const RawAddress& bda) { bool found = false; uint8_t i; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_tcb++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_tcb++) { if (!p_tcb->in_use) { found = true; break; Loading Loading @@ -409,7 +409,7 @@ bool bta_gattc_mark_bg_conn(tGATT_IF client_if, uint8_t i = 0; tBTA_GATTC_CIF_MASK* p_cif_mask; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_bg_tck++) { for (i = 0; i < BTM_GetWhiteListSize(); i++, p_bg_tck++) { if (p_bg_tck->in_use && ((p_bg_tck->remote_bda == remote_bda_ptr) || (p_bg_tck->remote_bda.IsEmpty()))) { p_cif_mask = &p_bg_tck->cif_mask; Loading Loading @@ -437,7 +437,7 @@ bool bta_gattc_mark_bg_conn(tGATT_IF client_if, } else /* adding a new device mask */ { for (i = 0, p_bg_tck = &bta_gattc_cb.bg_track[0]; i < BTA_GATTC_KNOWN_SR_MAX; i++, p_bg_tck++) { i < BTM_GetWhiteListSize(); i++, p_bg_tck++) { if (!p_bg_tck->in_use) { p_bg_tck->in_use = true; p_bg_tck->remote_bda = remote_bda_ptr; Loading Loading @@ -468,7 +468,7 @@ bool bta_gattc_check_bg_conn(tGATT_IF client_if, const RawAddress& remote_bda, uint8_t i = 0; bool is_bg_conn = false; for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX && !is_bg_conn; i++, p_bg_tck++) { for (i = 0; i < BTM_GetWhiteListSize() && !is_bg_conn; i++, p_bg_tck++) { if (p_bg_tck->in_use && (p_bg_tck->remote_bda == remote_bda || p_bg_tck->remote_bda.IsEmpty())) { if (((p_bg_tck->cif_mask & (1 << (client_if - 1))) != 0) && Loading
system/stack/btm/btm_ble_bgconn.cc +8 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,14 @@ void btm_ble_white_list_init(uint8_t white_list_size) { BTM_TRACE_DEBUG("%s white_list_size = %d", __func__, white_list_size); } uint8_t BTM_GetWhiteListSize() { const controller_t* controller = controller_get_interface(); if (!controller->supports_ble()) { return 0; } return controller->get_ble_white_list_size(); } bool BTM_SetLeConnectionModeToFast() { VLOG(2) << __func__; tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb; Loading
system/stack/btm/btm_ble_bgconn.h +4 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ extern bool BTM_WhiteListAdd(const RawAddress& address); /** Removes the device from white list */ extern void BTM_WhiteListRemove(const RawAddress& address); /** Get max white list size supports of the Bluetooth controller */ extern uint8_t BTM_GetWhiteListSize(); /** Clear the whitelist, end any pending whitelist connections */ extern void BTM_WhiteListClear(); Loading