summaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2016-04-08 12:14:56 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2016-04-08 12:14:56 +0200
commit5e007d9445b1fe0233b8d4618d6c1a01ec446788 (patch)
tree18340eba4ef807351b8770e1e70b35d9d63371ce /openbsc/src/gprs/gprs_gmm.c
parent42024336fef37effeb04e61d819ef46e1fd0f2db (diff)
gprs: Use different RAB IDs for activation
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index c1a4e50..ae0e200 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -698,9 +698,23 @@ static int gsm48_tx_gmm_service_rej(struct sgsn_mm_ctx *mm,
static int gsm48_tx_gmm_ra_upd_ack(struct sgsn_mm_ctx *mm);
+void activate_pdp_rabs(struct sgsn_mm_ctx *ctx)
+{
+ /* Send RAB activation requests for all PDP contexts */
+ if (ctx->iu.service.type == 1) {
+ struct sgsn_pdp_ctx *pdp;
+ uint8_t rab_id;
+ llist_for_each_entry(pdp, &ctx->pdp_list, list) {
+ rab_id = rab_id_from_mm_ctx(ctx);
+ iu_rab_act_ps(rab_id, pdp);
+ }
+ }
+}
+
/* Check if we can already authorize a subscriber */
static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
{
+ int rc;
#ifndef PTMSI_ALLOC
struct sgsn_signal_data sig_data;
#endif
@@ -783,15 +797,11 @@ static int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx)
/* 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(1, pdp);
- }
- }
+ rc = gsm48_tx_gmm_service_ack(ctx);
- return gsm48_tx_gmm_service_ack(ctx);
+ activate_pdp_rabs(ctx);
+
+ return rc;
case GSM48_MT_GMM_RA_UPD_REQ:
/* Send RA UPDATE ACCEPT */
return gsm48_tx_gmm_ra_upd_ack(ctx);