aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-02-23 20:59:07 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:12 +0100
commit7df570525181d3ff4305d5e690f10f99e5426332 (patch)
treed321e4abb9e8446329b6b00d40bd44493eab5835
parentda7424cc548ad99e0ad7395bd668c505f5e5f66f (diff)
WIP: Try and activate RABs after service request
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h6
-rw-r--r--openbsc/src/gprs/gprs_gmm.c15
2 files changed, 20 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index ad8add518..4f34f1b88 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -102,6 +102,11 @@ enum sgsn_ran_type {
MM_CTX_T_GERAN_Iu,
};
+struct service_info {
+ uint8_t type;
+ uint16_t pdp_status;
+};
+
/* According to TS 03.60, Table 5: SGSN MM and PDP Contexts */
/* Extended by 3GPP TS 23.060, Table 6: SGSN MM and PDP Contexts */
struct sgsn_mm_ctx {
@@ -142,6 +147,7 @@ struct sgsn_mm_ctx {
/* LIPA Allowed */
/* Voice Support Match Indicator */
void *ue_ctx;
+ struct service_info service;
} iu;
/* VLR number */
uint32_t new_sgsn_addr;
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index d22411a3c..ee3f9bfed 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -742,7 +742,17 @@ static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
return gsm48_tx_gmm_att_ack(ctx);
case GSM48_MT_GMM_SERVICE_REQ:
- /* TODO: State transition */
+ /* TODO: PMM State transition */
+ ctx->pending_req = 0;
+
+ /* Send RAB activation requests for all PDP contexts */
+ if (ctx->iu.service.type == 1) {
+ struct sgsn_pdp_ctx *pdp;
+ llist_for_each_entry(pdp, &ctx->pdp_list, list) {
+ iu_rab_act_ps(pdp);
+ }
+ }
+
return gsm48_tx_gmm_service_ack(ctx);
default:
LOGMMCTXP(LOGL_ERROR, ctx,
@@ -1466,6 +1476,9 @@ static int gsm48_rx_gmm_service_req(struct sgsn_mm_ctx *ctx, struct msgb *msg)
goto rejected;
}
+ ctx->iu.service.type = service_type;
+
+ /* TODO: Handle those only in case of accept? */
/* Look at PDP Context Status IE and see if MS's view of
* activated/deactivated NSAPIs agrees with our view */
if (TLVP_PRESENT(&tp, GSM48_IE_GMM_PDP_CTX_STATUS)) {