diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-06-13 09:39:56 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-01-22 17:25:40 +0100 |
commit | d33659a2a567e02197aaad81c67a9150a9e82c32 (patch) | |
tree | 73eda5e2f84f0fef1ad62274d08fece19232e6a4 /src/common | |
parent | 122aab3e2bcc3a7c3ba24ba62f212fd97349c56b (diff) |
handover: Use enums to indicate the state instead of magic numbers
Conflicts:
src/common/l1sap.c
src/common/rsl.c
src/osmo-bts-trx/l1_if.c
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/handover.c | 4 | ||||
-rw-r--r-- | src/common/rsl.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/common/handover.c b/src/common/handover.c index e02c128f..6dedf9ea 100644 --- a/src/common/handover.c +++ b/src/common/handover.c @@ -111,7 +111,7 @@ void handover_rach(struct gsm_bts_trx *trx, uint8_t chan_nr, lchan->rqd_ta = acc_delay; /* Stop handover detection, wait for valid frame */ - lchan->ho.active = 2; + lchan->ho.active = HANDOVER_WAIT_FRAME; l1sap_chan_modify(trx, chan_nr); /* Send HANDover DETect to BSC */ @@ -140,6 +140,6 @@ void handover_frame(struct gsm_lchan *lchan) osmo_timer_del(&lchan->ho.t3105); /* Handover process is done */ - lchan->ho.active = 0; + lchan->ho.active = HANDOVER_NONE; } diff --git a/src/common/rsl.c b/src/common/rsl.c index 9597df62..f039f432 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -45,6 +45,7 @@ #include <osmo-bts/bts_model.h> #include <osmo-bts/measurement.h> #include <osmo-bts/pcu_if.h> +#include <osmo-bts/handover.h> //#define FAKE_CIPH_MODE_COMPL @@ -736,7 +737,7 @@ static int rsl_rx_chan_activ(struct msgb *msg) if ((type == RSL_ACT_INTER_ASYNC || type == RSL_ACT_INTER_SYNC) && TLVP_PRESENT(&tp, RSL_IE_HANDO_REF)) { - lchan->ho.active = 1; + lchan->ho.active = HANDOVER_ENABLED; lchan->ho.ref = *TLVP_VAL(&tp, RSL_IE_HANDO_REF); LOGP(DRSL, LOGL_INFO, "Channel activation due to handover (id %i)", lchan->ho.ref); } @@ -833,7 +834,7 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan) } /* deactivate handover RACH detection and timer */ - lchan->ho.active = 0; + lchan->ho.active = HANDOVER_NONE; osmo_timer_del(&lchan->ho.t3105); lchan->rel_act_kind = LCHAN_REL_ACT_RSL; |