aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-15 18:51:01 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-15 22:51:20 +0700
commitdf26770d41cc8eed01401ab03f4769e3cc3f0c3e (patch)
treef956eba9c4899a8a2baa2e0d0b31ed81fdd34a27 /tests
parent906a9b5e71aa5d3d814d57fbcc7190faa06ab200 (diff)
A-bis/RSL: refactor handling of BS Power IE (power reduction)
According to 3GPP TS 08.58, section 9.3.4, BS Power IE indicates the transmission power attenuation on a particular channel: +--------------+---------+-----------------+ | Reserved (3) | FPC (1) | Power level (4) | +--------------+---------+-----------------+ so let's change handling of this IE as follows: - s/bs_power/bs_power_red/g, so it reflects 'reduction'; - store power attenuation value in dB, not in 2 db steps; - get rid of ms_power_ctrl.bts_tx_pwr, it's always 0 anyway; - fix rsl_tx_meas_res(): use lchan->bs_power_red; - always check if FPC (Fast Power Control) flag is set; - we don't support it, so reject messages containing it; - fix rsl_rx_chan_activ(): properly apply the bitmask. Change-Id: I16cc50dfca102030380a06e16c234d5f6698f38f
Diffstat (limited to 'tests')
-rw-r--r--tests/tx_power/tx_power_test.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/tx_power/tx_power_test.c b/tests/tx_power/tx_power_test.c
index 9d38d831..aaa34ea8 100644
--- a/tests/tx_power/tx_power_test.c
+++ b/tests/tx_power/tx_power_test.c
@@ -120,9 +120,9 @@ static void test_sbts1002(struct gsm_bts_trx *trx)
/* at max_power_red = 2, we expect 21dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(21));
/* at 1 step (of 2dB), we expect full 23-2-2=19 dBm */
- OSMO_ASSERT(get_p_target_mdBm(trx, 1) == to_mdB(19));
+ OSMO_ASSERT(get_p_target_mdBm(trx, 2) == to_mdB(19));
/* at 2 steps (= 4dB), we expect 23-2-4=17*/
- OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 2) == to_mdB(17));
+ OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 4) == to_mdB(17));
}
static void test_sbts1020(struct gsm_bts_trx *trx)
@@ -138,9 +138,9 @@ static void test_sbts1020(struct gsm_bts_trx *trx)
/* at max_power_red = 2, we expect 31dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(31));
/* at 1 step (of 2dB), we expect full 33-2-2=29 dBm */
- OSMO_ASSERT(get_p_target_mdBm(trx, 1) == to_mdB(29));
+ OSMO_ASSERT(get_p_target_mdBm(trx, 2) == to_mdB(29));
/* at 2 steps (= 4dB), we expect 33-2-4-10=17*/
- OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 2) == to_mdB(17));
+ OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 4) == to_mdB(17));
}
@@ -157,9 +157,9 @@ static void test_sbts1100(struct gsm_bts_trx *trx)
/* at max_power_red = 2, we expect 38dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(38));
/* at 1 step (of 2dB), we expect full 40-2-2=36 dBm */
- OSMO_ASSERT(get_p_target_mdBm(trx, 1) == to_mdB(36));
+ OSMO_ASSERT(get_p_target_mdBm(trx, 2) == to_mdB(36));
/* at 2 steps (= 4dB), we expect 40-2-4-17=17*/
- OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 2) == to_mdB(17));
+ OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 4) == to_mdB(17));
}
static void test_sbts2050(struct gsm_bts_trx *trx)
@@ -175,9 +175,9 @@ static void test_sbts2050(struct gsm_bts_trx *trx)
/* at max_power_red = 2, we expect 35dBm */
OSMO_ASSERT(get_p_nominal_mdBm(trx) == to_mdB(35));
/* at 1 step (of 2dB), we expect full 37-2-2=33 dBm */
- OSMO_ASSERT(get_p_target_mdBm(trx, 1) == to_mdB(33));
+ OSMO_ASSERT(get_p_target_mdBm(trx, 2) == to_mdB(33));
/* at 2 steps (= 4dB), we expect 37-2-4=31dBm */
- OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 2) == to_mdB(31));
+ OSMO_ASSERT(get_p_trxout_target_mdBm(trx, 4) == to_mdB(31));
}
int bts_model_change_power(struct gsm_bts_trx *trx, int p_trxout_mdBm)