aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-13 16:59:54 +0300
committerfixeria <vyanitskiy@sysmocom.de>2022-04-20 12:18:08 +0000
commitcfabf6275e51979526c8b99025c344d3e7be1e8d (patch)
tree510ac7351d7fd7eb0b3c7c4b3d9d8cdd8ea79731
parent5c95312487950637e6e5591f2f56e97099c39932 (diff)
osmo-bts-trx: amr_loop: simplify trx_loop_amr_set()
-rw-r--r--src/osmo-bts-trx/amr_loop.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/osmo-bts-trx/amr_loop.c b/src/osmo-bts-trx/amr_loop.c
index d6e6aacc..e5c7fec4 100644
--- a/src/osmo-bts-trx/amr_loop.c
+++ b/src/osmo-bts-trx/amr_loop.c
@@ -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;
}