osmo-bts-trx: amr_loop: simplify trx_loop_amr_set()

Change-Id: Ibeed00ef48450edfe1e0d4e179fb4c777b11beb9
Related: SYS#5917, OS#4984
This commit is contained in:
Vadim Yanitskiy 2022-04-13 16:59:54 +03:00 committed by fixeria
parent 5c95312487
commit cfabf6275e
1 changed files with 4 additions and 9 deletions

View File

@ -99,18 +99,13 @@ void trx_loop_amr_input(struct l1sched_chan_state *chan_state,
void trx_loop_amr_set(struct l1sched_chan_state *chan_state, int loop)
{
if (chan_state->amr_loop && !loop) {
chan_state->amr_loop = 0;
if (chan_state->amr_loop == loop)
return;
}
if (!chan_state->amr_loop && loop) {
chan_state->amr_loop = 1;
if (!chan_state->amr_loop) {
/* reset bit errors */
chan_state->ber_num = 0;
chan_state->ber_sum = 0;
return;
}
chan_state->amr_loop = loop;
}