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/7cea97f9_05fab1af?usp=... : PS3, Line 151: memcpy(params, trx->ms_dpc_params, sizeof(*params));
Because the reset function should do what it is supposed to do, reset all state to sensible/known de […]
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: we are talking about memcpying a few more bytes each time a lchan is created, which is really not a problem performance-wise and I think it's totally worth it having a more clear code. And in most cases I suspect anyway dynamic power control is the config which will/should be used...