diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-28 23:15:43 +0200 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2021-07-05 12:17:59 +0000 |
commit | 997a257f8dabe5dd940a1271e56e676a871896d7 (patch) | |
tree | 75488bca836fefd2d2ff5543e7a3ce5065c92e6c /src | |
parent | ced29cf94cc0bfa82cf62a7b1fa48202145f3fb6 (diff) |
power_control: constrain BS power reduction on BCCH carrier
BS Power Control is not allowed on the BCCH/CCCH carrier, unless
the BTS is operating in the BCCH carrier power reduction mode.
Allow constrained BS power reduction (up to 6 dB) on active logical
channels iff BCCH carrier power reduction mode is enabled.
Take into account that the maximum power difference between a timeslot
used for BCCH/CCCH and the timeslot preceding it shall not exceed 3 dB.
Change-Id: I2cc6a86731984f586ef35b43a8d3de631f7d8a2f
Related: SYS#4919, SYS#4918
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/bts.c | 31 | ||||
-rw-r--r-- | src/osmo-bsc/lchan_fsm.c | 7 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index c1f09ff07..8608767ec 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -749,6 +749,8 @@ int gsm_bts_set_system_infos(struct gsm_bts *bts) int gsm_bts_set_c0_power_red(struct gsm_bts *bts, const uint8_t red) { + struct gsm_bts_trx *c0 = bts->c0; + unsigned int tn; int rc; if (!osmo_bts_has_feature(&bts->features, BTS_FEAT_BCCH_POWER_RED)) @@ -760,6 +762,35 @@ int gsm_bts_set_c0_power_red(struct gsm_bts *bts, const uint8_t red) if (rc != 0) return rc; + /* Timeslot 0 is always transmitting BCCH/CCCH */ + c0->ts[0].c0_max_power_red_db = 0; + + for (tn = 1; tn < ARRAY_SIZE(c0->ts); tn++) { + struct gsm_bts_trx_ts *ts = &c0->ts[tn]; + struct gsm_bts_trx_ts *prev = ts - 1; + + switch (ts->pchan_is) { + /* Not allowed on CCCH/BCCH */ + case GSM_PCHAN_CCCH: + /* Preceeding timeslot shall not exceed 2 dB */ + if (prev->c0_max_power_red_db > 0) + prev->c0_max_power_red_db = 2; + /* fall-through */ + /* Not recommended on SDCCH/8 */ + case GSM_PCHAN_SDCCH8_SACCH8C: + case GSM_PCHAN_SDCCH8_SACCH8C_CBCH: + ts->c0_max_power_red_db = 0; + break; + default: + ts->c0_max_power_red_db = red; + break; + } + } + + /* Timeslot 7 is always preceding BCCH/CCCH */ + if (c0->ts[7].c0_max_power_red_db > 0) + c0->ts[7].c0_max_power_red_db = 2; + bts->c0_max_power_red_db = red; return 0; diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 03ccec085..635048167 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -675,6 +675,13 @@ static void lchan_fsm_wait_ts_ready_onenter(struct osmo_fsm_inst *fi, uint32_t p lchan->bs_power_db = bts->bs_power_ctrl.bs_power_val_db; } + /* BS Power Control is generally not allowed on the BCCH/CCCH carrier. + * However, we allow it in the BCCH carrier power reduction mode of operation. */ + if (lchan->ts->trx == bts->c0) { + lchan->bs_power_db = OSMO_MIN(lchan->ts->c0_max_power_red_db, + lchan->bs_power_db); + } + if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan)) return; |