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 /include/osmo-bts | |
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 'include/osmo-bts')
-rw-r--r-- | include/osmo-bts/phy_link.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index a06cf3fc..316a1bad 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -51,6 +51,8 @@ struct phy_link { uint32_t rts_advance; bool use_legacy_setbsic; uint8_t trxd_hdr_ver_max; /* Maximum TRXD header version to negotiate */ + bool powered; /* last POWERON (true) or POWEROFF (false) confirmed */ + bool poweronoff_sent; /* is there a POWERON/POWEROFF in transit? (one or the other based on ->powered) */ } osmotrx; struct { char *mcast_dev; /* Network device for multicast */ |