aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-04-16 18:17:45 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-23 16:04:18 +0000
commit02d20da18348c5e45e2e4934d246f33b966fdf7a (patch)
tree7ff07e87c4b8ed69e8bb9b1042bbea4138c68efe
parent74e4daa6956404485027f17ed5c5a0c2acd39250 (diff)
gscon: remove dead code
The state ST_WAIT_MODE_MODIFY_ACK can never be reached by the current FSM model. - Remove ST_WAIT_MODE_MODIFY_ACK and all related code Change-Id: Iacaae2ee50ca1956066b7dce4517bbc9c2b0897e Related: OS#2762
-rw-r--r--include/osmocom/bsc/bsc_subscr_conn_fsm.h2
-rw-r--r--src/libbsc/bsc_subscr_conn_fsm.c44
2 files changed, 1 insertions, 45 deletions
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index 942152877..9498d9f2e 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -21,8 +21,6 @@ enum gscon_fsm_event {
GSCON_EV_RR_ASS_COMPL,
/* RR ASSIGNMENT FAIL received */
GSCON_EV_RR_ASS_FAIL,
- /* RR MODE MODIFY ACK received */
- GSCON_EV_RR_MODE_MODIFY_ACK,
/* RSL RLL Release Indication */
GSCON_EV_RLL_REL_IND,
diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index 3e0ccc004..176bfbf28 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -56,8 +56,6 @@ enum gscon_fsm_states {
ST_ACTIVE,
/* during assignment; waiting for ASS_CMPL */
ST_WAIT_ASS_CMPL,
- /* during assignment; waiting for MODE_MODIFY_ACK */
- ST_WAIT_MODE_MODIFY_ACK,
/* BSSMAP CLEAR has been received */
ST_CLEARING,
@@ -99,7 +97,6 @@ static const struct value_string gscon_fsm_event_names[] = {
{GSCON_EV_RR_ASS_COMPL, "RR_ASSIGN_COMPL"},
{GSCON_EV_RR_ASS_FAIL, "RR_ASSIGN_FAIL"},
- {GSCON_EV_RR_MODE_MODIFY_ACK, "RR_MODE_MODIFY_ACK"},
{GSCON_EV_RLL_REL_IND, "RLL_RELEASE.ind"},
{GSCON_EV_RSL_CONN_FAIL, "RSL_CONN_FAIL.ind"},
{GSCON_EV_RSL_CLEAR_COMPL, "RSL_CLEAR_COMPLETE"},
@@ -722,39 +719,6 @@ static void gscon_fsm_wait_crcx_msc(struct osmo_fsm_inst *fi, uint32_t event, vo
}
}
-/* We're waiting for a MODE MODIFY ACK from MS + BTS */
-static void gscon_fsm_wait_mode_modify_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
-{
- struct gsm_subscriber_connection *conn = fi->priv;
- struct gsm_lchan *lchan = conn->lchan;
-
- switch (event) {
- case GSCON_EV_RR_MODE_MODIFY_ACK:
- /* we assume that not only have we received the RR MODE_MODIFY_ACK, but
- * actually that also the BTS side of the channel mode has been changed accordingly */
- osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
-
- /* FIXME: Check if this requires special handling. For now I assume that the send_ass_compl()
- * can be used. But I am not sure. */
- send_ass_compl(lchan, fi, false);
-
- break;
- /* FIXME: Do we need to handle DTAP traffic in this state? Maybe yes? Needs to be checked. */
- case GSCON_EV_MO_DTAP:
- forward_dtap(conn, (struct msgb *)data, fi);
- break;
- case GSCON_EV_MT_DTAP:
- submit_dtap(conn, (struct msgb *)data, fi);
- break;
- case GSCON_EV_TX_SCCP:
- sigtran_send(conn, (struct msgb *)data, fi);
- break;
- default:
- OSMO_ASSERT(false);
- break;
- }
-}
-
static void gscon_fsm_clearing(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct gsm_subscriber_connection *conn = fi->priv;
@@ -869,7 +833,7 @@ static const struct osmo_fsm_state gscon_fsm_states[] = {
.in_event_mask = EV_TRANSPARENT_SCCP | S(GSCON_EV_A_ASSIGNMENT_CMD) |
S(GSCON_EV_A_HO_REQ) | S(GSCON_EV_HO_START),
.out_state_mask = S(ST_CLEARING) | S(ST_WAIT_CRCX_BTS) | S(ST_WAIT_ASS_CMPL) |
- S(ST_WAIT_MODE_MODIFY_ACK) | S(ST_WAIT_MO_HO_CMD) | S(ST_WAIT_HO_COMPL),
+ S(ST_WAIT_MO_HO_CMD) | S(ST_WAIT_HO_COMPL),
.action = gscon_fsm_active,
},
[ST_WAIT_CRCX_BTS] = {
@@ -896,12 +860,6 @@ static const struct osmo_fsm_state gscon_fsm_states[] = {
.out_state_mask = S(ST_ACTIVE),
.action = gscon_fsm_wait_crcx_msc,
},
- [ST_WAIT_MODE_MODIFY_ACK] = {
- .name = OSMO_STRINGIFY(WAIT_MODE_MODIFY_ACK),
- .in_event_mask = EV_TRANSPARENT_SCCP | S(GSCON_EV_RR_MODE_MODIFY_ACK),
- .out_state_mask = S(ST_ACTIVE) | S(ST_CLEARING),
- .action = gscon_fsm_wait_mode_modify_ack,
- },
[ST_CLEARING] = {
.name = OSMO_STRINGIFY(CLEARING),
.in_event_mask = S(GSCON_EV_RSL_CLEAR_COMPL),