aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-12 05:02:37 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-16 16:24:26 +0200
commitd6f9965b8c1bbd7bb5693451fbe668260e2ef270 (patch)
treec74bc8b9b815c105ec5c3d65263c4e036bba20ac
parentb0cc3f299a3bb9216f33353b35647f3ffabefdcd (diff)
handover_fsm: don't imply EST_IND
-rw-r--r--src/osmo-bsc/handover_fsm.c4
-rw-r--r--tests/handover/handover_test.c23
2 files changed, 23 insertions, 4 deletions
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 34739ed7b..9d9c29b68 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -880,10 +880,6 @@ static void ho_fsm_post_lchan_established(struct osmo_fsm_inst *fi);
static void ho_fsm_wait_lchan_established_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct gsm_subscriber_connection *conn = ho_fi_conn(fi);
- struct handover *ho = &conn->ho;
-
- /* The RR Assignment Complete counts as RLL Establish event */
- osmo_fsm_inst_dispatch(ho->mt.new_lchan->fi, LCHAN_EV_RLL_ESTABLISH_IND, 0);
if (conn->ho.fi
&& lchan_state_is(ho->mt.new_lchan, LCHAN_ST_ESTABLISHED))
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index cab10a8e8..eeded6ef7 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -361,6 +361,27 @@ static void send_chan_act_ack(struct gsm_lchan *lchan, int act)
abis_rsl_rcvmsg(msg);
}
+/* Send RLL Est Ind for SAPI[0] */
+static void send_est_ind(struct gsm_lchan *lchan)
+{
+ struct msgb *msg = msgb_alloc_headroom(256, 64, "RSL");
+ struct abis_rsl_rll_hdr *rh;
+ uint8_t chan_nr = gsm_lchan2chan_nr(lchan);
+
+ rh = (struct abis_rsl_rll_hdr *) msgb_put(msg, sizeof(*rh));
+ rh->c.msg_discr = ABIS_RSL_MDISC_RLL;
+ rh->c.msg_type = RSL_MT_EST_IND;
+ rh->ie_chan = RSL_IE_CHAN_NR;
+ rh->chan_nr = chan_nr;
+ rh->ie_link_id = RSL_IE_LINK_IDENT;
+ rh->link_id = 0x00;
+
+ msg->dst = lchan->ts->trx->bts->c0->rsl_link;
+ msg->l2h = (unsigned char *)rh;
+
+ abis_rsl_rcvmsg(msg);
+}
+
/* send handover complete */
static void send_ho_complete(struct gsm_lchan *lchan, bool success)
{
@@ -371,6 +392,8 @@ static void send_ho_complete(struct gsm_lchan *lchan, bool success)
struct gsm48_hdr *gh;
struct gsm48_ho_cpl *hc;
+ send_est_ind(lchan);
+
rh = (struct abis_rsl_rll_hdr *) msgb_put(msg, sizeof(*rh));
rh->c.msg_discr = ABIS_RSL_MDISC_RLL;
rh->c.msg_type = RSL_MT_DATA_IND;