aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-29 19:59:07 +0200
committerpespin <pespin@sysmocom.de>2019-09-02 09:42:21 +0000
commit0b72240799c1cc961645a714a78b8c0209fdd7ab (patch)
tree4ce7b28ebaf54d0b3173f7261771e2d3a3720700 /include
parent8333ef10c9e2a3806e04dd9512dbb141d6cb13cc (diff)
Split enum gprs_pmm_state into Iu and Gb counterparts
Those two state sets are not part of the same state machine, and are used in different scenarios, so let's split them and handle them in Gb and Iu specific parts of struct sgsn_mm_ctx. This is required in order to improve related code (for instance, use osmocom fsm). Change-Id: I6100d607da316da0595886c6968704dd9ccfbde9
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/sgsn/gprs_gmm.h4
-rw-r--r--include/osmocom/sgsn/gprs_sgsn.h22
2 files changed, 16 insertions, 10 deletions
diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h
index 93163515a..6c72cda3f 100644
--- a/include/osmocom/sgsn/gprs_gmm.h
+++ b/include/osmocom/sgsn/gprs_gmm.h
@@ -49,9 +49,9 @@ void extract_subscr_hlr(struct sgsn_mm_ctx *ctx);
void pdp_ctx_detach_mm_ctx(struct sgsn_pdp_ctx *pdp);
-void mmctx_set_pmm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state);
+void mmctx_set_pmm_state(struct sgsn_mm_ctx *ctx, enum gprs_mm_state_iu state);
void mmctx_state_timer_start(struct sgsn_mm_ctx *mm, unsigned int T);
-void mmctx_set_mm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state);
+void mmctx_set_mm_state(struct sgsn_mm_ctx *ctx, enum gprs_mm_state_gb state);
void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg);
#endif /* _GPRS_GMM_H */
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h
index eea9fb0b9..f64e07b18 100644
--- a/include/osmocom/sgsn/gprs_sgsn.h
+++ b/include/osmocom/sgsn/gprs_sgsn.h
@@ -32,14 +32,17 @@ enum gprs_gmm_state {
GMM_DEREGISTERED_INIT, /* 4.1.3.3.1.4 */
};
-/* TS 23.060 6.1.1 and 6.1.2 Mobility management states A/Gb and Iu mode */
-enum gprs_pmm_state {
- PMM_DETACHED,
- PMM_CONNECTED,
- PMM_IDLE,
+/* TS 23.060 6.1.1 Mobility Management States (A/Gb mode) */
+enum gprs_mm_state_gb {
MM_IDLE,
MM_READY,
- MM_STANDBY,
+ MM_STANDBY
+};
+/* TS 23.060 6.1.2 Mobility Management States (Iu mode) */
+enum gprs_mm_state_iu {
+ PMM_DETACHED,
+ PMM_CONNECTED,
+ PMM_IDLE
};
enum gprs_mm_ctr {
@@ -138,7 +141,6 @@ struct sgsn_mm_ctx {
char imsi[GSM23003_IMSI_MAX_DIGITS+1];
enum gprs_gmm_state gmm_state;
- enum gprs_pmm_state pmm_state; /* Iu: page when in PMM-IDLE mode */
uint32_t p_tmsi;
uint32_t p_tmsi_old; /* old P-TMSI before new is confirmed */
uint32_t p_tmsi_sig;
@@ -158,9 +160,11 @@ struct sgsn_mm_ctx {
uint32_t tlli;
uint32_t tlli_new;
+ /* TS 23.060 6.1.1 Mobility Management States (A/Gb mode) */
+ enum gprs_mm_state_gb mm_state;
/* timer for mm state. state=READY: T3314 (aka TS 23.060 "READY timer") */
struct osmo_timer_list state_timer;
- unsigned int state_T; /* Txxxx number but only used for pmm_states */
+ unsigned int state_T; /* Txxxx number but only used for mm_state */
} gb;
struct {
int new_key;
@@ -175,6 +179,8 @@ struct sgsn_mm_ctx {
/* Voice Support Match Indicator */
struct ranap_ue_conn_ctx *ue_ctx;
struct service_info service;
+ /* TS 23.060 6.1.2 Mobility Management States (Iu mode) */
+ enum gprs_mm_state_iu mm_state;
} iu;
struct {
struct osmo_fsm_inst *fsm;