From eddf339871559f282fe615f9c618a1220bd97743 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 15 Nov 2017 12:25:47 +0100 Subject: mobile: Instead of putting semantic in a comment, use an enum The enum was created to understand the different states during the shutdown and find places where it is used. The normal transitions are like. Idle -> Imsi Detach -> L1 Reset -> Done Idle -> L1 Reset -> Done The shutdown can get stuck in case: * Out of memory situation while handling IMSI detach (timeout) * Never receiving l1 reset acknnowledgment. The code could benefit from the move to osmo fsm to deal with proper timeouts. Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1 --- src/host/layer23/include/osmocom/bb/common/osmocom_data.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/host/layer23/include/osmocom/bb/common/osmocom_data.h') diff --git a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h index 21b28805..7a935f97 100644 --- a/src/host/layer23/include/osmocom/bb/common/osmocom_data.h +++ b/src/host/layer23/include/osmocom/bb/common/osmocom_data.h @@ -54,6 +54,13 @@ struct rx_meas_stat { int16_t s, rl_fail; }; +enum { + MS_SHUTDOWN_NONE = 0, + MS_SHUTDOWN_IMSI_DETACH = 1, + MS_SHUTDOWN_WAIT_RESET = 2, + MS_SHUTDOWN_COMPL = 3, +}; + /* One Mobilestation for osmocom */ struct osmocom_ms { struct llist_head entity; -- cgit v1.2.3