diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-10 12:20:27 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2019-09-10 14:48:19 +0000 |
commit | 3061e1d14a27cb3a25f6079b1a5834fe03864aff (patch) | |
tree | 2fff6f2b9093914ed9e4648127e5cb4d0338da01 | |
parent | ec228cc08cd5a8c8b254fe40d0bfc9751d46d9dd (diff) |
bts-trx: Log case where no SETFORMAT is sent
If VTY cmd "osmotrx trxd-max-version 0" is used, max version 0 is used
(default starting one) and hence no need to send SETFORMAT (this is
useful in order to avoid sending SETFORMAT to old TRX implementations
not supporting the command). In this case, let's inform the user that
indeed osmo-bts won't send SETFORMAT because version 0 is assumed.
Change-Id: I7136ea6745c2275278bc400676b58fb4b10da966
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index db53d4c6..cd2a03cf 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -186,7 +186,8 @@ static void l1if_setslot_cb(struct trx_l1h *l1h, uint8_t tn, uint8_t type, int r int l1if_provision_transceiver_trx(struct trx_l1h *l1h) { uint8_t tn; - struct phy_link *plink = l1h->phy_inst->phy_link; + struct phy_instance *pinst = l1h->phy_inst; + struct phy_link *plink = pinst->phy_link; if (!transceiver_available) return -EIO; @@ -211,10 +212,16 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h) } /* Ask transceiver to use the newest TRXD header version if not using it yet */ - if (!l1h->config.setformat_sent && - l1h->config.trxd_hdr_ver_use != plink->u.osmotrx.trxd_hdr_ver_max) { - trx_if_cmd_setformat(l1h, plink->u.osmotrx.trxd_hdr_ver_max); - l1h->config.trxd_hdr_ver_req = plink->u.osmotrx.trxd_hdr_ver_max; + if (!l1h->config.setformat_sent) { + if (l1h->config.trxd_hdr_ver_use != plink->u.osmotrx.trxd_hdr_ver_max) { + trx_if_cmd_setformat(l1h, plink->u.osmotrx.trxd_hdr_ver_max); + l1h->config.trxd_hdr_ver_req = plink->u.osmotrx.trxd_hdr_ver_max; + } else { + LOGPPHI(pinst, DL1C, LOGL_INFO, + "No need to negotiate TRXD version, " + "already using maximum configured one: %" PRIu8 "\n", + l1h->config.trxd_hdr_ver_use); + } l1h->config.setformat_sent = 1; } |