Skip to content
Success

Changes

Summary

  1. rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC (details)
  2. fixup: rsl: properly initialize MS/BS Power Control state (details)
Commit 3c91579e8c7059355516a889ef5cfc6c5c4f79b6 by Vadim Yanitskiy
rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC

Otherwise the TA loop would end up using whatever value was set
previously.  Let's assume TA=0 if not indicated by the BSC.

Change-Id: I83f26ff06cebdfe8d4e75944f496e9678310e2a2
The file was modifiedsrc/common/rsl.c
Commit 19ade2fec441e53e5d53157341a342f0980e588e by Vadim Yanitskiy
fixup: rsl: properly initialize MS/BS Power Control state

Commit 75162427 fixed one problem, but introduced another one:

'''
/* Initialize MS Power Control defaults */
lchan->ms_power_ctrl = (struct lchan_power_ctrl_state) {
.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0),
.current = lchan->ms_power_ctrl.max, /* XXX */
};
'''

The intention here was to assign the same value to both 'max' and
'current' fields.  However, field 'current' actually gets assigned
whatever value was assigned to field 'max' previously.

This regression was caught by running the BTS_Tests.TC_rsl_ms_pwr_ctrl
several times against the same osmo-bts-trx process.

Let's use the good-old memset() to initialize the MS/BS Power Control
state structures, and move initialization of 'max' and 'current' fields
to the else branches of the RSL_IE_{MS,BS}_POWER IE checks.

Change-Id: I46c881d5a3959c2542610ed767e0f131d01f9f98
Fixes: 75162427 ("rsl: properly initialize MS/BS Power Control state")
Related: SYS#4918, OS#6672
The file was modifiedsrc/common/rsl.c