Attention is currently required from: fixeria, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41807?usp=email )
Change subject: {bs,ms}_power_control: Move params inside lchan_power_ctrl_state ......................................................................
Patch Set 4:
(1 comment)
File src/common/power_control.c:
https://gerrit.osmocom.org/c/osmo-bts/+/41807/comment/cd8515aa_91522673?usp=... : PS3, Line 151: memcpy(params, trx->ms_dpc_params, sizeof(*params));
What's the point of moving this `memcpy()` here? Why not keeping it where it was (in `rsl_rx_chan_ac […]
Because the reset function should do what it is supposed to do, reset all state to sensible/known defaults. This clarifies a lot the content of the struct at any time. In the case of DPC, it is also resetting "dpc_enabled" field, so it should also reset "dpc_params" field.
In the "receive MS Power Control" we are specifically only touching those params, as it makes sense to have a specific memcpy there to change stuff.
In the case of static power: