aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-13 10:19:46 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-01-22 17:26:02 +0100
commitdc8b1207a166156ecaf447538727daa4702fab49 (patch)
tree5b37f8e3dbacb84684281ef7d98b49d3256e131e
parentd33659a2a567e02197aaad81c67a9150a9e82c32 (diff)
handover: Use common function to reset handover statezecke/handover-foo
Conflicts: src/common/rsl.c
-rw-r--r--include/osmo-bts/handover.h1
-rw-r--r--src/common/handover.c7
-rw-r--r--src/common/rsl.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/include/osmo-bts/handover.h b/include/osmo-bts/handover.h
index b08f065..4412ea1 100644
--- a/include/osmo-bts/handover.h
+++ b/include/osmo-bts/handover.h
@@ -10,5 +10,6 @@ enum {
void handover_rach(struct gsm_bts_trx *trx, uint8_t chan_nr,
struct gsm_lchan *lchan, uint8_t ra, uint8_t acc_delay);
void handover_frame(struct gsm_lchan *lchan);
+void reset_handover(struct gsm_lchan *lchan);
#endif /* HANDOVER_H */
diff --git a/src/common/handover.c b/src/common/handover.c
index 6dedf9e..cd86428 100644
--- a/src/common/handover.c
+++ b/src/common/handover.c
@@ -136,10 +136,15 @@ void handover_frame(struct gsm_lchan *lchan)
LOGP(DHO, LOGL_INFO,
"%s First valid frame detected\n", gsm_lchan_name(lchan));
+ reset_handover(lchan);
+}
+
+/* release handover starte */
+void reset_handover(struct gsm_lchan *lchan)
+{
/* Stop T3105 */
osmo_timer_del(&lchan->ho.t3105);
/* Handover process is done */
lchan->ho.active = HANDOVER_NONE;
}
-
diff --git a/src/common/rsl.c b/src/common/rsl.c
index f039f43..09b815b 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -833,9 +833,8 @@ static int rsl_rx_rf_chan_rel(struct gsm_lchan *lchan)
msgb_queue_flush(&lchan->dl_tch_queue);
}
- /* deactivate handover RACH detection and timer */
- lchan->ho.active = HANDOVER_NONE;
- osmo_timer_del(&lchan->ho.t3105);
+ /* release handover state */
+ reset_handover(lchan);
lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
rc = bts_model_rsl_chan_rel(lchan);