aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-04-14 13:27:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-04-14 13:27:36 +0200
commit888052e71c3cd8adb854c8deb957df29607d687b (patch)
tree943267b8b080b31fb8961f1effb829cbac416abe /src
parent913dbcd55252c12c345ff302e134d71855e1e7b5 (diff)
mm_state_{gb,iu}_fsm: Improve naming for detach eventHEADpespin/sys-5389master
The E_(P)MM_IMPLICIT_DETACH event was actually sent and handled when the UE was considered to be detached, no matter the reason, be it due to implicit detach, or Detach Request received, etc. So, let's properly name the event to avoid confusions in the code. Related: SYS#5389 Change-Id: I224ea9db80b4d96696934cea06349dab036f919b
Diffstat (limited to 'src')
-rw-r--r--src/sgsn/gprs_gmm.c4
-rw-r--r--src/sgsn/gprs_gmm_fsm.c4
-rw-r--r--src/sgsn/gprs_mm_state_gb_fsm.c10
-rw-r--r--src/sgsn/gprs_mm_state_iu_fsm.c14
4 files changed, 16 insertions, 16 deletions
diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c
index f05167f3..edddd2d8 100644
--- a/src/sgsn/gprs_gmm.c
+++ b/src/sgsn/gprs_gmm.c
@@ -197,10 +197,10 @@ static void mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx, const char *log_text)
switch(ctx->ran_type) {
case MM_CTX_T_UTRAN_Iu:
- osmo_fsm_inst_dispatch(ctx->iu.mm_state_fsm, E_PMM_IMPLICIT_DETACH, NULL);
+ osmo_fsm_inst_dispatch(ctx->iu.mm_state_fsm, E_PMM_PS_DETACH, NULL);
break;
case MM_CTX_T_GERAN_Gb:
- osmo_fsm_inst_dispatch(ctx->gb.mm_state_fsm, E_MM_IMPLICIT_DETACH, NULL);
+ osmo_fsm_inst_dispatch(ctx->gb.mm_state_fsm, E_MM_GPRS_DETACH, NULL);
break;
}
diff --git a/src/sgsn/gprs_gmm_fsm.c b/src/sgsn/gprs_gmm_fsm.c
index caec5864..78946b5b 100644
--- a/src/sgsn/gprs_gmm_fsm.c
+++ b/src/sgsn/gprs_gmm_fsm.c
@@ -199,9 +199,9 @@ void gmm_fsm_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *dat
gmm_fsm_state_chg(fi, ST_GMM_DEREGISTERED);
default:
if (mmctx->ran_type == MM_CTX_T_GERAN_Gb)
- osmo_fsm_inst_dispatch(mmctx->gb.mm_state_fsm, E_MM_IMPLICIT_DETACH, NULL);
+ osmo_fsm_inst_dispatch(mmctx->gb.mm_state_fsm, E_MM_GPRS_DETACH, NULL);
else if (mmctx->ran_type == MM_CTX_T_UTRAN_Iu) {
- osmo_fsm_inst_dispatch(mmctx->iu.mm_state_fsm, E_PMM_IMPLICIT_DETACH, NULL);
+ osmo_fsm_inst_dispatch(mmctx->iu.mm_state_fsm, E_PMM_PS_DETACH, NULL);
mmctx->gb.llme = rat_chg->llme;
}
diff --git a/src/sgsn/gprs_mm_state_gb_fsm.c b/src/sgsn/gprs_mm_state_gb_fsm.c
index f8653f6b..6e812d31 100644
--- a/src/sgsn/gprs_mm_state_gb_fsm.c
+++ b/src/sgsn/gprs_mm_state_gb_fsm.c
@@ -71,7 +71,7 @@ static void st_mm_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data)
case E_MM_READY_TIMER_EXPIRY:
mm_state_gb_fsm_state_chg(fi, ST_MM_STANDBY);
break;
- case E_MM_IMPLICIT_DETACH:
+ case E_MM_GPRS_DETACH:
mm_state_gb_fsm_state_chg(fi, ST_MM_IDLE);
break;
case E_MM_PDU_RECEPTION:
@@ -90,7 +90,7 @@ static void st_mm_standby(struct osmo_fsm_inst *fi, uint32_t event, void *data)
case E_MM_PDU_RECEPTION:
mm_state_gb_fsm_state_chg(fi, ST_MM_READY);
break;
- case E_MM_IMPLICIT_DETACH:
+ case E_MM_GPRS_DETACH:
mm_state_gb_fsm_state_chg(fi, ST_MM_IDLE);
break;
}
@@ -105,13 +105,13 @@ static struct osmo_fsm_state mm_state_gb_fsm_states[] = {
.action = st_mm_idle,
},
[ST_MM_READY] = {
- .in_event_mask = X(E_MM_READY_TIMER_EXPIRY) | X(E_MM_RA_UPDATE) | X(E_MM_IMPLICIT_DETACH) | X(E_MM_PDU_RECEPTION),
+ .in_event_mask = X(E_MM_READY_TIMER_EXPIRY) | X(E_MM_RA_UPDATE) | X(E_MM_GPRS_DETACH) | X(E_MM_PDU_RECEPTION),
.out_state_mask = X(ST_MM_IDLE) | X(ST_MM_STANDBY),
.name = "Ready",
.action = st_mm_ready,
},
[ST_MM_STANDBY] = {
- .in_event_mask = X(E_MM_PDU_RECEPTION) | X(E_MM_IMPLICIT_DETACH),
+ .in_event_mask = X(E_MM_PDU_RECEPTION) | X(E_MM_GPRS_DETACH),
.out_state_mask = X(ST_MM_IDLE) | X(ST_MM_READY),
.name = "Standby",
.action = st_mm_standby,
@@ -121,7 +121,7 @@ static struct osmo_fsm_state mm_state_gb_fsm_states[] = {
const struct value_string mm_state_gb_fsm_event_names[] = {
OSMO_VALUE_STRING(E_MM_GPRS_ATTACH),
OSMO_VALUE_STRING(E_MM_PDU_RECEPTION),
- OSMO_VALUE_STRING(E_MM_IMPLICIT_DETACH),
+ OSMO_VALUE_STRING(E_MM_GPRS_DETACH),
OSMO_VALUE_STRING(E_MM_READY_TIMER_EXPIRY),
OSMO_VALUE_STRING(E_MM_RA_UPDATE),
{ 0, NULL }
diff --git a/src/sgsn/gprs_mm_state_iu_fsm.c b/src/sgsn/gprs_mm_state_iu_fsm.c
index 3f1336b2..b1604f83 100644
--- a/src/sgsn/gprs_mm_state_iu_fsm.c
+++ b/src/sgsn/gprs_mm_state_iu_fsm.c
@@ -61,7 +61,7 @@ static void st_pmm_detached(struct osmo_fsm_inst *fi, uint32_t event, void *data
case E_PMM_PS_ATTACH:
mm_state_iu_fsm_state_chg(fi, ST_PMM_CONNECTED);
break;
- case E_PMM_IMPLICIT_DETACH:
+ case E_PMM_PS_DETACH:
break;
}
}
@@ -75,7 +75,7 @@ static void st_pmm_connected(struct osmo_fsm_inst *fi, uint32_t event, void *dat
sgsn_ranap_iu_free(ctx);
mm_state_iu_fsm_state_chg(fi, ST_PMM_IDLE);
break;
- case E_PMM_IMPLICIT_DETACH:
+ case E_PMM_PS_DETACH:
sgsn_ranap_iu_release_free(ctx, NULL);
mm_state_iu_fsm_state_chg(fi, ST_PMM_DETACHED);
break;
@@ -98,7 +98,7 @@ static void st_pmm_idle(struct osmo_fsm_inst *fi, uint32_t event, void *data)
case E_PMM_PS_CONN_ESTABLISH:
mm_state_iu_fsm_state_chg(fi, ST_PMM_CONNECTED);
break;
- case E_PMM_IMPLICIT_DETACH:
+ case E_PMM_PS_DETACH:
mm_state_iu_fsm_state_chg(fi, ST_PMM_DETACHED);
break;
}
@@ -106,7 +106,7 @@ static void st_pmm_idle(struct osmo_fsm_inst *fi, uint32_t event, void *data)
static struct osmo_fsm_state mm_state_iu_fsm_states[] = {
[ST_PMM_DETACHED] = {
- .in_event_mask = X(E_PMM_PS_ATTACH) | X(E_PMM_IMPLICIT_DETACH),
+ .in_event_mask = X(E_PMM_PS_ATTACH) | X(E_PMM_PS_DETACH),
.out_state_mask = X(ST_PMM_CONNECTED),
.name = "Detached",
.action = st_pmm_detached,
@@ -115,14 +115,14 @@ static struct osmo_fsm_state mm_state_iu_fsm_states[] = {
.in_event_mask =
X(E_PMM_PS_CONN_RELEASE) |
X(E_PMM_RA_UPDATE) |
- X(E_PMM_IMPLICIT_DETACH),
+ X(E_PMM_PS_DETACH),
.out_state_mask = X(ST_PMM_DETACHED) | X(ST_PMM_IDLE),
.name = "Connected",
.action = st_pmm_connected,
},
[ST_PMM_IDLE] = {
.in_event_mask =
- X(E_PMM_IMPLICIT_DETACH) |
+ X(E_PMM_PS_DETACH) |
X(E_PMM_PS_CONN_ESTABLISH) |
X(E_PMM_PS_ATTACH),
.out_state_mask = X(ST_PMM_DETACHED) | X(ST_PMM_CONNECTED),
@@ -136,7 +136,7 @@ const struct value_string mm_state_iu_fsm_event_names[] = {
OSMO_VALUE_STRING(E_PMM_PS_ATTACH),
OSMO_VALUE_STRING(E_PMM_PS_CONN_RELEASE),
OSMO_VALUE_STRING(E_PMM_PS_CONN_ESTABLISH),
- OSMO_VALUE_STRING(E_PMM_IMPLICIT_DETACH),
+ OSMO_VALUE_STRING(E_PMM_PS_DETACH),
OSMO_VALUE_STRING(E_PMM_RA_UPDATE),
{ 0, NULL }
};