From 1920738840efab584e3c5b60ffa20b39d2279664 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 5 Jul 2011 14:27:30 +0200 Subject: [PATCH] L1/OML: De-activate L1 SAPIs in opposite order of activation L1 wants TCH to be activated before FACCH, and it wants FACCH to be de-activated before TCH. By iterating the array in iverse order, we ensure this. --- src/osmo-bts-sysmo/oml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index f38190b47..014730f11 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -536,9 +536,9 @@ int lchan_deactivate(struct gsm_lchan *lchan) { struct femtol1_hdl *fl1h = trx_femtol1_hdl(lchan->ts->trx); const struct lchan_sapis *s4l = &sapis_for_lchan[lchan->type]; - unsigned int i; + int i; - for (i = 0; i < s4l->num_sapis; i++) { + for (i = s4l->num_sapis-1; i >= 0; i--) { struct msgb *msg = l1p_msgb_alloc(); GsmL1_MphDeactivateReq_t *deact_req;