diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-09-06 22:14:29 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-09-06 22:14:29 +0200 |
commit | e8f40c257fff9719aa7be4e39e1a3df02ed58f77 (patch) | |
tree | fbc42939be87e78369567d988d2ef330b57666d5 /openbsc/src/gprs | |
parent | e4227988665cae6e44fc0f77c2463aae759f15ca (diff) |
SGSN: use BSSGP flow-control implementation of libosmocorelaforge/bssgp_fc
Diffstat (limited to 'openbsc/src/gprs')
-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 |
3 files changed, 6 insertions, 0 deletions
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); |