aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-06-15 14:14:21 +0200
committerpespin <pespin@sysmocom.de>2021-06-17 14:05:40 +0000
commitb9a62638230b65d3620adb949ad1a55e1130d8f9 (patch)
tree417740935d0a142cb8b494b25c1b72e325a2d8fd
parent35b6b25433b4bc1c1f20cc9d0fa477591cb0e0e7 (diff)
Introduce VTY command to disable srvcc fast-return on target BTS
-rw-r--r--include/osmocom/bsc/bsc_subscr_conn_fsm.h6
-rw-r--r--include/osmocom/bsc/bts.h3
-rw-r--r--include/osmocom/bsc/gsm_data.h7
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c7
-rw-r--r--src/osmo-bsc/bsc_vty.c18
-rw-r--r--src/osmo-bsc/bts.c3
-rw-r--r--src/osmo-bsc/handover_fsm.c7
-rw-r--r--src/osmo-bsc/osmo_bsc_bssap.c9
8 files changed, 47 insertions, 13 deletions
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index a681bc4aa..d7deb06a8 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -93,6 +93,8 @@ bool gscon_is_sccplite(struct gsm_subscriber_connection *conn);
static inline const struct osmo_plmn_id *gscon_last_eutran_plmn(const struct gsm_subscriber_connection *conn)
{
- return (conn && conn->last_eutran_plmn_valid) ?
- &conn->last_eutran_plmn : NULL;
+ return (conn && conn->fast_return.allowed &&
+ conn->fast_return.last_eutran_plmn_valid) ?
+ &conn->fast_return.last_eutran_plmn :
+ NULL;
}
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 72f83ebef..4436ed024 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -539,6 +539,9 @@ struct gsm_bts {
/* We will ignore CHAN RQD with access delay greater than rach_max_delay */
uint8_t rach_max_delay;
+
+ /* Is Fast return to LTE allowed during Chan Release in this BTS? */
+ bool srvcc_fast_return_allowed;
};
#define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i])
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index d3d5b7dee..37e38993d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -388,8 +388,11 @@ struct gsm_subscriber_connection {
struct gsm48_classmark3 cm3;
bool cm3_valid;
- bool last_eutran_plmn_valid;
- struct osmo_plmn_id last_eutran_plmn;
+ struct {
+ bool allowed; /* Is fast return to LTE allowed once the conn is released? */
+ bool last_eutran_plmn_valid; /* Is information stored in field below available? */
+ struct osmo_plmn_id last_eutran_plmn;
+ } fast_return;
};
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 8b89e1a53..c4a787567 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -885,10 +885,11 @@ static void gscon_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *d
bsc_subscr_set_imsi(conn->bsub, mi_imsi.imsi);
}
if (TLVP_PRESENT(tp, GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID)) {
- conn->last_eutran_plmn_valid = true;
- osmo_plmn_from_bcd(TLVP_VAL(tp, GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID), &conn->last_eutran_plmn);
+ conn->fast_return.allowed = true; /* Always allowed for CSFB */
+ conn->fast_return.last_eutran_plmn_valid = true;
+ osmo_plmn_from_bcd(TLVP_VAL(tp, GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID), &conn->fast_return.last_eutran_plmn);
LOGPFSML(fi, LOGL_DEBUG, "subscr comes from E-UTRAN PLMN %s\n",
- osmo_plmn_name(&conn->last_eutran_plmn));
+ osmo_plmn_name(&conn->fast_return.last_eutran_plmn));
}
gscon_update_id(conn);
break;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 880bd9403..707d99c2a 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1289,6 +1289,9 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
VTY_NEWLINE);
}
+ if (!bts->srvcc_fast_return_allowed)
+ vty_out(vty, " srvcc fast-return forbid%s", VTY_NEWLINE);
+
/* BS/MS Power Control parameters */
config_write_power_ctrl(vty, 2, &bts->bs_power_ctrl);
config_write_power_ctrl(vty, 2, &bts->ms_power_ctrl);
@@ -5001,6 +5004,20 @@ DEFUN_USRATTR(cfg_bts_interf_meas_level_bounds,
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_srvcc_fast_return, cfg_bts_srvcc_fast_return_cmd,
+ "srvcc fast-return (allow|forbid)",
+ "SRVCC Configuration\n"
+ "Allow or forbid Fast Return to 4G on Channel Release in this BTS\n"
+ "Allow\n"
+ "Forbid\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ bts->srvcc_fast_return_allowed = strcmp(argv[0], "allow") == 0;
+ return CMD_SUCCESS;
+}
+
#define BS_POWER_CONTROL_CMD \
"bs-power-control"
#define MS_POWER_CONTROL_CMD \
@@ -8105,6 +8122,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_rep_rxqual_cmd);
install_element(BTS_NODE, &cfg_bts_interf_meas_avg_period_cmd);
install_element(BTS_NODE, &cfg_bts_interf_meas_level_bounds_cmd);
+ install_element(BTS_NODE, &cfg_bts_srvcc_fast_return_cmd);
neighbor_ident_vty_init();
/* See also handover commands added on bts level from handover_vty.c */
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 4b0204226..e140565fa 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -362,6 +362,9 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, struct gsm_bts_sm *bts_sm
bts->rach_max_delay = 63;
+ /* SRVCC is enabled by default */
+ bts->srvcc_fast_return_allowed = true;
+
return bts;
}
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 8141a5db3..08b1dc7c5 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -721,9 +721,10 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn,
}
if (req->last_eutran_plmn_valid) {
- conn->last_eutran_plmn_valid = true;
- memcpy(&conn->last_eutran_plmn, &req->last_eutran_plmn,
- sizeof(conn->last_eutran_plmn));
+ conn->fast_return.allowed = ho->new_bts->srvcc_fast_return_allowed;
+ conn->fast_return.last_eutran_plmn_valid = true;
+ memcpy(&conn->fast_return.last_eutran_plmn, &req->last_eutran_plmn,
+ sizeof(conn->fast_return.last_eutran_plmn));
}
lchan_activate(ho->new_lchan, &info);
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index da0429bf2..563a957be 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -460,7 +460,7 @@ static int bssmap_handle_clear_cmd(struct gsm_subscriber_connection *conn,
}
if (TLVP_PRESENT(&tp, GSM0808_IE_CSFB_INDICATION) &&
- !conn->last_eutran_plmn_valid) {
+ !conn->fast_return.last_eutran_plmn_valid) {
LOGPFSML(conn->fi, LOGL_NOTICE,
"Clear Command: CSFB Indication present, "
"but subscriber has no Last Used E-UTRAN PLMN Id! "
@@ -1372,10 +1372,13 @@ int bsc_tx_bssmap_ho_required(struct gsm_lchan *lchan, const struct gsm0808_cell
.current_channel_type_1 = gsm0808_current_channel_type_1(lchan->type),
};
- if (conn->last_eutran_plmn_valid) {
+ /* Even if fast_return is now allowed locally, we may still want to
+ * signal the Last EUTRAN PLMN Id to the new cell, since destination
+ * config may differ and allow fast return */
+ if (conn->fast_return.last_eutran_plmn_valid) {
params.old_bss_to_new_bss_info_present = true;
params.old_bss_to_new_bss_info.last_eutran_plmn_id_present = true;
- params.old_bss_to_new_bss_info.last_eutran_plmn_id = conn->last_eutran_plmn;
+ params.old_bss_to_new_bss_info.last_eutran_plmn_id = conn->fast_return.last_eutran_plmn;
}
switch (lchan->type) {