diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-01-20 22:50:06 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-02-15 14:27:29 +0100 |
commit | e9a17292e8545d5f651e9614c43bc1626e10ac5f (patch) | |
tree | 6e2cf1ae92d8c4cd6de786eb4f0f3aab18f9ef91 /src/osmo-bts-litecell15/l1_if.c | |
parent | 9b5cff87ecc4b76f9f8a0a86aa64e9394e2a8374 (diff) |
LC15/sysmobts: Don't try to refer to fl1h from PHY config
At the time the phy link / phy instance level VTY configuration
commands are parsed, we did not yet call l1if_open() and thus
pinst->u.{lc15,sysmobts}.hdl == NULL.
PHY or PHY instance specific configuration must thus be stored inside
the phy_link or phy_instance itself, and not inside the (not yet
existing) handle.
We solve this by moving around some parameters:
* clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in
phy_instance
* min_qual_{rach,norm} are moved into the generic part (which means
that osmo-bts-octphy and osmo-bts-trx should also implement them)
Diffstat (limited to 'src/osmo-bts-litecell15/l1_if.c')
-rw-r--r-- | src/osmo-bts-litecell15/l1_if.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index e65f97d4..1e81b74c 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -69,10 +69,6 @@ extern int pcu_direct; -#define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ -#define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ - - struct wait_l1_conf { struct llist_head list; /* internal linked list */ struct osmo_timer_list timer; /* timer for L1 timeout */ @@ -833,6 +829,7 @@ static int handle_ph_data_ind(struct lc15l1_hdl *fl1, GsmL1_PhDataInd_t *data_in struct msgb *l1p_msg) { struct gsm_bts_trx *trx = lc15l1_hdl_trx(fl1); + struct gsm_bts_role_bts *btsb = bts_role_bts(trx->bts); uint8_t chan_nr, link_id; struct osmo_phsap_prim *l1sap; uint32_t fn; @@ -853,7 +850,7 @@ static int handle_ph_data_ind(struct lc15l1_hdl *fl1, GsmL1_PhDataInd_t *data_in process_meas_res(trx, chan_nr, &data_ind->measParam); - if (data_ind->measParam.fLinkQuality < fl1->min_qual_norm + if (data_ind->measParam.fLinkQuality < btsb->min_qual_norm && data_ind->msgUnitParam.u8Size != 0) { msgb_free(l1p_msg); return 0; @@ -918,7 +915,7 @@ static int handle_ph_ra_ind(struct lc15l1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind, ra_ind->measParam.fRssi >= btsb->load.rach.busy_thresh) btsb->load.rach.busy++; - if (ra_ind->measParam.fLinkQuality < fl1->min_qual_rach) { + if (ra_ind->measParam.fLinkQuality < btsb->min_qual_rach) { msgb_free(l1p_msg); return 0; } @@ -1400,8 +1397,6 @@ struct lc15l1_hdl *l1if_open(struct phy_instance *pinst) fl1h->phy_inst = pinst; fl1h->clk_cal = 0; - fl1h->min_qual_rach = MIN_QUAL_RACH; - fl1h->min_qual_norm = MIN_QUAL_NORM; fl1h->dsp_trace_f = pinst->u.lc15.dsp_trace_f; get_hwinfo(fl1h); |