diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-27 16:58:46 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-27 20:00:16 +0100 |
commit | acefd0586e5d463b2e7a6a039131994bc12573fc (patch) | |
tree | 9d7b22f8a0453c4fb20d69835717a20db02e7a90 /src/common/l1sap.c | |
parent | c092f4e1ded65447061198ea1c57458becc71574 (diff) |
L1SAP: Increase resolution of reported burst timing
Before this patch we had:
* osmo-bts-trx internally using 1/256th bit/symbol period
* osmo-bts-sysmo internally using 1/4 bit/smbol period
* PCU interface using 1/4
* L1SAP interface using 1/4
* measurement processing code on top of L1SAP using 1/256
So for sysmo/lc15/octphy we are not loosing resolution, but for
osmo-bts-trx we're arbitrarily reducing the resolution via L1SAP
only then to compute with higher resolution again.
Let's change L1SAP to use 1/256 bits and hence not loose any resolution.
This requires a corresponding change in libosmocore for l1sap.h, which
is found in Change-Id Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d
Change-Id: If9b0f617845ba6c4aa47969f521734388197c9a7
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r-- | src/common/l1sap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e095417e..330b40a1 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -512,8 +512,8 @@ static int l1sap_info_meas_ind(struct gsm_bts_trx *trx, } DEBUGPFN(DL1P, info_meas_ind->fn, - "%s MPH_INFO meas ind, ta_offs_qbits=%d, ber10k=%d, inv_rssi=%u\n", - gsm_lchan_name(lchan), info_meas_ind->ta_offs_qbits, + "%s MPH_INFO meas ind, ta_offs_256bits=%d, ber10k=%d, inv_rssi=%u\n", + gsm_lchan_name(lchan), info_meas_ind->ta_offs_256bits, info_meas_ind->ber10k, info_meas_ind->inv_rssi); /* in the GPRS case we are not interested in measurement @@ -522,13 +522,13 @@ static int l1sap_info_meas_ind(struct gsm_bts_trx *trx, return 0; memset(&ulm, 0, sizeof(ulm)); - ulm.ta_offs_256bits = info_meas_ind->ta_offs_qbits*(256/4); + ulm.ta_offs_256bits = info_meas_ind->ta_offs_256bits; ulm.ber10k = info_meas_ind->ber10k; ulm.inv_rssi = info_meas_ind->inv_rssi; ulm.is_sub = info_meas_ind->is_sub; /* we assume that symbol period is 1 bit: */ - set_ms_to_data(lchan, info_meas_ind->ta_offs_qbits / 4, true); + set_ms_to_data(lchan, info_meas_ind->ta_offs_256bits / 256, true); lchan_new_ul_meas(lchan, &ulm, info_meas_ind->fn); @@ -1058,7 +1058,7 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx, pcu_tx_data_ind(&trx->ts[tn], PCU_IF_SAPI_PTCCH, fn, 0 /* ARFCN */, L1SAP_FN2PTCCHBLOCK(fn), data, len, rssi, data_ind->ber10k, - data_ind->ta_offs_qbits, + data_ind->ta_offs_256bits/64, data_ind->lqual_cb); } else { /* drop incomplete UL block */ @@ -1067,7 +1067,7 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx, /* PDTCH / PACCH frame handling */ pcu_tx_data_ind(&trx->ts[tn], PCU_IF_SAPI_PDTCH, fn, 0 /* ARFCN */, L1SAP_FN2MACBLOCK(fn), data, len, rssi, data_ind->ber10k, - data_ind->ta_offs_qbits, data_ind->lqual_cb); + data_ind->ta_offs_256bits/64, data_ind->lqual_cb); } return 0; } |