diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-11-13 19:31:50 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-11-20 10:37:58 +0100 |
commit | 9d17840f83fa0c460098fc5b142d2f8b767fa501 (patch) | |
tree | f9a0bd5150450da78f8ae4055e73afd24150cb53 /src/osmo-bts-trx/main.c | |
parent | fc2ff394e0a1b2325bdadaa0699bf8e8d0c716bb (diff) |
bts-trx: setup timer once at creation time
The setup is only needed once, so no need to set it every time we want
to schedule it.
Furthermore, it will ease new code introduced in follow-up patches,
which will schedule this timer under some circumstances without need to
send a message at the same time (because re-try of a cmd after a delay
is wanted).
This commit adds an alloc function and an init function to keep
different parts of the code decoupled and avoid exposing more
implementation details between them (like exposing the trx_if timer).
Change-Id: I3b6461d0130d25284e673c5efce0b3832c48bbb5
Diffstat (limited to 'src/osmo-bts-trx/main.c')
-rw-r--r-- | src/osmo-bts-trx/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c index 98f460eb..9529190e 100644 --- a/src/osmo-bts-trx/main.c +++ b/src/osmo-bts-trx/main.c @@ -139,8 +139,7 @@ void bts_model_phy_link_set_defaults(struct phy_link *plink) void bts_model_phy_instance_set_defaults(struct phy_instance *pinst) { struct trx_l1h *l1h; - l1h = talloc_zero(tall_bts_ctx, struct trx_l1h); - l1h->phy_inst = pinst; + l1h = trx_l1h_alloc(tall_bts_ctx, pinst); pinst->u.osmotrx.hdl = l1h; l1h->config.power_oml = 1; |