summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb/modem/modem.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-05-02 13:47:51 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-05-03 18:38:34 +0200
commitfbd2f733a73ffda6545705098b28684b16d4675e (patch)
treee14f906d842fb06ba988066b9e1501b4554e75c4 /src/host/layer23/include/osmocom/bb/modem/modem.h
parent8d996de55b42b9288f7eaaae67c87a41da84ba21 (diff)
layer23: modem: Delay GPRS attach at startup until modem is ready
Wait until SIM is ready, network system information ws obtained and it announced the MS is able to use GPRS against it. Change-Id: I5029d9e8a47b8544b3b803c4db6352269bac3c0e
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/modem/modem.h')
-rw-r--r--src/host/layer23/include/osmocom/bb/modem/modem.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/modem/modem.h b/src/host/layer23/include/osmocom/bb/modem/modem.h
index 3945804d..29d2571a 100644
--- a/src/host/layer23/include/osmocom/bb/modem/modem.h
+++ b/src/host/layer23/include/osmocom/bb/modem/modem.h
@@ -3,4 +3,16 @@
#include <stdbool.h>
int modem_start(void);
+int modem_gprs_attach_if_needed(struct osmocom_ms *ms);
+enum modem_state {
+ MODEM_ST_IDLE,
+ MODEM_ST_ATTACHING,
+ MODEM_ST_ATTACHED
+};
+
+struct modem_app {
+ struct osmocom_ms *ms;
+ enum modem_state modem_state;
+};
+extern struct modem_app app_data;