This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25899 ) Change subject: [overpower] Turn it on and off depending on DL RxQual ...................................................................... [overpower] Turn it on and off depending on DL RxQual Change-Id: Iaa812d4661ee17c4cd4a8c4ae4bd3e94c1a2e6cc Depends: Ia28293a12de0af71f55e701fb65c46e905dae217 Related: SYS#5319 --- M include/osmo-bts/lchan.h M src/common/measurement.c M src/common/rsl.c M src/common/scheduler.c 4 files changed, 57 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h index 754dc7c..3aaa75a 100644 --- a/include/osmo-bts/lchan.h +++ b/include/osmo-bts/lchan.h @@ -293,8 +293,9 @@ struct gsm_power_ctrl_params ms_dpc_params; struct gsm_power_ctrl_params bs_dpc_params; - /* Temporary ACCH overpower capabilities */ + /* Temporary ACCH overpower capabilities and state */ struct abis_rsl_osmo_temp_ovp_acch_cap top_acch_cap; + bool top_acch_active; struct msgb *pending_rel_ind_msg; diff --git a/src/common/measurement.c b/src/common/measurement.c index 8f33eaa..4341be7 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -861,6 +861,43 @@ LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "DL-FACCH repetition: active => inactive\n"); } +static void acch_overpower_active_decision(struct gsm_lchan *lchan, + const struct gsm48_meas_res *meas_res) +{ + const bool old = lchan->top_acch_active; + uint8_t upper, lower, rxqual; + + /* ACCH overpower is not allowed => nothing to do */ + if (lchan->top_acch_cap.overpower_db == 0) + return; + /* RxQual threshold is disabled => overpower is always on */ + if (lchan->top_acch_cap.rxqual == 0) + return; + + /* If DTx is active on Downlink, use the '-SUB' */ + if (meas_res->dtx_used) + rxqual = meas_res->rxqual_sub; + else /* ... otherwise use the '-FULL' */ + rxqual = meas_res->rxqual_full; + + upper = lchan->top_acch_cap.rxqual; + if (upper > 2) + lower = upper - 2; + else + lower = 0; + + if (rxqual >= upper) + lchan->top_acch_active = true; + else if (rxqual <= lower) + lchan->top_acch_active = false; + + if (lchan->top_acch_active != old) { + LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "Temporary ACCH overpower: %s\n", + lchan->top_acch_active ? "inactive => active" + : "active => inactive"); + } +} + static bool data_is_rr_meas_rep(const uint8_t *data) { const struct gsm48_hdr *gh = (void *)(data + 5); @@ -954,8 +991,10 @@ } lchan_ms_ta_ctrl(lchan, ms_ta, lchan->meas.ms_toa256); lchan_ms_pwr_ctrl(lchan, ms_pwr, ul_rssi, ul_ci_cb); - if (mr && mr->meas_valid == 0) /* 0 = valid */ + if (mr && mr->meas_valid == 0) { /* 0 = valid */ lchan_bs_pwr_ctrl(lchan, mr); + acch_overpower_active_decision(lchan, mr); + } repeated_dl_facch_active_decision(lchan, mr); diff --git a/src/common/rsl.c b/src/common/rsl.c index 5d069c2..4c84f21 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1928,6 +1928,13 @@ if (rc < 0) return rsl_tx_chan_act_acknack(lchan, -rc); + /* Take the first ACCH overpower decision (if allowed): it can be + * enabled immediately if the RxQual threshold is disabled (0). */ + if (lchan->top_acch_cap.overpower_db > 0) + lchan->top_acch_active = !lchan->top_acch_cap.rxqual; + else + lchan->top_acch_active = false; + /* actually activate the channel in the BTS */ rc = l1sap_chan_act(lchan->ts->trx, dch->chan_nr, &tp); if (rc < 0) @@ -2198,6 +2205,13 @@ if (rc < 0) return rsl_tx_mode_modif_nack(lchan, -rc); + /* Immediately disable ACCH overpower if the value is 0 dB, + * or enable if the RxQual threshold becomes disabled (0). */ + if (lchan->top_acch_cap.overpower_db == 0) + lchan->top_acch_active = false; + else if (lchan->top_acch_cap.rxqual == 0) + lchan->top_acch_active = true; + l1sap_chan_modify(lchan->ts->trx, dch->chan_nr); /* FIXME: delay this until L1 says OK? */ diff --git a/src/common/scheduler.c b/src/common/scheduler.c index ba5c18a..d8048b5 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -1310,7 +1310,7 @@ br->att = lchan->bs_power_ctrl.current; /* Temporary Overpower for SACCH/FACCH bursts */ - if (lchan->top_acch_cap.overpower_db == 0) + if (!lchan->top_acch_active) return; if ((lchan->top_acch_cap.sacch_enable && desc->link_id == LID_SACCH) || (lchan->top_acch_cap.facch_enable && br->flags & TRX_BR_F_FACCH)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iaa812d4661ee17c4cd4a8c4ae4bd3e94c1a2e6cc Gerrit-Change-Number: 25899 Gerrit-PatchSet: 8 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211104/e9067452/attachment.htm>