aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/bsc/assignment_fsm.h4
-rw-r--r--src/osmo-bsc/assignment_fsm.c172
-rw-r--r--src/osmo-bsc/bsc_vty.c34
-rw-r--r--src/osmo-bsc/handover_decision_2.c24
-rw-r--r--src/osmo-bsc/handover_fsm.c2
-rw-r--r--tests/handover/handover_test.c149
-rw-r--r--tests/handover/test_amr_tch_f_to_h_congestion_assignment.ho_vty3
-rw-r--r--tests/handover/test_amr_tch_f_to_h_congestion_assignment_2.ho_vty4
-rw-r--r--tests/handover/test_amr_tch_f_to_h_congestion_assignment_3.ho_vty2
-rw-r--r--tests/handover/test_amr_tch_h_to_f_congestion.ho_vty2
-rw-r--r--tests/handover/test_amr_tch_h_to_f_congestion_two_cells.ho_vty2
-rw-r--r--tests/handover/test_balance_congestion_tchf_tchh.ho_vty4
-rw-r--r--tests/handover/test_congestion_intra_vs_inter_cell.ho_vty12
-rw-r--r--tests/handover/test_disabled_ho_and_as.ho_vty2
-rw-r--r--tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment.ho_vty12
-rw-r--r--tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty8
-rw-r--r--tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty4
-rw-r--r--tests/handover/test_dyn_ts_favor_moving_half_used_tch_h.ho_vty6
18 files changed, 315 insertions, 131 deletions
diff --git a/include/osmocom/bsc/assignment_fsm.h b/include/osmocom/bsc/assignment_fsm.h
index b4af335d1..d4ed846e1 100644
--- a/include/osmocom/bsc/assignment_fsm.h
+++ b/include/osmocom/bsc/assignment_fsm.h
@@ -41,6 +41,10 @@ enum assignment_fsm_event {
void assignment_fsm_init();
+int reassignment_request_to_lchan(enum assign_for assign_for, struct gsm_lchan *lchan, struct gsm_lchan *to_lchan);
+int reassignment_request_to_chan_type(enum assign_for assign_for, struct gsm_lchan *lchan,
+ enum gsm_chan_t new_lchan_type);
+
void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts *bts,
struct assignment_request *req);
void assignment_reset(struct gsm_subscriber_connection *conn);
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 3d341bb94..5eb0517ec 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -438,6 +438,55 @@ static bool reuse_existing_lchan(struct gsm_subscriber_connection *conn)
return false;
}
+static int _reassignment_request(enum assign_for assign_for, struct gsm_lchan *lchan, struct gsm_lchan *to_lchan,
+ enum gsm_chan_t new_lchan_type)
+{
+ struct gsm_subscriber_connection *conn = lchan->conn;
+ struct assignment_request req = {
+ .assign_for = assign_for,
+ .aoip = gscon_is_aoip(conn),
+ .msc_assigned_cic = conn->user_plane.msc_assigned_cic,
+ .msc_rtp_port = conn->user_plane.msc_assigned_rtp_port,
+ .n_ch_mode_rate = 1,
+ /* At the moment, we don't support changing the speech codec during handover/re-assignment.
+ * Here we request to activate the new lchan at the exact ch_mode_rate of the previous lchan. But:
+ * For Chan Act, in abis_rsl.c, channel_mode_from_lchan() will actually set the RSL_CMOD_CRT_* according
+ * to the new_lchan->type, while RSL_CMOD_SP_* is set according to this ch_mode_rate->chan_mode.
+ * So, for example, changing an AMR voice call from TCH/F to TCH/H will keep RSL_CMOD_SP_GSM3 taken from
+ * ch_mode_rate_list[0], but send RSL_CMOD_CRT_TCH_Lm taken from new_lchan->type.
+ * We still need to set ch_mode_rate.chan_rate according to the requested new_lchan_type for
+ * lchan_select_by_chan_mode() below.
+ * TODO: figure out whether that is actually sane.
+ */
+ .ch_mode_rate_list = { lchan->current_ch_mode_rate },
+ .target_lchan = to_lchan,
+ };
+
+ if (to_lchan)
+ new_lchan_type = to_lchan->type;
+ req.ch_mode_rate_list[0].chan_rate = chan_t_to_chan_rate(new_lchan_type);
+
+ OSMO_STRLCPY_ARRAY(req.msc_rtp_addr, conn->user_plane.msc_assigned_rtp_addr);
+
+ if (conn->user_plane.mgw_endpoint_ci_msc) {
+ req.use_osmux = osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(conn->user_plane.mgw_endpoint_ci_msc,
+ &req.osmux_cid);
+ }
+
+ return osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_ASSIGNMENT_START, &req);
+}
+
+int reassignment_request_to_lchan(enum assign_for assign_for, struct gsm_lchan *lchan, struct gsm_lchan *to_lchan)
+{
+ return _reassignment_request(assign_for, lchan, to_lchan, 0);
+}
+
+int reassignment_request_to_chan_type(enum assign_for assign_for, struct gsm_lchan *lchan,
+ enum gsm_chan_t new_lchan_type)
+{
+ return _reassignment_request(assign_for, lchan, NULL, new_lchan_type);
+}
+
void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts *bts,
struct assignment_request *req)
{
@@ -447,8 +496,6 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts
[CH_RATE_FULL] = "FR",
};
struct osmo_fsm_inst *fi;
- struct lchan_activate_info activ_info;
- struct lchan_modify_info modif_info;
int i;
OSMO_ASSERT(conn);
@@ -472,27 +519,8 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts
if (check_requires_voice_stream(conn) < 0)
return;
- if (req->target_lchan) {
- /* The caller already picked a target lchan to assign to. No need to try re-using the current lchan or
- * picking a new one. */
- if (!lchan_state_is(req->target_lchan, LCHAN_ST_UNUSED)) {
- assignment_fail(GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE,
- "Assignment to lchan %s requested, but lchan is already in use (state=%s)\n",
- gsm_lchan_name(req->target_lchan),
- osmo_fsm_inst_state_name(req->target_lchan->fi));
- return;
- }
- conn->assignment.new_lchan = req->target_lchan;
- goto new_lchan_selected;
- }
-
- /* There may be an already existing lchan, if yes, try to work with
- * the existing lchan.
- * If an RTP FSM is already set up for the lchan, Mode Modify is not yet supported -- see handling of
- * LCHAN_EV_REQUEST_MODE_MODIFY in lchan_fsm.c. To not break the lchan, do not even attempt to re-use an lchan
- * that already has an RTP stream set up, rather establish a new lchan (that transition is well implemented). */
- if (reuse_existing_lchan(conn) && !conn->lchan->fi_rtp) {
- /* The new lchan is the old lchan, keep new_lchan == NULL. */
+ if (!req->target_lchan && reuse_existing_lchan(conn)) {
+ /* The already existing lchan is suitable for this mode */
conn->assignment.new_lchan = NULL;
/* If the requested mode and the current TCH mode matches up, just send the
@@ -524,35 +552,54 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts
gsm48_chan_mode_name(conn->assignment.selected_ch_mode_rate.chan_mode),
gsm_lchan_name(conn->lchan));
- modif_info = (struct lchan_modify_info){
- .modify_for = FOR_ASSIGNMENT,
- .ch_mode_rate = conn->assignment.selected_ch_mode_rate,
- .requires_voice_stream = conn->assignment.requires_voice_stream,
- .msc_assigned_cic = req->msc_assigned_cic,
- };
-
- if (assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_MODIFIED))
- return;
- lchan_mode_modify(conn->lchan, &modif_info);
+ assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_MODIFIED);
return;
}
- /* Try to allocate a new lchan in order of preference */
- for (i = 0; i < req->n_ch_mode_rate; i++) {
- conn->assignment.new_lchan = lchan_select_by_chan_mode(bts,
- req->ch_mode_rate_list[i].chan_mode, req->ch_mode_rate_list[i].chan_rate);
- if (!conn->assignment.new_lchan)
- continue;
- LOG_ASSIGNMENT(conn, LOGL_DEBUG, "selected new lchan %s for mode[%d] = %s channel_rate=%d\n",
- gsm_lchan_name(conn->assignment.new_lchan),
- i, gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode),
- req->ch_mode_rate_list[i].chan_rate);
+ if (req->target_lchan) {
+ bool matching_mode;
- conn->assignment.selected_ch_mode_rate = req->ch_mode_rate_list[i];
- break;
+ /* The caller already picked a target lchan to assign to. No need to try re-using the current lchan or
+ * picking a new one. */
+ if (!lchan_state_is(req->target_lchan, LCHAN_ST_UNUSED)) {
+ assignment_fail(GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE,
+ "Assignment to lchan %s requested, but lchan is already in use (state=%s)\n",
+ gsm_lchan_name(req->target_lchan),
+ osmo_fsm_inst_state_name(req->target_lchan->fi));
+ return;
+ }
+
+ conn->assignment.new_lchan = req->target_lchan;
+ matching_mode = false;
+ for (i = 0; i < req->n_ch_mode_rate; i++) {
+ if (!lchan_type_compat_with_mode(conn->assignment.new_lchan->type, &req->ch_mode_rate_list[i]))
+ continue;
+ conn->assignment.selected_ch_mode_rate = req->ch_mode_rate_list[i];
+ matching_mode = true;
+ }
+ if (!matching_mode) {
+ assignment_fail(GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE,
+ "Assignment to lchan %s requested, but lchan is not compatible\n",
+ gsm_lchan_name(req->target_lchan));
+ return;
+ }
+ } else {
+ /* Try to allocate a new lchan in order of preference */
+ for (i = 0; i < req->n_ch_mode_rate; i++) {
+ conn->assignment.new_lchan = lchan_select_by_chan_mode(bts,
+ req->ch_mode_rate_list[i].chan_mode, req->ch_mode_rate_list[i].chan_rate);
+ if (!conn->assignment.new_lchan)
+ continue;
+ LOG_ASSIGNMENT(conn, LOGL_DEBUG, "selected new lchan %s for mode[%d] = %s channel_rate=%d\n",
+ gsm_lchan_name(conn->assignment.new_lchan),
+ i, gsm48_chan_mode_name(req->ch_mode_rate_list[i].chan_mode),
+ req->ch_mode_rate_list[i].chan_rate);
+
+ conn->assignment.selected_ch_mode_rate = req->ch_mode_rate_list[i];
+ break;
+ }
}
-new_lchan_selected:
/* Check whether the lchan allocation was successful or not and tear
* down the assignment in case of failure. */
if (!conn->assignment.new_lchan) {
@@ -579,7 +626,13 @@ new_lchan_selected:
req->use_osmux ? "yes" : "no");
assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE);
- activ_info = (struct lchan_activate_info){
+}
+
+static void assignment_fsm_wait_lchan_active_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);
+ struct assignment_request *req = &conn->assignment.req;
+ struct lchan_activate_info activ_info = {
.activ_for = FOR_ASSIGNMENT,
.for_conn = conn,
.ch_mode_rate = conn->assignment.selected_ch_mode_rate,
@@ -593,14 +646,17 @@ new_lchan_selected:
lchan_activate(conn->assignment.new_lchan, &activ_info);
}
-static void assignment_fsm_wait_lchan(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void assignment_fsm_wait_lchan_active(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);
switch (event) {
case ASSIGNMENT_EV_LCHAN_ACTIVE:
- if (data != conn->assignment.new_lchan)
+ if (data != conn->assignment.new_lchan) {
+ LOG_ASSIGNMENT(conn, LOGL_ERROR, "Some unrelated lchan was activated, ignoring: %s\n",
+ gsm_lchan_name(data));
return;
+ }
/* The TS may have changed its pchan_is */
assignment_fsm_update_id(conn);
@@ -620,7 +676,6 @@ static void assignment_fsm_wait_rr_ass_complete_onenter(struct osmo_fsm_inst *fi
rc = gsm48_send_rr_ass_cmd(conn->lchan, conn->assignment.new_lchan,
conn->lchan->ms_power);
-
if (rc)
assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE, "Unable to send RR Assignment Command");
}
@@ -751,6 +806,19 @@ static void assignment_fsm_wait_mgw_endpoint_to_msc(struct osmo_fsm_inst *fi, ui
}
}
+static void assignment_fsm_wait_lchan_modified_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);
+ struct assignment_request *req = &conn->assignment.req;
+ struct lchan_modify_info modif_info = {
+ .modify_for = MODIFY_FOR_ASSIGNMENT,
+ .ch_mode_rate = conn->assignment.selected_ch_mode_rate,
+ .requires_voice_stream = conn->assignment.requires_voice_stream,
+ .msc_assigned_cic = req->msc_assigned_cic,
+ };
+ lchan_mode_modify(conn->lchan, &modif_info);
+}
+
static void assignment_fsm_wait_lchan_modified(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
switch (event) {
@@ -769,7 +837,8 @@ static void assignment_fsm_wait_lchan_modified(struct osmo_fsm_inst *fi, uint32_
static const struct osmo_fsm_state assignment_fsm_states[] = {
[ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE] = {
.name = "WAIT_LCHAN_ACTIVE",
- .action = assignment_fsm_wait_lchan,
+ .onenter = assignment_fsm_wait_lchan_active_onenter,
+ .action = assignment_fsm_wait_lchan_active,
.in_event_mask = 0
| S(ASSIGNMENT_EV_LCHAN_ACTIVE)
,
@@ -814,6 +883,7 @@ static const struct osmo_fsm_state assignment_fsm_states[] = {
},
[ASSIGNMENT_ST_WAIT_LCHAN_MODIFIED] = {
.name = "WAIT_LCHAN_MODIFIED",
+ .onenter = assignment_fsm_wait_lchan_modified_onenter,
.action = assignment_fsm_wait_lchan_modified,
.in_event_mask = 0
| S(ASSIGNMENT_EV_LCHAN_MODIFIED)
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index f8243a85f..a1ab88516 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -78,6 +78,7 @@
#include <osmocom/bsc/bts.h>
#include <osmocom/mgcp_client/mgcp_client_endpoint_fsm.h>
#include <osmocom/bsc/bsc_subscr_conn_fsm.h>
+#include <osmocom/bsc/assignment_fsm.h>
#include <inttypes.h>
@@ -1865,30 +1866,15 @@ DEFUN(show_subscr_conn,
return CMD_SUCCESS;
}
-static int trigger_as(struct vty *vty, struct gsm_lchan *from_lchan)
+static int trigger_as(struct vty *vty, struct gsm_lchan *from_lchan, struct gsm_lchan *to_lchan)
{
- struct gsm_subscriber_connection *conn = from_lchan->conn;
- struct assignment_request req = {
- .assign_for = ASSIGN_FOR_VTY,
- .aoip = gscon_is_aoip(from_lchan->conn),
- .msc_assigned_cic = conn->user_plane.msc_assigned_cic,
- .msc_rtp_port = conn->user_plane.msc_assigned_rtp_port,
- .n_ch_mode_rate = 1,
- .ch_mode_rate_list = { from_lchan->current_ch_mode_rate, },
- };
- memcpy(&req.msc_rtp_addr, from_lchan->conn->user_plane.msc_assigned_rtp_addr, sizeof(req.msc_rtp_addr));
-
- if (conn->user_plane.mgw_endpoint_ci_msc) {
- req.use_osmux = osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(conn->user_plane.mgw_endpoint_ci_msc,
- &req.osmux_cid);
- }
-
LOG_LCHAN(from_lchan, LOGL_NOTICE, "Manually triggering Assignment from VTY\n");
-
- /* select a free target lchan to actually get a re-assignment, instead of just re-using the current lchan. */
- req.target_lchan = lchan_select_by_type(from_lchan->ts->trx->bts, from_lchan->type);
-
- if (osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_ASSIGNMENT_START, &req)) {
+ if (!to_lchan) {
+ to_lchan = lchan_select_by_type(from_lchan->ts->trx->bts, from_lchan->type);
+ vty_out(vty, "Error: cannot find free lchan of type %s%s",
+ gsm_lchant_name(from_lchan->type), VTY_NEWLINE);
+ }
+ if (reassignment_request_to_lchan(FOR_VTY, from_lchan, to_lchan)) {
vty_out(vty, "Error: not allowed to start assignment for %s%s",
gsm_lchan_name(from_lchan), VTY_NEWLINE);
return CMD_WARNING;
@@ -1954,7 +1940,7 @@ static int ho_or_as(struct vty *vty, const char *argv[], int argc)
if (new_bts)
return trigger_ho(vty, conn->lchan, new_bts);
else
- return trigger_as(vty, conn->lchan);
+ return trigger_as(vty, conn->lchan, NULL);
}
}
@@ -2094,7 +2080,7 @@ DEFUN(assignment_any, assignment_any_cmd,
if (!from_lchan)
return CMD_WARNING;
- return trigger_as(vty, from_lchan);
+ return trigger_as(vty, from_lchan, NULL);
}
DEFUN(handover_any_to_arfcn_bsic, handover_any_to_arfcn_bsic_cmd,
diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index d0bd87bae..1ebc8531e 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -29,6 +29,7 @@
#include <osmocom/bsc/debug.h>
#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/assignment_fsm.h>
#include <osmocom/bsc/handover_fsm.h>
#include <osmocom/bsc/handover_decision.h>
#include <osmocom/bsc/handover_decision_2.h>
@@ -812,7 +813,6 @@ static void check_requirements_remote_bss(struct ho_candidate *c)
/* Trigger handover or assignment depending on the target BTS */
static int trigger_local_ho_or_as(struct ho_candidate *c, uint8_t requirements)
{
- struct handover_out_req req;
int afs_bias = 0;
bool full_rate = false;
@@ -868,23 +868,25 @@ static int trigger_local_ho_or_as(struct ho_candidate *c, uint8_t requirements)
}
/* trigger handover or assignment */
- if (c->current.bts == c->target.bts)
+ if (c->current.bts == c->target.bts) {
LOGPHOLCHAN(c->current.lchan, LOGL_NOTICE, "Triggering assignment to %s, due to %s\n",
full_rate ? "TCH/F" : "TCH/H",
ho_reason_name(global_ho_reason));
- else
+ reassignment_request_to_chan_type(ASSIGN_FOR_CONGESTION_RESOLUTION, c->current.lchan,
+ full_rate? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H);
+ } else {
+ struct handover_out_req req = {
+ .from_hodec_id = HODEC2,
+ .old_lchan = c->current.lchan,
+ .new_lchan_type = full_rate? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H,
+ };
+ bts_cell_ab(&req.target_cell_ab, c->target.bts);
LOGPHOLCHANTOBTS(c->current.lchan, c->target.bts, LOGL_INFO,
"Triggering handover to %s, due to %s\n",
full_rate ? "TCH/F" : "TCH/H",
ho_reason_name(global_ho_reason));
-
- req = (struct handover_out_req){
- .from_hodec_id = HODEC2,
- .old_lchan = c->current.lchan,
- .new_lchan_type = full_rate? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H,
- };
- bts_cell_ab(&req.target_cell_ab, c->target.bts);
- handover_request(&req);
+ handover_request(&req);
+ }
return 0;
}
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 5aca655aa..7ecf168da 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -1357,6 +1357,7 @@ static const struct osmo_fsm_state ho_fsm_states[] = {
.out_state_mask = 0
| S(HO_ST_WAIT_LCHAN_ACTIVE)
| S(HO_ST_WAIT_MGW_ENDPOINT_TO_MSC)
+ | S(HO_ST_WAIT_LCHAN_ESTABLISHED)
| S(HO_ST_WAIT_RR_HO_DETECT)
,
},
@@ -1369,6 +1370,7 @@ static const struct osmo_fsm_state ho_fsm_states[] = {
| S(HO_EV_MSC_MGW_FAIL)
,
.out_state_mask = 0
+ | S(HO_ST_WAIT_LCHAN_ESTABLISHED)
| S(HO_ST_WAIT_RR_HO_DETECT)
,
},
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 2f0323f70..d47e97a1c 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -35,6 +35,7 @@
#include <osmocom/bsc/bsc_subscriber.h>
#include <osmocom/bsc/lchan_select.h>
#include <osmocom/bsc/lchan_fsm.h>
+#include <osmocom/bsc/assignment_fsm.h>
#include <osmocom/bsc/handover_decision.h>
#include <osmocom/bsc/system_information.h>
#include <osmocom/bsc/handover.h>
@@ -372,6 +373,10 @@ void create_conn(struct gsm_lchan *lchan)
snprintf(imsi, sizeof(imsi), "%06u", next_imsi);
lchan->conn->bsub = bsc_subscr_find_or_create_by_imsi(net->bsc_subscribers, imsi, BSUB_USE_CONN);
+ /* Set RTP data that the MSC normally would have sent */
+ OSMO_STRLCPY_ARRAY(conn->user_plane.msc_assigned_rtp_addr, "1.2.3.4");
+ conn->user_plane.msc_assigned_rtp_port = 1234;
+
/* kick the FSM from INIT through to the ACTIVE state */
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_MO_COMPL_L3, NULL);
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_CFM, NULL);
@@ -439,12 +444,14 @@ struct gsm_lchan *create_lchan(struct gsm_bts *bts, int full_rate, const char *c
static void lchan_release_ack(struct gsm_lchan *lchan)
{
- if (lchan->fi && lchan->fi->state == LCHAN_ST_WAIT_BEFORE_RF_RELEASE) {
- /* don't wait before release */
- osmo_fsm_inst_state_chg(lchan->fi, LCHAN_ST_WAIT_RF_RELEASE_ACK, 0, 0);
- /* ack the release */
- osmo_fsm_inst_dispatch(lchan->fi, LCHAN_EV_RSL_RF_CHAN_REL_ACK, 0);
- }
+ if (!lchan->fi || lchan->fi->state != LCHAN_ST_WAIT_BEFORE_RF_RELEASE)
+ return;
+ /* don't wait before release */
+ osmo_fsm_inst_state_chg(lchan->fi, LCHAN_ST_WAIT_RF_RELEASE_ACK, 0, 0);
+ if (lchan->fi->state == LCHAN_ST_UNUSED)
+ return;
+ /* ack the release */
+ osmo_fsm_inst_dispatch(lchan->fi, LCHAN_EV_RSL_RF_CHAN_REL_ACK, 0);
}
static void lchan_clear(struct gsm_lchan *lchan)
@@ -533,6 +540,9 @@ static struct gsm_lchan *last_chan_req = NULL;
static struct gsm_lchan *new_ho_cmd = NULL;
static struct gsm_lchan *last_ho_cmd = NULL;
+static struct gsm_lchan *new_as_cmd = NULL;
+static struct gsm_lchan *last_as_cmd = NULL;
+
/* send channel activation ack */
static void send_chan_act_ack(struct gsm_lchan *lchan, int act)
{
@@ -551,6 +561,44 @@ static void send_chan_act_ack(struct gsm_lchan *lchan, int act)
abis_rsl_rcvmsg(msg);
}
+/* Send RR Assignment Complete for SAPI[0] */
+static void send_assignment_complete(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);
+ uint8_t *buf;
+ struct gsm48_hdr *gh;
+ struct gsm48_ho_cpl *hc;
+
+ fprintf(stderr, "- Send RR Assignment Complete for %s\n", gsm_lchan_name(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;
+ rh->ie_chan = RSL_IE_CHAN_NR;
+ rh->chan_nr = chan_nr;
+ rh->ie_link_id = RSL_IE_LINK_IDENT;
+ rh->link_id = 0x00;
+
+ buf = msgb_put(msg, 3);
+ buf[0] = RSL_IE_L3_INFO;
+ buf[1] = (sizeof(*gh) + sizeof(*hc)) >> 8;
+ buf[2] = (sizeof(*gh) + sizeof(*hc)) & 0xff;
+
+ gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
+ hc = (struct gsm48_ho_cpl *) msgb_put(msg, sizeof(*hc));
+
+ gh->proto_discr = GSM48_PDISC_RR;
+ gh->msg_type = GSM48_MT_RR_ASS_COMPL;
+
+ msg->dst = lchan->ts->trx->rsl_link;
+ msg->l2h = (unsigned char *)rh;
+ msg->l3h = (unsigned char *)gh;
+
+ abis_rsl_rcvmsg(msg);
+}
+
/* Send RLL Est Ind for SAPI[0] */
static void send_est_ind(struct gsm_lchan *lchan)
{
@@ -698,14 +746,21 @@ int __wrap_abis_rsl_sendmsg(struct msgb *msg)
gh = (struct gsm48_hdr*)msg->l3h;
switch (gh->msg_type) {
case GSM48_MT_RR_HANDO_CMD:
- case GSM48_MT_RR_ASS_CMD:
- if (new_ho_cmd) {
+ if (new_ho_cmd || new_as_cmd) {
fprintf(stderr, "Test script is erratic: seen a Handover Command"
- " while a previous Handover Command is still unhandled\n");
+ " while a previous Assignment or Handover Command is still unhandled\n");
exit(1);
}
new_ho_cmd = lchan;
break;
+ case GSM48_MT_RR_ASS_CMD:
+ if (new_ho_cmd || new_as_cmd) {
+ fprintf(stderr, "Test script is erratic: seen an Assignment Command"
+ " while a previous Assignment or Handover Command is still unhandled\n");
+ exit(1);
+ }
+ new_as_cmd = lchan;
+ break;
}
break;
case RSL_MT_IPAC_CRCX:
@@ -1015,22 +1070,40 @@ static void _expect_chan_activ(struct gsm_lchan *lchan)
static void _expect_ho_cmd(struct gsm_lchan *lchan)
{
- fprintf(stderr, "- Expecting Handover/Assignment Command at %s\n",
+ fprintf(stderr, "- Expecting Handover Command at %s\n",
gsm_lchan_name(lchan));
if (!new_ho_cmd) {
fprintf(stderr, "Test failed, no Handover Command\n");
exit(1);
}
- fprintf(stderr, " * Got Handover/Assignment Command at %s\n", gsm_lchan_name(new_ho_cmd));
+ fprintf(stderr, " * Got Handover Command at %s\n", gsm_lchan_name(new_ho_cmd));
if (new_ho_cmd != lchan) {
- fprintf(stderr, "Test failed, Handover/Assignment Command not on the expected lchan\n");
+ fprintf(stderr, "Test failed, Handover Command not on the expected lchan\n");
exit(1);
}
last_ho_cmd = new_ho_cmd;
new_ho_cmd = NULL;
}
+static void _expect_as_cmd(struct gsm_lchan *lchan)
+{
+ fprintf(stderr, "- Expecting Assignment Command at %s\n",
+ gsm_lchan_name(lchan));
+
+ if (!new_as_cmd) {
+ fprintf(stderr, "Test failed, no Assignment Command\n");
+ exit(1);
+ }
+ fprintf(stderr, " * Got Assignment Command at %s\n", gsm_lchan_name(new_as_cmd));
+ if (new_as_cmd != lchan) {
+ fprintf(stderr, "Test failed, Assignment Command not on the expected lchan\n");
+ exit(1);
+ }
+ last_as_cmd = new_as_cmd;
+ new_as_cmd = NULL;
+}
+
DEFUN(expect_chan, expect_chan_cmd,
"expect-chan " LCHAN_ARGS,
"Expect RSL Channel Activation of a specific lchan\n"
@@ -1051,6 +1124,16 @@ DEFUN(expect_handover_command, expect_handover_command_cmd,
return CMD_SUCCESS;
}
+DEFUN(expect_assignment_command, expect_assignment_command_cmd,
+ "expect-as-cmd " LCHAN_ARGS,
+ "Expect Assignment Command for a given lchan\n"
+ LCHAN_ARGS_DOC)
+{
+ VTY_ECHO();
+ _expect_as_cmd(parse_lchan_args(argv));
+ return CMD_SUCCESS;
+}
+
DEFUN(ho_detection, ho_detection_cmd,
"ho-detect",
"Send Handover Detection to the most recent HO target lchan\n")
@@ -1087,7 +1170,7 @@ DEFUN(expect_ho, expect_ho_cmd,
"Expect a handover of a specific lchan to a specific target lchan;"
" shorthand for expect-chan, ack-chan, expect-ho, ho-complete.\n"
"lchan to handover from\n" LCHAN_ARGS_DOC
- "lchan that to handover to\n" LCHAN_ARGS_DOC)
+ "lchan to handover to\n" LCHAN_ARGS_DOC)
{
struct gsm_lchan *from = parse_lchan_args(argv);
struct gsm_lchan *to = parse_lchan_args(argv+4);
@@ -1097,6 +1180,31 @@ DEFUN(expect_ho, expect_ho_cmd,
_expect_ho_cmd(from);
send_ho_detect(to);
send_ho_complete(to, true);
+
+ lchan_release_ack(from);
+ return CMD_SUCCESS;
+}
+
+DEFUN(expect_as, expect_as_cmd,
+ "expect-as from " LCHAN_ARGS " to " LCHAN_ARGS,
+ "Expect an intra-cell re-assignment of a specific lchan to a specific target lchan;"
+ " shorthand for expect-chan, ack-chan, expect-as, TODO.\n"
+ "lchan to be re-assigned elsewhere\n" LCHAN_ARGS_DOC
+ "new lchan to re-assign to\n" LCHAN_ARGS_DOC)
+{
+ struct gsm_lchan *from = parse_lchan_args(argv);
+ struct gsm_lchan *to = parse_lchan_args(argv+4);
+ VTY_ECHO();
+
+ _expect_chan_activ(to);
+ if (from->ts->trx->bts != to->ts->trx->bts) {
+ vty_out(vty, "%% Error: re-assignment only works within the same BTS%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+ _expect_as_cmd(from);
+ send_assignment_complete(to);
+ send_est_ind(to);
+
lchan_release_ack(from);
return CMD_SUCCESS;
}
@@ -1186,9 +1294,11 @@ static void ho_test_vty_init()
install_element(CONFIG_NODE, &expect_no_chan_cmd);
install_element(CONFIG_NODE, &expect_chan_cmd);
install_element(CONFIG_NODE, &expect_handover_command_cmd);
+ install_element(CONFIG_NODE, &expect_assignment_command_cmd);
install_element(CONFIG_NODE, &ho_detection_cmd);
install_element(CONFIG_NODE, &ho_complete_cmd);
install_element(CONFIG_NODE, &expect_ho_cmd);
+ install_element(CONFIG_NODE, &expect_as_cmd);
install_element(CONFIG_NODE, &ho_failed_cmd);
install_element(CONFIG_NODE, &expect_ts_use_cmd);
install_element(CONFIG_NODE, &codec_f_cmd);
@@ -1307,7 +1417,8 @@ int main(int argc, char **argv)
osmo_init_logging2(ctx, &log_info);
- log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
+ log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_BASENAME);
+ log_set_print_filename_pos(osmo_stderr_target, LOG_FILENAME_POS_LINE_END);
log_set_print_category(osmo_stderr_target, 1);
log_set_print_category_hex(osmo_stderr_target, 0);
log_set_print_level(osmo_stderr_target, 1);
@@ -1326,6 +1437,7 @@ int main(int argc, char **argv)
lchan_fsm_init();
bsc_subscr_conn_fsm_init();
handover_fsm_init();
+ assignment_fsm_init();
ho_set_algorithm(bsc_gsmnet->ho, 2);
ho_set_ho_active(bsc_gsmnet->ho, true);
@@ -1414,3 +1526,12 @@ const char *osmo_mgcpc_ep_ci_name(const struct osmo_mgcpc_ep_ci *ci)
{
return "fake-ci";
}
+const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_rtp_info(const struct osmo_mgcpc_ep_ci *ci)
+{
+ static struct mgcp_conn_peer ret = {
+ .addr = "1.2.3.4",
+ .port = 1234,
+ .endpoint = "fake-endpoint",
+ };
+ return &ret;
+}
diff --git a/tests/handover/test_amr_tch_f_to_h_congestion_assignment.ho_vty b/tests/handover/test_amr_tch_f_to_h_congestion_assignment.ho_vty
index d6515fc6e..84f34ff61 100644
--- a/tests/handover/test_amr_tch_f_to_h_congestion_assignment.ho_vty
+++ b/tests/handover/test_amr_tch_f_to_h_congestion_assignment.ho_vty
@@ -14,6 +14,5 @@ meas-rep lchan 0 0 5 1 rxlev 34 rxqual 0 ta 0
meas-rep lchan 0 0 6 0 rxlev 20 rxqual 0 ta 0
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 6 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 6 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - TCH/HH - -
-
diff --git a/tests/handover/test_amr_tch_f_to_h_congestion_assignment_2.ho_vty b/tests/handover/test_amr_tch_f_to_h_congestion_assignment_2.ho_vty
index e7778d0fa..2fa08da17 100644
--- a/tests/handover/test_amr_tch_f_to_h_congestion_assignment_2.ho_vty
+++ b/tests/handover/test_amr_tch_f_to_h_congestion_assignment_2.ho_vty
@@ -15,10 +15,10 @@ meas-rep lchan 0 0 5 1 rxlev 34 rxqual 0 ta 0
meas-rep lchan 0 0 6 0 rxlev 20 rxqual 0 ta 0
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 6 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 6 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - TCH/HH - -
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 2 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 2 0
expect-ts-use trx 0 0 states * TCH/F TCH/F - - TCH/-H - -
congestion-check
expect-no-chan
diff --git a/tests/handover/test_amr_tch_f_to_h_congestion_assignment_3.ho_vty b/tests/handover/test_amr_tch_f_to_h_congestion_assignment_3.ho_vty
index ffa361489..0dca250d2 100644
--- a/tests/handover/test_amr_tch_f_to_h_congestion_assignment_3.ho_vty
+++ b/tests/handover/test_amr_tch_f_to_h_congestion_assignment_3.ho_vty
@@ -10,6 +10,6 @@ set-ts-use trx 0 0 states * TCH/F TCH/F - - TCH/H- - -
meas-rep lchan 0 0 1 0 rxlev 30 rxqual 0 ta 0 neighbors 30
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 5 1
+expect-as from lchan 0 0 1 0 to lchan 0 0 5 1
expect-ts-use trx 0 0 states * - TCH/F - - TCH/HH - -
diff --git a/tests/handover/test_amr_tch_h_to_f_congestion.ho_vty b/tests/handover/test_amr_tch_h_to_f_congestion.ho_vty
index 4d1194c47..0252d9f23 100644
--- a/tests/handover/test_amr_tch_h_to_f_congestion.ho_vty
+++ b/tests/handover/test_amr_tch_h_to_f_congestion.ho_vty
@@ -10,5 +10,5 @@ set-ts-use trx 0 0 states * - - - TCH/H- - - *
meas-rep lchan 0 0 4 0 rxlev 30 rxqual 0 ta 0
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 4 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 4 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - - - *
diff --git a/tests/handover/test_amr_tch_h_to_f_congestion_two_cells.ho_vty b/tests/handover/test_amr_tch_h_to_f_congestion_two_cells.ho_vty
index 7cbcd4b92..fecd06853 100644
--- a/tests/handover/test_amr_tch_h_to_f_congestion_two_cells.ho_vty
+++ b/tests/handover/test_amr_tch_h_to_f_congestion_two_cells.ho_vty
@@ -12,6 +12,6 @@ set-ts-use trx 1 0 states * - - - TCH/H- - - *
meas-rep repeat 10 lchan 1 0 4 0 rxlev 30 rxqual 0 ta 0 neighbors 20
expect-no-chan
congestion-check
-expect-ho from lchan 1 0 4 0 to lchan 1 0 1 0
+expect-as from lchan 1 0 4 0 to lchan 1 0 1 0
expect-ts-use trx 0 0 states * - - - - - - *
expect-ts-use trx 1 0 states * TCH/F - - - - - *
diff --git a/tests/handover/test_balance_congestion_tchf_tchh.ho_vty b/tests/handover/test_balance_congestion_tchf_tchh.ho_vty
index 62f07bff2..f151b2a41 100644
--- a/tests/handover/test_balance_congestion_tchf_tchh.ho_vty
+++ b/tests/handover/test_balance_congestion_tchf_tchh.ho_vty
@@ -23,7 +23,7 @@ expect-no-chan
set-ts-use trx 0 0 states * TCH/F TCH/F - - TCH/HH TCH/HH TCH/HH
meas-rep lchan * * * * rxlev 10 rxqual 0 ta 0
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 3 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 3 0
# Now similar load percentages, just with different min-free-slots settings for tch/f vs tch/h.
@@ -50,4 +50,4 @@ expect-no-chan
set-ts-use trx 0 0 states * TCH/F TCH/F - - TCH/HH TCH/HH TCH/H-
meas-rep lchan * * * * rxlev 20 rxqual 0 ta 0
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 3 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 3 0
diff --git a/tests/handover/test_congestion_intra_vs_inter_cell.ho_vty b/tests/handover/test_congestion_intra_vs_inter_cell.ho_vty
index d93f56cee..ddf6802f9 100644
--- a/tests/handover/test_congestion_intra_vs_inter_cell.ho_vty
+++ b/tests/handover/test_congestion_intra_vs_inter_cell.ho_vty
@@ -12,7 +12,7 @@ meas-rep lchan 0 0 6 0 rxlev 30 rxqual 0 ta 0 neighbors 20
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 6 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 6 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - TCH/H- - *
expect-ts-use trx 1 0 states * - - - - - - *
@@ -27,7 +27,7 @@ meas-rep lchan 0 0 6 0 rxlev 31 rxqual 0 ta 0 neighbors 20
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - - TCH/H- *
expect-ts-use trx 1 0 states * - - - - - - *
@@ -42,7 +42,7 @@ meas-rep lchan 0 0 6 0 rxlev 31 rxqual 0 ta 0 neighbors 21
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - - TCH/H- *
expect-ts-use trx 1 0 states * - - - - - - *
@@ -57,7 +57,7 @@ meas-rep lchan 0 0 6 0 rxlev 31 rxqual 0 ta 0 neighbors 20
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - - TCH/H- *
expect-ts-use trx 1 0 states * - - - - - - *
@@ -72,7 +72,7 @@ meas-rep lchan 0 0 6 0 rxlev 31 rxqual 0 ta 0 neighbors 31
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - - TCH/H- *
expect-ts-use trx 1 0 states * - - - - - - *
@@ -87,7 +87,7 @@ meas-rep lchan 0 0 6 0 rxlev 30 rxqual 0 ta 0 neighbors 30
expect-no-chan
congestion-check
-expect-ho from lchan 0 0 6 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 6 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - TCH/H- - *
expect-ts-use trx 1 0 states * - - - - - - *
diff --git a/tests/handover/test_disabled_ho_and_as.ho_vty b/tests/handover/test_disabled_ho_and_as.ho_vty
index ffd031147..586c3a70d 100644
--- a/tests/handover/test_disabled_ho_and_as.ho_vty
+++ b/tests/handover/test_disabled_ho_and_as.ho_vty
@@ -19,7 +19,7 @@ network
bts 0
handover2 assignment 1
meas-rep lchan 0 0 5 0 rxlev 0 rxqual 0 ta 0 neighbors 30
-expect-ho from lchan 0 0 5 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F - - - - - -
network
bts 0
diff --git a/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment.ho_vty b/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment.ho_vty
index 85b00e87d..6990132ee 100644
--- a/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment.ho_vty
+++ b/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment.ho_vty
@@ -22,11 +22,11 @@ meas-rep lchan 0 0 5 0 rxlev 40 rxqual 0 ta 0 neighbors 30
expect-ts-use trx 0 0 states * TCH/F TCH/F TCH/F TCH/F TCH/F pdch *
congestion-check
-expect-ho from lchan 0 0 5 0 to lchan 0 0 6 0
+expect-as from lchan 0 0 5 0 to lchan 0 0 6 0
expect-ts-use trx 0 0 states * TCH/F TCH/F TCH/F TCH/F pdch TCH/H- *
congestion-check
-expect-ho from lchan 0 0 4 0 to lchan 0 0 6 1
+expect-as from lchan 0 0 4 0 to lchan 0 0 6 1
expect-ts-use trx 0 0 states * TCH/F TCH/F TCH/F pdch pdch TCH/HH *
congestion-check
@@ -37,11 +37,11 @@ meas-rep lchan 0 0 4 0 rxlev 40 rxqual 0 ta 0 neighbors 30
expect-ts-use trx 0 0 states * TCH/F TCH/F TCH/F TCH/F pdch TCH/HH *
congestion-check
-expect-ho from lchan 0 0 4 0 to lchan 0 0 5 0
+expect-as from lchan 0 0 4 0 to lchan 0 0 5 0
expect-ts-use trx 0 0 states * TCH/F TCH/F TCH/F pdch TCH/H- TCH/HH *
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 5 1
+expect-as from lchan 0 0 1 0 to lchan 0 0 5 1
expect-ts-use trx 0 0 states * - TCH/F TCH/F pdch TCH/HH TCH/HH *
congestion-check
@@ -52,11 +52,11 @@ meas-rep lchan 0 0 1 0 rxlev 40 rxqual 0 ta 0 neighbors 30
expect-ts-use trx 0 0 states * TCH/F TCH/F TCH/F pdch TCH/HH TCH/HH *
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 4 0
+expect-as from lchan 0 0 1 0 to lchan 0 0 4 0
expect-ts-use trx 0 0 states * - TCH/F TCH/F TCH/H- TCH/HH TCH/HH *
congestion-check
-expect-ho from lchan 0 0 2 0 to lchan 0 0 4 1
+expect-as from lchan 0 0 2 0 to lchan 0 0 4 1
expect-ts-use trx 0 0 states * - - TCH/F TCH/HH TCH/HH TCH/HH *
congestion-check
diff --git a/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty b/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty
index a7984572d..08bc151ec 100644
--- a/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty
+++ b/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty
@@ -14,14 +14,14 @@ set-ts-use trx 0 0 states * TCH/F - - - * * *
# (there must be at least one measurement report on each lchan for congestion check to work)
meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 4 0
+expect-as from lchan 0 0 1 0 to lchan 0 0 4 0
expect-ts-use trx 0 0 states * pdch - - TCH/H- * * *
# Again with one more TCH/H occupied, there will still be two free TCH/H after HO on the dyn TS
set-ts-use trx 0 0 states * TCH/F - - TCH/H- * * *
meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 4 1
+expect-as from lchan 0 0 1 0 to lchan 0 0 4 1
expect-ts-use trx 0 0 states * pdch - - TCH/HH * * *
# Again, with the target being a dyn TS
@@ -36,12 +36,12 @@ network
set-ts-use trx 1 0 states * TCH/F TCH/F - pdch * * *
meas-rep lchan 1 * * * rxlev 40 rxqual 0 ta 0 neighbors 30
congestion-check
-expect-ho from lchan 1 0 1 0 to lchan 1 0 4 0
+expect-as from lchan 1 0 1 0 to lchan 1 0 4 0
expect-ts-use trx 1 0 states * pdch TCH/F - TCH/H- * * *
# Again with one more TCH/H occupied, there will still be two free TCH/H after HO on the dyn TS
set-ts-use trx 1 0 states * TCH/F TCH/F - TCH/H- * * *
meas-rep lchan 1 * * * rxlev 40 rxqual 0 ta 0 neighbors 30
congestion-check
-expect-ho from lchan 1 0 1 0 to lchan 1 0 4 1
+expect-as from lchan 1 0 1 0 to lchan 1 0 4 1
expect-ts-use trx 1 0 states * pdch TCH/F - TCH/HH * * *
diff --git a/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty b/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty
index de9595b48..bf1edf22b 100644
--- a/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty
+++ b/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty
@@ -14,14 +14,14 @@ set-ts-use trx 0 0 states * TCH/H- - - - * * *
# (there must be at least one measurement report on each lchan for congestion check to work)
meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 2 0
+expect-as from lchan 0 0 1 0 to lchan 0 0 2 0
expect-ts-use trx 0 0 states * pdch TCH/F - - * * *
# Again with one more TCH/F occupied, there will still be two free TCH/F after HO on the dyn TS
set-ts-use trx 0 0 states * TCH/H- - - TCH/F * * *
meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30
congestion-check
-expect-ho from lchan 0 0 1 0 to lchan 0 0 2 0
+expect-as from lchan 0 0 1 0 to lchan 0 0 2 0
expect-ts-use trx 0 0 states * pdch TCH/F - TCH/F * * *
# (TCH/H -> TCH/F onto a dyn TS will always make TCH/H congestion worse, so there is no useful test case left here)
diff --git a/tests/handover/test_dyn_ts_favor_moving_half_used_tch_h.ho_vty b/tests/handover/test_dyn_ts_favor_moving_half_used_tch_h.ho_vty
index b25cf96a6..6548360e8 100644
--- a/tests/handover/test_dyn_ts_favor_moving_half_used_tch_h.ho_vty
+++ b/tests/handover/test_dyn_ts_favor_moving_half_used_tch_h.ho_vty
@@ -10,7 +10,7 @@ network
set-ts-use trx 0 0 states * - TCH/HH TCH/H- TCH/HH pdch - -
meas-rep lchan * * * * rxlev 30 rxqual 0 ta 0
congestion-check
-expect-ho from lchan 0 0 3 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 3 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F TCH/HH pdch TCH/HH pdch - -
# clear measurements for the next run
@@ -24,7 +24,7 @@ meas-rep lchan 0 0 3 0 rxlev 31 rxqual 0 ta 0
meas-rep lchan 0 0 4 0 rxlev 32 rxqual 0 ta 0
meas-rep lchan 0 0 4 1 rxlev 33 rxqual 0 ta 0
congestion-check
-expect-ho from lchan 0 0 3 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 3 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F TCH/HH pdch TCH/HH pdch - -
# clear measurements for the next run
@@ -38,5 +38,5 @@ meas-rep lchan 0 0 3 0 rxlev 33 rxqual 0 ta 0
meas-rep lchan 0 0 4 0 rxlev 32 rxqual 0 ta 0
meas-rep lchan 0 0 4 1 rxlev 31 rxqual 0 ta 0
congestion-check
-expect-ho from lchan 0 0 3 0 to lchan 0 0 1 0
+expect-as from lchan 0 0 3 0 to lchan 0 0 1 0
expect-ts-use trx 0 0 states * TCH/F TCH/HH pdch TCH/HH pdch - -