diff --git a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h index 80553575387..1241616b4c9 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h @@ -3067,6 +3067,7 @@ esp_err_t esp_ble_gap_clear_whitelist(void); /** * @brief Get the whitelist size in the controller +* Note: This API returns a constant value indicating the maximum number of whitelists supported by the controller * * @param[out] length: the white list length. * @return diff --git a/components/bt/host/bluedroid/bta/include/bta/bta_sys.h b/components/bt/host/bluedroid/bta/include/bta/bta_sys.h index 12a88cf8e48..e514824dcdd 100644 --- a/components/bt/host/bluedroid/bta/include/bta/bta_sys.h +++ b/components/bt/host/bluedroid/bta/include/bta/bta_sys.h @@ -142,7 +142,7 @@ typedef void (tBTA_SYS_CONN_CBACK)(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 typedef void (tBTA_SYS_SSR_CFG_CBACK)(UINT8 id, UINT8 app_id, UINT16 latency, UINT16 tout); #if (BTA_EIR_CANNED_UUID_LIST != TRUE) -/* eir callback for adding/removeing UUID */ +/* eir callback for adding/removing UUID */ typedef void (tBTA_SYS_EIR_CBACK)(tBT_UUID uuid, BOOLEAN adding); #endif diff --git a/components/bt/host/bluedroid/main/bte_init.c b/components/bt/host/bluedroid/main/bte_init.c index f0d209426aa..0810b43b003 100644 --- a/components/bt/host/bluedroid/main/bte_init.c +++ b/components/bt/host/bluedroid/main/bte_init.c @@ -27,8 +27,8 @@ #include -/* Stack Configuation Related Init Definaton - * TODO: Now Just Unmask these defination until stack layer is OK +/* Stack Configuration Related Init Definition + * TODO: Now Just Unmask these definition until stack layer is OK */ #ifndef BTA_INCLUDED diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c b/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c index 82bbcf1c3b8..452d3b3a1a0 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c @@ -464,7 +464,15 @@ void btm_ble_add_2_white_list_complete(UINT8 status) BTM_TRACE_EVENT("%s status=%d", __func__, status); tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; if (status == HCI_SUCCESS) { - --btm_cb.ble_ctr_cb.white_list_avail_size; + // --btm_cb.ble_ctr_cb.white_list_avail_size; + /* + According to the latest Bluetooth spec: + If the device is already in the Filter Accept List, the Controller should not add the device + to the Filter Accept List again and should return success. + The host cannot obtain the controller as the actual remaining white list size unless the host + also maintains a white list + Keep consistent behavior with the NimBLE host stack + */ } // add whitelist complete callback if (p_cb->update_wl_cb) @@ -487,7 +495,7 @@ void btm_ble_remove_from_white_list_complete(UINT8 *p, UINT16 evt_len) UNUSED(evt_len); BTM_TRACE_EVENT ("%s status=%d", __func__, *p); if (*p == HCI_SUCCESS) { - ++btm_cb.ble_ctr_cb.white_list_avail_size; + // ++btm_cb.ble_ctr_cb.white_list_avail_size; } if (p_cb->update_wl_cb) {