fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/27773 )


Change subject: osmo-bts-trx: amr_loop: simplify trx_loop_amr_set()
......................................................................

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

Change-Id: Ibeed00ef48450edfe1e0d4e179fb4c777b11beb9
Related: SYS#5917, OS#4984
---
M src/osmo-bts-trx/amr_loop.c
1 file changed, 4 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/73/27773/1

diff --git a/src/osmo-bts-trx/amr_loop.c b/src/osmo-bts-trx/amr_loop.c
index d6e6aac..e5c7fec 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_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;
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27773
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibeed00ef48450edfe1e0d4e179fb4c777b11beb9
Gerrit-Change-Number: 27773
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to