aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_llc.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-06-17 09:31:16 +0800
committerHarald Welte <laforge@gnumonks.org>2012-06-17 09:31:16 +0800
commitfaa70ff2c6c3f592b5601aaa73a3a9a851a6d3c1 (patch)
tree3b04a79f1665c01e70e00a0fc9b32552e3c5ac3c /openbsc/src/gprs/gprs_llc.c
parent0d5e8e0b565da40ab5213d873c58f41b5d2d4556 (diff)
libgb: remove dependency of BSSGP to include sgsn/gmm internal structs
Diffstat (limited to 'openbsc/src/gprs/gprs_llc.c')
-rw-r--r--openbsc/src/gprs/gprs_llc.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index b26f263f2..c1327b6cd 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -36,6 +36,26 @@
#include <openbsc/crc24.h>
#include <openbsc/sgsn.h>
+/* Entry function from upper level (LLC), asking us to transmit a BSSGP PDU
+ * to a remote MS (identified by TLLI) at a BTS identified by its BVCI and NSEI */
+static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx)
+{
+ struct bssgp_dl_ud_par dup;
+ const uint8_t qos_profile_default[3] = { 0x00, 0x00, 0x20 };
+
+ dup.tlli = NULL;
+ dup.imsi = mmctx->imsi;
+ 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.pdu_lifetime = 1000; /* centi-seconds */
+ memcpy(&dup.qos_profile, qos_profile_default,
+ sizeof(qos_profile_default));
+
+ return gprs_bssgp_tx_dl_ud(msg, 1000, &dup);
+}
+
+
/* Section 8.9.9 LLC layer parameter default values */
static const struct gprs_llc_params llc_default_params[] = {
[1] = {
@@ -308,7 +328,7 @@ int gprs_llc_tx_u(struct msgb *msg, uint8_t sapi, int command,
/* Identifiers passed down: (BVCI, NSEI) */
/* Send BSSGP-DL-UNITDATA.req */
- return gprs_bssgp_tx_dl_ud(msg, NULL);
+ return _bssgp_tx_dl_ud(msg, 1000, NULL);
}
/* Send XID response to LLE */
@@ -420,7 +440,7 @@ int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command,
/* Identifiers passed down: (BVCI, NSEI) */
/* Send BSSGP-DL-UNITDATA.req */
- return gprs_bssgp_tx_dl_ud(msg, mmctx);
+ return _bssgp_tx_dl_ud(msg, mmctx);
}
/* According to 6.4.1.6 / Figure 11 */