Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b03a1aa5 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Stop address rotation when stack is shutdown

Tag: #stability
Bug: 174293979
Test: Start and stop the stack
Change-Id: I28846762271201384c1902eccc87029b4671f462
parent e14a6bea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ static void event_shut_down_stack(UNUSED_ATTR void* context) {
  gatt_free();
  l2c_free();
  sdp_free();
  btm_ble_free();
  btm_free();

  if (bluetooth::shim::is_any_gd_enabled()) {
+6 −0
Original line number Diff line number Diff line
@@ -2399,6 +2399,12 @@ void btm_ble_init(void) {
#endif
}

// Clean up btm ble control block
void btm_ble_free() {
  tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb;
  alarm_free(p_cb->addr_mgnt_cb.refresh_raddr_timer);
}

/*******************************************************************************
 *
 * Function         btm_ble_topology_check
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ extern void btm_ble_stop_scan(void);
extern void btm_clear_all_pending_le_entry(void);

extern void btm_ble_init(void);
extern void btm_ble_free();
extern void btm_ble_connected(const RawAddress& bda, uint16_t handle,
                              uint8_t enc_mode, uint8_t role,
                              tBLE_ADDR_TYPE addr_type, bool addr_matched);