diff options
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 3 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 2 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_llc.c | 1 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 3 |
4 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 6a653b7fe..dd241b9e2 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -7,6 +7,7 @@ #include <osmocom/core/timer.h> #include <osmocom/gsm/gsm48.h> +#include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/crypt/gprs_cipher.h> @@ -110,6 +111,8 @@ struct sgsn_mm_ctx { enum gprs_t3350_mode t3350_mode; uint8_t t3370_id_type; + + struct bssgp_flow_control fc; }; /* look-up a SGSN MM context based on TLLI + RAI */ diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 72d9e764b..5acbbe095 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -707,6 +707,7 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg, ctx = sgsn_mm_ctx_alloc(0, &ra_id); if (!ctx) return gsm48_tx_gmm_att_rej_oldmsg(msg, GMM_CAUSE_NET_FAIL); + bssgp_fc_ms_init(&ctx->fc, msgb_bvci(msg), msgb_nsei(msg)); strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi)); #endif } @@ -725,6 +726,7 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg, * Context will not have an IMSI ultil ID RESP is received */ ctx = sgsn_mm_ctx_alloc(msgb_tlli(msg), &ra_id); ctx->p_tmsi = tmsi; + bssgp_fc_ms_init(&ctx->fc, msgb_bvci(msg), msgb_nsei(msg)); } ctx->tlli = msgb_tlli(msg); ctx->llme = llme; diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 6244d186f..b51388093 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -52,6 +52,7 @@ static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx) dup.drx_parms = mmctx->drx_parms; dup.ms_ra_cap.len = mmctx->ms_radio_access_capa.len; dup.ms_ra_cap.v = mmctx->ms_radio_access_capa.buf; + dup.fc = &mmctx->fc; } memcpy(&dup.qos_profile, qos_profile_default, sizeof(qos_profile_default)); diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 84bf512ae..748204a07 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -168,6 +168,9 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli, ctx->mm_state = GMM_DEREGISTERED; ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, tlli); INIT_LLIST_HEAD(&ctx->pdp_list); + /* the output call-back of the per-MS flow control is the + * per-BSS flow control input */ + ctx->fc.out_cb = &bssgp_fc_in; llist_add(&ctx->list, &sgsn_mm_ctxts); |