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

Commit 68f1d38d authored by Chris Manton's avatar Chris Manton
Browse files

Move stack/btm/btm_ble_addr::btm_ble_refresh_raddr_timer_timeout

From: stack/btm/btm_ble_gap::btm_ble_refresh_raddr_timer_timeout

Group functionality within same file

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ida81c42548b377ecada80bfe7e94f0e4fa45721a
parent 4a7b5faf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -59,6 +59,13 @@ RawAddress generate_rpa_from_irk_and_rand(const Octet16& irk,
  return address;
}

static void btm_ble_refresh_raddr_timer_timeout(UNUSED_ATTR void* data) {
  if (btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type == BLE_ADDR_RANDOM) {
    /* refresh the random addr */
    btm_gen_resolvable_private_addr(base::Bind(&btm_gen_resolve_paddr_low));
  }
}

/** This function is called when random address for local controller was
 * generated */
void btm_gen_resolve_paddr_low(const RawAddress& address) {
+0 −7
Original line number Diff line number Diff line
@@ -2163,13 +2163,6 @@ static void btm_ble_observer_timer_timeout(UNUSED_ATTR void* data) {
  btm_ble_stop_observe();
}

void btm_ble_refresh_raddr_timer_timeout(UNUSED_ATTR void* data) {
  if (btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type == BLE_ADDR_RANDOM) {
    /* refresh the random addr */
    btm_gen_resolvable_private_addr(base::Bind(&btm_gen_resolve_paddr_low));
  }
}

/*******************************************************************************
 *
 * Function         btm_ble_read_remote_features_complete
+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
#include "hcidefs.h"
#include "smp_api.h"

extern void btm_ble_refresh_raddr_timer_timeout(void* data);
extern void btm_ble_process_periodic_adv_sync_est_evt(uint8_t len, uint8_t* p);
extern void btm_ble_process_periodic_adv_pkt(uint8_t len, uint8_t* p);
extern void btm_ble_process_periodic_adv_sync_lost_evt(uint8_t len, uint8_t* p);