[S] Change in osmo-bts[master]: ms_power_control: Apply defaults during reset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/41795?usp=email ) Change subject: ms_power_control: Apply defaults during reset ...................................................................... ms_power_control: Apply defaults during reset lchan_ms_pwr_ctrl_reset() is already called furhter above in rsl_rx_chan_activ(), so simplify mode the default values there and no need to re-apply them twice. Change-Id: I5c0137ba8bf1e057abdc1911716e3d1bf8c61ea3 --- M src/common/power_control.c M src/common/rsl.c 2 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/95/41795/1 diff --git a/src/common/power_control.c b/src/common/power_control.c index bf310c6..187c5da 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -145,6 +145,10 @@ * state->dpc_params = NULL (static mode). * state->skip_block_num = 0, so that 1st power input is taken into account. */ memset(state, 0, sizeof(*state)); + + state->max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); + /* XXX: should we use the maximum power level instead of 0 dBm? */ + state->current = state->max; } /* Shall we skip current block based on configured interval? */ diff --git a/src/common/rsl.c b/src/common/rsl.c index 863167e..07d5e6d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1989,8 +1989,6 @@ } } - lchan_ms_pwr_ctrl_reset(lchan); - /* 9.3.6 Channel Mode */ if (type != RSL_ACT_OSMO_PDCH) { if (rsl_handle_chan_mod_ie(lchan, &tp, &cause) != 0) @@ -2050,11 +2048,12 @@ } /* 9.3.13 MS Power */ - if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) + lchan_ms_pwr_ctrl_reset(lchan); + if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) { lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F; - else /* XXX: should we use the maximum power level instead of 0 dBm? */ - lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0); - lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; + /* XXX: should we use the maximum power level instead of 0 dBm? */ + lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max; + } /* 9.3.24 Timing Advance */ if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1)) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41795?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5c0137ba8bf1e057abdc1911716e3d1bf8c61ea3 Gerrit-Change-Number: 41795 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>
participants (1)
-
pespin