aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15/l1_if.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-03-22 15:40:12 +0100
committerHarald Welte <laforge@gnumonks.org>2016-03-22 19:38:39 +0100
commit21fc6e45fbe201dcc6c066a006cef899e931064a (patch)
tree6cc422bd58964a4d78ed2da8a20c20cad7f92717 /src/osmo-bts-litecell15/l1_if.c
parent925fcf48ed94c3907dee5cfcbd8cd2f2fece7b85 (diff)
LC15: properly initialize unmapped phy instances
Fixes: OS#1665
Diffstat (limited to 'src/osmo-bts-litecell15/l1_if.c')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index f625968d..6a60b3fe 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1382,6 +1382,11 @@ int bts_model_phy_link_open(struct phy_link *plink)
OSMO_ASSERT(pinst);
+ if (!pinst->trx) {
+ LOGP(DL1C, LOGL_NOTICE, "Ignoring phy link %d instance %d "
+ "because no TRX is associated with it\n", plink->num, pinst->num);
+ return 0;
+ }
phy_link_state_set(plink, PHY_LINK_CONNECTING);
pinst->u.lc15.hdl = l1if_open(pinst);
@@ -1393,5 +1398,7 @@ int bts_model_phy_link_open(struct phy_link *plink)
l1if_reset(pinst->u.lc15.hdl);
phy_link_state_set(plink, PHY_LINK_CONNECTED);
+
+ return 0;
}