diff options
-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; } |