Browse Source

struct bts_ul_meas: reflect C/I units in field name s/c_i/ci_cb/

Change-Id: If07f7f2a3ea996cbfc6a9087fa34402e38a7fd9f
Related: SYS#5853
changes/81/28081/1
Vadim Yanitskiy 2 months ago
parent
commit
523b6de593
  1. 2
      include/osmo-bts/lchan.h
  2. 8
      src/common/l1sap.c
  3. 8
      src/common/measurement.c
  4. 2
      tests/meas/meas_test.c
  5. 2
      tests/meas/meas_testcases.h

2
include/osmo-bts/lchan.h

@ -52,7 +52,7 @@ struct bts_ul_meas {
/* timing advance offset (in 1/256 bits) */
int16_t ta_offs_256bits;
/* C/I ratio in cB */
int16_t c_i;
int16_t ci_cb;
/* flags */
uint8_t is_sub:1;
/* RSSI in dBm * -1 */

8
src/common/l1sap.c

@ -719,7 +719,7 @@ static void process_l1sap_meas_data(struct gsm_lchan *lchan,
.ta_offs_256bits = info_meas_ind->ta_offs_256bits,
.inv_rssi = info_meas_ind->inv_rssi,
.ber10k = info_meas_ind->ber10k,
.c_i = info_meas_ind->c_i_cb,
.ci_cb = info_meas_ind->c_i_cb,
.is_sub = info_meas_ind->is_sub,
};
break;
@ -733,7 +733,7 @@ static void process_l1sap_meas_data(struct gsm_lchan *lchan,
.ta_offs_256bits = ph_tch_ind->ta_offs_256bits,
.inv_rssi = abs(ph_tch_ind->rssi),
.ber10k = ph_tch_ind->ber10k,
.c_i = ph_tch_ind->lqual_cb,
.ci_cb = ph_tch_ind->lqual_cb,
.is_sub = ph_tch_ind->is_sub,
};
break;
@ -747,7 +747,7 @@ static void process_l1sap_meas_data(struct gsm_lchan *lchan,
.ta_offs_256bits = ph_data_ind->ta_offs_256bits,
.inv_rssi = abs(ph_data_ind->rssi),
.ber10k = ph_data_ind->ber10k,
.c_i = ph_data_ind->lqual_cb,
.ci_cb = ph_data_ind->lqual_cb,
.is_sub = ph_data_ind->is_sub,
};
break;
@ -758,7 +758,7 @@ static void process_l1sap_meas_data(struct gsm_lchan *lchan,
DEBUGPFN(DL1P, fn,
"%s %s meas ind, ta_offs_256bits=%d, ber10k=%d, inv_rssi=%u, C/I=%d cB\n",
gsm_lchan_name(lchan), ind_name, ulm.ta_offs_256bits,
ulm.ber10k, ulm.inv_rssi, ulm.c_i);
ulm.ber10k, ulm.inv_rssi, ulm.ci_cb);
/* we assume that symbol period is 1 bit: */
set_ms_to_data(lchan, ulm.ta_offs_256bits / 256, true);

8
src/common/measurement.c

@ -31,7 +31,7 @@ static const uint8_t ts45008_83_tch_hs1[] = { 14, 16, 18, 20, 66, 68, 70, 72 };
static const struct bts_ul_meas measurement_dummy = {
.ber10k = MEASUREMENT_DUMMY_BER,
.ta_offs_256bits = 0,
.c_i = 0,
.ci_cb = 0,
.is_sub = 0,
.inv_rssi = MEASUREMENT_DUMMY_IRSSI
};
@ -348,7 +348,7 @@ int lchan_new_ul_meas(struct gsm_lchan *lchan,
DEBUGPFN(DMEAS, fn, "%s adding measurement (ber10k=%u, ta_offs=%d, ci_cB=%d, is_sub=%u, rssi=-%u), num_ul_meas=%d, fn_mod=%u\n",
gsm_lchan_name(lchan), ulm->ber10k, ulm->ta_offs_256bits,
ulm->c_i, dest->is_sub, ulm->inv_rssi, lchan->meas.num_ul_meas,
ulm->ci_cb, dest->is_sub, ulm->inv_rssi, lchan->meas.num_ul_meas,
fn_mod);
lchan->meas.last_fn = fn;
@ -631,13 +631,13 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
m = &lchan->meas.uplink[i + num_ul_meas_excess];
if (m->is_sub) {
irssi_sub_sum += m->inv_rssi;
ci_sub_sum += m->c_i;
ci_sub_sum += m->ci_cb;
num_meas_sub_actual++;
is_sub = true;
}
irssi_full_sum += m->inv_rssi;
ta256b_sum += m->ta_offs_256bits;
ci_full_sum += m->c_i;
ci_full_sum += m->ci_cb;
num_ul_meas_actual++;
} else {

2
tests/meas/meas_test.c

@ -329,7 +329,7 @@ void test_lchan_meas_process_measurement(bool no_sacch, bool dropouts)
ulm.ber10k = 0;
ulm.ta_offs_256bits = 256;
ulm.c_i = 0;
ulm.ci_cb = 0;
ulm.is_sub = 0;
ulm.inv_rssi = 90;

2
tests/meas/meas_testcases.h

@ -1,5 +1,5 @@
#define ULM(ber, ta, sub, neg_rssi) \
{ .ber10k = (ber), .ta_offs_256bits = (ta), .c_i = 10, .is_sub = sub, .inv_rssi = (neg_rssi) }
{ .ber10k = (ber), .ta_offs_256bits = (ta), .ci_cb = 10, .is_sub = sub, .inv_rssi = (neg_rssi) }
struct meas_testcase {
const char *name;

Loading…
Cancel
Save