Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/28085 )
Change subject: measurement: move SACCH detection to process_l1sap_meas_data() ......................................................................
Patch Set 1:
(1 comment)
File src/common/l1sap.c:
https://gerrit.osmocom.org/c/osmo-bts/+/28085/comment/261a2e32_bf85c471 PS1, Line 725: .is_sub = info_meas_ind->is_sub,
this looks weird. You first set it and then use it to re-set it. […]
This is done on purpose because in AMR mode the caller of this function sets .is_sub itself. If it's set to true by the caller, then we know that it's a SUB frame and do nothing. If it's false, then we do some additional checks here.
Doing what you suggest would break SUB detection for AMR. The correct condition would be:
if (info_meas_ind->is_sub || trx_sched_is_sacch_fn(lchan->ts, fn, true)) ulm.is_sub = 1;
If you find this cleaner, I'll update the patch.