diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-28 00:50:51 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2019-10-05 20:50:13 +0000 |
commit | 96cb0c54a97c398512e74d3fd4d14582e3ffb7e4 (patch) | |
tree | 6b4a5941a6f17c5ce5434ade4c13b12fb6dc2ec0 /src/osmo-bts-trx/trx_if.h | |
parent | 4b72ee924cd66981d73c524d2fca091b8e5d7503 (diff) |
bts-trx: Rework code handling poweron state
Use of variables in each code is confusing and mixing configuration with
POWERON/POWEROFF state (which is at least per phy inst and not per TRX,
since those commands are only expected on the 1st phy inst).
* field "poweron" becomes "enabled", and is used as an indicator for
actions to take during TRX provisioning (hether to power it on and
configure it or to power it off).
* poweron/poweroff state becomes "powered", and it is shared by all trx
in same phy_link, and is updated only after confirmation by TRX.
* poweron_set becomes poweronoff_set (because it's used by both POWERON
and POWEROFF), and becomes shared by all trx in same phy_link, since
those CMDs are usually sent by first phy instance of the link (the first
trx).
Related: OS#4215
Change-Id: Icd0b482f1454236432e1952220bbec9d178b8607
Diffstat (limited to 'src/osmo-bts-trx/trx_if.h')
-rw-r--r-- | src/osmo-bts-trx/trx_if.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h index dda7116e..3325c625 100644 --- a/src/osmo-bts-trx/trx_if.h +++ b/src/osmo-bts-trx/trx_if.h @@ -15,11 +15,12 @@ struct trx_ctrl_msg { void *cb; }; +typedef void trx_if_cmd_poweronoff_cb(struct trx_l1h *l1h, bool poweronoff, int rc); typedef void trx_if_cmd_setslot_cb(struct trx_l1h *l1h, uint8_t tn, uint8_t type, int rc); void trx_if_init(struct trx_l1h *l1h); -int trx_if_cmd_poweroff(struct trx_l1h *l1h); -int trx_if_cmd_poweron(struct trx_l1h *l1h); +int trx_if_cmd_poweroff(struct trx_l1h *l1h, trx_if_cmd_poweronoff_cb *cb); +int trx_if_cmd_poweron(struct trx_l1h *l1h, trx_if_cmd_poweronoff_cb *cb); int trx_if_cmd_settsc(struct trx_l1h *l1h, uint8_t tsc); int trx_if_cmd_setbsic(struct trx_l1h *l1h, uint8_t bsic); int trx_if_cmd_setrxgain(struct trx_l1h *l1h, int db); |